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_definitions.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 legacy 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="LOGICALCAMERA">
43        Entry is required for logical multi-camera capability.
44    </tag>
45    <tag id="HEIC">
46        Entry is required for devices with HEIC (High Efficiency Image Format) support.
47    </tag>
48    <tag id="FUTURE">
49        Entry is  under-specified and is not required for now. This is for book-keeping purpose,
50        do not implement or use it, it may be revised for future.
51    </tag>
52  </tags>
53
54  <types>
55    <typedef name="pairFloatFloat">
56      <language name="java">android.util.Pair&lt;Float,Float&gt;</language>
57    </typedef>
58    <typedef name="pairDoubleDouble">
59      <language name="java">android.util.Pair&lt;Double,Double&gt;</language>
60    </typedef>
61    <typedef name="rectangle">
62      <language name="java">android.graphics.Rect</language>
63    </typedef>
64    <typedef name="size">
65      <language name="java">android.util.Size</language>
66    </typedef>
67    <typedef name="string">
68      <language name="java">String</language>
69    </typedef>
70    <typedef name="boolean">
71      <language name="java">boolean</language>
72    </typedef>
73    <typedef name="imageFormat">
74      <language name="java">int</language>
75    </typedef>
76    <typedef name="streamConfigurationMap">
77      <language name="java">android.hardware.camera2.params.StreamConfigurationMap</language>
78    </typedef>
79    <typedef name="streamConfiguration">
80      <language name="java">android.hardware.camera2.params.StreamConfiguration</language>
81    </typedef>
82    <typedef name="recommendedStreamConfiguration">
83      <language
84      name="java">android.hardware.camera2.params.RecommendedStreamConfiguration</language>
85    </typedef>
86    <typedef name="streamConfigurationDuration">
87      <language name="java">android.hardware.camera2.params.StreamConfigurationDuration</language>
88    </typedef>
89    <typedef name="face">
90      <language name="java">android.hardware.camera2.params.Face</language>
91    </typedef>
92    <typedef name="meteringRectangle">
93      <language name="java">android.hardware.camera2.params.MeteringRectangle</language>
94    </typedef>
95    <typedef name="rangeFloat">
96      <language name="java">android.util.Range&lt;Float&gt;</language>
97    </typedef>
98    <typedef name="rangeInt">
99      <language name="java">android.util.Range&lt;Integer&gt;</language>
100    </typedef>
101    <typedef name="rangeLong">
102      <language name="java">android.util.Range&lt;Long&gt;</language>
103    </typedef>
104    <typedef name="colorSpaceTransform">
105      <language name="java">android.hardware.camera2.params.ColorSpaceTransform</language>
106    </typedef>
107    <typedef name="rggbChannelVector">
108      <language name="java">android.hardware.camera2.params.RggbChannelVector</language>
109    </typedef>
110    <typedef name="blackLevelPattern">
111      <language name="java">android.hardware.camera2.params.BlackLevelPattern</language>
112    </typedef>
113    <typedef name="enumList">
114      <language name="java">int</language>
115    </typedef>
116    <typedef name="sizeF">
117      <language name="java">android.util.SizeF</language>
118    </typedef>
119    <typedef name="point">
120      <language name="java">android.graphics.Point</language>
121    </typedef>
122    <typedef name="tonemapCurve">
123      <language name="java">android.hardware.camera2.params.TonemapCurve</language>
124    </typedef>
125    <typedef name="lensShadingMap">
126      <language name="java">android.hardware.camera2.params.LensShadingMap</language>
127    </typedef>
128    <typedef name="location">
129      <language name="java">android.location.Location</language>
130    </typedef>
131    <typedef name="highSpeedVideoConfiguration">
132      <language name="java">android.hardware.camera2.params.HighSpeedVideoConfiguration</language>
133    </typedef>
134    <typedef name="reprocessFormatsMap">
135      <language name="java">android.hardware.camera2.params.ReprocessFormatsMap</language>
136    </typedef>
137    <typedef name="oisSample">
138      <language name="java">android.hardware.camera2.params.OisSample</language>
139    </typedef>
140    <typedef name="mandatoryStreamCombination">
141      <language name="java">android.hardware.camera2.params.MandatoryStreamCombination</language>
142    </typedef>
143    <typedef name="capability">
144      <language name="java">android.hardware.camera2.params.Capability</language>
145    </typedef>
146    <typedef name="multiResolutionStreamConfigurationMap">
147      <language name="java">android.hardware.camera2.params.MultiResolutionStreamConfigurationMap</language>
148    </typedef>
149  </types>
150
151  <namespace name="android">
152    <section name="colorCorrection">
153      <controls>
154        <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full">
155          <enum>
156            <value>TRANSFORM_MATRIX
157              <notes>Use the android.colorCorrection.transform matrix
158                and android.colorCorrection.gains to do color conversion.
159
160                All advanced white balance adjustments (not specified
161                by our white balance pipeline) must be disabled.
162
163                If AWB is enabled with `android.control.awbMode != OFF`, then
164                TRANSFORM_MATRIX is ignored. The camera device will override
165                this value to either FAST or HIGH_QUALITY.
166              </notes>
167            </value>
168            <value>FAST
169              <notes>Color correction processing must not slow down
170              capture rate relative to sensor raw output.
171
172              Advanced white balance adjustments above and beyond
173              the specified white balance pipeline may be applied.
174
175              If AWB is enabled with `android.control.awbMode != OFF`, then
176              the camera device uses the last frame's AWB values
177              (or defaults if AWB has never been run).
178            </notes>
179            </value>
180            <value>HIGH_QUALITY
181              <notes>Color correction processing operates at improved
182              quality but the capture rate might be reduced (relative to sensor
183              raw output rate)
184
185              Advanced white balance adjustments above and beyond
186              the specified white balance pipeline may be applied.
187
188              If AWB is enabled with `android.control.awbMode != OFF`, then
189              the camera device uses the last frame's AWB values
190              (or defaults if AWB has never been run).
191            </notes>
192            </value>
193          </enum>
194
195          <description>
196          The mode control selects how the image data is converted from the
197          sensor's native color into linear sRGB color.
198          </description>
199          <details>
200          When auto-white balance (AWB) is enabled with android.control.awbMode, this
201          control is overridden by the AWB routine. When AWB is disabled, the
202          application controls how the color mapping is performed.
203
204          We define the expected processing pipeline below. For consistency
205          across devices, this is always the case with TRANSFORM_MATRIX.
206
207          When either FAST or HIGH_QUALITY is used, the camera device may
208          do additional processing but android.colorCorrection.gains and
209          android.colorCorrection.transform will still be provided by the
210          camera device (in the results) and be roughly correct.
211
212          Switching to TRANSFORM_MATRIX and using the data provided from
213          FAST or HIGH_QUALITY will yield a picture with the same white point
214          as what was produced by the camera device in the earlier frame.
215
216          The expected processing pipeline is as follows:
217
218          ![White balance processing pipeline](android.colorCorrection.mode/processing_pipeline.png)
219
220          The white balance is encoded by two values, a 4-channel white-balance
221          gain vector (applied in the Bayer domain), and a 3x3 color transform
222          matrix (applied after demosaic).
223
224          The 4-channel white-balance gains are defined as:
225
226              android.colorCorrection.gains = [ R G_even G_odd B ]
227
228          where `G_even` is the gain for green pixels on even rows of the
229          output, and `G_odd` is the gain for green pixels on the odd rows.
230          These may be identical for a given camera device implementation; if
231          the camera device does not support a separate gain for even/odd green
232          channels, it will use the `G_even` value, and write `G_odd` equal to
233          `G_even` in the output result metadata.
234
235          The matrices for color transforms are defined as a 9-entry vector:
236
237              android.colorCorrection.transform = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
238
239          which define a transform from input sensor colors, `P_in = [ r g b ]`,
240          to output linear sRGB, `P_out = [ r' g' b' ]`,
241
242          with colors as follows:
243
244              r' = I0r + I1g + I2b
245              g' = I3r + I4g + I5b
246              b' = I6r + I7g + I8b
247
248          Both the input and output value ranges must match. Overflow/underflow
249          values are clipped to fit within the range.
250          </details>
251          <hal_details>
252          HAL must support both FAST and HIGH_QUALITY if color correction control is available
253          on the camera device, but the underlying implementation can be the same for both modes.
254          That is, if the highest quality implementation on the camera device does not slow down
255          capture rate, then FAST and HIGH_QUALITY should generate the same output.
256          </hal_details>
257        </entry>
258        <entry name="transform" type="rational" visibility="public"
259               type_notes="3x3 rational matrix in row-major order"
260               container="array" typedef="colorSpaceTransform" hwlevel="full">
261          <array>
262            <size>3</size>
263            <size>3</size>
264          </array>
265          <description>A color transform matrix to use to transform
266          from sensor RGB color space to output linear sRGB color space.
267          </description>
268          <units>Unitless scale factors</units>
269          <details>This matrix is either set by the camera device when the request
270          android.colorCorrection.mode is not TRANSFORM_MATRIX, or
271          directly by the application in the request when the
272          android.colorCorrection.mode is TRANSFORM_MATRIX.
273
274          In the latter case, the camera device may round the matrix to account
275          for precision issues; the final rounded matrix should be reported back
276          in this matrix result metadata. The transform should keep the magnitude
277          of the output color values within `[0, 1.0]` (assuming input color
278          values is within the normalized range `[0, 1.0]`), or clipping may occur.
279
280          The valid range of each matrix element varies on different devices, but
281          values within [-1.5, 3.0] are guaranteed not to be clipped.
282          </details>
283        </entry>
284        <entry name="gains" type="float" visibility="public"
285               type_notes="A 1D array of floats for 4 color channel gains"
286               container="array" typedef="rggbChannelVector" hwlevel="full">
287          <array>
288            <size>4</size>
289          </array>
290          <description>Gains applying to Bayer raw color channels for
291          white-balance.</description>
292          <units>Unitless gain factors</units>
293          <details>
294          These per-channel gains are either set by the camera device
295          when the request android.colorCorrection.mode is not
296          TRANSFORM_MATRIX, or directly by the application in the
297          request when the android.colorCorrection.mode is
298          TRANSFORM_MATRIX.
299
300          The gains in the result metadata are the gains actually
301          applied by the camera device to the current frame.
302
303          The valid range of gains varies on different devices, but gains
304          between [1.0, 3.0] are guaranteed not to be clipped. Even if a given
305          device allows gains below 1.0, this is usually not recommended because
306          this can create color artifacts.
307          </details>
308          <hal_details>
309          The 4-channel white-balance gains are defined in
310          the order of `[R G_even G_odd B]`, where `G_even` is the gain
311          for green pixels on even rows of the output, and `G_odd`
312          is the gain for green pixels on the odd rows.
313
314          If a HAL does not support a separate gain for even/odd green
315          channels, it must use the `G_even` value, and write
316          `G_odd` equal to `G_even` in the output result metadata.
317          </hal_details>
318        </entry>
319        <entry name="aberrationMode" type="byte" visibility="public" enum="true" hwlevel="legacy">
320          <enum>
321            <value>OFF
322              <notes>
323                No aberration correction is applied.
324              </notes>
325            </value>
326            <value>FAST
327              <notes>
328                Aberration correction will not slow down capture rate
329                relative to sensor raw output.
330            </notes>
331            </value>
332            <value>HIGH_QUALITY
333              <notes>
334                Aberration correction operates at improved quality but the capture rate might be
335                reduced (relative to sensor raw output rate)
336            </notes>
337            </value>
338          </enum>
339          <description>
340            Mode of operation for the chromatic aberration correction algorithm.
341          </description>
342          <range>android.colorCorrection.availableAberrationModes</range>
343          <details>
344            Chromatic (color) aberration is caused by the fact that different wavelengths of light
345            can not focus on the same point after exiting from the lens. This metadata defines
346            the high level control of chromatic aberration correction algorithm, which aims to
347            minimize the chromatic artifacts that may occur along the object boundaries in an
348            image.
349
350            FAST/HIGH_QUALITY both mean that camera device determined aberration
351            correction will be applied. HIGH_QUALITY mode indicates that the camera device will
352            use the highest-quality aberration correction algorithms, even if it slows down
353            capture rate. FAST means the camera device will not slow down capture rate when
354            applying aberration correction.
355
356            LEGACY devices will always be in FAST mode.
357          </details>
358        </entry>
359      </controls>
360      <dynamic>
361        <clone entry="android.colorCorrection.mode" kind="controls">
362        </clone>
363        <clone entry="android.colorCorrection.transform" kind="controls">
364        </clone>
365        <clone entry="android.colorCorrection.gains" kind="controls">
366        </clone>
367        <clone entry="android.colorCorrection.aberrationMode" kind="controls">
368        </clone>
369      </dynamic>
370      <static>
371        <entry name="availableAberrationModes" type="byte" visibility="public"
372        type_notes="list of enums" container="array" typedef="enumList" hwlevel="legacy">
373          <array>
374            <size>n</size>
375          </array>
376          <description>
377            List of aberration correction modes for android.colorCorrection.aberrationMode that are
378            supported by this camera device.
379          </description>
380          <range>Any value listed in android.colorCorrection.aberrationMode</range>
381          <details>
382            This key lists the valid modes for android.colorCorrection.aberrationMode.  If no
383            aberration correction modes are available for a device, this list will solely include
384            OFF mode. All camera devices will support either OFF or FAST mode.
385
386            Camera devices that support the MANUAL_POST_PROCESSING capability will always list
387            OFF mode. This includes all FULL level devices.
388
389            LEGACY devices will always only support FAST mode.
390          </details>
391          <hal_details>
392            HAL must support both FAST and HIGH_QUALITY if chromatic aberration control is available
393            on the camera device, but the underlying implementation can be the same for both modes.
394            That is, if the highest quality implementation on the camera device does not slow down
395            capture rate, then FAST and HIGH_QUALITY will generate the same output.
396          </hal_details>
397          <tag id="V1" />
398        </entry>
399      </static>
400    </section>
401    <section name="control">
402      <controls>
403        <entry name="aeAntibandingMode" type="byte" visibility="public"
404               enum="true" hwlevel="legacy">
405          <enum>
406            <value>OFF
407              <notes>
408                The camera device will not adjust exposure duration to
409                avoid banding problems.
410              </notes>
411            </value>
412            <value>50HZ
413              <notes>
414                The camera device will adjust exposure duration to
415                avoid banding problems with 50Hz illumination sources.
416              </notes>
417            </value>
418            <value>60HZ
419              <notes>
420                The camera device will adjust exposure duration to
421                avoid banding problems with 60Hz illumination
422                sources.
423              </notes>
424            </value>
425            <value>AUTO
426              <notes>
427                The camera device will automatically adapt its
428                antibanding routine to the current illumination
429                condition. This is the default mode if AUTO is
430                available on given camera device.
431              </notes>
432            </value>
433          </enum>
434          <description>
435            The desired setting for the camera device's auto-exposure
436            algorithm's antibanding compensation.
437          </description>
438          <range>
439            android.control.aeAvailableAntibandingModes
440          </range>
441          <details>
442            Some kinds of lighting fixtures, such as some fluorescent
443            lights, flicker at the rate of the power supply frequency
444            (60Hz or 50Hz, depending on country). While this is
445            typically not noticeable to a person, it can be visible to
446            a camera device. If a camera sets its exposure time to the
447            wrong value, the flicker may become visible in the
448            viewfinder as flicker or in a final captured image, as a
449            set of variable-brightness bands across the image.
450
451            Therefore, the auto-exposure routines of camera devices
452            include antibanding routines that ensure that the chosen
453            exposure value will not cause such banding. The choice of
454            exposure time depends on the rate of flicker, which the
455            camera device can detect automatically, or the expected
456            rate can be selected by the application using this
457            control.
458
459            A given camera device may not support all of the possible
460            options for the antibanding mode. The
461            android.control.aeAvailableAntibandingModes key contains
462            the available modes for a given camera device.
463
464            AUTO mode is the default if it is available on given
465            camera device. When AUTO mode is not available, the
466            default will be either 50HZ or 60HZ, and both 50HZ
467            and 60HZ will be available.
468
469            If manual exposure control is enabled (by setting
470            android.control.aeMode or android.control.mode to OFF),
471            then this setting has no effect, and the application must
472            ensure it selects exposure times that do not cause banding
473            issues. The android.statistics.sceneFlicker key can assist
474            the application in this.
475          </details>
476          <hal_details>
477            For all capture request templates, this field must be set
478            to AUTO if AUTO mode is available. If AUTO is not available,
479            the default must be either 50HZ or 60HZ, and both 50HZ and
480            60HZ must be available.
481
482            If manual exposure control is enabled (by setting
483            android.control.aeMode or android.control.mode to OFF),
484            then the exposure values provided by the application must not be
485            adjusted for antibanding.
486          </hal_details>
487          <tag id="BC" />
488        </entry>
489        <entry name="aeExposureCompensation" type="int32" visibility="public" hwlevel="legacy">
490          <description>Adjustment to auto-exposure (AE) target image
491          brightness.</description>
492          <units>Compensation steps</units>
493          <range>android.control.aeCompensationRange</range>
494          <details>
495          The adjustment is measured as a count of steps, with the
496          step size defined by android.control.aeCompensationStep and the
497          allowed range by android.control.aeCompensationRange.
498
499          For example, if the exposure value (EV) step is 0.333, '6'
500          will mean an exposure compensation of +2 EV; -3 will mean an
501          exposure compensation of -1 EV. One EV represents a doubling
502          of image brightness. Note that this control will only be
503          effective if android.control.aeMode `!=` OFF. This control
504          will take effect even when android.control.aeLock `== true`.
505
506          In the event of exposure compensation value being changed, camera device
507          may take several frames to reach the newly requested exposure target.
508          During that time, android.control.aeState field will be in the SEARCHING
509          state. Once the new exposure target is reached, android.control.aeState will
510          change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
511          FLASH_REQUIRED (if the scene is too dark for still capture).
512          </details>
513          <tag id="BC" />
514        </entry>
515        <entry name="aeLock" type="byte" visibility="public" enum="true"
516               typedef="boolean" hwlevel="legacy">
517          <enum>
518            <value>OFF
519            <notes>Auto-exposure lock is disabled; the AE algorithm
520            is free to update its parameters.</notes></value>
521            <value>ON
522            <notes>Auto-exposure lock is enabled; the AE algorithm
523            must not update the exposure and sensitivity parameters
524            while the lock is active.
525
526            android.control.aeExposureCompensation setting changes
527            will still take effect while auto-exposure is locked.
528
529            Some rare LEGACY devices may not support
530            this, in which case the value will always be overridden to OFF.
531            </notes></value>
532          </enum>
533          <description>Whether auto-exposure (AE) is currently locked to its latest
534          calculated values.</description>
535          <details>
536          When set to `true` (ON), the AE algorithm is locked to its latest parameters,
537          and will not change exposure settings until the lock is set to `false` (OFF).
538
539          Note that even when AE is locked, the flash may be fired if
540          the android.control.aeMode is ON_AUTO_FLASH /
541          ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.
542
543          When android.control.aeExposureCompensation is changed, even if the AE lock
544          is ON, the camera device will still adjust its exposure value.
545
546          If AE precapture is triggered (see android.control.aePrecaptureTrigger)
547          when AE is already locked, the camera device will not change the exposure time
548          (android.sensor.exposureTime) and sensitivity (android.sensor.sensitivity)
549          parameters. The flash may be fired if the android.control.aeMode
550          is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
551          android.control.aeMode is ON_ALWAYS_FLASH, the scene may become overexposed.
552          Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.
553
554          When an AE precapture sequence is triggered, AE unlock will not be able to unlock
555          the AE if AE is locked by the camera device internally during precapture metering
556          sequence In other words, submitting requests with AE unlock has no effect for an
557          ongoing precapture metering sequence. Otherwise, the precapture metering sequence
558          will never succeed in a sequence of preview requests where AE lock is always set
559          to `false`.
560
561          Since the camera device has a pipeline of in-flight requests, the settings that
562          get locked do not necessarily correspond to the settings that were present in the
563          latest capture result received from the camera device, since additional captures
564          and AE updates may have occurred even before the result was sent out. If an
565          application is switching between automatic and manual control and wishes to eliminate
566          any flicker during the switch, the following procedure is recommended:
567
568            1. Starting in auto-AE mode:
569            2. Lock AE
570            3. Wait for the first result to be output that has the AE locked
571            4. Copy exposure settings from that result into a request, set the request to manual AE
572            5. Submit the capture request, proceed to run manual AE as desired.
573
574          See android.control.aeState for AE lock related state transition details.
575          </details>
576          <tag id="BC" />
577        </entry>
578        <entry name="aeMode" type="byte" visibility="public" enum="true" hwlevel="legacy">
579          <enum>
580            <value>OFF
581              <notes>
582                The camera device's autoexposure routine is disabled.
583
584                The application-selected android.sensor.exposureTime,
585                android.sensor.sensitivity and
586                android.sensor.frameDuration are used by the camera
587                device, along with android.flash.* fields, if there's
588                a flash unit for this camera device.
589
590                Note that auto-white balance (AWB) and auto-focus (AF)
591                behavior is device dependent when AE is in OFF mode.
592                To have consistent behavior across different devices,
593                it is recommended to either set AWB and AF to OFF mode
594                or lock AWB and AF before setting AE to OFF.
595                See android.control.awbMode, android.control.afMode,
596                android.control.awbLock, and android.control.afTrigger
597                for more details.
598
599                LEGACY devices do not support the OFF mode and will
600                override attempts to use this value to ON.
601              </notes>
602            </value>
603            <value>ON
604              <notes>
605                The camera device's autoexposure routine is active,
606                with no flash control.
607
608                The application's values for
609                android.sensor.exposureTime,
610                android.sensor.sensitivity, and
611                android.sensor.frameDuration are ignored. The
612                application has control over the various
613                android.flash.* fields.
614              </notes>
615            </value>
616            <value>ON_AUTO_FLASH
617              <notes>
618                Like ON, except that the camera device also controls
619                the camera's flash unit, firing it in low-light
620                conditions.
621
622                The flash may be fired during a precapture sequence
623                (triggered by android.control.aePrecaptureTrigger) and
624                may be fired for captures for which the
625                android.control.captureIntent field is set to
626                STILL_CAPTURE
627              </notes>
628            </value>
629            <value>ON_ALWAYS_FLASH
630              <notes>
631                Like ON, except that the camera device also controls
632                the camera's flash unit, always firing it for still
633                captures.
634
635                The flash may be fired during a precapture sequence
636                (triggered by android.control.aePrecaptureTrigger) and
637                will always be fired for captures for which the
638                android.control.captureIntent field is set to
639                STILL_CAPTURE
640              </notes>
641            </value>
642            <value>ON_AUTO_FLASH_REDEYE
643              <notes>
644                Like ON_AUTO_FLASH, but with automatic red eye
645                reduction.
646
647                If deemed necessary by the camera device, a red eye
648                reduction flash will fire during the precapture
649                sequence.
650              </notes>
651            </value>
652            <value hal_version="3.3">ON_EXTERNAL_FLASH
653              <notes>
654                An external flash has been turned on.
655
656                It informs the camera device that an external flash has been turned on, and that
657                metering (and continuous focus if active) should be quickly recaculated to account
658                for the external flash. Otherwise, this mode acts like ON.
659
660                When the external flash is turned off, AE mode should be changed to one of the
661                other available AE modes.
662
663                If the camera device supports AE external flash mode, android.control.aeState must
664                be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without
665                flash.
666              </notes>
667            </value>
668          </enum>
669          <description>The desired mode for the camera device's
670          auto-exposure routine.</description>
671          <range>android.control.aeAvailableModes</range>
672          <details>
673            This control is only effective if android.control.mode is
674            AUTO.
675
676            When set to any of the ON modes, the camera device's
677            auto-exposure routine is enabled, overriding the
678            application's selected exposure time, sensor sensitivity,
679            and frame duration (android.sensor.exposureTime,
680            android.sensor.sensitivity, and
681            android.sensor.frameDuration). If one of the FLASH modes
682            is selected, the camera device's flash unit controls are
683            also overridden.
684
685            The FLASH modes are only available if the camera device
686            has a flash unit (android.flash.info.available is `true`).
687
688            If flash TORCH mode is desired, this field must be set to
689            ON or OFF, and android.flash.mode set to TORCH.
690
691            When set to any of the ON modes, the values chosen by the
692            camera device auto-exposure routine for the overridden
693            fields for a given capture will be available in its
694            CaptureResult.
695          </details>
696          <tag id="BC" />
697        </entry>
698        <entry name="aeRegions" type="int32" visibility="public"
699            optional="true" container="array" typedef="meteringRectangle">
700          <array>
701            <size>5</size>
702            <size>area_count</size>
703          </array>
704          <description>List of metering areas to use for auto-exposure adjustment.</description>
705          <units>Pixel coordinates within android.sensor.info.activeArraySize or
706            android.sensor.info.preCorrectionActiveArraySize depending on
707            distortion correction capability and mode</units>
708          <range>Coordinates must be between `[(0,0), (width, height))` of
709            android.sensor.info.activeArraySize or android.sensor.info.preCorrectionActiveArraySize
710            depending on distortion correction capability and mode</range>
711          <details>
712              Not available if android.control.maxRegionsAe is 0.
713              Otherwise will always be present.
714
715              The maximum number of regions supported by the device is determined by the value
716              of android.control.maxRegionsAe.
717
718              For devices not supporting android.distortionCorrection.mode control, the coordinate
719              system always follows that of android.sensor.info.activeArraySize, with (0,0) being
720              the top-left pixel in the active pixel array, and
721              (android.sensor.info.activeArraySize.width - 1,
722              android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
723              active pixel array.
724
725              For devices supporting android.distortionCorrection.mode control, the coordinate
726              system depends on the mode being set.
727              When the distortion correction mode is OFF, the coordinate system follows
728              android.sensor.info.preCorrectionActiveArraySize, with
729              `(0, 0)` being the top-left pixel of the pre-correction active array, and
730              (android.sensor.info.preCorrectionActiveArraySize.width - 1,
731              android.sensor.info.preCorrectionActiveArraySize.height - 1) being the bottom-right
732              pixel in the pre-correction active pixel array.
733              When the distortion correction mode is not OFF, the coordinate system follows
734              android.sensor.info.activeArraySize, with
735              `(0, 0)` being the top-left pixel of the active array, and
736              (android.sensor.info.activeArraySize.width - 1,
737              android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
738              active pixel array.
739
740              The weight must be within `[0, 1000]`, and represents a weight
741              for every pixel in the area. This means that a large metering area
742              with the same weight as a smaller area will have more effect in
743              the metering result. Metering areas can partially overlap and the
744              camera device will add the weights in the overlap region.
745
746              The weights are relative to weights of other exposure metering regions, so if only one
747              region is used, all non-zero weights will have the same effect. A region with 0
748              weight is ignored.
749
750              If all regions have 0 weight, then no specific metering area needs to be used by the
751              camera device.
752
753              If the metering region is outside the used android.scaler.cropRegion returned in
754              capture result metadata, the camera device will ignore the sections outside the crop
755              region and output only the intersection rectangle as the metering region in the result
756              metadata.  If the region is entirely outside the crop region, it will be ignored and
757              not reported in the result metadata.
758
759              Starting from API level 30, the coordinate system of activeArraySize or
760              preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
761              pre-zoom field of view. This means that the same aeRegions values at different
762              android.control.zoomRatio represent different parts of the scene. The aeRegions
763              coordinates are relative to the activeArray/preCorrectionActiveArray representing the
764              zoomed field of view. If android.control.zoomRatio is set to 1.0 (default), the same
765              aeRegions at different android.scaler.cropRegion still represent the same parts of the
766              scene as they do before. See android.control.zoomRatio for details. Whether to use
767              activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
768              mode.
769
770              For camera devices with the
771              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
772              capability,
773              android.sensor.info.activeArraySizeMaximumResolution /
774              android.sensor.info.preCorrectionActiveArraySizeMaximumResolution must be used as the
775              coordinate system for requests where android.sensor.pixelMode is set to
776              {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
777          </details>
778          <ndk_details>
779              The data representation is `int[5 * area_count]`.
780              Every five elements represent a metering region of `(xmin, ymin, xmax, ymax, weight)`.
781              The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
782              ymax.
783          </ndk_details>
784          <hal_details>
785              The HAL level representation of MeteringRectangle[] is a
786              int[5 * area_count].
787              Every five elements represent a metering region of
788              (xmin, ymin, xmax, ymax, weight).
789              The rectangle is defined to be inclusive on xmin and ymin, but
790              exclusive on xmax and ymax.
791              HAL must always report metering regions in the coordinate system of pre-correction
792              active array.
793          </hal_details>
794          <tag id="BC" />
795        </entry>
796        <entry name="aeTargetFpsRange" type="int32" visibility="public"
797               container="array" typedef="rangeInt" hwlevel="legacy">
798          <array>
799            <size>2</size>
800          </array>
801          <description>Range over which the auto-exposure routine can
802          adjust the capture frame rate to maintain good
803          exposure.</description>
804          <units>Frames per second (FPS)</units>
805          <range>Any of the entries in android.control.aeAvailableTargetFpsRanges</range>
806          <details>Only constrains auto-exposure (AE) algorithm, not
807          manual control of android.sensor.exposureTime and
808          android.sensor.frameDuration.</details>
809          <tag id="BC" />
810        </entry>
811        <entry name="aePrecaptureTrigger" type="byte" visibility="public"
812               enum="true" hwlevel="limited">
813          <enum>
814            <value>IDLE
815              <notes>The trigger is idle.</notes>
816            </value>
817            <value>START
818              <notes>The precapture metering sequence will be started
819              by the camera device.
820
821              The exact effect of the precapture trigger depends on
822              the current AE mode and state.</notes>
823            </value>
824            <value>CANCEL
825              <notes>The camera device will cancel any currently active or completed
826              precapture metering sequence, the auto-exposure routine will return to its
827              initial state.</notes>
828            </value>
829          </enum>
830          <description>Whether the camera device will trigger a precapture
831          metering sequence when it processes this request.</description>
832          <details>This entry is normally set to IDLE, or is not
833          included at all in the request settings. When included and
834          set to START, the camera device will trigger the auto-exposure (AE)
835          precapture metering sequence.
836
837          When set to CANCEL, the camera device will cancel any active
838          precapture metering trigger, and return to its initial AE state.
839          If a precapture metering sequence is already completed, and the camera
840          device has implicitly locked the AE for subsequent still capture, the
841          CANCEL trigger will unlock the AE and return to its initial AE state.
842
843          The precapture sequence should be triggered before starting a
844          high-quality still capture for final metering decisions to
845          be made, and for firing pre-capture flash pulses to estimate
846          scene brightness and required final capture flash power, when
847          the flash is enabled.
848
849          Normally, this entry should be set to START for only a
850          single request, and the application should wait until the
851          sequence completes before starting a new one.
852
853          When a precapture metering sequence is finished, the camera device
854          may lock the auto-exposure routine internally to be able to accurately expose the
855          subsequent still capture image (`android.control.captureIntent == STILL_CAPTURE`).
856          For this case, the AE may not resume normal scan if no subsequent still capture is
857          submitted. To ensure that the AE routine restarts normal scan, the application should
858          submit a request with `android.control.aeLock == true`, followed by a request
859          with `android.control.aeLock == false`, if the application decides not to submit a
860          still capture request after the precapture sequence completes. Alternatively, for
861          API level 23 or newer devices, the CANCEL can be used to unlock the camera device
862          internally locked AE if the application doesn't submit a still capture request after
863          the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not
864          be used in devices that have earlier API levels.
865
866          The exact effect of auto-exposure (AE) precapture trigger
867          depends on the current AE mode and state; see
868          android.control.aeState for AE precapture state transition
869          details.
870
871          On LEGACY-level devices, the precapture trigger is not supported;
872          capturing a high-resolution JPEG image will automatically trigger a
873          precapture sequence before the high-resolution capture, including
874          potentially firing a pre-capture flash.
875
876          Using the precapture trigger and the auto-focus trigger android.control.afTrigger
877          simultaneously is allowed. However, since these triggers often require cooperation between
878          the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
879          focus sweep), the camera device may delay acting on a later trigger until the previous
880          trigger has been fully handled. This may lead to longer intervals between the trigger and
881          changes to android.control.aeState indicating the start of the precapture sequence, for
882          example.
883
884          If both the precapture and the auto-focus trigger are activated on the same request, then
885          the camera device will complete them in the optimal order for that device.
886          </details>
887          <hal_details>
888          The HAL must support triggering the AE precapture trigger while an AF trigger is active
889          (and vice versa), or at the same time as the AF trigger.  It is acceptable for the HAL to
890          treat these as two consecutive triggers, for example handling the AF trigger and then the
891          AE trigger.  Or the HAL may choose to optimize the case with both triggers fired at once,
892          to minimize the latency for converging both focus and exposure/flash usage.
893          </hal_details>
894          <tag id="BC" />
895        </entry>
896        <entry name="afMode" type="byte" visibility="public" enum="true"
897               hwlevel="legacy">
898          <enum>
899            <value>OFF
900            <notes>The auto-focus routine does not control the lens;
901            android.lens.focusDistance is controlled by the
902            application.</notes></value>
903            <value>AUTO
904            <notes>Basic automatic focus mode.
905
906            In this mode, the lens does not move unless
907            the autofocus trigger action is called. When that trigger
908            is activated, AF will transition to ACTIVE_SCAN, then to
909            the outcome of the scan (FOCUSED or NOT_FOCUSED).
910
911            Always supported if lens is not fixed focus.
912
913            Use android.lens.info.minimumFocusDistance to determine if lens
914            is fixed-focus.
915
916            Triggering AF_CANCEL resets the lens position to default,
917            and sets the AF state to INACTIVE.</notes></value>
918            <value>MACRO
919            <notes>Close-up focusing mode.
920
921            In this mode, the lens does not move unless the
922            autofocus trigger action is called. When that trigger is
923            activated, AF will transition to ACTIVE_SCAN, then to
924            the outcome of the scan (FOCUSED or NOT_FOCUSED). This
925            mode is optimized for focusing on objects very close to
926            the camera.
927
928            When that trigger is activated, AF will transition to
929            ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
930            NOT_FOCUSED). Triggering cancel AF resets the lens
931            position to default, and sets the AF state to
932            INACTIVE.</notes></value>
933            <value>CONTINUOUS_VIDEO
934            <notes>In this mode, the AF algorithm modifies the lens
935            position continually to attempt to provide a
936            constantly-in-focus image stream.
937
938            The focusing behavior should be suitable for good quality
939            video recording; typically this means slower focus
940            movement and no overshoots. When the AF trigger is not
941            involved, the AF algorithm should start in INACTIVE state,
942            and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
943            states as appropriate. When the AF trigger is activated,
944            the algorithm should immediately transition into
945            AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
946            lens position until a cancel AF trigger is received.
947
948            Once cancel is received, the algorithm should transition
949            back to INACTIVE and resume passive scan. Note that this
950            behavior is not identical to CONTINUOUS_PICTURE, since an
951            ongoing PASSIVE_SCAN must immediately be
952            canceled.</notes></value>
953            <value>CONTINUOUS_PICTURE
954            <notes>In this mode, the AF algorithm modifies the lens
955            position continually to attempt to provide a
956            constantly-in-focus image stream.
957
958            The focusing behavior should be suitable for still image
959            capture; typically this means focusing as fast as
960            possible. When the AF trigger is not involved, the AF
961            algorithm should start in INACTIVE state, and then
962            transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
963            appropriate as it attempts to maintain focus. When the AF
964            trigger is activated, the algorithm should finish its
965            PASSIVE_SCAN if active, and then transition into
966            AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
967            lens position until a cancel AF trigger is received.
968
969            When the AF cancel trigger is activated, the algorithm
970            should transition back to INACTIVE and then act as if it
971            has just been started.</notes></value>
972            <value>EDOF
973            <notes>Extended depth of field (digital focus) mode.
974
975            The camera device will produce images with an extended
976            depth of field automatically; no special focusing
977            operations need to be done before taking a picture.
978
979            AF triggers are ignored, and the AF state will always be
980            INACTIVE.</notes></value>
981          </enum>
982          <description>Whether auto-focus (AF) is currently enabled, and what
983          mode it is set to.</description>
984          <range>android.control.afAvailableModes</range>
985          <details>Only effective if android.control.mode = AUTO and the lens is not fixed focus
986          (i.e. `android.lens.info.minimumFocusDistance &gt; 0`). Also note that
987          when android.control.aeMode is OFF, the behavior of AF is device
988          dependent. It is recommended to lock AF by using android.control.afTrigger before
989          setting android.control.aeMode to OFF, or set AF mode to OFF when AE is OFF.
990
991          If the lens is controlled by the camera device auto-focus algorithm,
992          the camera device will report the current AF status in android.control.afState
993          in result metadata.</details>
994          <hal_details>
995          When afMode is AUTO or MACRO, the lens must not move until an AF trigger is sent in a
996          request (android.control.afTrigger `==` START). After an AF trigger, the afState will end
997          up with either FOCUSED_LOCKED or NOT_FOCUSED_LOCKED state (see
998          android.control.afState for detailed state transitions), which indicates that the lens is
999          locked and will not move. If camera movement (e.g. tilting camera) causes the lens to move
1000          after the lens is locked, the HAL must compensate this movement appropriately such that
1001          the same focal plane remains in focus.
1002
1003          When afMode is one of the continuous auto focus modes, the HAL is free to start a AF
1004          scan whenever it's not locked. When the lens is locked after an AF trigger
1005          (see android.control.afState for detailed state transitions), the HAL should maintain the
1006          same lock behavior as above.
1007
1008          When afMode is OFF, the application controls focus manually. The accuracy of the
1009          focus distance control depends on the android.lens.info.focusDistanceCalibration.
1010          However, the lens must not move regardless of the camera movement for any focus distance
1011          manual control.
1012
1013          To put this in concrete terms, if the camera has lens elements which may move based on
1014          camera orientation or motion (e.g. due to gravity), then the HAL must drive the lens to
1015          remain in a fixed position invariant to the camera's orientation or motion, for example,
1016          by using accelerometer measurements in the lens control logic. This is a typical issue
1017          that will arise on camera modules with open-loop VCMs.
1018          </hal_details>
1019          <tag id="BC" />
1020        </entry>
1021        <entry name="afRegions" type="int32" visibility="public"
1022               optional="true" container="array" typedef="meteringRectangle">
1023          <array>
1024            <size>5</size>
1025            <size>area_count</size>
1026          </array>
1027          <description>List of metering areas to use for auto-focus.</description>
1028          <units>Pixel coordinates within android.sensor.info.activeArraySize or
1029            android.sensor.info.preCorrectionActiveArraySize depending on
1030            distortion correction capability and mode</units>
1031          <range>Coordinates must be between `[(0,0), (width, height))` of
1032            android.sensor.info.activeArraySize or android.sensor.info.preCorrectionActiveArraySize
1033            depending on distortion correction capability and mode</range>
1034          <details>
1035              Not available if android.control.maxRegionsAf is 0.
1036              Otherwise will always be present.
1037
1038              The maximum number of focus areas supported by the device is determined by the value
1039              of android.control.maxRegionsAf.
1040
1041
1042              For devices not supporting android.distortionCorrection.mode control, the coordinate
1043              system always follows that of android.sensor.info.activeArraySize, with (0,0) being
1044              the top-left pixel in the active pixel array, and
1045              (android.sensor.info.activeArraySize.width - 1,
1046              android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
1047              active pixel array.
1048
1049              For devices supporting android.distortionCorrection.mode control, the coordinate
1050              system depends on the mode being set.
1051              When the distortion correction mode is OFF, the coordinate system follows
1052              android.sensor.info.preCorrectionActiveArraySize, with
1053              `(0, 0)` being the top-left pixel of the pre-correction active array, and
1054              (android.sensor.info.preCorrectionActiveArraySize.width - 1,
1055              android.sensor.info.preCorrectionActiveArraySize.height - 1) being the bottom-right
1056              pixel in the pre-correction active pixel array.
1057              When the distortion correction mode is not OFF, the coordinate system follows
1058              android.sensor.info.activeArraySize, with
1059              `(0, 0)` being the top-left pixel of the active array, and
1060              (android.sensor.info.activeArraySize.width - 1,
1061              android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
1062              active pixel array.
1063
1064              The weight must be within `[0, 1000]`, and represents a weight
1065              for every pixel in the area. This means that a large metering area
1066              with the same weight as a smaller area will have more effect in
1067              the metering result. Metering areas can partially overlap and the
1068              camera device will add the weights in the overlap region.
1069
1070              The weights are relative to weights of other metering regions, so if only one region
1071              is used, all non-zero weights will have the same effect. A region with 0 weight is
1072              ignored.
1073
1074              If all regions have 0 weight, then no specific metering area needs to be used by the
1075              camera device. The capture result will either be a zero weight region as well, or
1076              the region selected by the camera device as the focus area of interest.
1077
1078              If the metering region is outside the used android.scaler.cropRegion returned in
1079              capture result metadata, the camera device will ignore the sections outside the crop
1080              region and output only the intersection rectangle as the metering region in the result
1081              metadata. If the region is entirely outside the crop region, it will be ignored and
1082              not reported in the result metadata.
1083
1084              Starting from API level 30, the coordinate system of activeArraySize or
1085              preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
1086              pre-zoom field of view. This means that the same afRegions values at different
1087              android.control.zoomRatio represent different parts of the scene. The afRegions
1088              coordinates are relative to the activeArray/preCorrectionActiveArray representing the
1089              zoomed field of view. If android.control.zoomRatio is set to 1.0 (default), the same
1090              afRegions at different android.scaler.cropRegion still represent the same parts of the
1091              scene as they do before. See android.control.zoomRatio for details. Whether to use
1092              activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
1093              mode.
1094
1095              For camera devices with the
1096              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
1097              capability, android.sensor.info.activeArraySizeMaximumResolution /
1098              android.sensor.info.preCorrectionActiveArraySizeMaximumResolution must be used as the
1099              coordinate system for requests where android.sensor.pixelMode is set to
1100              {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
1101          </details>
1102          <ndk_details>
1103              The data representation is `int[5 * area_count]`.
1104              Every five elements represent a metering region of `(xmin, ymin, xmax, ymax, weight)`.
1105              The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
1106              ymax.
1107          </ndk_details>
1108          <hal_details>
1109              The HAL level representation of MeteringRectangle[] is a
1110              int[5 * area_count].
1111              Every five elements represent a metering region of
1112              (xmin, ymin, xmax, ymax, weight).
1113              The rectangle is defined to be inclusive on xmin and ymin, but
1114              exclusive on xmax and ymax.
1115              HAL must always report metering regions in the coordinate system of pre-correction
1116              active array.
1117          </hal_details>
1118          <tag id="BC" />
1119        </entry>
1120        <entry name="afTrigger" type="byte" visibility="public" enum="true"
1121               hwlevel="legacy">
1122          <enum>
1123            <value>IDLE
1124              <notes>The trigger is idle.</notes>
1125            </value>
1126            <value>START
1127              <notes>Autofocus will trigger now.</notes>
1128            </value>
1129            <value>CANCEL
1130              <notes>Autofocus will return to its initial
1131              state, and cancel any currently active trigger.</notes>
1132            </value>
1133          </enum>
1134          <description>
1135          Whether the camera device will trigger autofocus for this request.
1136          </description>
1137          <details>This entry is normally set to IDLE, or is not
1138          included at all in the request settings.
1139
1140          When included and set to START, the camera device will trigger the
1141          autofocus algorithm. If autofocus is disabled, this trigger has no effect.
1142
1143          When set to CANCEL, the camera device will cancel any active trigger,
1144          and return to its initial AF state.
1145
1146          Generally, applications should set this entry to START or CANCEL for only a
1147          single capture, and then return it to IDLE (or not set at all). Specifying
1148          START for multiple captures in a row means restarting the AF operation over
1149          and over again.
1150
1151          See android.control.afState for what the trigger means for each AF mode.
1152
1153          Using the autofocus trigger and the precapture trigger android.control.aePrecaptureTrigger
1154          simultaneously is allowed. However, since these triggers often require cooperation between
1155          the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
1156          focus sweep), the camera device may delay acting on a later trigger until the previous
1157          trigger has been fully handled. This may lead to longer intervals between the trigger and
1158          changes to android.control.afState, for example.
1159          </details>
1160          <hal_details>
1161          The HAL must support triggering the AF trigger while an AE precapture trigger is active
1162          (and vice versa), or at the same time as the AE trigger.  It is acceptable for the HAL to
1163          treat these as two consecutive triggers, for example handling the AF trigger and then the
1164          AE trigger.  Or the HAL may choose to optimize the case with both triggers fired at once,
1165          to minimize the latency for converging both focus and exposure/flash usage.
1166          </hal_details>
1167          <tag id="BC" />
1168        </entry>
1169        <entry name="awbLock" type="byte" visibility="public" enum="true"
1170               typedef="boolean" hwlevel="legacy">
1171          <enum>
1172            <value>OFF
1173            <notes>Auto-white balance lock is disabled; the AWB
1174            algorithm is free to update its parameters if in AUTO
1175            mode.</notes></value>
1176            <value>ON
1177            <notes>Auto-white balance lock is enabled; the AWB
1178            algorithm will not update its parameters while the lock
1179            is active.</notes></value>
1180          </enum>
1181          <description>Whether auto-white balance (AWB) is currently locked to its
1182          latest calculated values.</description>
1183          <details>
1184          When set to `true` (ON), the AWB algorithm is locked to its latest parameters,
1185          and will not change color balance settings until the lock is set to `false` (OFF).
1186
1187          Since the camera device has a pipeline of in-flight requests, the settings that
1188          get locked do not necessarily correspond to the settings that were present in the
1189          latest capture result received from the camera device, since additional captures
1190          and AWB updates may have occurred even before the result was sent out. If an
1191          application is switching between automatic and manual control and wishes to eliminate
1192          any flicker during the switch, the following procedure is recommended:
1193
1194            1. Starting in auto-AWB mode:
1195            2. Lock AWB
1196            3. Wait for the first result to be output that has the AWB locked
1197            4. Copy AWB settings from that result into a request, set the request to manual AWB
1198            5. Submit the capture request, proceed to run manual AWB as desired.
1199
1200          Note that AWB lock is only meaningful when
1201          android.control.awbMode is in the AUTO mode; in other modes,
1202          AWB is already fixed to a specific setting.
1203
1204          Some LEGACY devices may not support ON; the value is then overridden to OFF.
1205          </details>
1206          <tag id="BC" />
1207        </entry>
1208        <entry name="awbMode" type="byte" visibility="public" enum="true"
1209               hwlevel="legacy">
1210          <enum>
1211            <value>OFF
1212            <notes>
1213            The camera device's auto-white balance routine is disabled.
1214
1215            The application-selected color transform matrix
1216            (android.colorCorrection.transform) and gains
1217            (android.colorCorrection.gains) are used by the camera
1218            device for manual white balance control.
1219            </notes>
1220            </value>
1221            <value>AUTO
1222            <notes>
1223            The camera device's auto-white balance routine is active.
1224
1225            The application's values for android.colorCorrection.transform
1226            and android.colorCorrection.gains are ignored.
1227            For devices that support the MANUAL_POST_PROCESSING capability, the
1228            values used by the camera device for the transform and gains
1229            will be available in the capture result for this request.
1230            </notes>
1231            </value>
1232            <value>INCANDESCENT
1233            <notes>
1234            The camera device's auto-white balance routine is disabled;
1235            the camera device uses incandescent light as the assumed scene
1236            illumination for white balance.
1237
1238            While the exact white balance transforms are up to the
1239            camera device, they will approximately match the CIE
1240            standard illuminant A.
1241
1242            The application's values for android.colorCorrection.transform
1243            and android.colorCorrection.gains are ignored.
1244            For devices that support the MANUAL_POST_PROCESSING capability, the
1245            values used by the camera device for the transform and gains
1246            will be available in the capture result for this request.
1247            </notes>
1248            </value>
1249            <value>FLUORESCENT
1250            <notes>
1251            The camera device's auto-white balance routine is disabled;
1252            the camera device uses fluorescent light as the assumed scene
1253            illumination for white balance.
1254
1255            While the exact white balance transforms are up to the
1256            camera device, they will approximately match the CIE
1257            standard illuminant F2.
1258
1259            The application's values for android.colorCorrection.transform
1260            and android.colorCorrection.gains are ignored.
1261            For devices that support the MANUAL_POST_PROCESSING capability, the
1262            values used by the camera device for the transform and gains
1263            will be available in the capture result for this request.
1264            </notes>
1265            </value>
1266            <value>WARM_FLUORESCENT
1267            <notes>
1268            The camera device's auto-white balance routine is disabled;
1269            the camera device uses warm fluorescent light as the assumed scene
1270            illumination for white balance.
1271
1272            While the exact white balance transforms are up to the
1273            camera device, they will approximately match the CIE
1274            standard illuminant F4.
1275
1276            The application's values for android.colorCorrection.transform
1277            and android.colorCorrection.gains are ignored.
1278            For devices that support the MANUAL_POST_PROCESSING capability, the
1279            values used by the camera device for the transform and gains
1280            will be available in the capture result for this request.
1281            </notes>
1282            </value>
1283            <value>DAYLIGHT
1284            <notes>
1285            The camera device's auto-white balance routine is disabled;
1286            the camera device uses daylight light as the assumed scene
1287            illumination for white balance.
1288
1289            While the exact white balance transforms are up to the
1290            camera device, they will approximately match the CIE
1291            standard illuminant D65.
1292
1293            The application's values for android.colorCorrection.transform
1294            and android.colorCorrection.gains are ignored.
1295            For devices that support the MANUAL_POST_PROCESSING capability, the
1296            values used by the camera device for the transform and gains
1297            will be available in the capture result for this request.
1298            </notes>
1299            </value>
1300            <value>CLOUDY_DAYLIGHT
1301            <notes>
1302            The camera device's auto-white balance routine is disabled;
1303            the camera device uses cloudy daylight light as the assumed scene
1304            illumination for white balance.
1305
1306            The application's values for android.colorCorrection.transform
1307            and android.colorCorrection.gains are ignored.
1308            For devices that support the MANUAL_POST_PROCESSING capability, the
1309            values used by the camera device for the transform and gains
1310            will be available in the capture result for this request.
1311            </notes>
1312            </value>
1313            <value>TWILIGHT
1314            <notes>
1315            The camera device's auto-white balance routine is disabled;
1316            the camera device uses twilight light as the assumed scene
1317            illumination for white balance.
1318
1319            The application's values for android.colorCorrection.transform
1320            and android.colorCorrection.gains are ignored.
1321            For devices that support the MANUAL_POST_PROCESSING capability, the
1322            values used by the camera device for the transform and gains
1323            will be available in the capture result for this request.
1324            </notes>
1325            </value>
1326            <value>SHADE
1327            <notes>
1328            The camera device's auto-white balance routine is disabled;
1329            the camera device uses shade light as the assumed scene
1330            illumination for white balance.
1331
1332            The application's values for android.colorCorrection.transform
1333            and android.colorCorrection.gains are ignored.
1334            For devices that support the MANUAL_POST_PROCESSING capability, the
1335            values used by the camera device for the transform and gains
1336            will be available in the capture result for this request.
1337            </notes>
1338            </value>
1339          </enum>
1340          <description>Whether auto-white balance (AWB) is currently setting the color
1341          transform fields, and what its illumination target
1342          is.</description>
1343          <range>android.control.awbAvailableModes</range>
1344          <details>
1345          This control is only effective if android.control.mode is AUTO.
1346
1347          When set to the AUTO mode, the camera device's auto-white balance
1348          routine is enabled, overriding the application's selected
1349          android.colorCorrection.transform, android.colorCorrection.gains and
1350          android.colorCorrection.mode. Note that when android.control.aeMode
1351          is OFF, the behavior of AWB is device dependent. It is recommened to
1352          also set AWB mode to OFF or lock AWB by using android.control.awbLock before
1353          setting AE mode to OFF.
1354
1355          When set to the OFF mode, the camera device's auto-white balance
1356          routine is disabled. The application manually controls the white
1357          balance by android.colorCorrection.transform, android.colorCorrection.gains
1358          and android.colorCorrection.mode.
1359
1360          When set to any other modes, the camera device's auto-white
1361          balance routine is disabled. The camera device uses each
1362          particular illumination target for white balance
1363          adjustment. The application's values for
1364          android.colorCorrection.transform,
1365          android.colorCorrection.gains and
1366          android.colorCorrection.mode are ignored.
1367          </details>
1368          <tag id="BC" />
1369        </entry>
1370        <entry name="awbRegions" type="int32" visibility="public"
1371               optional="true" container="array" typedef="meteringRectangle">
1372          <array>
1373            <size>5</size>
1374            <size>area_count</size>
1375          </array>
1376          <description>List of metering areas to use for auto-white-balance illuminant
1377          estimation.</description>
1378          <units>Pixel coordinates within android.sensor.info.activeArraySize or
1379            android.sensor.info.preCorrectionActiveArraySize depending on
1380            distortion correction capability and mode</units>
1381          <range>Coordinates must be between `[(0,0), (width, height))` of
1382            android.sensor.info.activeArraySize or android.sensor.info.preCorrectionActiveArraySize
1383            depending on distortion correction capability and mode</range>
1384          <details>
1385              Not available if android.control.maxRegionsAwb is 0.
1386              Otherwise will always be present.
1387
1388              The maximum number of regions supported by the device is determined by the value
1389              of android.control.maxRegionsAwb.
1390
1391              For devices not supporting android.distortionCorrection.mode control, the coordinate
1392              system always follows that of android.sensor.info.activeArraySize, with (0,0) being
1393              the top-left pixel in the active pixel array, and
1394              (android.sensor.info.activeArraySize.width - 1,
1395              android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
1396              active pixel array.
1397
1398              For devices supporting android.distortionCorrection.mode control, the coordinate
1399              system depends on the mode being set.
1400              When the distortion correction mode is OFF, the coordinate system follows
1401              android.sensor.info.preCorrectionActiveArraySize, with
1402              `(0, 0)` being the top-left pixel of the pre-correction active array, and
1403              (android.sensor.info.preCorrectionActiveArraySize.width - 1,
1404              android.sensor.info.preCorrectionActiveArraySize.height - 1) being the bottom-right
1405              pixel in the pre-correction active pixel array.
1406              When the distortion correction mode is not OFF, the coordinate system follows
1407              android.sensor.info.activeArraySize, with
1408              `(0, 0)` being the top-left pixel of the active array, and
1409              (android.sensor.info.activeArraySize.width - 1,
1410              android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
1411              active pixel array.
1412
1413              The weight must range from 0 to 1000, and represents a weight
1414              for every pixel in the area. This means that a large metering area
1415              with the same weight as a smaller area will have more effect in
1416              the metering result. Metering areas can partially overlap and the
1417              camera device will add the weights in the overlap region.
1418
1419              The weights are relative to weights of other white balance metering regions, so if
1420              only one region is used, all non-zero weights will have the same effect. A region with
1421              0 weight is ignored.
1422
1423              If all regions have 0 weight, then no specific metering area needs to be used by the
1424              camera device.
1425
1426              If the metering region is outside the used android.scaler.cropRegion returned in
1427              capture result metadata, the camera device will ignore the sections outside the crop
1428              region and output only the intersection rectangle as the metering region in the result
1429              metadata.  If the region is entirely outside the crop region, it will be ignored and
1430              not reported in the result metadata.
1431
1432              Starting from API level 30, the coordinate system of activeArraySize or
1433              preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
1434              pre-zoom field of view. This means that the same awbRegions values at different
1435              android.control.zoomRatio represent different parts of the scene. The awbRegions
1436              coordinates are relative to the activeArray/preCorrectionActiveArray representing the
1437              zoomed field of view. If android.control.zoomRatio is set to 1.0 (default), the same
1438              awbRegions at different android.scaler.cropRegion still represent the same parts of
1439              the scene as they do before. See android.control.zoomRatio for details. Whether to use
1440              activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
1441              mode.
1442
1443              For camera devices with the
1444              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
1445              capability, android.sensor.info.activeArraySizeMaximumResolution /
1446              android.sensor.info.preCorrectionActiveArraySizeMaximumResolution must be used as the
1447              coordinate system for requests where android.sensor.pixelMode is set to
1448              {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
1449          </details>
1450          <ndk_details>
1451              The data representation is `int[5 * area_count]`.
1452              Every five elements represent a metering region of `(xmin, ymin, xmax, ymax, weight)`.
1453              The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
1454              ymax.
1455          </ndk_details>
1456          <hal_details>
1457              The HAL level representation of MeteringRectangle[] is a
1458              int[5 * area_count].
1459              Every five elements represent a metering region of
1460              (xmin, ymin, xmax, ymax, weight).
1461              The rectangle is defined to be inclusive on xmin and ymin, but
1462              exclusive on xmax and ymax.
1463              HAL must always report metering regions in the coordinate system of pre-correction
1464              active array.
1465          </hal_details>
1466          <tag id="BC" />
1467        </entry>
1468        <entry name="captureIntent" type="byte" visibility="public" enum="true"
1469               hwlevel="legacy">
1470          <enum>
1471            <value>CUSTOM
1472            <notes>The goal of this request doesn't fall into the other
1473            categories. The camera device will default to preview-like
1474            behavior.</notes></value>
1475            <value>PREVIEW
1476            <notes>This request is for a preview-like use case.
1477
1478            The precapture trigger may be used to start off a metering
1479            w/flash sequence.
1480            </notes></value>
1481            <value>STILL_CAPTURE
1482            <notes>This request is for a still capture-type
1483            use case.
1484
1485            If the flash unit is under automatic control, it may fire as needed.
1486            </notes></value>
1487            <value>VIDEO_RECORD
1488            <notes>This request is for a video recording
1489            use case.</notes></value>
1490            <value>VIDEO_SNAPSHOT
1491            <notes>This request is for a video snapshot (still
1492            image while recording video) use case.
1493
1494            The camera device should take the highest-quality image
1495            possible (given the other settings) without disrupting the
1496            frame rate of video recording.  </notes></value>
1497            <value>ZERO_SHUTTER_LAG
1498            <notes>This request is for a ZSL usecase; the
1499            application will stream full-resolution images and
1500            reprocess one or several later for a final
1501            capture.
1502            </notes></value>
1503            <value>MANUAL
1504            <notes>This request is for manual capture use case where
1505            the applications want to directly control the capture parameters.
1506
1507            For example, the application may wish to manually control
1508            android.sensor.exposureTime, android.sensor.sensitivity, etc.
1509            </notes></value>
1510            <value hal_version="3.3">MOTION_TRACKING
1511            <notes>This request is for a motion tracking use case, where
1512            the application will use camera and inertial sensor data to
1513            locate and track objects in the world.
1514
1515            The camera device auto-exposure routine will limit the exposure time
1516            of the camera to no more than 20 milliseconds, to minimize motion blur.
1517            </notes></value>
1518          </enum>
1519          <description>Information to the camera device 3A (auto-exposure,
1520          auto-focus, auto-white balance) routines about the purpose
1521          of this capture, to help the camera device to decide optimal 3A
1522          strategy.</description>
1523          <details>This control (except for MANUAL) is only effective if
1524          `android.control.mode != OFF` and any 3A routine is active.
1525
1526          All intents are supported by all devices, except that:
1527            * ZERO_SHUTTER_LAG will be supported if android.request.availableCapabilities contains
1528          PRIVATE_REPROCESSING or YUV_REPROCESSING.
1529            * MANUAL will be supported if android.request.availableCapabilities contains
1530          MANUAL_SENSOR.
1531            * MOTION_TRACKING will be supported if android.request.availableCapabilities contains
1532          MOTION_TRACKING.
1533          </details>
1534          <tag id="BC" />
1535        </entry>
1536        <entry name="effectMode" type="byte" visibility="public" enum="true"
1537               hwlevel="legacy">
1538          <enum>
1539            <value>OFF
1540              <notes>
1541              No color effect will be applied.
1542              </notes>
1543            </value>
1544            <value optional="true">MONO
1545              <notes>
1546              A "monocolor" effect where the image is mapped into
1547              a single color.
1548
1549              This will typically be grayscale.
1550              </notes>
1551            </value>
1552            <value optional="true">NEGATIVE
1553              <notes>
1554              A "photo-negative" effect where the image's colors
1555              are inverted.
1556              </notes>
1557            </value>
1558            <value optional="true">SOLARIZE
1559              <notes>
1560              A "solarisation" effect (Sabattier effect) where the
1561              image is wholly or partially reversed in
1562              tone.
1563              </notes>
1564            </value>
1565            <value optional="true">SEPIA
1566              <notes>
1567              A "sepia" effect where the image is mapped into warm
1568              gray, red, and brown tones.
1569              </notes>
1570            </value>
1571            <value optional="true">POSTERIZE
1572              <notes>
1573              A "posterization" effect where the image uses
1574              discrete regions of tone rather than a continuous
1575              gradient of tones.
1576              </notes>
1577            </value>
1578            <value optional="true">WHITEBOARD
1579              <notes>
1580              A "whiteboard" effect where the image is typically displayed
1581              as regions of white, with black or grey details.
1582              </notes>
1583            </value>
1584            <value optional="true">BLACKBOARD
1585              <notes>
1586              A "blackboard" effect where the image is typically displayed
1587              as regions of black, with white or grey details.
1588              </notes>
1589            </value>
1590            <value optional="true">AQUA
1591              <notes>
1592              An "aqua" effect where a blue hue is added to the image.
1593              </notes>
1594            </value>
1595          </enum>
1596          <description>A special color effect to apply.</description>
1597          <range>android.control.availableEffects</range>
1598          <details>
1599          When this mode is set, a color effect will be applied
1600          to images produced by the camera device. The interpretation
1601          and implementation of these color effects is left to the
1602          implementor of the camera device, and should not be
1603          depended on to be consistent (or present) across all
1604          devices.
1605          </details>
1606          <tag id="BC" />
1607        </entry>
1608        <entry name="mode" type="byte" visibility="public" enum="true"
1609               hwlevel="legacy">
1610          <enum>
1611            <value>OFF
1612            <notes>Full application control of pipeline.
1613
1614            All control by the device's metering and focusing (3A)
1615            routines is disabled, and no other settings in
1616            android.control.* have any effect, except that
1617            android.control.captureIntent may be used by the camera
1618            device to select post-processing values for processing
1619            blocks that do not allow for manual control, or are not
1620            exposed by the camera API.
1621
1622            However, the camera device's 3A routines may continue to
1623            collect statistics and update their internal state so that
1624            when control is switched to AUTO mode, good control values
1625            can be immediately applied.
1626            </notes></value>
1627            <value>AUTO
1628            <notes>Use settings for each individual 3A routine.
1629
1630            Manual control of capture parameters is disabled. All
1631            controls in android.control.* besides sceneMode take
1632            effect.</notes></value>
1633            <value optional="true">USE_SCENE_MODE
1634            <notes>Use a specific scene mode.
1635
1636            Enabling this disables control.aeMode, control.awbMode and
1637            control.afMode controls; the camera device will ignore
1638            those settings while USE_SCENE_MODE is active (except for
1639            FACE_PRIORITY scene mode). Other control entries are still active.
1640            This setting can only be used if scene mode is supported (i.e.
1641            android.control.availableSceneModes
1642            contain some modes other than DISABLED).
1643
1644            For extended scene modes such as BOKEH, please use USE_EXTENDED_SCENE_MODE instead.
1645            </notes></value>
1646            <value optional="true">OFF_KEEP_STATE
1647            <notes>Same as OFF mode, except that this capture will not be
1648            used by camera device background auto-exposure, auto-white balance and
1649            auto-focus algorithms (3A) to update their statistics.
1650
1651            Specifically, the 3A routines are locked to the last
1652            values set from a request with AUTO, OFF, or
1653            USE_SCENE_MODE, and any statistics or state updates
1654            collected from manual captures with OFF_KEEP_STATE will be
1655            discarded by the camera device.
1656            </notes></value>
1657            <value optional="true" hal_version="3.5">USE_EXTENDED_SCENE_MODE
1658            <notes>Use a specific extended scene mode.
1659
1660            When extended scene mode is on, the camera device may override certain control
1661            parameters, such as targetFpsRange, AE, AWB, and AF modes, to achieve best power and
1662            quality tradeoffs. Only the mandatory stream combinations of LIMITED hardware level
1663            are guaranteed.
1664
1665            This setting can only be used if extended scene mode is supported (i.e.
1666            android.control.availableExtendedSceneModes
1667            contains some modes other than DISABLED).</notes></value>
1668          </enum>
1669          <description>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
1670          routines.</description>
1671          <range>android.control.availableModes</range>
1672          <details>
1673          This is a top-level 3A control switch. When set to OFF, all 3A control
1674          by the camera device is disabled. The application must set the fields for
1675          capture parameters itself.
1676
1677          When set to AUTO, the individual algorithm controls in
1678          android.control.* are in effect, such as android.control.afMode.
1679
1680          When set to USE_SCENE_MODE or USE_EXTENDED_SCENE_MODE, the individual controls in
1681          android.control.* are mostly disabled, and the camera device
1682          implements one of the scene mode or extended scene mode settings (such as ACTION,
1683          SUNSET, PARTY, or BOKEH) as it wishes. The camera device scene mode
1684          3A settings are provided by {@link
1685          android.hardware.camera2.CaptureResult|ACameraCaptureSession_captureCallback_result
1686          capture results}.
1687
1688          When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
1689          is that this frame will not be used by camera device background 3A statistics
1690          update, as if this frame is never captured. This mode can be used in the scenario
1691          where the application doesn't want a 3A manual control capture to affect
1692          the subsequent auto 3A capture results.
1693          </details>
1694          <tag id="BC" />
1695        </entry>
1696        <entry name="sceneMode" type="byte" visibility="public" enum="true"
1697               hwlevel="legacy">
1698          <enum>
1699            <value id="0">DISABLED
1700              <notes>
1701              Indicates that no scene modes are set for a given capture request.
1702              </notes>
1703            </value>
1704            <value>FACE_PRIORITY
1705              <notes>If face detection support exists, use face
1706              detection data for auto-focus, auto-white balance, and
1707              auto-exposure routines.
1708
1709              If face detection statistics are disabled
1710              (i.e. android.statistics.faceDetectMode is set to OFF),
1711              this should still operate correctly (but will not return
1712              face detection statistics to the framework).
1713
1714              Unlike the other scene modes, android.control.aeMode,
1715              android.control.awbMode, and android.control.afMode
1716              remain active when FACE_PRIORITY is set.
1717              </notes>
1718            </value>
1719            <value optional="true">ACTION
1720              <notes>
1721              Optimized for photos of quickly moving objects.
1722
1723              Similar to SPORTS.
1724              </notes>
1725            </value>
1726            <value optional="true">PORTRAIT
1727              <notes>
1728              Optimized for still photos of people.
1729              </notes>
1730            </value>
1731            <value optional="true">LANDSCAPE
1732              <notes>
1733              Optimized for photos of distant macroscopic objects.
1734              </notes>
1735            </value>
1736            <value optional="true">NIGHT
1737              <notes>
1738              Optimized for low-light settings.
1739              </notes>
1740            </value>
1741            <value optional="true">NIGHT_PORTRAIT
1742              <notes>
1743              Optimized for still photos of people in low-light
1744              settings.
1745              </notes>
1746            </value>
1747            <value optional="true">THEATRE
1748              <notes>
1749              Optimized for dim, indoor settings where flash must
1750              remain off.
1751              </notes>
1752            </value>
1753            <value optional="true">BEACH
1754              <notes>
1755              Optimized for bright, outdoor beach settings.
1756              </notes>
1757            </value>
1758            <value optional="true">SNOW
1759              <notes>
1760              Optimized for bright, outdoor settings containing snow.
1761              </notes>
1762            </value>
1763            <value optional="true">SUNSET
1764              <notes>
1765              Optimized for scenes of the setting sun.
1766              </notes>
1767            </value>
1768            <value optional="true">STEADYPHOTO
1769              <notes>
1770              Optimized to avoid blurry photos due to small amounts of
1771              device motion (for example: due to hand shake).
1772              </notes>
1773            </value>
1774            <value optional="true">FIREWORKS
1775              <notes>
1776              Optimized for nighttime photos of fireworks.
1777              </notes>
1778            </value>
1779            <value optional="true">SPORTS
1780              <notes>
1781              Optimized for photos of quickly moving people.
1782
1783              Similar to ACTION.
1784              </notes>
1785            </value>
1786            <value optional="true">PARTY
1787              <notes>
1788              Optimized for dim, indoor settings with multiple moving
1789              people.
1790              </notes>
1791            </value>
1792            <value optional="true">CANDLELIGHT
1793              <notes>
1794              Optimized for dim settings where the main light source
1795              is a candle.
1796              </notes>
1797            </value>
1798            <value optional="true">BARCODE
1799              <notes>
1800              Optimized for accurately capturing a photo of barcode
1801              for use by camera applications that wish to read the
1802              barcode value.
1803              </notes>
1804            </value>
1805            <value deprecated="true" optional="true" visibility="java_public">HIGH_SPEED_VIDEO
1806              <notes>
1807              This is deprecated, please use {@link
1808              android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}
1809              and {@link
1810              android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList}
1811              for high speed video recording.
1812
1813              Optimized for high speed video recording (frame rate >=60fps) use case.
1814
1815              The supported high speed video sizes and fps ranges are specified in
1816              android.control.availableHighSpeedVideoConfigurations. To get desired
1817              output frame rates, the application is only allowed to select video size
1818              and fps range combinations listed in this static metadata. The fps range
1819              can be control via android.control.aeTargetFpsRange.
1820
1821              In this mode, the camera device will override aeMode, awbMode, and afMode to
1822              ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
1823              controls will be overridden to be FAST. Therefore, no manual control of capture
1824              and post-processing parameters is possible. All other controls operate the
1825              same as when android.control.mode == AUTO. This means that all other
1826              android.control.* fields continue to work, such as
1827
1828              * android.control.aeTargetFpsRange
1829              * android.control.aeExposureCompensation
1830              * android.control.aeLock
1831              * android.control.awbLock
1832              * android.control.effectMode
1833              * android.control.aeRegions
1834              * android.control.afRegions
1835              * android.control.awbRegions
1836              * android.control.afTrigger
1837              * android.control.aePrecaptureTrigger
1838              * android.control.zoomRatio
1839
1840              Outside of android.control.*, the following controls will work:
1841
1842              * android.flash.mode (automatic flash for still capture will not work since aeMode is ON)
1843              * android.lens.opticalStabilizationMode (if it is supported)
1844              * android.scaler.cropRegion
1845              * android.statistics.faceDetectMode
1846
1847              For high speed recording use case, the actual maximum supported frame rate may
1848              be lower than what camera can output, depending on the destination Surfaces for
1849              the image data. For example, if the destination surface is from video encoder,
1850              the application need check if the video encoder is capable of supporting the
1851              high frame rate for a given video size, or it will end up with lower recording
1852              frame rate. If the destination surface is from preview window, the preview frame
1853              rate will be bounded by the screen refresh rate.
1854
1855              The camera device will only support up to 2 output high speed streams
1856              (processed non-stalling format defined in android.request.maxNumOutputStreams)
1857              in this mode. This control will be effective only if all of below conditions are true:
1858
1859              * The application created no more than maxNumHighSpeedStreams processed non-stalling
1860              format output streams, where maxNumHighSpeedStreams is calculated as
1861              min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).
1862              * The stream sizes are selected from the sizes reported by
1863              android.control.availableHighSpeedVideoConfigurations.
1864              * No processed non-stalling or raw streams are configured.
1865
1866              When above conditions are NOT satistied, the controls of this mode and
1867              android.control.aeTargetFpsRange will be ignored by the camera device,
1868              the camera device will fall back to android.control.mode `==` AUTO,
1869              and the returned capture result metadata will give the fps range choosen
1870              by the camera device.
1871
1872              Switching into or out of this mode may trigger some camera ISP/sensor
1873              reconfigurations, which may introduce extra latency. It is recommended that
1874              the application avoids unnecessary scene mode switch as much as possible.
1875              </notes>
1876            </value>
1877            <value optional="true">HDR
1878              <notes>
1879              Turn on a device-specific high dynamic range (HDR) mode.
1880
1881              In this scene mode, the camera device captures images
1882              that keep a larger range of scene illumination levels
1883              visible in the final image. For example, when taking a
1884              picture of a object in front of a bright window, both
1885              the object and the scene through the window may be
1886              visible when using HDR mode, while in normal AUTO mode,
1887              one or the other may be poorly exposed. As a tradeoff,
1888              HDR mode generally takes much longer to capture a single
1889              image, has no user control, and may have other artifacts
1890              depending on the HDR method used.
1891
1892              Therefore, HDR captures operate at a much slower rate
1893              than regular captures.
1894
1895              In this mode, on LIMITED or FULL devices, when a request
1896              is made with a android.control.captureIntent of
1897              STILL_CAPTURE, the camera device will capture an image
1898              using a high dynamic range capture technique.  On LEGACY
1899              devices, captures that target a JPEG-format output will
1900              be captured with HDR, and the capture intent is not
1901              relevant.
1902
1903              The HDR capture may involve the device capturing a burst
1904              of images internally and combining them into one, or it
1905              may involve the device using specialized high dynamic
1906              range capture hardware. In all cases, a single image is
1907              produced in response to a capture request submitted
1908              while in HDR mode.
1909
1910              Since substantial post-processing is generally needed to
1911              produce an HDR image, only YUV, PRIVATE, and JPEG
1912              outputs are supported for LIMITED/FULL device HDR
1913              captures, and only JPEG outputs are supported for LEGACY
1914              HDR captures. Using a RAW output for HDR capture is not
1915              supported.
1916
1917              Some devices may also support always-on HDR, which
1918              applies HDR processing at full frame rate.  For these
1919              devices, intents other than STILL_CAPTURE will also
1920              produce an HDR output with no frame rate impact compared
1921              to normal operation, though the quality may be lower
1922              than for STILL_CAPTURE intents.
1923
1924              If SCENE_MODE_HDR is used with unsupported output types
1925              or capture intents, the images captured will be as if
1926              the SCENE_MODE was not enabled at all.
1927              </notes>
1928            </value>
1929            <value optional="true" visibility="hidden">FACE_PRIORITY_LOW_LIGHT
1930              <notes>Same as FACE_PRIORITY scene mode, except that the camera
1931              device will choose higher sensitivity values (android.sensor.sensitivity)
1932              under low light conditions.
1933
1934              The camera device may be tuned to expose the images in a reduced
1935              sensitivity range to produce the best quality images. For example,
1936              if the android.sensor.info.sensitivityRange gives range of [100, 1600],
1937              the camera device auto-exposure routine tuning process may limit the actual
1938              exposure sensitivity range to [100, 1200] to ensure that the noise level isn't
1939              exessive in order to preserve the image quality. Under this situation, the image under
1940              low light may be under-exposed when the sensor max exposure time (bounded by the
1941              android.control.aeTargetFpsRange when android.control.aeMode is one of the
1942              ON_* modes) and effective max sensitivity are reached. This scene mode allows the
1943              camera device auto-exposure routine to increase the sensitivity up to the max
1944              sensitivity specified by android.sensor.info.sensitivityRange when the scene is too
1945              dark and the max exposure time is reached. The captured images may be noisier
1946              compared with the images captured in normal FACE_PRIORITY mode; therefore, it is
1947              recommended that the application only use this scene mode when it is capable of
1948              reducing the noise level of the captured images.
1949
1950              Unlike the other scene modes, android.control.aeMode,
1951              android.control.awbMode, and android.control.afMode
1952              remain active when FACE_PRIORITY_LOW_LIGHT is set.
1953              </notes>
1954            </value>
1955            <value optional="true" visibility="hidden" id="100">DEVICE_CUSTOM_START
1956              <notes>
1957                Scene mode values within the range of
1958                `[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]` are reserved for device specific
1959                customized scene modes.
1960              </notes>
1961            </value>
1962            <value optional="true" visibility="hidden" id="127">DEVICE_CUSTOM_END
1963              <notes>
1964                Scene mode values within the range of
1965                `[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]` are reserved for device specific
1966                customized scene modes.
1967              </notes>
1968            </value>
1969          </enum>
1970          <description>
1971          Control for which scene mode is currently active.
1972          </description>
1973          <range>android.control.availableSceneModes</range>
1974          <details>
1975          Scene modes are custom camera modes optimized for a certain set of conditions and
1976          capture settings.
1977
1978          This is the mode that that is active when
1979          `android.control.mode == USE_SCENE_MODE`. Aside from FACE_PRIORITY, these modes will
1980          disable android.control.aeMode, android.control.awbMode, and android.control.afMode
1981          while in use.
1982
1983          The interpretation and implementation of these scene modes is left
1984          to the implementor of the camera device. Their behavior will not be
1985          consistent across all devices, and any given device may only implement
1986          a subset of these modes.
1987          </details>
1988          <hal_details>
1989          HAL implementations that include scene modes are expected to provide
1990          the per-scene settings to use for android.control.aeMode,
1991          android.control.awbMode, and android.control.afMode in
1992          android.control.sceneModeOverrides.
1993
1994          For HIGH_SPEED_VIDEO mode, if it is included in android.control.availableSceneModes, the
1995          HAL must list supported video size and fps range in
1996          android.control.availableHighSpeedVideoConfigurations. For a given size, e.g.  1280x720,
1997          if the HAL has two different sensor configurations for normal streaming mode and high
1998          speed streaming, when this scene mode is set/reset in a sequence of capture requests, the
1999          HAL may have to switch between different sensor modes.  This mode is deprecated in legacy
2000          HAL3.3, to support high speed video recording, please implement
2001          android.control.availableHighSpeedVideoConfigurations and CONSTRAINED_HIGH_SPEED_VIDEO
2002          capbility defined in android.request.availableCapabilities.
2003          </hal_details>
2004          <tag id="BC" />
2005        </entry>
2006        <entry name="videoStabilizationMode" type="byte" visibility="public"
2007               enum="true" hwlevel="legacy">
2008          <enum>
2009            <value>OFF
2010            <notes>
2011              Video stabilization is disabled.
2012            </notes></value>
2013            <value>ON
2014            <notes>
2015              Video stabilization is enabled.
2016            </notes></value>
2017          </enum>
2018          <description>Whether video stabilization is
2019          active.</description>
2020          <details>
2021          Video stabilization automatically warps images from
2022          the camera in order to stabilize motion between consecutive frames.
2023
2024          If enabled, video stabilization can modify the
2025          android.scaler.cropRegion to keep the video stream stabilized.
2026
2027          Switching between different video stabilization modes may take several
2028          frames to initialize, the camera device will report the current mode
2029          in capture result metadata. For example, When "ON" mode is requested,
2030          the video stabilization modes in the first several capture results may
2031          still be "OFF", and it will become "ON" when the initialization is
2032          done.
2033
2034          In addition, not all recording sizes or frame rates may be supported for
2035          stabilization by a device that reports stabilization support. It is guaranteed
2036          that an output targeting a MediaRecorder or MediaCodec will be stabilized if
2037          the recording resolution is less than or equal to 1920 x 1080 (width less than
2038          or equal to 1920, height less than or equal to 1080), and the recording
2039          frame rate is less than or equal to 30fps.  At other sizes, the CaptureResult
2040          android.control.videoStabilizationMode field will return
2041          OFF if the recording output is not stabilized, or if there are no output
2042          Surface types that can be stabilized.
2043
2044          If a camera device supports both this mode and OIS
2045          (android.lens.opticalStabilizationMode), turning both modes on may
2046          produce undesirable interaction, so it is recommended not to enable
2047          both at the same time.
2048          </details>
2049          <tag id="BC" />
2050        </entry>
2051      </controls>
2052      <static>
2053        <entry name="aeAvailableAntibandingModes" type="byte" visibility="public"
2054               type_notes="list of enums" container="array" typedef="enumList"
2055               hwlevel="legacy">
2056          <array>
2057            <size>n</size>
2058          </array>
2059          <description>
2060            List of auto-exposure antibanding modes for android.control.aeAntibandingMode that are
2061            supported by this camera device.
2062          </description>
2063          <range>Any value listed in android.control.aeAntibandingMode</range>
2064          <details>
2065            Not all of the auto-exposure anti-banding modes may be
2066            supported by a given camera device. This field lists the
2067            valid anti-banding modes that the application may request
2068            for this camera device with the
2069            android.control.aeAntibandingMode control.
2070          </details>
2071          <tag id="BC" />
2072        </entry>
2073        <entry name="aeAvailableModes" type="byte" visibility="public"
2074               type_notes="list of enums" container="array" typedef="enumList"
2075               hwlevel="legacy">
2076          <array>
2077            <size>n</size>
2078          </array>
2079          <description>
2080            List of auto-exposure modes for android.control.aeMode that are supported by this camera
2081            device.
2082          </description>
2083          <range>Any value listed in android.control.aeMode</range>
2084          <details>
2085            Not all the auto-exposure modes may be supported by a
2086            given camera device, especially if no flash unit is
2087            available. This entry lists the valid modes for
2088            android.control.aeMode for this camera device.
2089
2090            All camera devices support ON, and all camera devices with flash
2091            units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.
2092
2093            FULL mode camera devices always support OFF mode,
2094            which enables application control of camera exposure time,
2095            sensitivity, and frame duration.
2096
2097            LEGACY mode camera devices never support OFF mode.
2098            LIMITED mode devices support OFF if they support the MANUAL_SENSOR
2099            capability.
2100          </details>
2101          <tag id="BC" />
2102        </entry>
2103        <entry name="aeAvailableTargetFpsRanges" type="int32" visibility="public"
2104               type_notes="list of pairs of frame rates"
2105               container="array" typedef="rangeInt"
2106               hwlevel="legacy">
2107          <array>
2108            <size>2</size>
2109            <size>n</size>
2110          </array>
2111          <description>List of frame rate ranges for android.control.aeTargetFpsRange supported by
2112          this camera device.</description>
2113          <units>Frames per second (FPS)</units>
2114          <details>
2115          For devices at the LEGACY level or above:
2116
2117          * For constant-framerate recording, for each normal
2118          {@link android.media.CamcorderProfile CamcorderProfile}, that is, a
2119          {@link android.media.CamcorderProfile CamcorderProfile} that has
2120          {@link android.media.CamcorderProfile#quality quality} in
2121          the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW},
2122          {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is
2123          supported by the device and has
2124          {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} `x`, this list will
2125          always include (`x`,`x`).
2126
2127          * Also, a camera device must either not support any
2128          {@link android.media.CamcorderProfile CamcorderProfile},
2129          or support at least one
2130          normal {@link android.media.CamcorderProfile CamcorderProfile} that has
2131          {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} `x` &gt;= 24.
2132
2133          For devices at the LIMITED level or above:
2134
2135          * For devices that advertise NIR color filter arrangement in
2136          android.sensor.info.colorFilterArrangement, this list will always include
2137          (`max`, `max`) where `max` = the maximum output frame rate of the maximum YUV_420_888
2138          output size.
2139          * For devices advertising any color filter arrangement other than NIR, or devices not
2140          advertising color filter arrangement, this list will always include (`min`, `max`) and
2141          (`max`, `max`) where `min` &lt;= 15 and `max` = the maximum output frame rate of the
2142          maximum YUV_420_888 output size.
2143
2144          </details>
2145          <tag id="BC" />
2146        </entry>
2147        <entry name="aeCompensationRange" type="int32" visibility="public"
2148               container="array" typedef="rangeInt"
2149               hwlevel="legacy">
2150          <array>
2151            <size>2</size>
2152          </array>
2153          <description>Maximum and minimum exposure compensation values for
2154          android.control.aeExposureCompensation, in counts of android.control.aeCompensationStep,
2155          that are supported by this camera device.</description>
2156          <range>
2157            Range [0,0] indicates that exposure compensation is not supported.
2158
2159            For LIMITED and FULL devices, range must follow below requirements if exposure
2160            compensation is supported (`range != [0, 0]`):
2161
2162            `Min.exposure compensation * android.control.aeCompensationStep &lt;= -2 EV`
2163
2164            `Max.exposure compensation * android.control.aeCompensationStep &gt;= 2 EV`
2165
2166            LEGACY devices may support a smaller range than this.
2167          </range>
2168          <tag id="BC" />
2169        </entry>
2170        <entry name="aeCompensationStep" type="rational" visibility="public"
2171               hwlevel="legacy">
2172          <description>Smallest step by which the exposure compensation
2173          can be changed.</description>
2174          <units>Exposure Value (EV)</units>
2175          <details>
2176          This is the unit for android.control.aeExposureCompensation. For example, if this key has
2177          a value of `1/2`, then a setting of `-2` for android.control.aeExposureCompensation means
2178          that the target EV offset for the auto-exposure routine is -1 EV.
2179
2180          One unit of EV compensation changes the brightness of the captured image by a factor
2181          of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.
2182          </details>
2183          <hal_details>
2184            This must be less than or equal to 1/2.
2185          </hal_details>
2186          <tag id="BC" />
2187        </entry>
2188        <entry name="afAvailableModes" type="byte" visibility="public"
2189               type_notes="List of enums" container="array" typedef="enumList"
2190               hwlevel="legacy">
2191          <array>
2192            <size>n</size>
2193          </array>
2194          <description>
2195          List of auto-focus (AF) modes for android.control.afMode that are
2196          supported by this camera device.
2197          </description>
2198          <range>Any value listed in android.control.afMode</range>
2199          <details>
2200          Not all the auto-focus modes may be supported by a
2201          given camera device. This entry lists the valid modes for
2202          android.control.afMode for this camera device.
2203
2204          All LIMITED and FULL mode camera devices will support OFF mode, and all
2205          camera devices with adjustable focuser units
2206          (`android.lens.info.minimumFocusDistance &gt; 0`) will support AUTO mode.
2207
2208          LEGACY devices will support OFF mode only if they support
2209          focusing to infinity (by also setting android.lens.focusDistance to
2210          `0.0f`).
2211          </details>
2212          <tag id="BC" />
2213        </entry>
2214        <entry name="availableEffects" type="byte" visibility="public"
2215               type_notes="List of enums (android.control.effectMode)." container="array"
2216               typedef="enumList" hwlevel="legacy">
2217          <array>
2218            <size>n</size>
2219          </array>
2220          <description>
2221          List of color effects for android.control.effectMode that are supported by this camera
2222          device.
2223          </description>
2224          <range>Any value listed in android.control.effectMode</range>
2225          <details>
2226          This list contains the color effect modes that can be applied to
2227          images produced by the camera device.
2228          Implementations are not expected to be consistent across all devices.
2229          If no color effect modes are available for a device, this will only list
2230          OFF.
2231
2232          A color effect will only be applied if
2233          android.control.mode != OFF.  OFF is always included in this list.
2234
2235          This control has no effect on the operation of other control routines such
2236          as auto-exposure, white balance, or focus.
2237          </details>
2238          <tag id="BC" />
2239        </entry>
2240        <entry name="availableSceneModes" type="byte" visibility="public"
2241               type_notes="List of enums (android.control.sceneMode)."
2242               container="array" typedef="enumList" hwlevel="legacy">
2243          <array>
2244            <size>n</size>
2245          </array>
2246          <description>
2247          List of scene modes for android.control.sceneMode that are supported by this camera
2248          device.
2249          </description>
2250          <range>Any value listed in android.control.sceneMode</range>
2251          <details>
2252          This list contains scene modes that can be set for the camera device.
2253          Only scene modes that have been fully implemented for the
2254          camera device may be included here. Implementations are not expected
2255          to be consistent across all devices.
2256
2257          If no scene modes are supported by the camera device, this
2258          will be set to DISABLED. Otherwise DISABLED will not be listed.
2259
2260          FACE_PRIORITY is always listed if face detection is
2261          supported (i.e.`android.statistics.info.maxFaceCount &gt;
2262          0`).
2263          </details>
2264          <tag id="BC" />
2265        </entry>
2266        <entry name="availableVideoStabilizationModes" type="byte"
2267               visibility="public" type_notes="List of enums." container="array"
2268               typedef="enumList" hwlevel="legacy">
2269          <array>
2270            <size>n</size>
2271          </array>
2272          <description>
2273          List of video stabilization modes for android.control.videoStabilizationMode
2274          that are supported by this camera device.
2275          </description>
2276          <range>Any value listed in android.control.videoStabilizationMode</range>
2277          <details>
2278          OFF will always be listed.
2279          </details>
2280          <tag id="BC" />
2281        </entry>
2282        <entry name="awbAvailableModes" type="byte" visibility="public"
2283               type_notes="List of enums"
2284               container="array" typedef="enumList" hwlevel="legacy">
2285          <array>
2286            <size>n</size>
2287          </array>
2288          <description>
2289          List of auto-white-balance modes for android.control.awbMode that are supported by this
2290          camera device.
2291          </description>
2292          <range>Any value listed in android.control.awbMode</range>
2293          <details>
2294          Not all the auto-white-balance modes may be supported by a
2295          given camera device. This entry lists the valid modes for
2296          android.control.awbMode for this camera device.
2297
2298          All camera devices will support ON mode.
2299
2300          Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
2301          mode, which enables application control of white balance, by using
2302          android.colorCorrection.transform and android.colorCorrection.gains
2303          (android.colorCorrection.mode must be set to TRANSFORM_MATRIX). This includes all FULL
2304          mode camera devices.
2305          </details>
2306          <tag id="BC" />
2307        </entry>
2308        <entry name="maxRegions" type="int32" visibility="ndk_public"
2309               container="array" hwlevel="legacy">
2310          <array>
2311            <size>3</size>
2312          </array>
2313          <description>
2314          List of the maximum number of regions that can be used for metering in
2315          auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
2316          this corresponds to the maximum number of elements in
2317          android.control.aeRegions, android.control.awbRegions,
2318          and android.control.afRegions.
2319          </description>
2320          <range>
2321          Value must be &amp;gt;= 0 for each element. For full-capability devices
2322          this value must be &amp;gt;= 1 for AE and AF. The order of the elements is:
2323          `(AE, AWB, AF)`.</range>
2324          <tag id="BC" />
2325        </entry>
2326        <entry name="maxRegionsAe" type="int32" visibility="java_public"
2327               synthetic="true" hwlevel="legacy">
2328          <description>
2329          The maximum number of metering regions that can be used by the auto-exposure (AE)
2330          routine.
2331          </description>
2332          <range>Value will be &amp;gt;= 0. For FULL-capability devices, this
2333          value will be &amp;gt;= 1.
2334          </range>
2335          <details>
2336          This corresponds to the maximum allowed number of elements in
2337          android.control.aeRegions.
2338          </details>
2339          <hal_details>This entry is private to the framework. Fill in
2340          maxRegions to have this entry be automatically populated.
2341          </hal_details>
2342        </entry>
2343        <entry name="maxRegionsAwb" type="int32" visibility="java_public"
2344               synthetic="true" hwlevel="legacy">
2345          <description>
2346          The maximum number of metering regions that can be used by the auto-white balance (AWB)
2347          routine.
2348          </description>
2349          <range>Value will be &amp;gt;= 0.
2350          </range>
2351          <details>
2352          This corresponds to the maximum allowed number of elements in
2353          android.control.awbRegions.
2354          </details>
2355          <hal_details>This entry is private to the framework. Fill in
2356          maxRegions to have this entry be automatically populated.
2357          </hal_details>
2358        </entry>
2359        <entry name="maxRegionsAf" type="int32" visibility="java_public"
2360               synthetic="true" hwlevel="legacy">
2361          <description>
2362          The maximum number of metering regions that can be used by the auto-focus (AF) routine.
2363          </description>
2364          <range>Value will be &amp;gt;= 0. For FULL-capability devices, this
2365          value will be &amp;gt;= 1.
2366          </range>
2367          <details>
2368          This corresponds to the maximum allowed number of elements in
2369          android.control.afRegions.
2370          </details>
2371          <hal_details>This entry is private to the framework. Fill in
2372          maxRegions to have this entry be automatically populated.
2373          </hal_details>
2374        </entry>
2375        <entry name="sceneModeOverrides" type="byte" visibility="system"
2376               container="array" hwlevel="limited">
2377          <array>
2378            <size>3</size>
2379            <size>length(availableSceneModes)</size>
2380          </array>
2381          <description>
2382          Ordered list of auto-exposure, auto-white balance, and auto-focus
2383          settings to use with each available scene mode.
2384          </description>
2385          <range>
2386          For each available scene mode, the list must contain three
2387          entries containing the android.control.aeMode,
2388          android.control.awbMode, and android.control.afMode values used
2389          by the camera device. The entry order is `(aeMode, awbMode, afMode)`
2390          where aeMode has the lowest index position.
2391          </range>
2392          <details>
2393          When a scene mode is enabled, the camera device is expected
2394          to override android.control.aeMode, android.control.awbMode,
2395          and android.control.afMode with its preferred settings for
2396          that scene mode.
2397
2398          The order of this list matches that of availableSceneModes,
2399          with 3 entries for each mode.  The overrides listed
2400          for FACE_PRIORITY and FACE_PRIORITY_LOW_LIGHT (if supported) are ignored,
2401          since for that mode the application-set android.control.aeMode,
2402          android.control.awbMode, and android.control.afMode values are
2403          used instead, matching the behavior when android.control.mode
2404          is set to AUTO. It is recommended that the FACE_PRIORITY and
2405          FACE_PRIORITY_LOW_LIGHT (if supported) overrides should be set to 0.
2406
2407          For example, if availableSceneModes contains
2408          `(FACE_PRIORITY, ACTION, NIGHT)`,  then the camera framework
2409          expects sceneModeOverrides to have 9 entries formatted like:
2410          `(0, 0, 0, ON_AUTO_FLASH, AUTO, CONTINUOUS_PICTURE,
2411          ON_AUTO_FLASH, INCANDESCENT, AUTO)`.
2412          </details>
2413          <hal_details>
2414          To maintain backward compatibility, this list will be made available
2415          in the static metadata of the camera service.  The camera service will
2416          use these values to set android.control.aeMode,
2417          android.control.awbMode, and android.control.afMode when using a scene
2418          mode other than FACE_PRIORITY and FACE_PRIORITY_LOW_LIGHT (if supported).
2419          </hal_details>
2420          <tag id="BC" />
2421        </entry>
2422      </static>
2423      <dynamic>
2424        <entry name="aePrecaptureId" type="int32" visibility="system" deprecated="true">
2425          <description>The ID sent with the latest
2426          CAMERA2_TRIGGER_PRECAPTURE_METERING call</description>
2427          <deprecation_description>
2428            Removed in camera HAL v3
2429          </deprecation_description>
2430          <details>Must be 0 if no
2431          CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet
2432          by HAL. Always updated even if AE algorithm ignores the
2433          trigger</details>
2434        </entry>
2435        <clone entry="android.control.aeAntibandingMode" kind="controls">
2436        </clone>
2437        <clone entry="android.control.aeExposureCompensation" kind="controls">
2438        </clone>
2439        <clone entry="android.control.aeLock" kind="controls">
2440        </clone>
2441        <clone entry="android.control.aeMode" kind="controls">
2442        </clone>
2443        <clone entry="android.control.aeRegions" kind="controls">
2444        </clone>
2445        <clone entry="android.control.aeTargetFpsRange" kind="controls">
2446        </clone>
2447        <clone entry="android.control.aePrecaptureTrigger" kind="controls">
2448        </clone>
2449        <entry name="aeState" type="byte" visibility="public" enum="true"
2450               hwlevel="limited">
2451          <enum>
2452            <value>INACTIVE
2453            <notes>AE is off or recently reset.
2454
2455            When a camera device is opened, it starts in
2456            this state. This is a transient state, the camera device may skip reporting
2457            this state in capture result.</notes></value>
2458            <value>SEARCHING
2459            <notes>AE doesn't yet have a good set of control values
2460            for the current scene.
2461
2462            This is a transient state, the camera device may skip
2463            reporting this state in capture result.</notes></value>
2464            <value>CONVERGED
2465            <notes>AE has a good set of control values for the
2466            current scene.</notes></value>
2467            <value>LOCKED
2468            <notes>AE has been locked.</notes></value>
2469            <value>FLASH_REQUIRED
2470            <notes>AE has a good set of control values, but flash
2471            needs to be fired for good quality still
2472            capture.</notes></value>
2473            <value>PRECAPTURE
2474            <notes>AE has been asked to do a precapture sequence
2475            and is currently executing it.
2476
2477            Precapture can be triggered through setting
2478            android.control.aePrecaptureTrigger to START. Currently
2479            active and completed (if it causes camera device internal AE lock) precapture
2480            metering sequence can be canceled through setting
2481            android.control.aePrecaptureTrigger to CANCEL.
2482
2483            Once PRECAPTURE completes, AE will transition to CONVERGED
2484            or FLASH_REQUIRED as appropriate. This is a transient
2485            state, the camera device may skip reporting this state in
2486            capture result.</notes></value>
2487          </enum>
2488          <description>Current state of the auto-exposure (AE) algorithm.</description>
2489          <details>Switching between or enabling AE modes (android.control.aeMode) always
2490          resets the AE state to INACTIVE. Similarly, switching between android.control.mode,
2491          or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all
2492          the algorithm states to INACTIVE.
2493
2494          The camera device can do several state transitions between two results, if it is
2495          allowed by the state transition table. For example: INACTIVE may never actually be
2496          seen in a result.
2497
2498          The state in the result is the state for this image (in sync with this image): if
2499          AE state becomes CONVERGED, then the image data associated with this result should
2500          be good to use.
2501
2502          Below are state transition tables for different AE modes.
2503
2504            State       | Transition Cause | New State | Notes
2505          :------------:|:----------------:|:---------:|:-----------------------:
2506          INACTIVE      |                  | INACTIVE  | Camera device auto exposure algorithm is disabled
2507
2508          When android.control.aeMode is AE_MODE_ON*:
2509
2510            State        | Transition Cause                             | New State      | Notes
2511          :-------------:|:--------------------------------------------:|:--------------:|:-----------------:
2512          INACTIVE       | Camera device initiates AE scan              | SEARCHING      | Values changing
2513          INACTIVE       | android.control.aeLock is ON                 | LOCKED         | Values locked
2514          SEARCHING      | Camera device finishes AE scan               | CONVERGED      | Good values, not changing
2515          SEARCHING      | Camera device finishes AE scan               | FLASH_REQUIRED | Converged but too dark w/o flash
2516          SEARCHING      | android.control.aeLock is ON                 | LOCKED         | Values locked
2517          CONVERGED      | Camera device initiates AE scan              | SEARCHING      | Values changing
2518          CONVERGED      | android.control.aeLock is ON                 | LOCKED         | Values locked
2519          FLASH_REQUIRED | Camera device initiates AE scan              | SEARCHING      | Values changing
2520          FLASH_REQUIRED | android.control.aeLock is ON                 | LOCKED         | Values locked
2521          LOCKED         | android.control.aeLock is OFF                | SEARCHING      | Values not good after unlock
2522          LOCKED         | android.control.aeLock is OFF                | CONVERGED      | Values good after unlock
2523          LOCKED         | android.control.aeLock is OFF                | FLASH_REQUIRED | Exposure good, but too dark
2524          PRECAPTURE     | Sequence done. android.control.aeLock is OFF | CONVERGED      | Ready for high-quality capture
2525          PRECAPTURE     | Sequence done. android.control.aeLock is ON  | LOCKED         | Ready for high-quality capture
2526          LOCKED         | aeLock is ON and aePrecaptureTrigger is START | LOCKED        | Precapture trigger is ignored when AE is already locked
2527          LOCKED         | aeLock is ON and aePrecaptureTrigger is CANCEL| LOCKED        | Precapture trigger is ignored when AE is already locked
2528          Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is START | PRECAPTURE     | Start AE precapture metering sequence
2529          Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is CANCEL| INACTIVE       | Currently active precapture metering sequence is canceled
2530
2531          If the camera device supports AE external flash mode (ON_EXTERNAL_FLASH is included in
2532          android.control.aeAvailableModes), android.control.aeState must be FLASH_REQUIRED after
2533          the camera device finishes AE scan and it's too dark without flash.
2534
2535          For the above table, the camera device may skip reporting any state changes that happen
2536          without application intervention (i.e. mode switch, trigger, locking). Any state that
2537          can be skipped in that manner is called a transient state.
2538
2539          For example, for above AE modes (AE_MODE_ON*), in addition to the state transitions
2540          listed in above table, it is also legal for the camera device to skip one or more
2541          transient states between two results. See below table for examples:
2542
2543            State        | Transition Cause                                            | New State      | Notes
2544          :-------------:|:-----------------------------------------------------------:|:--------------:|:-----------------:
2545          INACTIVE       | Camera device finished AE scan                              | CONVERGED      | Values are already good, transient states are skipped by camera device.
2546          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.
2547          Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is START, sequence done | CONVERGED      | Converged after a precapture sequence, transient states are skipped by camera device.
2548          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.
2549          Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is CANCEL, converged    | CONVERGED      | Converged after a precapture sequenceis canceled, transient states are skipped by camera device.
2550          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.
2551          FLASH_REQUIRED | Camera device finished AE scan                              | CONVERGED      | Converged after a new scan, transient states are skipped by camera device.
2552          </details>
2553        </entry>
2554        <clone entry="android.control.afMode" kind="controls">
2555        </clone>
2556        <clone entry="android.control.afRegions" kind="controls">
2557        </clone>
2558        <clone entry="android.control.afTrigger" kind="controls">
2559        </clone>
2560        <entry name="afState" type="byte" visibility="public" enum="true"
2561               hwlevel="legacy">
2562          <enum>
2563            <value>INACTIVE
2564            <notes>AF is off or has not yet tried to scan/been asked
2565            to scan.
2566
2567            When a camera device is opened, it starts in this
2568            state. This is a transient state, the camera device may
2569            skip reporting this state in capture
2570            result.</notes></value>
2571            <value>PASSIVE_SCAN
2572            <notes>AF is currently performing an AF scan initiated the
2573            camera device in a continuous autofocus mode.
2574
2575            Only used by CONTINUOUS_* AF modes. This is a transient
2576            state, the camera device may skip reporting this state in
2577            capture result.</notes></value>
2578            <value>PASSIVE_FOCUSED
2579            <notes>AF currently believes it is in focus, but may
2580            restart scanning at any time.
2581
2582            Only used by CONTINUOUS_* AF modes. This is a transient
2583            state, the camera device may skip reporting this state in
2584            capture result.</notes></value>
2585            <value>ACTIVE_SCAN
2586            <notes>AF is performing an AF scan because it was
2587            triggered by AF trigger.
2588
2589            Only used by AUTO or MACRO AF modes. This is a transient
2590            state, the camera device may skip reporting this state in
2591            capture result.</notes></value>
2592            <value>FOCUSED_LOCKED
2593            <notes>AF believes it is focused correctly and has locked
2594            focus.
2595
2596            This state is reached only after an explicit START AF trigger has been
2597            sent (android.control.afTrigger), when good focus has been obtained.
2598
2599            The lens will remain stationary until the AF mode (android.control.afMode) is changed or
2600            a new AF trigger is sent to the camera device (android.control.afTrigger).
2601            </notes></value>
2602            <value>NOT_FOCUSED_LOCKED
2603            <notes>AF has failed to focus successfully and has locked
2604            focus.
2605
2606            This state is reached only after an explicit START AF trigger has been
2607            sent (android.control.afTrigger), when good focus cannot be obtained.
2608
2609            The lens will remain stationary until the AF mode (android.control.afMode) is changed or
2610            a new AF trigger is sent to the camera device (android.control.afTrigger).
2611            </notes></value>
2612            <value>PASSIVE_UNFOCUSED
2613            <notes>AF finished a passive scan without finding focus,
2614            and may restart scanning at any time.
2615
2616            Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
2617            device may skip reporting this state in capture result.
2618
2619            LEGACY camera devices do not support this state. When a passive
2620            scan has finished, it will always go to PASSIVE_FOCUSED.
2621            </notes></value>
2622          </enum>
2623          <description>Current state of auto-focus (AF) algorithm.</description>
2624          <details>
2625          Switching between or enabling AF modes (android.control.afMode) always
2626          resets the AF state to INACTIVE. Similarly, switching between android.control.mode,
2627          or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all
2628          the algorithm states to INACTIVE.
2629
2630          The camera device can do several state transitions between two results, if it is
2631          allowed by the state transition table. For example: INACTIVE may never actually be
2632          seen in a result.
2633
2634          The state in the result is the state for this image (in sync with this image): if
2635          AF state becomes FOCUSED, then the image data associated with this result should
2636          be sharp.
2637
2638          Below are state transition tables for different AF modes.
2639
2640          When android.control.afMode is AF_MODE_OFF or AF_MODE_EDOF:
2641
2642            State       | Transition Cause | New State | Notes
2643          :------------:|:----------------:|:---------:|:-----------:
2644          INACTIVE      |                  | INACTIVE  | Never changes
2645
2646          When android.control.afMode is AF_MODE_AUTO or AF_MODE_MACRO:
2647
2648            State            | Transition Cause | New State          | Notes
2649          :-----------------:|:----------------:|:------------------:|:--------------:
2650          INACTIVE           | AF_TRIGGER       | ACTIVE_SCAN        | Start AF sweep, Lens now moving
2651          ACTIVE_SCAN        | AF sweep done    | FOCUSED_LOCKED     | Focused, Lens now locked
2652          ACTIVE_SCAN        | AF sweep done    | NOT_FOCUSED_LOCKED | Not focused, Lens now locked
2653          ACTIVE_SCAN        | AF_CANCEL        | INACTIVE           | Cancel/reset AF, Lens now locked
2654          FOCUSED_LOCKED     | AF_CANCEL        | INACTIVE           | Cancel/reset AF
2655          FOCUSED_LOCKED     | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
2656          NOT_FOCUSED_LOCKED | AF_CANCEL        | INACTIVE           | Cancel/reset AF
2657          NOT_FOCUSED_LOCKED | AF_TRIGGER       | ACTIVE_SCAN        | Start new sweep, Lens now moving
2658          Any state          | Mode change      | INACTIVE           |
2659
2660          For the above table, the camera device may skip reporting any state changes that happen
2661          without application intervention (i.e. mode switch, trigger, locking). Any state that
2662          can be skipped in that manner is called a transient state.
2663
2664          For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
2665          state transitions listed in above table, it is also legal for the camera device to skip
2666          one or more transient states between two results. See below table for examples:
2667
2668            State            | Transition Cause | New State          | Notes
2669          :-----------------:|:----------------:|:------------------:|:--------------:
2670          INACTIVE           | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
2671          INACTIVE           | AF_TRIGGER       | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked.
2672          FOCUSED_LOCKED     | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is already good or good after a scan, lens is now locked.
2673          NOT_FOCUSED_LOCKED | AF_TRIGGER       | FOCUSED_LOCKED     | Focus is good after a scan, lens is not locked.
2674
2675
2676          When android.control.afMode is AF_MODE_CONTINUOUS_VIDEO:
2677
2678            State            | Transition Cause                    | New State          | Notes
2679          :-----------------:|:-----------------------------------:|:------------------:|:--------------:
2680          INACTIVE           | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
2681          INACTIVE           | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
2682          PASSIVE_SCAN       | Camera device completes current scan| PASSIVE_FOCUSED    | End AF scan, Lens now locked
2683          PASSIVE_SCAN       | Camera device fails current scan    | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
2684          PASSIVE_SCAN       | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, if focus is good. Lens now locked
2685          PASSIVE_SCAN       | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, if focus is bad. Lens now locked
2686          PASSIVE_SCAN       | AF_CANCEL                           | INACTIVE           | Reset lens position, Lens now locked
2687          PASSIVE_FOCUSED    | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
2688          PASSIVE_UNFOCUSED  | Camera device initiates new scan    | PASSIVE_SCAN       | Start AF scan, Lens now moving
2689          PASSIVE_FOCUSED    | AF_TRIGGER                          | FOCUSED_LOCKED     | Immediate transition, lens now locked
2690          PASSIVE_UNFOCUSED  | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked
2691          FOCUSED_LOCKED     | AF_TRIGGER                          | FOCUSED_LOCKED     | No effect
2692          FOCUSED_LOCKED     | AF_CANCEL                           | INACTIVE           | Restart AF scan
2693          NOT_FOCUSED_LOCKED | AF_TRIGGER                          | NOT_FOCUSED_LOCKED | No effect
2694          NOT_FOCUSED_LOCKED | AF_CANCEL                           | INACTIVE           | Restart AF scan
2695
2696          When android.control.afMode is AF_MODE_CONTINUOUS_PICTURE:
2697
2698            State            | Transition Cause                     | New State          | Notes
2699          :-----------------:|:------------------------------------:|:------------------:|:--------------:
2700          INACTIVE           | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
2701          INACTIVE           | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
2702          PASSIVE_SCAN       | Camera device completes current scan | PASSIVE_FOCUSED    | End AF scan, Lens now locked
2703          PASSIVE_SCAN       | Camera device fails current scan     | PASSIVE_UNFOCUSED  | End AF scan, Lens now locked
2704          PASSIVE_SCAN       | AF_TRIGGER                           | FOCUSED_LOCKED     | Eventual transition once the focus is good. Lens now locked
2705          PASSIVE_SCAN       | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Eventual transition if cannot find focus. Lens now locked
2706          PASSIVE_SCAN       | AF_CANCEL                            | INACTIVE           | Reset lens position, Lens now locked
2707          PASSIVE_FOCUSED    | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
2708          PASSIVE_UNFOCUSED  | Camera device initiates new scan     | PASSIVE_SCAN       | Start AF scan, Lens now moving
2709          PASSIVE_FOCUSED    | AF_TRIGGER                           | FOCUSED_LOCKED     | Immediate trans. Lens now locked
2710          PASSIVE_UNFOCUSED  | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked
2711          FOCUSED_LOCKED     | AF_TRIGGER                           | FOCUSED_LOCKED     | No effect
2712          FOCUSED_LOCKED     | AF_CANCEL                            | INACTIVE           | Restart AF scan
2713          NOT_FOCUSED_LOCKED | AF_TRIGGER                           | NOT_FOCUSED_LOCKED | No effect
2714          NOT_FOCUSED_LOCKED | AF_CANCEL                            | INACTIVE           | Restart AF scan
2715
2716          When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
2717          (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
2718          camera device. When a trigger is included in a mode switch request, the trigger
2719          will be evaluated in the context of the new mode in the request.
2720          See below table for examples:
2721
2722            State      | Transition Cause                       | New State                                | Notes
2723          :-----------:|:--------------------------------------:|:----------------------------------------:|:--------------:
2724          any state    | CAF-->AUTO mode switch                 | INACTIVE                                 | Mode switch without trigger, initial state must be INACTIVE
2725          any state    | CAF-->AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE   | Mode switch with trigger, INACTIVE is skipped
2726          any state    | AUTO-->CAF mode switch                 | passively reachable states from INACTIVE | Mode switch without trigger, passive transient state is skipped
2727          </details>
2728        </entry>
2729        <entry name="afTriggerId" type="int32" visibility="system" deprecated="true">
2730          <description>The ID sent with the latest
2731          CAMERA2_TRIGGER_AUTOFOCUS call</description>
2732          <deprecation_description>
2733            Removed in camera HAL v3
2734          </deprecation_description>
2735          <details>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger
2736          received yet by HAL. Always updated even if AF algorithm
2737          ignores the trigger</details>
2738        </entry>
2739        <clone entry="android.control.awbLock" kind="controls">
2740        </clone>
2741        <clone entry="android.control.awbMode" kind="controls">
2742        </clone>
2743        <clone entry="android.control.awbRegions" kind="controls">
2744        </clone>
2745        <clone entry="android.control.captureIntent" kind="controls">
2746        </clone>
2747        <entry name="awbState" type="byte" visibility="public" enum="true"
2748               hwlevel="limited">
2749          <enum>
2750            <value>INACTIVE
2751            <notes>AWB is not in auto mode, or has not yet started metering.
2752
2753            When a camera device is opened, it starts in this
2754            state. This is a transient state, the camera device may
2755            skip reporting this state in capture
2756            result.</notes></value>
2757            <value>SEARCHING
2758            <notes>AWB doesn't yet have a good set of control
2759            values for the current scene.
2760
2761            This is a transient state, the camera device
2762            may skip reporting this state in capture result.</notes></value>
2763            <value>CONVERGED
2764            <notes>AWB has a good set of control values for the
2765            current scene.</notes></value>
2766            <value>LOCKED
2767            <notes>AWB has been locked.
2768            </notes></value>
2769          </enum>
2770          <description>Current state of auto-white balance (AWB) algorithm.</description>
2771          <details>Switching between or enabling AWB modes (android.control.awbMode) always
2772          resets the AWB state to INACTIVE. Similarly, switching between android.control.mode,
2773          or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all
2774          the algorithm states to INACTIVE.
2775
2776          The camera device can do several state transitions between two results, if it is
2777          allowed by the state transition table. So INACTIVE may never actually be seen in
2778          a result.
2779
2780          The state in the result is the state for this image (in sync with this image): if
2781          AWB state becomes CONVERGED, then the image data associated with this result should
2782          be good to use.
2783
2784          Below are state transition tables for different AWB modes.
2785
2786          When `android.control.awbMode != AWB_MODE_AUTO`:
2787
2788            State       | Transition Cause | New State | Notes
2789          :------------:|:----------------:|:---------:|:-----------------------:
2790          INACTIVE      |                  |INACTIVE   |Camera device auto white balance algorithm is disabled
2791
2792          When android.control.awbMode is AWB_MODE_AUTO:
2793
2794            State        | Transition Cause                 | New State     | Notes
2795          :-------------:|:--------------------------------:|:-------------:|:-----------------:
2796          INACTIVE       | Camera device initiates AWB scan | SEARCHING     | Values changing
2797          INACTIVE       | android.control.awbLock is ON    | LOCKED        | Values locked
2798          SEARCHING      | Camera device finishes AWB scan  | CONVERGED     | Good values, not changing
2799          SEARCHING      | android.control.awbLock is ON    | LOCKED        | Values locked
2800          CONVERGED      | Camera device initiates AWB scan | SEARCHING     | Values changing
2801          CONVERGED      | android.control.awbLock is ON    | LOCKED        | Values locked
2802          LOCKED         | android.control.awbLock is OFF   | SEARCHING     | Values not good after unlock
2803
2804          For the above table, the camera device may skip reporting any state changes that happen
2805          without application intervention (i.e. mode switch, trigger, locking). Any state that
2806          can be skipped in that manner is called a transient state.
2807
2808          For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
2809          listed in above table, it is also legal for the camera device to skip one or more
2810          transient states between two results. See below table for examples:
2811
2812            State        | Transition Cause                 | New State     | Notes
2813          :-------------:|:--------------------------------:|:-------------:|:-----------------:
2814          INACTIVE       | Camera device finished AWB scan  | CONVERGED     | Values are already good, transient states are skipped by camera device.
2815          LOCKED         | android.control.awbLock is OFF   | CONVERGED     | Values good after unlock, transient states are skipped by camera device.
2816          </details>
2817        </entry>
2818        <clone entry="android.control.effectMode" kind="controls">
2819        </clone>
2820        <clone entry="android.control.mode" kind="controls">
2821        </clone>
2822        <clone entry="android.control.sceneMode" kind="controls">
2823        </clone>
2824        <clone entry="android.control.videoStabilizationMode" kind="controls">
2825        </clone>
2826      </dynamic>
2827      <static>
2828        <entry name="availableHighSpeedVideoConfigurations" type="int32" visibility="hidden"
2829               container="array" typedef="highSpeedVideoConfiguration" hwlevel="limited">
2830          <array>
2831            <size>5</size>
2832            <size>n</size>
2833          </array>
2834          <description>
2835          List of available high speed video size, fps range and max batch size configurations
2836          supported by the camera device, in the format of (width, height, fps_min, fps_max, batch_size_max).
2837          </description>
2838          <range>
2839          For each configuration, the fps_max &amp;gt;= 120fps.
2840          </range>
2841          <details>
2842          When CONSTRAINED_HIGH_SPEED_VIDEO is supported in android.request.availableCapabilities,
2843          this metadata will list the supported high speed video size, fps range and max batch size
2844          configurations. All the sizes listed in this configuration will be a subset of the sizes
2845          reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes}
2846          for processed non-stalling formats.
2847
2848          For the high speed video use case, the application must
2849          select the video size and fps range from this metadata to configure the recording and
2850          preview streams and setup the recording requests. For example, if the application intends
2851          to do high speed recording, it can select the maximum size reported by this metadata to
2852          configure output streams. Once the size is selected, application can filter this metadata
2853          by selected size and get the supported fps ranges, and use these fps ranges to setup the
2854          recording requests. Note that for the use case of multiple output streams, application
2855          must select one unique size from this metadata to use (e.g., preview and recording streams
2856          must have the same size). Otherwise, the high speed capture session creation will fail.
2857
2858          The min and max fps will be multiple times of 30fps.
2859
2860          High speed video streaming extends significant performance pressue to camera hardware,
2861          to achieve efficient high speed streaming, the camera device may have to aggregate
2862          multiple frames together and send to camera device for processing where the request
2863          controls are same for all the frames in this batch. Max batch size indicates
2864          the max possible number of frames the camera device will group together for this high
2865          speed stream configuration. This max batch size will be used to generate a high speed
2866          recording request list by
2867          {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList}.
2868          The max batch size for each configuration will satisfy below conditions:
2869
2870          * Each max batch size will be a divisor of its corresponding fps_max / 30. For example,
2871          if max_fps is 300, max batch size will only be 1, 2, 5, or 10.
2872          * The camera device may choose smaller internal batch size for each configuration, but
2873          the actual batch size will be a divisor of max batch size. For example, if the max batch
2874          size is 8, the actual batch size used by camera device will only be 1, 2, 4, or 8.
2875          * The max batch size in each configuration entry must be no larger than 32.
2876
2877          The camera device doesn't have to support batch mode to achieve high speed video recording,
2878          in such case, batch_size_max will be reported as 1 in each configuration entry.
2879
2880          This fps ranges in this configuration list can only be used to create requests
2881          that are submitted to a high speed camera capture session created by
2882          {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}.
2883          The fps ranges reported in this metadata must not be used to setup capture requests for
2884          normal capture session, or it will cause request error.
2885          </details>
2886          <hal_details>
2887          All the sizes listed in this configuration will be a subset of the sizes reported by
2888          android.scaler.availableStreamConfigurations for processed non-stalling output formats.
2889          Note that for all high speed video configurations, HAL must be able to support a minimum
2890          of two streams, though the application might choose to configure just one stream.
2891
2892          The HAL may support multiple sensor modes for high speed outputs, for example, 120fps
2893          sensor mode and 120fps recording, 240fps sensor mode for 240fps recording. The application
2894          usually starts preview first, then starts recording. To avoid sensor mode switch caused
2895          stutter when starting recording as much as possible, the application may want to ensure
2896          the same sensor mode is used for preview and recording. Therefore, The HAL must advertise
2897          the variable fps range [30, fps_max] for each fixed fps range in this configuration list.
2898          For example, if the HAL advertises [120, 120] and [240, 240], the HAL must also advertise
2899          [30, 120] and [30, 240] for each configuration. In doing so, if the application intends to
2900          do 120fps recording, it can select [30, 120] to start preview, and [120, 120] to start
2901          recording. For these variable fps ranges, it's up to the HAL to decide the actual fps
2902          values that are suitable for smooth preview streaming. If the HAL sees different max_fps
2903          values that fall into different sensor modes in a sequence of requests, the HAL must
2904          switch the sensor mode as quick as possible to minimize the mode switch caused stutter.
2905          </hal_details>
2906          <tag id="V1" />
2907        </entry>
2908        <entry name="aeLockAvailable" type="byte" visibility="public" enum="true"
2909               typedef="boolean" hwlevel="legacy">
2910          <enum>
2911            <value>FALSE</value>
2912            <value>TRUE</value>
2913          </enum>
2914          <description>Whether the camera device supports android.control.aeLock</description>
2915          <details>
2916              Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
2917              list `true`. This includes FULL devices.
2918          </details>
2919          <tag id="BC"/>
2920        </entry>
2921        <entry name="awbLockAvailable" type="byte" visibility="public" enum="true"
2922               typedef="boolean" hwlevel="legacy">
2923          <enum>
2924            <value>FALSE</value>
2925            <value>TRUE</value>
2926          </enum>
2927          <description>Whether the camera device supports android.control.awbLock</description>
2928          <details>
2929              Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
2930              always list `true`. This includes FULL devices.
2931          </details>
2932          <tag id="BC"/>
2933        </entry>
2934        <entry name="availableModes" type="byte" visibility="public"
2935            type_notes="List of enums (android.control.mode)." container="array"
2936            typedef="enumList" hwlevel="legacy">
2937          <array>
2938            <size>n</size>
2939          </array>
2940          <description>
2941          List of control modes for android.control.mode that are supported by this camera
2942          device.
2943          </description>
2944          <range>Any value listed in android.control.mode</range>
2945          <details>
2946              This list contains control modes that can be set for the camera device.
2947              LEGACY mode devices will always support AUTO mode. LIMITED and FULL
2948              devices will always support OFF, AUTO modes.
2949          </details>
2950        </entry>
2951        <entry name="postRawSensitivityBoostRange" type="int32" visibility="public"
2952            type_notes="Range of supported post RAW sensitivitiy boosts"
2953            container="array" typedef="rangeInt">
2954          <array>
2955            <size>2</size>
2956          </array>
2957          <description>Range of boosts for android.control.postRawSensitivityBoost supported
2958            by this camera device.
2959          </description>
2960          <units>ISO arithmetic units, the same as android.sensor.sensitivity</units>
2961          <details>
2962            Devices support post RAW sensitivity boost  will advertise
2963            android.control.postRawSensitivityBoost key for controling
2964            post RAW sensitivity boost.
2965
2966            This key will be `null` for devices that do not support any RAW format
2967            outputs. For devices that do support RAW format outputs, this key will always
2968            present, and if a device does not support post RAW sensitivity boost, it will
2969            list `(100, 100)` in this key.
2970          </details>
2971          <hal_details>
2972             This key is added in legacy HAL3.4. For legacy HAL3.3 or earlier devices, camera
2973             framework will generate this key as `(100, 100)` if device supports any of RAW output
2974             formats.  All legacy HAL3.4 and above devices should list this key if device supports
2975             any of RAW output formats.
2976          </hal_details>
2977        </entry>
2978      </static>
2979      <controls>
2980        <entry name="postRawSensitivityBoost" type="int32" visibility="public">
2981          <description>The amount of additional sensitivity boost applied to output images
2982             after RAW sensor data is captured.
2983          </description>
2984          <units>ISO arithmetic units, the same as android.sensor.sensitivity</units>
2985          <range>android.control.postRawSensitivityBoostRange</range>
2986          <details>
2987          Some camera devices support additional digital sensitivity boosting in the
2988          camera processing pipeline after sensor RAW image is captured.
2989          Such a boost will be applied to YUV/JPEG format output images but will not
2990          have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE.
2991
2992          This key will be `null` for devices that do not support any RAW format
2993          outputs. For devices that do support RAW format outputs, this key will always
2994          present, and if a device does not support post RAW sensitivity boost, it will
2995          list `100` in this key.
2996
2997          If the camera device cannot apply the exact boost requested, it will reduce the
2998          boost to the nearest supported value.
2999          The final boost value used will be available in the output capture result.
3000
3001          For devices that support post RAW sensitivity boost, the YUV/JPEG output images
3002          of such device will have the total sensitivity of
3003          `android.sensor.sensitivity * android.control.postRawSensitivityBoost / 100`
3004          The sensitivity of RAW format images will always be `android.sensor.sensitivity`
3005
3006          This control is only effective if android.control.aeMode or android.control.mode is set to
3007          OFF; otherwise the auto-exposure algorithm will override this value.
3008          </details>
3009        </entry>
3010      </controls>
3011      <dynamic>
3012        <clone entry="android.control.postRawSensitivityBoost" kind="controls">
3013        </clone>
3014      </dynamic>
3015      <controls>
3016        <entry name="enableZsl" type="byte" visibility="public" enum="true" typedef="boolean">
3017          <enum>
3018            <value>FALSE
3019            <notes>Requests with android.control.captureIntent == STILL_CAPTURE must be captured
3020              after previous requests.</notes></value>
3021            <value>TRUE
3022            <notes>Requests with android.control.captureIntent == STILL_CAPTURE may or may not be
3023              captured before previous requests.</notes></value>
3024          </enum>
3025          <description>Allow camera device to enable zero-shutter-lag mode for requests with
3026            android.control.captureIntent == STILL_CAPTURE.
3027          </description>
3028          <details>
3029          If enableZsl is `true`, the camera device may enable zero-shutter-lag mode for requests with
3030          STILL_CAPTURE capture intent. The camera device may use images captured in the past to
3031          produce output images for a zero-shutter-lag request. The result metadata including the
3032          android.sensor.timestamp reflects the source frames used to produce output images.
3033          Therefore, the contents of the output images and the result metadata may be out of order
3034          compared to previous regular requests. enableZsl does not affect requests with other
3035          capture intents.
3036
3037          For example, when requests are submitted in the following order:
3038            Request A: enableZsl is ON, android.control.captureIntent is PREVIEW
3039            Request B: enableZsl is ON, android.control.captureIntent is STILL_CAPTURE
3040
3041          The output images for request B may have contents captured before the output images for
3042          request A, and the result metadata for request B may be older than the result metadata for
3043          request A.
3044
3045          Note that when enableZsl is `true`, it is not guaranteed to get output images captured in
3046          the past for requests with STILL_CAPTURE capture intent.
3047
3048          For applications targeting SDK versions O and newer, the value of enableZsl in
3049          TEMPLATE_STILL_CAPTURE template may be `true`. The value in other templates is always
3050          `false` if present.
3051
3052          For applications targeting SDK versions older than O, the value of enableZsl in all
3053          capture templates is always `false` if present.
3054
3055          For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.
3056          </details>
3057          <hal_details>
3058          It is valid for HAL to produce regular output images for requests with STILL_CAPTURE
3059          capture intent.
3060          </hal_details>
3061        </entry>
3062      </controls>
3063      <dynamic>
3064        <clone entry="android.control.enableZsl" kind="controls">
3065        </clone>
3066        <entry name="afSceneChange" type="byte" visibility="public" enum="true" hal_version="3.3">
3067          <enum>
3068            <value>NOT_DETECTED
3069            <notes>Scene change is not detected within the AF region(s).</notes></value>
3070            <value>DETECTED
3071            <notes>Scene change is detected within the AF region(s).</notes></value>
3072          </enum>
3073          <description>Whether a significant scene change is detected within the currently-set AF
3074          region(s).</description>
3075          <details>When the camera focus routine detects a change in the scene it is looking at,
3076          such as a large shift in camera viewpoint, significant motion in the scene, or a
3077          significant illumination change, this value will be set to DETECTED for a single capture
3078          result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar
3079          to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.
3080
3081          This key will be available if the camera device advertises this key via {@link
3082          android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys|ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}.
3083          </details>
3084        </entry>
3085      </dynamic>
3086      <static>
3087        <entry name="availableExtendedSceneModeMaxSizes" type="int32"
3088               visibility="ndk_public" optional="true"
3089               type_notes="List of extended scene modes and the corresponding max streaming sizes."
3090               container="array" hwlevel="limited" hal_version="3.5">
3091          <array>
3092            <size>3</size>
3093            <size>n</size>
3094          </array>
3095          <description>
3096          The list of extended scene modes for android.control.extendedSceneMode that are supported
3097          by this camera device, and each extended scene mode's maximum streaming (non-stall) size
3098          with  effect.
3099          </description>
3100          <units>(mode, width, height)</units>
3101          <details>
3102            For DISABLED mode, the camera behaves normally with no extended scene mode enabled.
3103
3104            For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit
3105            under which bokeh is effective when capture intent is PREVIEW. Note that when capture
3106            intent is PREVIEW, the bokeh effect may not be as high in quality compared to
3107            STILL_CAPTURE intent in order to maintain reasonable frame rate. The maximum streaming
3108            dimension must be one of the YUV_420_888 or PRIVATE resolutions in
3109            availableStreamConfigurations, or (0, 0) if preview bokeh is not supported. If the
3110            application configures a stream larger than the maximum streaming dimension, bokeh
3111            effect may not be applied for this stream for PREVIEW intent.
3112
3113            For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under
3114            which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE
3115            resolutions in availableStreamConfigurations, and if the sensor maximum resolution is
3116            larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p.
3117            If the application configures a stream with larger dimension, the stream may not have
3118            bokeh effect applied.
3119          </details>
3120          <hal_details>
3121            For available extended scene modes, DISABLED will always be listed.
3122
3123            HAL must support at list one non-OFF extended scene mode if extendedSceneMode control is
3124            available on the camera device. For DISABLED mode, the maximum streaming resolution must
3125            be set to (0, 0).
3126          </hal_details>
3127        </entry>
3128        <entry name="availableExtendedSceneModeZoomRatioRanges" type="float"
3129               visibility="ndk_public" optional="true"
3130               type_notes="Zoom ranges for all supported non-OFF extended scene modes."
3131               container="array" hwlevel="limited" hal_version="3.5">
3132          <array>
3133            <size>2</size>
3134            <size>n</size>
3135          </array>
3136          <description>
3137          The ranges of supported zoom ratio for non-DISABLED android.control.extendedSceneMode.
3138          </description>
3139          <units>(minZoom, maxZoom)</units>
3140          <details>
3141            When extended scene mode is set, the camera device may have limited range of zoom ratios
3142            compared to when extended scene mode is DISABLED. This tag lists the zoom ratio ranges
3143            for all supported non-DISABLED extended scene modes, in the same order as in
3144            android.control.availableExtended.
3145
3146            Range [1.0, 1.0] means that no zoom (optical or digital) is supported.
3147          </details>
3148        </entry>
3149        <entry name="availableExtendedSceneModeCapabilities" type="int32" visibility="public"
3150               synthetic="true" container="array" typedef="capability" hal_version="3.5">
3151          <array>
3152            <size>n</size>
3153          </array>
3154          <description>The list of extended scene modes for android.control.extendedSceneMode that
3155            are supported by this camera device, and each extended scene mode's capabilities such
3156            as maximum streaming size, and supported zoom ratio ranges.</description>
3157          <details>
3158            For DISABLED mode, the camera behaves normally with no extended scene mode enabled.
3159
3160            For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit
3161            under which bokeh is effective when capture intent is PREVIEW. Note that when capture
3162            intent is PREVIEW, the bokeh effect may not be as high quality compared to STILL_CAPTURE
3163            intent in order to maintain reasonable frame rate. The maximum streaming dimension must
3164            be one of the YUV_420_888 or PRIVATE resolutions in availableStreamConfigurations, or
3165            (0, 0) if preview bokeh is not supported. If the application configures a stream
3166            larger than the maximum streaming dimension, bokeh effect may not be applied for this
3167            stream for PREVIEW intent.
3168
3169            For BOKEH_CONTINUOUS mode, the maximum streaming dimension specifies the limit under
3170            which bokeh is effective. This dimension must be one of the YUV_420_888 or PRIVATE
3171            resolutions in availableStreamConfigurations, and if the sensor maximum resolution is
3172            larger than or equal to 1080p, the maximum streaming dimension must be at least 1080p.
3173            If the application configures a stream with larger dimension, the stream may not have
3174            bokeh effect applied.
3175
3176            When extended scene mode is set, the camera device may have limited range of zoom ratios
3177            compared to when the mode is DISABLED. availableExtendedSceneModeCapabilities lists the
3178            zoom ranges for all supported extended modes. A range of (1.0, 1.0) means that no zoom
3179            (optical or digital) is supported.
3180          </details>
3181        </entry>
3182      </static>
3183      <controls>
3184        <entry name="extendedSceneMode" type="byte" visibility="public" optional="true"
3185            enum="true" hal_version="3.5">
3186          <enum>
3187            <value id="0">DISABLED
3188            <notes>Extended scene mode is disabled.</notes></value>
3189            <value>BOKEH_STILL_CAPTURE
3190              <notes>High quality bokeh mode is enabled for all non-raw streams (including YUV,
3191              JPEG, and IMPLEMENTATION_DEFINED) when capture intent is STILL_CAPTURE. Due to the
3192              extra image processing, this mode may introduce additional stall to non-raw streams.
3193              This mode should be used in high quality still capture use case.
3194              </notes>
3195            </value>
3196            <value>BOKEH_CONTINUOUS
3197              <notes>Bokeh effect must not slow down capture rate relative to sensor raw output,
3198              and the effect is applied to all processed streams no larger than the maximum
3199              streaming dimension. This mode should be used if performance and power are a
3200              priority, such as video recording.
3201              </notes>
3202            </value>
3203            <value visibility="hidden" id="0x40">VENDOR_START
3204              <notes>
3205                Vendor defined extended scene modes. These depend on vendor implementation.
3206              </notes>
3207            </value>
3208          </enum>
3209          <description>Whether extended scene mode is enabled for a particular capture request.
3210          </description>
3211          <details>
3212          With bokeh mode, the camera device may blur out the parts of scene that are not in
3213          focus, creating a bokeh (or shallow depth of field) effect for people or objects.
3214
3215          When set to BOKEH_STILL_CAPTURE mode with STILL_CAPTURE capture intent, due to the extra
3216          processing needed for high quality bokeh effect, the stall may be longer than when
3217          capture intent is not STILL_CAPTURE.
3218
3219          When set to BOKEH_STILL_CAPTURE mode with PREVIEW capture intent,
3220
3221          * If the camera device has BURST_CAPTURE capability, the frame rate requirement of
3222          BURST_CAPTURE must still be met.
3223          * All streams not larger than the maximum streaming dimension for BOKEH_STILL_CAPTURE mode
3224          (queried via {@link android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES|ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES})
3225          will have preview bokeh effect applied.
3226
3227          When set to BOKEH_CONTINUOUS mode, configured streams dimension should not exceed this mode's
3228          maximum streaming dimension in order to have bokeh effect applied. Bokeh effect may not
3229          be available for streams larger than the maximum streaming dimension.
3230
3231          Switching between different extended scene modes may involve reconfiguration of the camera
3232          pipeline, resulting in long latency. The application should check this key against the
3233          available session keys queried via
3234          {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys|ACameraManager_getCameraCharacteristics}.
3235
3236          For a logical multi-camera, bokeh may be implemented by stereo vision from sub-cameras
3237          with different field of view. As a result, when bokeh mode is enabled, the camera device
3238          may override android.scaler.cropRegion or android.control.zoomRatio, and the field of
3239          view may be smaller than when bokeh mode is off.
3240          </details>
3241        </entry>
3242      </controls>
3243      <dynamic>
3244        <clone entry="android.control.extendedSceneMode" kind="controls">
3245        </clone>
3246      </dynamic>
3247      <static>
3248        <entry name="zoomRatioRange" type="float" visibility="public"
3249               type_notes="The range of zoom ratios that this camera device supports."
3250               container="array" typedef="rangeFloat" hwlevel="limited" hal_version="3.5">
3251          <array>
3252            <size>2</size>
3253          </array>
3254          <description>
3255          Minimum and maximum zoom ratios supported by this camera device.
3256          </description>
3257          <units>A pair of zoom ratio in floating-points: (minZoom, maxZoom)</units>
3258          <range>
3259            maxZoom >= 1.0 >= minZoom
3260          </range>
3261          <details>
3262            If the camera device supports zoom-out from 1x zoom, minZoom will be less than 1.0, and
3263            setting android.control.zoomRatio to values less than 1.0 increases the camera's field
3264            of view.
3265          </details>
3266          <hal_details>
3267            When the key is reported, the camera device's android.scaler.availableMaxDigitalZoom
3268            must be less than or equal to maxZoom. The camera framework makes sure to always
3269            control zoom via android.control.zoomRatio. The android.scaler.cropRegion tag is only
3270            used to do horizontal or vertical cropping (but not both) to achieve aspect ratio
3271            different than the camera sensor's native aspect ratio.
3272
3273            For a logical multi-camera device, this key must either be reported for both the logical
3274            camera device and all its physical sub-cameras, or none of them.
3275
3276            When the key is not reported, camera framework derives the application-facing
3277            zoomRatioRange to be (1, android.scaler.availableMaxDigitalZoom).
3278          </hal_details>
3279        </entry>
3280      </static>
3281      <controls>
3282        <entry name="zoomRatio" type="float" visibility="public" hwlevel="limited"
3283            hal_version="3.5">
3284          <description>
3285            The desired zoom ratio
3286          </description>
3287          <range>android.control.zoomRatioRange</range>
3288          <details>
3289            Instead of using android.scaler.cropRegion for zoom, the application can now choose to
3290            use this tag to specify the desired zoom level.
3291
3292            By using this control, the application gains a simpler way to control zoom, which can
3293            be a combination of optical and digital zoom. For example, a multi-camera system may
3294            contain more than one lens with different focal lengths, and the user can use optical
3295            zoom by switching between lenses. Using zoomRatio has benefits in the scenarios below:
3296
3297            * Zooming in from a wide-angle lens to a telephoto lens: A floating-point ratio provides
3298              better precision compared to an integer value of android.scaler.cropRegion.
3299            * Zooming out from a wide lens to an ultrawide lens: zoomRatio supports zoom-out whereas
3300              android.scaler.cropRegion doesn't.
3301
3302            To illustrate, here are several scenarios of different zoom ratios, crop regions,
3303            and output streams, for a hypothetical camera device with an active array of size
3304            `(2000,1500)`.
3305
3306            * Camera Configuration:
3307                * Active array size: `2000x1500` (3 MP, 4:3 aspect ratio)
3308                * Output stream #1: `640x480` (VGA, 4:3 aspect ratio)
3309                * Output stream #2: `1280x720` (720p, 16:9 aspect ratio)
3310            * Case #1: 4:3 crop region with 2.0x zoom ratio
3311                * Zoomed field of view: 1/4 of original field of view
3312                * Crop region: `Rect(0, 0, 2000, 1500) // (left, top, right, bottom)` (post zoom)
3313            * ![4:3 aspect ratio crop diagram](android.control.zoomRatio/zoom-ratio-2-crop-43.png)
3314                * `640x480` stream source area: `(0, 0, 2000, 1500)` (equal to crop region)
3315                * `1280x720` stream source area: `(0, 187, 2000, 1312)` (letterboxed)
3316            * Case #2: 16:9 crop region with 2.0x zoom.
3317                * Zoomed field of view: 1/4 of original field of view
3318                * Crop region: `Rect(0, 187, 2000, 1312)`
3319                * ![16:9 aspect ratio crop diagram](android.control.zoomRatio/zoom-ratio-2-crop-169.png)
3320                * `640x480` stream source area: `(250, 187, 1750, 1312)` (pillarboxed)
3321                * `1280x720` stream source area: `(0, 187, 2000, 1312)` (equal to crop region)
3322            * Case #3: 1:1 crop region with 0.5x zoom out to ultrawide lens.
3323                * Zoomed field of view: 4x of original field of view (switched from wide lens to ultrawide lens)
3324                * Crop region: `Rect(250, 0, 1750, 1500)`
3325                * ![1:1 aspect ratio crop diagram](android.control.zoomRatio/zoom-ratio-0.5-crop-11.png)
3326                * `640x480` stream source area: `(250, 187, 1750, 1312)` (letterboxed)
3327                * `1280x720` stream source area: `(250, 328, 1750, 1172)` (letterboxed)
3328
3329            As seen from the graphs above, the coordinate system of cropRegion now changes to the
3330            effective after-zoom field-of-view, and is represented by the rectangle of (0, 0,
3331            activeArrayWith, activeArrayHeight). The same applies to AE/AWB/AF regions, and faces.
3332            This coordinate system change isn't applicable to RAW capture and its related
3333            metadata such as intrinsicCalibration and lensShadingMap.
3334
3335            Using the same hypothetical example above, and assuming output stream #1 (640x480) is
3336            the viewfinder stream, the application can achieve 2.0x zoom in one of two ways:
3337
3338            * zoomRatio = 2.0, scaler.cropRegion = (0, 0, 2000, 1500)
3339            * zoomRatio = 1.0 (default), scaler.cropRegion = (500, 375, 1500, 1125)
3340
3341            If the application intends to set aeRegions to be top-left quarter of the viewfinder
3342            field-of-view, the android.control.aeRegions should be set to (0, 0, 1000, 750) with
3343            zoomRatio set to 2.0. Alternatively, the application can set aeRegions to the equivalent
3344            region of (500, 375, 1000, 750) for zoomRatio of 1.0. If the application doesn't
3345            explicitly set android.control.zoomRatio, its value defaults to 1.0.
3346
3347            One limitation of controlling zoom using zoomRatio is that the android.scaler.cropRegion
3348            must only be used for letterboxing or pillarboxing of the sensor active array, and no
3349            FREEFORM cropping can be used with android.control.zoomRatio other than 1.0. If
3350            android.control.zoomRatio is not 1.0, and android.scaler.cropRegion is set to be
3351            windowboxing, the camera framework will override the android.scaler.cropRegion to be
3352            the active array.
3353
3354            In the capture request, if the application sets android.control.zoomRatio to a
3355            value != 1.0, the android.control.zoomRatio tag in the capture result reflects the
3356            effective zoom ratio achieved by the camera device, and the android.scaler.cropRegion
3357            adjusts for additional crops that are not zoom related. Otherwise, if the application
3358            sets android.control.zoomRatio to 1.0, or does not set it at all, the
3359            android.control.zoomRatio tag in the result metadata will also be 1.0.
3360
3361            When the application requests a physical stream for a logical multi-camera, the
3362            android.control.zoomRatio in the physical camera result metadata will be 1.0, and
3363            the android.scaler.cropRegion tag reflects the amount of zoom and crop done by the
3364            physical camera device.
3365          </details>
3366          <hal_details>
3367            For all capture request templates, this field must be set to 1.0 in order to have
3368            consistent field of views between different modes.
3369          </hal_details>
3370        </entry>
3371      </controls>
3372      <dynamic>
3373        <clone entry="android.control.zoomRatio" kind="controls">
3374        </clone>
3375      </dynamic>
3376    <static>
3377      <entry name="availableHighSpeedVideoConfigurationsMaximumResolution" type="int32"
3378        visibility="hidden" container="array" typedef="highSpeedVideoConfiguration"
3379        hal_version="3.6">
3380        <array>
3381          <size>5</size>
3382          <size>n</size>
3383        </array>
3384        <description>
3385        List of available high speed video size, fps range and max batch size configurations
3386        supported by the camera device, in the format of
3387        (width, height, fps_min, fps_max, batch_size_max),
3388        when android.sensor.pixelMode is set to
3389        {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
3390        </description>
3391        <range>
3392        For each configuration, the fps_max &amp;gt;= 120fps.
3393        </range>
3394        <details>
3395        Analogous to android.control.availableHighSpeedVideoConfigurations, for configurations
3396        which are applicable when android.sensor.pixelMode is set to
3397        {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
3398        </details>
3399        <hal_details>
3400        Refer to hal details for android.control.availableHighSpeedVideoConfigurations.
3401        </hal_details>
3402        <tag id="V1" />
3403      </entry>
3404    </static>
3405    <controls>
3406        <entry name="afRegionsSet" type="byte" visibility="fwk_only"
3407               enum="true" typedef="boolean">
3408          <enum>
3409            <value>TRUE
3410            <notes>AF regions (android.control.afRegions) have been set by the camera client.
3411            </notes>
3412            </value>
3413            <value>FALSE
3414            <notes>
3415              AF regions (android.control.afRegions) have not been set by the camera client.
3416            </notes>
3417            </value>
3418          </enum>
3419          <description>
3420            Framework-only private key which informs camera fwk that the AF regions has been set
3421            by the client and those regions need not be corrected when android.sensor.pixelMode is
3422            set to MAXIMUM_RESOLUTION.
3423          </description>
3424          <details>
3425            This must be set to TRUE by the camera2 java fwk when the camera client sets
3426            android.control.afRegions.
3427          </details>
3428        </entry>
3429        <entry name="aeRegionsSet" type="byte" visibility="fwk_only"
3430          enum="true" typedef="boolean">
3431          <enum>
3432            <value>TRUE
3433            <notes> AE regions (android.control.aeRegions) have been set by the camera client.
3434            </notes>
3435            </value>
3436            <value>FALSE
3437            <notes>
3438              AE regions (android.control.aeRegions) have not been set by the camera client.
3439            </notes>
3440            </value>
3441          </enum>
3442          <description>
3443            Framework-only private key which informs camera fwk that the AE regions has been set
3444            by the client and those regions need not be corrected when android.sensor.pixelMode is
3445            set to MAXIMUM_RESOLUTION.
3446          </description>
3447          <details>
3448            This must be set to TRUE by the camera2 java fwk when the camera client sets
3449            android.control.aeRegions.
3450          </details>
3451        </entry>
3452        <entry name="awbRegionsSet" type="byte" visibility="fwk_only"
3453          enum="true" typedef="boolean">
3454          <enum>
3455            <value>TRUE
3456            <notes> AWB regions (android.control.awbRegions) have been set by the camera client.
3457            </notes>
3458            </value>
3459            <value>FALSE
3460            <notes>
3461              AWB regions (android.control.awbRegions) have not been set by the camera client.
3462            </notes>
3463            </value>
3464          </enum>
3465          <description>
3466            Framework-only private key which informs camera fwk that the AF regions has been set
3467            by the client and those regions need not be corrected when android.sensor.pixelMode is
3468            set to MAXIMUM_RESOLUTION.
3469          </description>
3470          <details>
3471            This must be set to TRUE by the camera2 java fwk when the camera client sets
3472            android.control.awbRegions.
3473          </details>
3474        </entry>
3475    </controls>
3476    </section>
3477    <section name="demosaic">
3478      <controls>
3479        <entry name="mode" type="byte" enum="true">
3480          <enum>
3481            <value>FAST
3482            <notes>Minimal or no slowdown of frame rate compared to
3483            Bayer RAW output.</notes></value>
3484            <value>HIGH_QUALITY
3485            <notes>Improved processing quality but the frame rate might be slowed down
3486            relative to raw output.</notes></value>
3487          </enum>
3488          <description>Controls the quality of the demosaicing
3489          processing.</description>
3490          <tag id="FUTURE" />
3491        </entry>
3492      </controls>
3493    </section>
3494    <section name="edge">
3495      <controls>
3496        <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full">
3497          <enum>
3498            <value>OFF
3499            <notes>No edge enhancement is applied.</notes></value>
3500            <value>FAST
3501            <notes>Apply edge enhancement at a quality level that does not slow down frame rate
3502            relative to sensor output. It may be the same as OFF if edge enhancement will
3503            slow down frame rate relative to sensor.</notes></value>
3504            <value>HIGH_QUALITY
3505            <notes>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.
3506            </notes></value>
3507            <value optional="true">ZERO_SHUTTER_LAG <notes>Edge enhancement is applied at different
3508            levels for different output streams, based on resolution. Streams at maximum recording
3509            resolution (see {@link
3510            android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession})
3511            or below have edge enhancement applied, while higher-resolution streams have no edge
3512            enhancement applied. The level of edge enhancement for low-resolution streams is tuned
3513            so that frame rate is not impacted, and the quality is equal to or better than FAST
3514            (since it is only applied to lower-resolution outputs, quality may improve from FAST).
3515
3516            This mode is intended to be used by applications operating in a zero-shutter-lag mode
3517            with YUV or PRIVATE reprocessing, where the application continuously captures
3518            high-resolution intermediate buffers into a circular buffer, from which a final image is
3519            produced via reprocessing when a user takes a picture.  For such a use case, the
3520            high-resolution buffers must not have edge enhancement applied to maximize efficiency of
3521            preview and to avoid double-applying enhancement when reprocessed, while low-resolution
3522            buffers (used for recording or preview, generally) need edge enhancement applied for
3523            reasonable preview quality.
3524
3525            This mode is guaranteed to be supported by devices that support either the
3526            YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
3527            (android.request.availableCapabilities lists either of those capabilities) and it will
3528            be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.
3529            </notes></value>
3530          </enum>
3531          <description>Operation mode for edge
3532          enhancement.</description>
3533          <range>android.edge.availableEdgeModes</range>
3534          <details>Edge enhancement improves sharpness and details in the captured image. OFF means
3535          no enhancement will be applied by the camera device.
3536
3537          FAST/HIGH_QUALITY both mean camera device determined enhancement
3538          will be applied. HIGH_QUALITY mode indicates that the
3539          camera device will use the highest-quality enhancement algorithms,
3540          even if it slows down capture rate. FAST means the camera device will
3541          not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if
3542          edge enhancement will slow down capture rate. Every output stream will have a similar
3543          amount of enhancement applied.
3544
3545          ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
3546          buffer of high-resolution images during preview and reprocess image(s) from that buffer
3547          into a final capture when triggered by the user. In this mode, the camera device applies
3548          edge enhancement to low-resolution streams (below maximum recording resolution) to
3549          maximize preview quality, but does not apply edge enhancement to high-resolution streams,
3550          since those will be reprocessed later if necessary.
3551
3552          For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
3553          device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
3554          The camera device may adjust its internal edge enhancement parameters for best
3555          image quality based on the android.reprocess.effectiveExposureFactor, if it is set.
3556          </details>
3557          <hal_details>
3558          For YUV_REPROCESSING The HAL can use android.reprocess.effectiveExposureFactor to
3559          adjust the internal edge enhancement reduction parameters appropriately to get the best
3560          quality images.
3561          </hal_details>
3562          <tag id="V1" />
3563          <tag id="REPROC" />
3564        </entry>
3565        <entry name="strength" type="byte">
3566          <description>Control the amount of edge enhancement
3567          applied to the images</description>
3568          <units>1-10; 10 is maximum sharpening</units>
3569          <tag id="FUTURE" />
3570        </entry>
3571      </controls>
3572      <static>
3573        <entry name="availableEdgeModes" type="byte" visibility="public"
3574               type_notes="list of enums" container="array" typedef="enumList"
3575               hwlevel="full">
3576          <array>
3577            <size>n</size>
3578          </array>
3579          <description>
3580          List of edge enhancement modes for android.edge.mode that are supported by this camera
3581          device.
3582          </description>
3583          <range>Any value listed in android.edge.mode</range>
3584          <details>
3585          Full-capability camera devices must always support OFF; camera devices that support
3586          YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will
3587          list FAST.
3588          </details>
3589          <hal_details>
3590          HAL must support both FAST and HIGH_QUALITY if edge enhancement control is available
3591          on the camera device, but the underlying implementation can be the same for both modes.
3592          That is, if the highest quality implementation on the camera device does not slow down
3593          capture rate, then FAST and HIGH_QUALITY will generate the same output.
3594          </hal_details>
3595          <tag id="V1" />
3596          <tag id="REPROC" />
3597        </entry>
3598      </static>
3599      <dynamic>
3600        <clone entry="android.edge.mode" kind="controls">
3601          <tag id="V1" />
3602          <tag id="REPROC" />
3603        </clone>
3604      </dynamic>
3605    </section>
3606    <section name="flash">
3607      <controls>
3608        <entry name="firingPower" type="byte">
3609          <description>Power for flash firing/torch</description>
3610          <units>10 is max power; 0 is no flash. Linear</units>
3611          <range>0 - 10</range>
3612          <details>Power for snapshot may use a different scale than
3613          for torch mode. Only one entry for torch mode will be
3614          used</details>
3615          <tag id="FUTURE" />
3616        </entry>
3617        <entry name="firingTime" type="int64">
3618          <description>Firing time of flash relative to start of
3619          exposure</description>
3620          <units>nanoseconds</units>
3621          <range>0-(exposure time-flash duration)</range>
3622          <details>Clamped to (0, exposure time - flash
3623          duration).</details>
3624          <tag id="FUTURE" />
3625        </entry>
3626        <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="legacy">
3627          <enum>
3628            <value>OFF
3629              <notes>
3630              Do not fire the flash for this capture.
3631              </notes>
3632            </value>
3633            <value>SINGLE
3634              <notes>
3635              If the flash is available and charged, fire flash
3636              for this capture.
3637              </notes>
3638            </value>
3639            <value>TORCH
3640              <notes>
3641              Transition flash to continuously on.
3642              </notes>
3643            </value>
3644          </enum>
3645          <description>The desired mode for for the camera device's flash control.</description>
3646          <details>
3647          This control is only effective when flash unit is available
3648          (`android.flash.info.available == true`).
3649
3650          When this control is used, the android.control.aeMode must be set to ON or OFF.
3651          Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
3652          ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.
3653
3654          When set to OFF, the camera device will not fire flash for this capture.
3655
3656          When set to SINGLE, the camera device will fire flash regardless of the camera
3657          device's auto-exposure routine's result. When used in still capture case, this
3658          control should be used along with auto-exposure (AE) precapture metering sequence
3659          (android.control.aePrecaptureTrigger), otherwise, the image may be incorrectly exposed.
3660
3661          When set to TORCH, the flash will be on continuously. This mode can be used
3662          for use cases such as preview, auto-focus assist, still capture, or video recording.
3663
3664          The flash status will be reported by android.flash.state in the capture result metadata.
3665          </details>
3666          <tag id="BC" />
3667        </entry>
3668      </controls>
3669      <static>
3670        <namespace name="info">
3671          <entry name="available" type="byte" visibility="public" enum="true"
3672                 typedef="boolean" hwlevel="legacy">
3673            <enum>
3674              <value>FALSE</value>
3675              <value>TRUE</value>
3676            </enum>
3677            <description>Whether this camera device has a
3678            flash unit.</description>
3679            <details>
3680            Will be `false` if no flash is available.
3681
3682            If there is no flash unit, none of the flash controls do
3683            anything.</details>
3684            <tag id="BC" />
3685          </entry>
3686          <entry name="chargeDuration" type="int64">
3687            <description>Time taken before flash can fire
3688            again</description>
3689            <units>nanoseconds</units>
3690            <range>0-1e9</range>
3691            <details>1 second too long/too short for recharge? Should
3692            this be power-dependent?</details>
3693            <tag id="FUTURE" />
3694          </entry>
3695        </namespace>
3696        <entry name="colorTemperature" type="byte">
3697          <description>The x,y whitepoint of the
3698          flash</description>
3699          <units>pair of floats</units>
3700          <range>0-1 for both</range>
3701          <tag id="FUTURE" />
3702        </entry>
3703        <entry name="maxEnergy" type="byte">
3704          <description>Max energy output of the flash for a full
3705          power single flash</description>
3706          <units>lumen-seconds</units>
3707          <range>&amp;gt;= 0</range>
3708          <tag id="FUTURE" />
3709        </entry>
3710      </static>
3711      <dynamic>
3712        <clone entry="android.flash.firingPower" kind="controls">
3713        </clone>
3714        <clone entry="android.flash.firingTime" kind="controls">
3715        </clone>
3716        <clone entry="android.flash.mode" kind="controls"></clone>
3717        <entry name="state" type="byte" visibility="public" enum="true"
3718               hwlevel="limited">
3719          <enum>
3720            <value>UNAVAILABLE
3721            <notes>No flash on camera.</notes></value>
3722            <value>CHARGING
3723            <notes>Flash is charging and cannot be fired.</notes></value>
3724            <value>READY
3725            <notes>Flash is ready to fire.</notes></value>
3726            <value>FIRED
3727            <notes>Flash fired for this capture.</notes></value>
3728            <value>PARTIAL
3729            <notes>Flash partially illuminated this frame.
3730
3731            This is usually due to the next or previous frame having
3732            the flash fire, and the flash spilling into this capture
3733            due to hardware limitations.</notes></value>
3734          </enum>
3735          <description>Current state of the flash
3736          unit.</description>
3737          <details>
3738          When the camera device doesn't have flash unit
3739          (i.e. `android.flash.info.available == false`), this state will always be UNAVAILABLE.
3740          Other states indicate the current flash status.
3741
3742          In certain conditions, this will be available on LEGACY devices:
3743
3744           * Flash-less cameras always return UNAVAILABLE.
3745           * Using android.control.aeMode `==` ON_ALWAYS_FLASH
3746             will always return FIRED.
3747           * Using android.flash.mode `==` TORCH
3748             will always return FIRED.
3749
3750          In all other conditions the state will not be available on
3751          LEGACY devices (i.e. it will be `null`).
3752          </details>
3753        </entry>
3754      </dynamic>
3755    </section>
3756    <section name="hotPixel">
3757      <controls>
3758        <entry name="mode" type="byte" visibility="public" enum="true">
3759          <enum>
3760            <value>OFF
3761              <notes>
3762              No hot pixel correction is applied.
3763
3764              The frame rate must not be reduced relative to sensor raw output
3765              for this option.
3766
3767              The hotpixel map may be returned in android.statistics.hotPixelMap.
3768              </notes>
3769            </value>
3770            <value>FAST
3771              <notes>
3772              Hot pixel correction is applied, without reducing frame
3773              rate relative to sensor raw output.
3774
3775              The hotpixel map may be returned in android.statistics.hotPixelMap.
3776              </notes>
3777            </value>
3778            <value>HIGH_QUALITY
3779              <notes>
3780              High-quality hot pixel correction is applied, at a cost
3781              of possibly reduced frame rate relative to sensor raw output.
3782
3783              The hotpixel map may be returned in android.statistics.hotPixelMap.
3784              </notes>
3785            </value>
3786          </enum>
3787          <description>
3788          Operational mode for hot pixel correction.
3789          </description>
3790          <range>android.hotPixel.availableHotPixelModes</range>
3791          <details>
3792          Hotpixel correction interpolates out, or otherwise removes, pixels
3793          that do not accurately measure the incoming light (i.e. pixels that
3794          are stuck at an arbitrary value or are oversensitive).
3795          </details>
3796          <tag id="V1" />
3797          <tag id="RAW" />
3798        </entry>
3799      </controls>
3800      <static>
3801        <entry name="availableHotPixelModes" type="byte" visibility="public"
3802          type_notes="list of enums" container="array" typedef="enumList">
3803          <array>
3804            <size>n</size>
3805          </array>
3806          <description>
3807          List of hot pixel correction modes for android.hotPixel.mode that are supported by this
3808          camera device.
3809          </description>
3810          <range>Any value listed in android.hotPixel.mode</range>
3811          <details>
3812          FULL mode camera devices will always support FAST.
3813          </details>
3814          <hal_details>
3815          To avoid performance issues, there will be significantly fewer hot
3816          pixels than actual pixels on the camera sensor.
3817          HAL must support both FAST and HIGH_QUALITY if hot pixel correction control is available
3818          on the camera device, but the underlying implementation can be the same for both modes.
3819          That is, if the highest quality implementation on the camera device does not slow down
3820          capture rate, then FAST and HIGH_QUALITY will generate the same output.
3821          </hal_details>
3822          <tag id="V1" />
3823          <tag id="RAW" />
3824        </entry>
3825      </static>
3826      <dynamic>
3827        <clone entry="android.hotPixel.mode" kind="controls">
3828          <tag id="V1" />
3829          <tag id="RAW" />
3830        </clone>
3831      </dynamic>
3832    </section>
3833    <section name="jpeg">
3834      <controls>
3835        <entry name="gpsLocation" type="byte" visibility="java_public" synthetic="true"
3836        typedef="location" hwlevel="legacy">
3837          <description>
3838          A location object to use when generating image GPS metadata.
3839          </description>
3840          <details>
3841          Setting a location object in a request will include the GPS coordinates of the location
3842          into any JPEG images captured based on the request. These coordinates can then be
3843          viewed by anyone who receives the JPEG image.
3844
3845          This tag is also used for HEIC image capture.
3846          </details>
3847        </entry>
3848        <entry name="gpsCoordinates" type="double" visibility="ndk_public"
3849        type_notes="latitude, longitude, altitude. First two in degrees, the third in meters"
3850        container="array" hwlevel="legacy">
3851          <array>
3852            <size>3</size>
3853          </array>
3854          <description>GPS coordinates to include in output JPEG
3855          EXIF.</description>
3856          <range>(-180 - 180], [-90,90], [-inf, inf]</range>
3857          <details>This tag is also used for HEIC image capture.</details>
3858          <tag id="BC" />
3859        </entry>
3860        <entry name="gpsProcessingMethod" type="byte" visibility="ndk_public"
3861               typedef="string" hwlevel="legacy">
3862          <description>32 characters describing GPS algorithm to
3863          include in EXIF.</description>
3864          <units>UTF-8 null-terminated string</units>
3865          <details>This tag is also used for HEIC image capture.</details>
3866          <tag id="BC" />
3867        </entry>
3868        <entry name="gpsTimestamp" type="int64" visibility="ndk_public" hwlevel="legacy">
3869          <description>Time GPS fix was made to include in
3870          EXIF.</description>
3871          <units>UTC in seconds since January 1, 1970</units>
3872          <details>This tag is also used for HEIC image capture.</details>
3873          <tag id="BC" />
3874        </entry>
3875        <entry name="orientation" type="int32" visibility="public" hwlevel="legacy">
3876          <description>The orientation for a JPEG image.</description>
3877          <units>Degrees in multiples of 90</units>
3878          <range>0, 90, 180, 270</range>
3879          <details>
3880          The clockwise rotation angle in degrees, relative to the orientation
3881          to the camera, that the JPEG picture needs to be rotated by, to be viewed
3882          upright.
3883
3884          Camera devices may either encode this value into the JPEG EXIF header, or
3885          rotate the image data to match this orientation. When the image data is rotated,
3886          the thumbnail data will also be rotated.
3887
3888          Note that this orientation is relative to the orientation of the camera sensor, given
3889          by android.sensor.orientation.
3890
3891          To translate from the device orientation given by the Android sensor APIs for camera
3892          sensors which are not EXTERNAL, the following sample code may be used:
3893
3894              private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
3895                  if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
3896                  int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
3897
3898                  // Round device orientation to a multiple of 90
3899                  deviceOrientation = (deviceOrientation + 45) / 90 * 90;
3900
3901                  // Reverse device orientation for front-facing cameras
3902                  boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
3903                  if (facingFront) deviceOrientation = -deviceOrientation;
3904
3905                  // Calculate desired JPEG orientation relative to camera orientation to make
3906                  // the image upright relative to the device orientation
3907                  int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
3908
3909                  return jpegOrientation;
3910              }
3911
3912          For EXTERNAL cameras the sensor orientation will always be set to 0 and the facing will
3913          also be set to EXTERNAL. The above code is not relevant in such case.
3914
3915          This tag is also used to describe the orientation of the HEIC image capture, in which
3916          case the rotation is reflected by
3917          {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}, and not by
3918          rotating the image data itself.
3919          </details>
3920          <tag id="BC" />
3921        </entry>
3922        <entry name="quality" type="byte" visibility="public" hwlevel="legacy">
3923          <description>Compression quality of the final JPEG
3924          image.</description>
3925          <range>1-100; larger is higher quality</range>
3926          <details>85-95 is typical usage range. This tag is also used to describe the quality
3927          of the HEIC image capture.</details>
3928          <tag id="BC" />
3929        </entry>
3930        <entry name="thumbnailQuality" type="byte" visibility="public" hwlevel="legacy">
3931          <description>Compression quality of JPEG
3932          thumbnail.</description>
3933          <range>1-100; larger is higher quality</range>
3934          <details>This tag is also used to describe the quality of the HEIC image capture.</details>
3935          <tag id="BC" />
3936        </entry>
3937        <entry name="thumbnailSize" type="int32" visibility="public"
3938        container="array" typedef="size" hwlevel="legacy">
3939          <array>
3940            <size>2</size>
3941          </array>
3942          <description>Resolution of embedded JPEG thumbnail.</description>
3943          <range>android.jpeg.availableThumbnailSizes</range>
3944          <details>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
3945          but the captured JPEG will still be a valid image.
3946
3947          For best results, when issuing a request for a JPEG image, the thumbnail size selected
3948          should have the same aspect ratio as the main JPEG output.
3949
3950          If the thumbnail image aspect ratio differs from the JPEG primary image aspect
3951          ratio, the camera device creates the thumbnail by cropping it from the primary image.
3952          For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
3953          16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
3954          generate the thumbnail image. The thumbnail image will always have a smaller Field
3955          Of View (FOV) than the primary image when aspect ratios differ.
3956
3957          When an android.jpeg.orientation of non-zero degree is requested,
3958          the camera device will handle thumbnail rotation in one of the following ways:
3959
3960          * Set the {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}
3961            and keep jpeg and thumbnail image data unrotated.
3962          * Rotate the jpeg and thumbnail image data and not set
3963            {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}. In this
3964            case, LIMITED or FULL hardware level devices will report rotated thumnail size in
3965            capture result, so the width and height will be interchanged if 90 or 270 degree
3966            orientation is requested. LEGACY device will always report unrotated thumbnail
3967            size.
3968
3969          The tag is also used as thumbnail size for HEIC image format capture, in which case the
3970          the thumbnail rotation is reflected by
3971          {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}, and not by
3972          rotating the thumbnail data itself.
3973          </details>
3974          <hal_details>
3975          The HAL must not squeeze or stretch the downscaled primary image to generate thumbnail.
3976          The cropping must be done on the primary jpeg image rather than the sensor pre-correction
3977          active array. The stream cropping rule specified by "S5. Cropping" in camera3.h doesn't
3978          apply to the thumbnail image cropping.
3979          </hal_details>
3980          <tag id="BC" />
3981        </entry>
3982      </controls>
3983      <static>
3984        <entry name="availableThumbnailSizes" type="int32" visibility="public"
3985        container="array" typedef="size" hwlevel="legacy">
3986          <array>
3987            <size>2</size>
3988            <size>n</size>
3989          </array>
3990          <description>List of JPEG thumbnail sizes for android.jpeg.thumbnailSize supported by this
3991          camera device.</description>
3992          <details>
3993          This list will include at least one non-zero resolution, plus `(0,0)` for indicating no
3994          thumbnail should be generated.
3995
3996          Below condiditions will be satisfied for this size list:
3997
3998          * The sizes will be sorted by increasing pixel area (width x height).
3999          If several resolutions have the same area, they will be sorted by increasing width.
4000          * The aspect ratio of the largest thumbnail size will be same as the
4001          aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations.
4002          The largest size is defined as the size that has the largest pixel area
4003          in a given size list.
4004          * Each output JPEG size in android.scaler.availableStreamConfigurations will have at least
4005          one corresponding size that has the same aspect ratio in availableThumbnailSizes,
4006          and vice versa.
4007          * All non-`(0, 0)` sizes will have non-zero widths and heights.
4008
4009          This list is also used as supported thumbnail sizes for HEIC image format capture.
4010          </details>
4011          <tag id="BC" />
4012        </entry>
4013        <entry name="maxSize" type="int32" visibility="system">
4014          <description>Maximum size in bytes for the compressed
4015          JPEG buffer, in default sensor pixel mode (see android.sensor.pixelMode)</description>
4016          <range>Must be large enough to fit any JPEG produced by
4017          the camera</range>
4018          <details>This is used for sizing the gralloc buffers for
4019          JPEG</details>
4020        </entry>
4021      </static>
4022      <dynamic>
4023        <clone entry="android.jpeg.gpsLocation" kind="controls">
4024        </clone>
4025        <clone entry="android.jpeg.gpsCoordinates" kind="controls">
4026        </clone>
4027        <clone entry="android.jpeg.gpsProcessingMethod"
4028        kind="controls"></clone>
4029        <clone entry="android.jpeg.gpsTimestamp" kind="controls">
4030        </clone>
4031        <clone entry="android.jpeg.orientation" kind="controls">
4032        </clone>
4033        <clone entry="android.jpeg.quality" kind="controls">
4034        </clone>
4035        <entry name="size" type="int32">
4036          <description>The size of the compressed JPEG image, in
4037          bytes</description>
4038          <range>&amp;gt;= 0</range>
4039          <details>If no JPEG output is produced for the request,
4040          this must be 0.
4041
4042          Otherwise, this describes the real size of the compressed
4043          JPEG image placed in the output stream.  More specifically,
4044          if android.jpeg.maxSize = 1000000, and a specific capture
4045          has android.jpeg.size = 500000, then the output buffer from
4046          the JPEG stream will be 1000000 bytes, of which the first
4047          500000 make up the real data.</details>
4048          <tag id="FUTURE" />
4049        </entry>
4050        <clone entry="android.jpeg.thumbnailQuality"
4051        kind="controls"></clone>
4052        <clone entry="android.jpeg.thumbnailSize" kind="controls">
4053        </clone>
4054      </dynamic>
4055    </section>
4056    <section name="lens">
4057      <controls>
4058        <entry name="aperture" type="float" visibility="public" hwlevel="full">
4059          <description>The desired lens aperture size, as a ratio of lens focal length to the
4060          effective aperture diameter.</description>
4061          <units>The f-number (f/N)</units>
4062          <range>android.lens.info.availableApertures</range>
4063          <details>Setting this value is only supported on the camera devices that have a variable
4064          aperture lens.
4065
4066          When this is supported and android.control.aeMode is OFF,
4067          this can be set along with android.sensor.exposureTime,
4068          android.sensor.sensitivity, and android.sensor.frameDuration
4069          to achieve manual exposure control.
4070
4071          The requested aperture value may take several frames to reach the
4072          requested value; the camera device will report the current (intermediate)
4073          aperture size in capture result metadata while the aperture is changing.
4074          While the aperture is still changing, android.lens.state will be set to MOVING.
4075
4076          When this is supported and android.control.aeMode is one of
4077          the ON modes, this will be overridden by the camera device
4078          auto-exposure algorithm, the overridden values are then provided
4079          back to the user in the corresponding result.</details>
4080          <tag id="V1" />
4081        </entry>
4082        <entry name="filterDensity" type="float" visibility="public" hwlevel="full">
4083          <description>
4084          The desired setting for the lens neutral density filter(s).
4085          </description>
4086          <units>Exposure Value (EV)</units>
4087          <range>android.lens.info.availableFilterDensities</range>
4088          <details>
4089          This control will not be supported on most camera devices.
4090
4091          Lens filters are typically used to lower the amount of light the
4092          sensor is exposed to (measured in steps of EV). As used here, an EV
4093          step is the standard logarithmic representation, which are
4094          non-negative, and inversely proportional to the amount of light
4095          hitting the sensor.  For example, setting this to 0 would result
4096          in no reduction of the incoming light, and setting this to 2 would
4097          mean that the filter is set to reduce incoming light by two stops
4098          (allowing 1/4 of the prior amount of light to the sensor).
4099
4100          It may take several frames before the lens filter density changes
4101          to the requested value. While the filter density is still changing,
4102          android.lens.state will be set to MOVING.
4103          </details>
4104          <tag id="V1" />
4105        </entry>
4106        <entry name="focalLength" type="float" visibility="public" hwlevel="legacy">
4107          <description>
4108          The desired lens focal length; used for optical zoom.
4109          </description>
4110          <units>Millimeters</units>
4111          <range>android.lens.info.availableFocalLengths</range>
4112          <details>
4113          This setting controls the physical focal length of the camera
4114          device's lens. Changing the focal length changes the field of
4115          view of the camera device, and is usually used for optical zoom.
4116
4117          Like android.lens.focusDistance and android.lens.aperture, this
4118          setting won't be applied instantaneously, and it may take several
4119          frames before the lens can change to the requested focal length.
4120          While the focal length is still changing, android.lens.state will
4121          be set to MOVING.
4122
4123          Optical zoom via this control will not be supported on most devices. Starting from API
4124          level 30, the camera device may combine optical and digital zoom through the
4125          android.control.zoomRatio control.
4126          </details>
4127          <hal_details>
4128          For a logical camera device supporting both optical and digital zoom, if focalLength and
4129          cropRegion change in the same request, the camera device must make sure that the new
4130          focalLength and cropRegion take effect in the same frame. This is to make sure that there
4131          is no visible field-of-view jump during zoom. For example, if cropRegion is applied
4132          immediately, but focalLength takes more than 1 frame to take effect, the camera device
4133          will delay the cropRegion so that it's synchronized with focalLength.
4134
4135          Starting from API level 30, it's strongly recommended for HAL to implement the
4136          combination of optical and digital zoom using the new android.control.zoomRatio API, in
4137          lieu of using android.lens.focalLength and android.scaler.cropRegion.
4138          </hal_details>
4139          <tag id="V1" />
4140        </entry>
4141        <entry name="focusDistance" type="float" visibility="public" hwlevel="full">
4142          <description>Desired distance to plane of sharpest focus,
4143          measured from frontmost surface of the lens.</description>
4144          <units>See android.lens.info.focusDistanceCalibration for details</units>
4145          <range>&amp;gt;= 0</range>
4146          <details>
4147          This control can be used for setting manual focus, on devices that support
4148          the MANUAL_SENSOR capability and have a variable-focus lens (see
4149          android.lens.info.minimumFocusDistance).
4150
4151          A value of `0.0f` means infinity focus. The value set will be clamped to
4152          `[0.0f, android.lens.info.minimumFocusDistance]`.
4153
4154          Like android.lens.focalLength, this setting won't be applied
4155          instantaneously, and it may take several frames before the lens
4156          can move to the requested focus distance. While the lens is still moving,
4157          android.lens.state will be set to MOVING.
4158
4159          LEGACY devices support at most setting this to `0.0f`
4160          for infinity focus.
4161          </details>
4162          <tag id="BC" />
4163          <tag id="V1" />
4164        </entry>
4165        <entry name="opticalStabilizationMode" type="byte" visibility="public"
4166        enum="true" hwlevel="limited">
4167          <enum>
4168            <value>OFF
4169              <notes>Optical stabilization is unavailable.</notes>
4170            </value>
4171            <value optional="true">ON
4172              <notes>Optical stabilization is enabled.</notes>
4173            </value>
4174          </enum>
4175          <description>
4176          Sets whether the camera device uses optical image stabilization (OIS)
4177          when capturing images.
4178          </description>
4179          <range>android.lens.info.availableOpticalStabilization</range>
4180          <details>
4181          OIS is used to compensate for motion blur due to small
4182          movements of the camera during capture. Unlike digital image
4183          stabilization (android.control.videoStabilizationMode), OIS
4184          makes use of mechanical elements to stabilize the camera
4185          sensor, and thus allows for longer exposure times before
4186          camera shake becomes apparent.
4187
4188          Switching between different optical stabilization modes may take several
4189          frames to initialize, the camera device will report the current mode in
4190          capture result metadata. For example, When "ON" mode is requested, the
4191          optical stabilization modes in the first several capture results may still
4192          be "OFF", and it will become "ON" when the initialization is done.
4193
4194          If a camera device supports both OIS and digital image stabilization
4195          (android.control.videoStabilizationMode), turning both modes on may produce undesirable
4196          interaction, so it is recommended not to enable both at the same time.
4197
4198          Not all devices will support OIS; see
4199          android.lens.info.availableOpticalStabilization for
4200          available controls.
4201          </details>
4202          <tag id="V1" />
4203        </entry>
4204      </controls>
4205      <static>
4206        <namespace name="info">
4207          <entry name="availableApertures" type="float" visibility="public"
4208          container="array" hwlevel="full">
4209            <array>
4210              <size>n</size>
4211            </array>
4212            <description>List of aperture size values for android.lens.aperture that are
4213            supported by this camera device.</description>
4214            <units>The aperture f-number</units>
4215            <details>If the camera device doesn't support a variable lens aperture,
4216            this list will contain only one value, which is the fixed aperture size.
4217
4218            If the camera device supports a variable aperture, the aperture values
4219            in this list will be sorted in ascending order.</details>
4220            <tag id="V1" />
4221          </entry>
4222          <entry name="availableFilterDensities" type="float" visibility="public"
4223          container="array" hwlevel="full">
4224            <array>
4225              <size>n</size>
4226            </array>
4227            <description>
4228            List of neutral density filter values for
4229            android.lens.filterDensity that are supported by this camera device.
4230            </description>
4231            <units>Exposure value (EV)</units>
4232            <range>
4233            Values are &amp;gt;= 0
4234            </range>
4235            <details>
4236            If a neutral density filter is not supported by this camera device,
4237            this list will contain only 0. Otherwise, this list will include every
4238            filter density supported by the camera device, in ascending order.
4239            </details>
4240            <tag id="V1" />
4241          </entry>
4242          <entry name="availableFocalLengths" type="float" visibility="public"
4243          type_notes="The list of available focal lengths"
4244          container="array" hwlevel="legacy">
4245            <array>
4246              <size>n</size>
4247            </array>
4248            <description>
4249            List of focal lengths for android.lens.focalLength that are supported by this camera
4250            device.
4251            </description>
4252            <units>Millimeters</units>
4253            <range>
4254            Values are &amp;gt; 0
4255            </range>
4256            <details>
4257            If optical zoom is not supported, this list will only contain
4258            a single value corresponding to the fixed focal length of the
4259            device. Otherwise, this list will include every focal length supported
4260            by the camera device, in ascending order.
4261            </details>
4262            <tag id="BC" />
4263            <tag id="V1" />
4264          </entry>
4265          <entry name="availableOpticalStabilization" type="byte"
4266          visibility="public" type_notes="list of enums" container="array"
4267          typedef="enumList" hwlevel="limited">
4268            <array>
4269              <size>n</size>
4270            </array>
4271            <description>
4272            List of optical image stabilization (OIS) modes for
4273            android.lens.opticalStabilizationMode that are supported by this camera device.
4274            </description>
4275            <range>Any value listed in android.lens.opticalStabilizationMode</range>
4276            <details>
4277            If OIS is not supported by a given camera device, this list will
4278            contain only OFF.
4279            </details>
4280            <tag id="V1" />
4281          </entry>
4282          <entry name="hyperfocalDistance" type="float" visibility="public" optional="true"
4283                 hwlevel="limited" permission_needed="true">
4284            <description>Hyperfocal distance for this lens.</description>
4285            <units>See android.lens.info.focusDistanceCalibration for details</units>
4286            <range>If lens is fixed focus, &amp;gt;= 0. If lens has focuser unit, the value is
4287            within `(0.0f, android.lens.info.minimumFocusDistance]`</range>
4288            <details>
4289            If the lens is not fixed focus, the camera device will report this
4290            field when android.lens.info.focusDistanceCalibration is APPROXIMATE or CALIBRATED.
4291            </details>
4292          </entry>
4293          <entry name="minimumFocusDistance" type="float" visibility="public" optional="true"
4294                 hwlevel="limited" permission_needed="true">
4295            <description>Shortest distance from frontmost surface
4296            of the lens that can be brought into sharp focus.</description>
4297            <units>See android.lens.info.focusDistanceCalibration for details</units>
4298            <range>&amp;gt;= 0</range>
4299            <details>If the lens is fixed-focus, this will be
4300            0.</details>
4301            <hal_details>Mandatory for FULL devices; LIMITED devices
4302            must always set this value to 0 for fixed-focus; and may omit
4303            the minimum focus distance otherwise.
4304
4305            This field is also mandatory for all devices advertising
4306            the MANUAL_SENSOR capability.</hal_details>
4307            <tag id="V1" />
4308          </entry>
4309          <entry name="shadingMapSize" type="int32" visibility="ndk_public"
4310                 type_notes="width and height (N, M) of lens shading map provided by the camera device."
4311                 container="array" typedef="size" hwlevel="full">
4312            <array>
4313              <size>2</size>
4314            </array>
4315            <description>Dimensions of lens shading map.</description>
4316            <range>Both values &amp;gt;= 1</range>
4317            <details>
4318            The map should be on the order of 30-40 rows and columns, and
4319            must be smaller than 64x64.
4320            </details>
4321            <tag id="V1" />
4322          </entry>
4323          <entry name="focusDistanceCalibration" type="byte" visibility="public"
4324                 enum="true" hwlevel="limited">
4325            <enum>
4326              <value>UNCALIBRATED
4327                <notes>
4328                The lens focus distance is not accurate, and the units used for
4329                android.lens.focusDistance do not correspond to any physical units.
4330
4331                Setting the lens to the same focus distance on separate occasions may
4332                result in a different real focus distance, depending on factors such
4333                as the orientation of the device, the age of the focusing mechanism,
4334                and the device temperature. The focus distance value will still be
4335                in the range of `[0, android.lens.info.minimumFocusDistance]`, where 0
4336                represents the farthest focus.
4337                </notes>
4338              </value>
4339              <value>APPROXIMATE
4340                <notes>
4341                The lens focus distance is measured in diopters.
4342
4343                However, setting the lens to the same focus distance
4344                on separate occasions may result in a different real
4345                focus distance, depending on factors such as the
4346                orientation of the device, the age of the focusing
4347                mechanism, and the device temperature.
4348                </notes>
4349              </value>
4350              <value>CALIBRATED
4351                <notes>
4352                The lens focus distance is measured in diopters, and
4353                is calibrated.
4354
4355                The lens mechanism is calibrated so that setting the
4356                same focus distance is repeatable on multiple
4357                occasions with good accuracy, and the focus distance
4358                corresponds to the real physical distance to the plane
4359                of best focus.
4360                </notes>
4361              </value>
4362            </enum>
4363            <description>The lens focus distance calibration quality.</description>
4364            <details>
4365            The lens focus distance calibration quality determines the reliability of
4366            focus related metadata entries, i.e. android.lens.focusDistance,
4367            android.lens.focusRange, android.lens.info.hyperfocalDistance, and
4368            android.lens.info.minimumFocusDistance.
4369
4370            APPROXIMATE and CALIBRATED devices report the focus metadata in
4371            units of diopters (1/meter), so `0.0f` represents focusing at infinity,
4372            and increasing positive numbers represent focusing closer and closer
4373            to the camera device. The focus distance control also uses diopters
4374            on these devices.
4375
4376            UNCALIBRATED devices do not use units that are directly comparable
4377            to any real physical measurement, but `0.0f` still represents farthest
4378            focus, and android.lens.info.minimumFocusDistance represents the
4379            nearest focus the device can achieve.
4380            </details>
4381            <hal_details>
4382            For devices advertise APPROXIMATE quality or higher, diopters 0 (infinity
4383            focus) must work. When autofocus is disabled (android.control.afMode == OFF)
4384            and the lens focus distance is set to 0 diopters
4385            (android.lens.focusDistance == 0), the lens will move to focus at infinity
4386            and is stably focused at infinity even if the device tilts. It may take the
4387            lens some time to move; during the move the lens state should be MOVING and
4388            the output diopter value should be changing toward 0.
4389            </hal_details>
4390          <tag id="V1" />
4391        </entry>
4392        </namespace>
4393        <entry name="facing" type="byte" visibility="public" enum="true" hwlevel="legacy">
4394          <enum>
4395            <value>FRONT
4396            <notes>
4397              The camera device faces the same direction as the device's screen.
4398            </notes></value>
4399            <value>BACK
4400            <notes>
4401              The camera device faces the opposite direction as the device's screen.
4402            </notes></value>
4403            <value>EXTERNAL
4404            <notes>
4405              The camera device is an external camera, and has no fixed facing relative to the
4406              device's screen.
4407            </notes></value>
4408          </enum>
4409          <description>Direction the camera faces relative to
4410          device screen.</description>
4411        </entry>
4412        <entry name="poseRotation" type="float" visibility="public"
4413               container="array" permission_needed="true">
4414          <array>
4415            <size>4</size>
4416          </array>
4417          <description>
4418            The orientation of the camera relative to the sensor
4419            coordinate system.
4420          </description>
4421          <units>
4422            Quaternion coefficients
4423          </units>
4424          <details>
4425            The four coefficients that describe the quaternion
4426            rotation from the Android sensor coordinate system to a
4427            camera-aligned coordinate system where the X-axis is
4428            aligned with the long side of the image sensor, the Y-axis
4429            is aligned with the short side of the image sensor, and
4430            the Z-axis is aligned with the optical axis of the sensor.
4431
4432            To convert from the quaternion coefficients `(x,y,z,w)`
4433            to the axis of rotation `(a_x, a_y, a_z)` and rotation
4434            amount `theta`, the following formulas can be used:
4435
4436                 theta = 2 * acos(w)
4437                a_x = x / sin(theta/2)
4438                a_y = y / sin(theta/2)
4439                a_z = z / sin(theta/2)
4440
4441            To create a 3x3 rotation matrix that applies the rotation
4442            defined by this quaternion, the following matrix can be
4443            used:
4444
4445                R = [ 1 - 2y^2 - 2z^2,       2xy - 2zw,       2xz + 2yw,
4446                           2xy + 2zw, 1 - 2x^2 - 2z^2,       2yz - 2xw,
4447                           2xz - 2yw,       2yz + 2xw, 1 - 2x^2 - 2y^2 ]
4448
4449             This matrix can then be used to apply the rotation to a
4450             column vector point with
4451
4452               `p' = Rp`
4453
4454             where `p` is in the device sensor coordinate system, and
4455             `p'` is in the camera-oriented coordinate system.
4456
4457             If android.lens.poseReference is UNDEFINED, the quaternion rotation cannot
4458             be accurately represented by the camera device, and will be represented by
4459             default values matching its default facing.
4460          </details>
4461          <tag id="DEPTH" />
4462        </entry>
4463        <entry name="poseTranslation" type="float" visibility="public"
4464               container="array" permission_needed="true">
4465          <array>
4466            <size>3</size>
4467          </array>
4468          <description>Position of the camera optical center.</description>
4469          <units>Meters</units>
4470          <details>
4471            The position of the camera device's lens optical center,
4472            as a three-dimensional vector `(x,y,z)`.
4473
4474            Prior to Android P, or when android.lens.poseReference is PRIMARY_CAMERA, this position
4475            is relative to the optical center of the largest camera device facing in the same
4476            direction as this camera, in the {@link android.hardware.SensorEvent Android sensor
4477            coordinate axes}. Note that only the axis definitions are shared with the sensor
4478            coordinate system, but not the origin.
4479
4480            If this device is the largest or only camera device with a given facing, then this
4481            position will be `(0, 0, 0)`; a camera device with a lens optical center located 3 cm
4482            from the main sensor along the +X axis (to the right from the user's perspective) will
4483            report `(0.03, 0, 0)`.  Note that this means that, for many computer vision
4484            applications, the position needs to be negated to convert it to a translation from the
4485            camera to the origin.
4486
4487            To transform a pixel coordinates between two cameras facing the same direction, first
4488            the source camera android.lens.distortion must be corrected for.  Then the source
4489            camera android.lens.intrinsicCalibration needs to be applied, followed by the
4490            android.lens.poseRotation of the source camera, the translation of the source camera
4491            relative to the destination camera, the android.lens.poseRotation of the destination
4492            camera, and finally the inverse of android.lens.intrinsicCalibration of the destination
4493            camera. This obtains a radial-distortion-free coordinate in the destination camera pixel
4494            coordinates.
4495
4496            To compare this against a real image from the destination camera, the destination camera
4497            image then needs to be corrected for radial distortion before comparison or sampling.
4498
4499            When android.lens.poseReference is GYROSCOPE, then this position is relative to
4500            the center of the primary gyroscope on the device. The axis definitions are the same as
4501            with PRIMARY_CAMERA.
4502
4503            When android.lens.poseReference is UNDEFINED, this position cannot be accurately
4504            represented by the camera device, and will be represented as `(0, 0, 0)`.
4505          </details>
4506          <tag id="DEPTH" />
4507        </entry>
4508      </static>
4509      <dynamic>
4510        <clone entry="android.lens.aperture" kind="controls">
4511          <tag id="V1" />
4512        </clone>
4513        <clone entry="android.lens.filterDensity" kind="controls">
4514          <tag id="V1" />
4515        </clone>
4516        <clone entry="android.lens.focalLength" kind="controls">
4517          <tag id="BC" />
4518        </clone>
4519        <clone entry="android.lens.focusDistance" kind="controls">
4520          <details>Should be zero for fixed-focus cameras</details>
4521          <tag id="BC" />
4522        </clone>
4523        <entry name="focusRange" type="float" visibility="public"
4524        type_notes="Range of scene distances that are in focus"
4525        container="array" typedef="pairFloatFloat" hwlevel="limited">
4526          <array>
4527            <size>2</size>
4528          </array>
4529          <description>The range of scene distances that are in
4530          sharp focus (depth of field).</description>
4531          <units>A pair of focus distances in diopters: (near,
4532          far); see android.lens.info.focusDistanceCalibration for details.</units>
4533          <range>&amp;gt;=0</range>
4534          <details>If variable focus not supported, can still report
4535          fixed depth of field range</details>
4536          <tag id="BC" />
4537        </entry>
4538        <clone entry="android.lens.opticalStabilizationMode"
4539        kind="controls">
4540          <tag id="V1" />
4541        </clone>
4542        <entry name="state" type="byte" visibility="public" enum="true" hwlevel="limited">
4543          <enum>
4544            <value>STATIONARY
4545              <notes>
4546              The lens parameters (android.lens.focalLength, android.lens.focusDistance,
4547              android.lens.filterDensity and android.lens.aperture) are not changing.
4548              </notes>
4549            </value>
4550            <value>MOVING
4551              <notes>
4552              One or several of the lens parameters
4553              (android.lens.focalLength, android.lens.focusDistance,
4554              android.lens.filterDensity or android.lens.aperture) is
4555              currently changing.
4556              </notes>
4557            </value>
4558          </enum>
4559          <description>Current lens status.</description>
4560          <details>
4561          For lens parameters android.lens.focalLength, android.lens.focusDistance,
4562          android.lens.filterDensity and android.lens.aperture, when changes are requested,
4563          they may take several frames to reach the requested values. This state indicates
4564          the current status of the lens parameters.
4565
4566          When the state is STATIONARY, the lens parameters are not changing. This could be
4567          either because the parameters are all fixed, or because the lens has had enough
4568          time to reach the most recently-requested values.
4569          If all these lens parameters are not changable for a camera device, as listed below:
4570
4571          * Fixed focus (`android.lens.info.minimumFocusDistance == 0`), which means
4572          android.lens.focusDistance parameter will always be 0.
4573          * Fixed focal length (android.lens.info.availableFocalLengths contains single value),
4574          which means the optical zoom is not supported.
4575          * No ND filter (android.lens.info.availableFilterDensities contains only 0).
4576          * Fixed aperture (android.lens.info.availableApertures contains single value).
4577
4578          Then this state will always be STATIONARY.
4579
4580          When the state is MOVING, it indicates that at least one of the lens parameters
4581          is changing.
4582          </details>
4583          <tag id="V1" />
4584        </entry>
4585        <clone entry="android.lens.poseRotation" kind="static">
4586        </clone>
4587        <clone entry="android.lens.poseTranslation" kind="static">
4588        </clone>
4589      </dynamic>
4590      <static>
4591        <entry name="intrinsicCalibration" type="float" visibility="public"
4592               container="array" permission_needed="true">
4593          <array>
4594            <size>5</size>
4595          </array>
4596          <description>
4597            The parameters for this camera device's intrinsic
4598            calibration.
4599          </description>
4600          <units>
4601            Pixels in the
4602            android.sensor.info.preCorrectionActiveArraySize
4603            coordinate system.
4604          </units>
4605          <details>
4606            The five calibration parameters that describe the
4607            transform from camera-centric 3D coordinates to sensor
4608            pixel coordinates:
4609
4610                [f_x, f_y, c_x, c_y, s]
4611
4612            Where `f_x` and `f_y` are the horizontal and vertical
4613            focal lengths, `[c_x, c_y]` is the position of the optical
4614            axis, and `s` is a skew parameter for the sensor plane not
4615            being aligned with the lens plane.
4616
4617            These are typically used within a transformation matrix K:
4618
4619                K = [ f_x,   s, c_x,
4620                       0, f_y, c_y,
4621                       0    0,   1 ]
4622
4623            which can then be combined with the camera pose rotation
4624            `R` and translation `t` (android.lens.poseRotation and
4625            android.lens.poseTranslation, respectively) to calculate the
4626            complete transform from world coordinates to pixel
4627            coordinates:
4628
4629                P = [ K 0   * [ R -Rt
4630                     0 1 ]      0 1 ]
4631
4632            (Note the negation of poseTranslation when mapping from camera
4633            to world coordinates, and multiplication by the rotation).
4634
4635            With `p_w` being a point in the world coordinate system
4636            and `p_s` being a point in the camera active pixel array
4637            coordinate system, and with the mapping including the
4638            homogeneous division by z:
4639
4640                 p_h = (x_h, y_h, z_h) = P p_w
4641                p_s = p_h / z_h
4642
4643            so `[x_s, y_s]` is the pixel coordinates of the world
4644            point, `z_s = 1`, and `w_s` is a measurement of disparity
4645            (depth) in pixel coordinates.
4646
4647            Note that the coordinate system for this transform is the
4648            android.sensor.info.preCorrectionActiveArraySize system,
4649            where `(0,0)` is the top-left of the
4650            preCorrectionActiveArraySize rectangle. Once the pose and
4651            intrinsic calibration transforms have been applied to a
4652            world point, then the android.lens.distortion
4653            transform needs to be applied, and the result adjusted to
4654            be in the android.sensor.info.activeArraySize coordinate
4655            system (where `(0, 0)` is the top-left of the
4656            activeArraySize rectangle), to determine the final pixel
4657            coordinate of the world point for processed (non-RAW)
4658            output buffers.
4659
4660            For camera devices, the center of pixel `(x,y)` is located at
4661            coordinate `(x + 0.5, y + 0.5)`.  So on a device with a
4662            precorrection active array of size `(10,10)`, the valid pixel
4663            indices go from `(0,0)-(9,9)`, and an perfectly-built camera would
4664            have an optical center at the exact center of the pixel grid, at
4665            coordinates `(5.0, 5.0)`, which is the top-left corner of pixel
4666            `(5,5)`.
4667          </details>
4668          <tag id="DEPTH" />
4669        </entry>
4670        <entry name="radialDistortion" type="float" visibility="public"
4671               deprecated="true" container="array" permission_needed="true">
4672          <array>
4673            <size>6</size>
4674          </array>
4675          <description>
4676            The correction coefficients to correct for this camera device's
4677            radial and tangential lens distortion.
4678          </description>
4679          <deprecation_description>
4680            This field was inconsistently defined in terms of its
4681            normalization. Use android.lens.distortion instead.
4682          </deprecation_description>
4683          <units>
4684            Unitless coefficients.
4685          </units>
4686          <details>
4687            Four radial distortion coefficients `[kappa_0, kappa_1, kappa_2,
4688            kappa_3]` and two tangential distortion coefficients
4689            `[kappa_4, kappa_5]` that can be used to correct the
4690            lens's geometric distortion with the mapping equations:
4691
4692                 x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
4693                       kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
4694                 y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
4695                       kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
4696
4697            Here, `[x_c, y_c]` are the coordinates to sample in the
4698            input image that correspond to the pixel values in the
4699            corrected image at the coordinate `[x_i, y_i]`:
4700
4701                 correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
4702
4703            The pixel coordinates are defined in a normalized
4704            coordinate system related to the
4705            android.lens.intrinsicCalibration calibration fields.
4706            Both `[x_i, y_i]` and `[x_c, y_c]` have `(0,0)` at the
4707            lens optical center `[c_x, c_y]`. The maximum magnitudes
4708            of both x and y coordinates are normalized to be 1 at the
4709            edge further from the optical center, so the range
4710            for both dimensions is `-1 &lt;= x &lt;= 1`.
4711
4712            Finally, `r` represents the radial distance from the
4713            optical center, `r^2 = x_i^2 + y_i^2`, and its magnitude
4714            is therefore no larger than `|r| &lt;= sqrt(2)`.
4715
4716            The distortion model used is the Brown-Conrady model.
4717          </details>
4718          <tag id="DEPTH" />
4719        </entry>
4720      </static>
4721      <dynamic>
4722        <clone entry="android.lens.intrinsicCalibration" kind="static">
4723        </clone>
4724        <clone entry="android.lens.radialDistortion" kind="static">
4725        </clone>
4726      </dynamic>
4727      <static>
4728        <entry name="poseReference" type="byte" visibility="public" enum="true"
4729            permission_needed="true" hal_version="3.3" >
4730          <enum>
4731            <value>PRIMARY_CAMERA
4732            <notes>The value of android.lens.poseTranslation is relative to the optical center of
4733            the largest camera device facing the same direction as this camera.
4734
4735            This is the default value for API levels before Android P.
4736            </notes>
4737            </value>
4738            <value>GYROSCOPE
4739            <notes>The value of android.lens.poseTranslation is relative to the position of the
4740            primary gyroscope of this Android device.
4741            </notes>
4742            </value>
4743            <value hal_version="3.5">UNDEFINED
4744            <notes>The camera device cannot represent the values of android.lens.poseTranslation
4745            and android.lens.poseRotation accurately enough. One such example is a camera device
4746            on the cover of a foldable phone: in order to measure the pose translation and rotation,
4747            some kind of hinge position sensor would be needed.
4748
4749            The value of android.lens.poseTranslation must be all zeros, and
4750            android.lens.poseRotation must be values matching its default facing.
4751            </notes>
4752            </value>
4753          </enum>
4754          <description>
4755            The origin for android.lens.poseTranslation, and the accuracy of
4756            android.lens.poseTranslation and android.lens.poseRotation.
4757          </description>
4758          <details>
4759            Different calibration methods and use cases can produce better or worse results
4760            depending on the selected coordinate origin.
4761          </details>
4762        </entry>
4763        <entry name="distortion" type="float" visibility="public" container="array"
4764               permission_needed="true" hal_version="3.3" >
4765          <array>
4766            <size>5</size>
4767          </array>
4768          <description>
4769            The correction coefficients to correct for this camera device's
4770            radial and tangential lens distortion.
4771
4772            Replaces the deprecated android.lens.radialDistortion field, which was
4773            inconsistently defined.
4774          </description>
4775          <units>
4776            Unitless coefficients.
4777          </units>
4778          <details>
4779            Three radial distortion coefficients `[kappa_1, kappa_2,
4780            kappa_3]` and two tangential distortion coefficients
4781            `[kappa_4, kappa_5]` that can be used to correct the
4782            lens's geometric distortion with the mapping equations:
4783
4784                 x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
4785                       kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
4786                 y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
4787                       kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
4788
4789            Here, `[x_c, y_c]` are the coordinates to sample in the
4790            input image that correspond to the pixel values in the
4791            corrected image at the coordinate `[x_i, y_i]`:
4792
4793                 correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
4794
4795            The pixel coordinates are defined in a coordinate system
4796            related to the android.lens.intrinsicCalibration
4797            calibration fields; see that entry for details of the mapping stages.
4798            Both `[x_i, y_i]` and `[x_c, y_c]`
4799            have `(0,0)` at the lens optical center `[c_x, c_y]`, and
4800            the range of the coordinates depends on the focal length
4801            terms of the intrinsic calibration.
4802
4803            Finally, `r` represents the radial distance from the
4804            optical center, `r^2 = x_i^2 + y_i^2`.
4805
4806            The distortion model used is the Brown-Conrady model.
4807          </details>
4808          <tag id="DEPTH" />
4809        </entry>
4810        <entry name="distortionMaximumResolution" type="float" visibility="public" container="array"
4811               permission_needed="true" hal_version="3.6" >
4812          <array>
4813            <size>5</size>
4814          </array>
4815          <description>
4816            The correction coefficients to correct for this camera device's
4817            radial and tangential lens distortion for a
4818            CaptureRequest with android.sensor.pixelMode set to
4819            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
4820          </description>
4821          <units>
4822            Unitless coefficients.
4823          </units>
4824          <details>
4825            Analogous to android.lens.distortion, when android.sensor.pixelMode is set to
4826            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
4827          </details>
4828          <tag id="DEPTH" />
4829        </entry>
4830        <entry name="intrinsicCalibrationMaximumResolution" type="float" visibility="public"
4831               container="array" permission_needed="true" hal_version="3.6">
4832          <array>
4833            <size>5</size>
4834          </array>
4835          <description>
4836            The parameters for this camera device's intrinsic
4837            calibration when android.sensor.pixelMode is set to
4838            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
4839          </description>
4840          <units>
4841            Pixels in the
4842            android.sensor.info.preCorrectionActiveArraySizeMaximumResolution
4843            coordinate system.
4844          </units>
4845          <details>
4846            Analogous to android.lens.intrinsicCalibration, when android.sensor.pixelMode is set to
4847            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
4848          </details>
4849          <tag id="DEPTH" />
4850        </entry>
4851      </static>
4852      <dynamic>
4853        <clone entry="android.lens.distortion" kind="static">
4854        </clone>
4855      </dynamic>
4856    </section>
4857    <section name="noiseReduction">
4858      <controls>
4859        <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full">
4860          <enum>
4861            <value>OFF
4862            <notes>No noise reduction is applied.</notes></value>
4863            <value>FAST
4864            <notes>Noise reduction is applied without reducing frame rate relative to sensor
4865            output. It may be the same as OFF if noise reduction will reduce frame rate
4866            relative to sensor.</notes></value>
4867            <value>HIGH_QUALITY
4868            <notes>High-quality noise reduction is applied, at the cost of possibly reduced frame
4869            rate relative to sensor output.</notes></value>
4870            <value optional="true">MINIMAL
4871            <notes>MINIMAL noise reduction is applied without reducing frame rate relative to
4872            sensor output. </notes></value>
4873            <value optional="true">ZERO_SHUTTER_LAG
4874
4875            <notes>Noise reduction is applied at different levels for different output streams,
4876            based on resolution. Streams at maximum recording resolution (see {@link
4877            android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession})
4878            or below have noise reduction applied, while higher-resolution streams have MINIMAL (if
4879            supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of
4880            noise reduction for low-resolution streams is tuned so that frame rate is not impacted,
4881            and the quality is equal to or better than FAST (since it is only applied to
4882            lower-resolution outputs, quality may improve from FAST).
4883
4884            This mode is intended to be used by applications operating in a zero-shutter-lag mode
4885            with YUV or PRIVATE reprocessing, where the application continuously captures
4886            high-resolution intermediate buffers into a circular buffer, from which a final image is
4887            produced via reprocessing when a user takes a picture.  For such a use case, the
4888            high-resolution buffers must not have noise reduction applied to maximize efficiency of
4889            preview and to avoid over-applying noise filtering when reprocessing, while
4890            low-resolution buffers (used for recording or preview, generally) need noise reduction
4891            applied for reasonable preview quality.
4892
4893            This mode is guaranteed to be supported by devices that support either the
4894            YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
4895            (android.request.availableCapabilities lists either of those capabilities) and it will
4896            be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.
4897            </notes></value>
4898          </enum>
4899          <description>Mode of operation for the noise reduction algorithm.</description>
4900          <range>android.noiseReduction.availableNoiseReductionModes</range>
4901          <details>The noise reduction algorithm attempts to improve image quality by removing
4902          excessive noise added by the capture process, especially in dark conditions.
4903
4904          OFF means no noise reduction will be applied by the camera device, for both raw and
4905          YUV domain.
4906
4907          MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove
4908          demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF.
4909          This mode is optional, may not be support by all devices. The application should check
4910          android.noiseReduction.availableNoiseReductionModes before using it.
4911
4912          FAST/HIGH_QUALITY both mean camera device determined noise filtering
4913          will be applied. HIGH_QUALITY mode indicates that the camera device
4914          will use the highest-quality noise filtering algorithms,
4915          even if it slows down capture rate. FAST means the camera device will not
4916          slow down capture rate when applying noise filtering. FAST may be the same as MINIMAL if
4917          MINIMAL is listed, or the same as OFF if any noise filtering will slow down capture rate.
4918          Every output stream will have a similar amount of enhancement applied.
4919
4920          ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
4921          buffer of high-resolution images during preview and reprocess image(s) from that buffer
4922          into a final capture when triggered by the user. In this mode, the camera device applies
4923          noise reduction to low-resolution streams (below maximum recording resolution) to maximize
4924          preview quality, but does not apply noise reduction to high-resolution streams, since
4925          those will be reprocessed later if necessary.
4926
4927          For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device
4928          will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device
4929          may adjust the noise reduction parameters for best image quality based on the
4930          android.reprocess.effectiveExposureFactor if it is set.
4931          </details>
4932          <hal_details>
4933          For YUV_REPROCESSING The HAL can use android.reprocess.effectiveExposureFactor to
4934          adjust the internal noise reduction parameters appropriately to get the best quality
4935          images.
4936          </hal_details>
4937          <tag id="V1" />
4938          <tag id="REPROC" />
4939        </entry>
4940        <entry name="strength" type="byte">
4941          <description>Control the amount of noise reduction
4942          applied to the images</description>
4943          <units>1-10; 10 is max noise reduction</units>
4944          <range>1 - 10</range>
4945          <tag id="FUTURE" />
4946        </entry>
4947      </controls>
4948      <static>
4949        <entry name="availableNoiseReductionModes" type="byte" visibility="public"
4950        type_notes="list of enums" container="array" typedef="enumList" hwlevel="limited">
4951          <array>
4952            <size>n</size>
4953          </array>
4954          <description>
4955          List of noise reduction modes for android.noiseReduction.mode that are supported
4956          by this camera device.
4957          </description>
4958          <range>Any value listed in android.noiseReduction.mode</range>
4959          <details>
4960          Full-capability camera devices will always support OFF and FAST.
4961
4962          Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support
4963          ZERO_SHUTTER_LAG.
4964
4965          Legacy-capability camera devices will only support FAST mode.
4966          </details>
4967          <hal_details>
4968          HAL must support both FAST and HIGH_QUALITY if noise reduction control is available
4969          on the camera device, but the underlying implementation can be the same for both modes.
4970          That is, if the highest quality implementation on the camera device does not slow down
4971          capture rate, then FAST and HIGH_QUALITY will generate the same output.
4972          </hal_details>
4973          <tag id="V1" />
4974          <tag id="REPROC" />
4975        </entry>
4976      </static>
4977      <dynamic>
4978        <clone entry="android.noiseReduction.mode" kind="controls">
4979          <tag id="V1" />
4980          <tag id="REPROC" />
4981        </clone>
4982      </dynamic>
4983    </section>
4984    <section name="quirks">
4985      <static>
4986        <entry name="meteringCropRegion" type="byte" visibility="system" deprecated="true" optional="true">
4987          <description>If set to 1, the camera service does not
4988          scale 'normalized' coordinates with respect to the crop
4989          region. This applies to metering input (a{e,f,wb}Region
4990          and output (face rectangles).</description>
4991          <deprecation_description>
4992          Not used in HALv3 or newer
4993          </deprecation_description>
4994          <details>Normalized coordinates refer to those in the
4995          (-1000,1000) range mentioned in the
4996          android.hardware.Camera API.
4997
4998          HAL implementations should instead always use and emit
4999          sensor array-relative coordinates for all region data. Does
5000          not need to be listed in static metadata. Support will be
5001          removed in future versions of camera service.</details>
5002        </entry>
5003        <entry name="triggerAfWithAuto" type="byte" visibility="system" deprecated="true" optional="true">
5004          <description>If set to 1, then the camera service always
5005          switches to FOCUS_MODE_AUTO before issuing a AF
5006          trigger.</description>
5007          <deprecation_description>
5008          Not used in HALv3 or newer
5009          </deprecation_description>
5010          <details>HAL implementations should implement AF trigger
5011          modes for AUTO, MACRO, CONTINUOUS_FOCUS, and
5012          CONTINUOUS_PICTURE modes instead of using this flag. Does
5013          not need to be listed in static metadata. Support will be
5014          removed in future versions of camera service</details>
5015        </entry>
5016        <entry name="useZslFormat" type="byte" visibility="system" deprecated="true" optional="true">
5017          <description>If set to 1, the camera service uses
5018          CAMERA2_PIXEL_FORMAT_ZSL instead of
5019          HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED for the zero
5020          shutter lag stream</description>
5021          <deprecation_description>
5022          Not used in HALv3 or newer
5023          </deprecation_description>
5024          <details>HAL implementations should use gralloc usage flags
5025          to determine that a stream will be used for
5026          zero-shutter-lag, instead of relying on an explicit
5027          format setting. Does not need to be listed in static
5028          metadata. Support will be removed in future versions of
5029          camera service.</details>
5030        </entry>
5031        <entry name="usePartialResult" type="byte" visibility="hidden" deprecated="true" optional="true">
5032          <description>
5033          If set to 1, the HAL will always split result
5034          metadata for a single capture into multiple buffers,
5035          returned using multiple process_capture_result calls.
5036          </description>
5037          <deprecation_description>
5038          Not used in HALv3 or newer; replaced by better partials mechanism
5039          </deprecation_description>
5040          <details>
5041          Does not need to be listed in static
5042          metadata. Support for partial results will be reworked in
5043          future versions of camera service. This quirk will stop
5044          working at that point; DO NOT USE without careful
5045          consideration of future support.
5046          </details>
5047          <hal_details>
5048          Refer to `camera3_capture_result::partial_result`
5049          for information on how to implement partial results.
5050          </hal_details>
5051        </entry>
5052      </static>
5053      <dynamic>
5054        <entry name="partialResult" type="byte" visibility="hidden" deprecated="true" optional="true" enum="true" typedef="boolean">
5055          <enum>
5056            <value>FINAL
5057            <notes>The last or only metadata result buffer
5058            for this capture.</notes>
5059            </value>
5060            <value>PARTIAL
5061            <notes>A partial buffer of result metadata for this
5062            capture. More result buffers for this capture will be sent
5063            by the camera device, the last of which will be marked
5064            FINAL.</notes>
5065            </value>
5066          </enum>
5067          <description>
5068          Whether a result given to the framework is the
5069          final one for the capture, or only a partial that contains a
5070          subset of the full set of dynamic metadata
5071          values.</description>
5072          <deprecation_description>
5073          Not used in HALv3 or newer
5074          </deprecation_description>
5075          <range>Optional. Default value is FINAL.</range>
5076          <details>
5077          The entries in the result metadata buffers for a
5078          single capture may not overlap, except for this entry. The
5079          FINAL buffers must retain FIFO ordering relative to the
5080          requests that generate them, so the FINAL buffer for frame 3 must
5081          always be sent to the framework after the FINAL buffer for frame 2, and
5082          before the FINAL buffer for frame 4. PARTIAL buffers may be returned
5083          in any order relative to other frames, but all PARTIAL buffers for a given
5084          capture must arrive before the FINAL buffer for that capture. This entry may
5085          only be used by the camera device if quirks.usePartialResult is set to 1.
5086          </details>
5087          <hal_details>
5088          Refer to `camera3_capture_result::partial_result`
5089          for information on how to implement partial results.
5090          </hal_details>
5091        </entry>
5092      </dynamic>
5093    </section>
5094    <section name="request">
5095      <controls>
5096        <entry name="frameCount" type="int32" visibility="system" deprecated="true">
5097          <description>A frame counter set by the framework. Must
5098          be maintained unchanged in output frame. This value monotonically
5099          increases with every new result (that is, each new result has a unique
5100          frameCount value).
5101          </description>
5102          <deprecation_description>
5103          Not used in HALv3 or newer
5104          </deprecation_description>
5105          <units>incrementing integer</units>
5106          <range>Any int.</range>
5107        </entry>
5108        <entry name="id" type="int32" visibility="hidden">
5109          <description>An application-specified ID for the current
5110          request. Must be maintained unchanged in output
5111          frame</description>
5112          <units>arbitrary integer assigned by application</units>
5113          <range>Any int</range>
5114          <tag id="V1" />
5115        </entry>
5116        <entry name="inputStreams" type="int32" visibility="system" deprecated="true"
5117               container="array">
5118          <array>
5119            <size>n</size>
5120          </array>
5121          <description>List which camera reprocess stream is used
5122          for the source of reprocessing data.</description>
5123          <deprecation_description>
5124          Not used in HALv3 or newer
5125          </deprecation_description>
5126          <units>List of camera reprocess stream IDs</units>
5127          <range>
5128          Typically, only one entry allowed, must be a valid reprocess stream ID.
5129          </range>
5130          <details>Only meaningful when android.request.type ==
5131          REPROCESS. Ignored otherwise</details>
5132          <tag id="HAL2" />
5133        </entry>
5134        <entry name="metadataMode" type="byte" visibility="system"
5135               enum="true">
5136          <enum>
5137            <value>NONE
5138            <notes>No metadata should be produced on output, except
5139            for application-bound buffer data. If no
5140            application-bound streams exist, no frame should be
5141            placed in the output frame queue. If such streams
5142            exist, a frame should be placed on the output queue
5143            with null metadata but with the necessary output buffer
5144            information. Timestamp information should still be
5145            included with any output stream buffers</notes></value>
5146            <value>FULL
5147            <notes>All metadata should be produced. Statistics will
5148            only be produced if they are separately
5149            enabled</notes></value>
5150          </enum>
5151          <description>How much metadata to produce on
5152          output</description>
5153          <tag id="FUTURE" />
5154        </entry>
5155        <entry name="outputStreams" type="int32" visibility="system" deprecated="true"
5156               container="array">
5157          <array>
5158            <size>n</size>
5159          </array>
5160          <description>Lists which camera output streams image data
5161          from this capture must be sent to</description>
5162          <deprecation_description>
5163          Not used in HALv3 or newer
5164          </deprecation_description>
5165          <units>List of camera stream IDs</units>
5166          <range>List must only include streams that have been
5167          created</range>
5168          <details>If no output streams are listed, then the image
5169          data should simply be discarded. The image data must
5170          still be captured for metadata and statistics production,
5171          and the lens and flash must operate as requested.</details>
5172          <tag id="HAL2" />
5173        </entry>
5174        <entry name="type" type="byte" visibility="system" deprecated="true" enum="true">
5175          <enum>
5176            <value>CAPTURE
5177            <notes>Capture a new image from the imaging hardware,
5178            and process it according to the
5179            settings</notes></value>
5180            <value>REPROCESS
5181            <notes>Process previously captured data; the
5182            android.request.inputStreams parameter determines the
5183            source reprocessing stream. TODO: Mark dynamic metadata
5184            needed for reprocessing with [RP]</notes></value>
5185          </enum>
5186          <description>The type of the request; either CAPTURE or
5187          REPROCESS. For legacy HAL3, this tag is redundant.
5188          </description>
5189          <deprecation_description>
5190          Not used in HALv3 or newer
5191          </deprecation_description>
5192          <tag id="HAL2" />
5193        </entry>
5194      </controls>
5195      <static>
5196        <entry name="maxNumOutputStreams" type="int32" visibility="ndk_public"
5197               container="array" hwlevel="legacy">
5198          <array>
5199            <size>3</size>
5200          </array>
5201          <description>The maximum numbers of different types of output streams
5202          that can be configured and used simultaneously by a camera device.
5203          </description>
5204          <range>
5205          For processed (and stalling) format streams, &amp;gt;= 1.
5206
5207          For Raw format (either stalling or non-stalling) streams, &amp;gt;= 0.
5208
5209          For processed (but not stalling) format streams, &amp;gt;= 3
5210          for FULL mode devices (`android.info.supportedHardwareLevel == FULL`);
5211          &amp;gt;= 2 for LIMITED mode devices (`android.info.supportedHardwareLevel == LIMITED`).
5212          </range>
5213          <details>
5214          This is a 3 element tuple that contains the max number of output simultaneous
5215          streams for raw sensor, processed (but not stalling), and processed (and stalling)
5216          formats respectively. For example, assuming that JPEG is typically a processed and
5217          stalling stream, if max raw sensor format output stream number is 1, max YUV streams
5218          number is 3, and max JPEG stream number is 2, then this tuple should be `(1, 3, 2)`.
5219
5220          This lists the upper bound of the number of output streams supported by
5221          the camera device. Using more streams simultaneously may require more hardware and
5222          CPU resources that will consume more power. The image format for an output stream can
5223          be any supported format provided by android.scaler.availableStreamConfigurations.
5224          The formats defined in android.scaler.availableStreamConfigurations can be catergorized
5225          into the 3 stream types as below:
5226
5227          * Processed (but stalling): any non-RAW format with a stallDurations &amp;gt; 0.
5228            Typically {@link android.graphics.ImageFormat#JPEG|AIMAGE_FORMAT_JPEG JPEG format}.
5229          * Raw formats: {@link android.graphics.ImageFormat#RAW_SENSOR|AIMAGE_FORMAT_RAW16
5230            RAW_SENSOR}, {@link android.graphics.ImageFormat#RAW10|AIMAGE_FORMAT_RAW10 RAW10}, or
5231            {@link android.graphics.ImageFormat#RAW12|AIMAGE_FORMAT_RAW12 RAW12}.
5232          * Processed (but not-stalling): any non-RAW format without a stall duration.  Typically
5233            {@link android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888 YUV_420_888},
5234            {@link android.graphics.ImageFormat#NV21 NV21}, {@link
5235            android.graphics.ImageFormat#YV12 YV12}, or {@link
5236            android.graphics.ImageFormat#Y8|AIMAGE_FORMAT_Y8 Y8} .
5237          </details>
5238          <tag id="BC" />
5239        </entry>
5240        <entry name="maxNumOutputRaw" type="int32" visibility="java_public" synthetic="true"
5241               hwlevel="legacy">
5242          <description>The maximum numbers of different types of output streams
5243          that can be configured and used simultaneously by a camera device
5244          for any `RAW` formats.
5245          </description>
5246          <range>
5247          &amp;gt;= 0
5248          </range>
5249          <details>
5250          This value contains the max number of output simultaneous
5251          streams from the raw sensor.
5252
5253          This lists the upper bound of the number of output streams supported by
5254          the camera device. Using more streams simultaneously may require more hardware and
5255          CPU resources that will consume more power. The image format for this kind of an output stream can
5256          be any `RAW` and supported format provided by android.scaler.streamConfigurationMap.
5257
5258          In particular, a `RAW` format is typically one of:
5259
5260          * {@link android.graphics.ImageFormat#RAW_SENSOR|AIMAGE_FORMAT_RAW16 RAW_SENSOR}
5261          * {@link android.graphics.ImageFormat#RAW10|AIMAGE_FORMAT_RAW10 RAW10}
5262          * {@link android.graphics.ImageFormat#RAW12|AIMAGE_FORMAT_RAW12 RAW12}
5263
5264          LEGACY mode devices (android.info.supportedHardwareLevel `==` LEGACY)
5265          never support raw streams.
5266          </details>
5267        </entry>
5268        <entry name="maxNumOutputProc" type="int32" visibility="java_public" synthetic="true"
5269               hwlevel="legacy">
5270          <description>The maximum numbers of different types of output streams
5271          that can be configured and used simultaneously by a camera device
5272          for any processed (but not-stalling) formats.
5273          </description>
5274          <range>
5275          &amp;gt;= 3
5276          for FULL mode devices (`android.info.supportedHardwareLevel == FULL`);
5277          &amp;gt;= 2 for LIMITED mode devices (`android.info.supportedHardwareLevel == LIMITED`).
5278          </range>
5279          <details>
5280          This value contains the max number of output simultaneous
5281          streams for any processed (but not-stalling) formats.
5282
5283          This lists the upper bound of the number of output streams supported by
5284          the camera device. Using more streams simultaneously may require more hardware and
5285          CPU resources that will consume more power. The image format for this kind of an output stream can
5286          be any non-`RAW` and supported format provided by android.scaler.streamConfigurationMap.
5287
5288          Processed (but not-stalling) is defined as any non-RAW format without a stall duration.
5289          Typically:
5290
5291          * {@link android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888 YUV_420_888}
5292          * {@link android.graphics.ImageFormat#NV21 NV21}
5293          * {@link android.graphics.ImageFormat#YV12 YV12}
5294          * Implementation-defined formats, i.e. {@link
5295            android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class)}
5296          * {@link android.graphics.ImageFormat#Y8|AIMAGE_FORMAT_Y8 Y8}
5297
5298          For full guarantees, query {@link
5299          android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration} with a
5300          processed format -- it will return 0 for a non-stalling stream.
5301
5302          LEGACY devices will support at least 2 processing/non-stalling streams.
5303          </details>
5304        </entry>
5305        <entry name="maxNumOutputProcStalling" type="int32" visibility="java_public" synthetic="true"
5306               hwlevel="legacy">
5307          <description>The maximum numbers of different types of output streams
5308          that can be configured and used simultaneously by a camera device
5309          for any processed (and stalling) formats.
5310          </description>
5311          <range>
5312          &amp;gt;= 1
5313          </range>
5314          <details>
5315          This value contains the max number of output simultaneous
5316          streams for any processed (but not-stalling) formats.
5317
5318          This lists the upper bound of the number of output streams supported by
5319          the camera device. Using more streams simultaneously may require more hardware and
5320          CPU resources that will consume more power. The image format for this kind of an output stream can
5321          be any non-`RAW` and supported format provided by android.scaler.streamConfigurationMap.
5322
5323          A processed and stalling format is defined as any non-RAW format with a stallDurations
5324          &amp;gt; 0.  Typically only the {@link
5325          android.graphics.ImageFormat#JPEG|AIMAGE_FORMAT_JPEG JPEG format} is a stalling format.
5326
5327          For full guarantees, query {@link
5328          android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration} with a
5329          processed format -- it will return a non-0 value for a stalling stream.
5330
5331          LEGACY devices will support up to 1 processing/stalling stream.
5332          </details>
5333        </entry>
5334        <entry name="maxNumReprocessStreams" type="int32" visibility="system"
5335        deprecated="true" container="array">
5336          <array>
5337            <size>1</size>
5338          </array>
5339          <description>How many reprocessing streams of any type
5340          can be allocated at the same time.</description>
5341          <deprecation_description>
5342          Not used in HALv3 or newer
5343          </deprecation_description>
5344          <range>&amp;gt;= 0</range>
5345          <details>
5346          Only used by HAL2.x.
5347
5348          When set to 0, it means no reprocess stream is supported.
5349          </details>
5350          <tag id="HAL2" />
5351        </entry>
5352        <entry name="maxNumInputStreams" type="int32" visibility="java_public" hwlevel="full">
5353          <description>
5354          The maximum numbers of any type of input streams
5355          that can be configured and used simultaneously by a camera device.
5356          </description>
5357          <range>
5358          0 or 1.
5359          </range>
5360          <details>When set to 0, it means no input stream is supported.
5361
5362          The image format for a input stream can be any supported format returned by {@link
5363          android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}. When using an
5364          input stream, there must be at least one output stream configured to to receive the
5365          reprocessed images.
5366
5367          When an input stream and some output streams are used in a reprocessing request,
5368          only the input buffer will be used to produce these output stream buffers, and a
5369          new sensor image will not be captured.
5370
5371          For example, for Zero Shutter Lag (ZSL) still capture use case, the input
5372          stream image format will be PRIVATE, the associated output stream image format
5373          should be JPEG.
5374          </details>
5375          <hal_details>
5376          For the reprocessing flow and controls, see
5377          hardware/libhardware/include/hardware/camera3.h Section 10 for more details.
5378          </hal_details>
5379          <tag id="REPROC" />
5380        </entry>
5381      </static>
5382      <dynamic>
5383        <entry name="frameCount" type="int32" visibility="hidden" deprecated="true">
5384          <description>A frame counter set by the framework. This value monotonically
5385          increases with every new result (that is, each new result has a unique
5386          frameCount value).</description>
5387          <deprecation_description>
5388          Not used in HALv3 or newer
5389          </deprecation_description>
5390          <units>count of frames</units>
5391          <range>&amp;gt; 0</range>
5392          <details>Reset on release()</details>
5393        </entry>
5394        <clone entry="android.request.id" kind="controls"></clone>
5395        <clone entry="android.request.metadataMode"
5396        kind="controls"></clone>
5397        <clone entry="android.request.outputStreams"
5398        kind="controls"></clone>
5399        <entry name="pipelineDepth" type="byte" visibility="public" hwlevel="legacy">
5400          <description>Specifies the number of pipeline stages the frame went
5401          through from when it was exposed to when the final completed result
5402          was available to the framework.</description>
5403          <range>&amp;lt;= android.request.pipelineMaxDepth</range>
5404          <details>Depending on what settings are used in the request, and
5405          what streams are configured, the data may undergo less processing,
5406          and some pipeline stages skipped.
5407
5408          See android.request.pipelineMaxDepth for more details.
5409          </details>
5410          <hal_details>
5411          This value must always represent the accurate count of how many
5412          pipeline stages were actually used.
5413          </hal_details>
5414        </entry>
5415      </dynamic>
5416      <static>
5417        <entry name="pipelineMaxDepth" type="byte" visibility="public" hwlevel="legacy">
5418          <description>Specifies the number of maximum pipeline stages a frame
5419          has to go through from when it's exposed to when it's available
5420          to the framework.</description>
5421          <details>A typical minimum value for this is 2 (one stage to expose,
5422          one stage to readout) from the sensor. The ISP then usually adds
5423          its own stages to do custom HW processing. Further stages may be
5424          added by SW processing.
5425
5426          Depending on what settings are used (e.g. YUV, JPEG) and what
5427          processing is enabled (e.g. face detection), the actual pipeline
5428          depth (specified by android.request.pipelineDepth) may be less than
5429          the max pipeline depth.
5430
5431          A pipeline depth of X stages is equivalent to a pipeline latency of
5432          X frame intervals.
5433
5434          This value will normally be 8 or less, however, for high speed capture session,
5435          the max pipeline depth will be up to 8 x size of high speed capture request list.
5436          </details>
5437          <hal_details>
5438          This value should be 4 or less, expect for the high speed recording session, where the
5439          max batch sizes may be larger than 1.
5440          </hal_details>
5441        </entry>
5442        <entry name="partialResultCount" type="int32" visibility="public" optional="true">
5443          <description>Defines how many sub-components
5444          a result will be composed of.
5445          </description>
5446          <range>&amp;gt;= 1</range>
5447          <details>In order to combat the pipeline latency, partial results
5448          may be delivered to the application layer from the camera device as
5449          soon as they are available.
5450
5451          Optional; defaults to 1. A value of 1 means that partial
5452          results are not supported, and only the final TotalCaptureResult will
5453          be produced by the camera device.
5454
5455          A typical use case for this might be: after requesting an
5456          auto-focus (AF) lock the new AF state might be available 50%
5457          of the way through the pipeline.  The camera device could
5458          then immediately dispatch this state via a partial result to
5459          the application, and the rest of the metadata via later
5460          partial results.
5461          </details>
5462        </entry>
5463        <entry name="availableCapabilities" type="byte" visibility="public"
5464          enum="true" container="array" hwlevel="legacy">
5465          <array>
5466            <size>n</size>
5467          </array>
5468          <enum>
5469            <value>BACKWARD_COMPATIBLE
5470              <notes>The minimal set of capabilities that every camera
5471                device (regardless of android.info.supportedHardwareLevel)
5472                supports.
5473
5474                This capability is listed by all normal devices, and
5475                indicates that the camera device has a feature set
5476                that's comparable to the baseline requirements for the
5477                older android.hardware.Camera API.
5478
5479                Devices with the DEPTH_OUTPUT capability might not list this
5480                capability, indicating that they support only depth measurement,
5481                not standard color output.
5482              </notes>
5483            </value>
5484            <value optional="true">MANUAL_SENSOR
5485              <notes>
5486              The camera device can be manually controlled (3A algorithms such
5487              as auto-exposure, and auto-focus can be bypassed).
5488              The camera device supports basic manual control of the sensor image
5489              acquisition related stages. This means the following controls are
5490              guaranteed to be supported:
5491
5492              * Manual frame duration control
5493                  * android.sensor.frameDuration
5494                  * android.sensor.info.maxFrameDuration
5495              * Manual exposure control
5496                  * android.sensor.exposureTime
5497                  * android.sensor.info.exposureTimeRange
5498              * Manual sensitivity control
5499                  * android.sensor.sensitivity
5500                  * android.sensor.info.sensitivityRange
5501              * Manual lens control (if the lens is adjustable)
5502                  * android.lens.*
5503              * Manual flash control (if a flash unit is present)
5504                  * android.flash.*
5505              * Manual black level locking
5506                  * android.blackLevel.lock
5507              * Auto exposure lock
5508                  * android.control.aeLock
5509
5510              If any of the above 3A algorithms are enabled, then the camera
5511              device will accurately report the values applied by 3A in the
5512              result.
5513
5514              A given camera device may also support additional manual sensor controls,
5515              but this capability only covers the above list of controls.
5516
5517              If this is supported, android.scaler.streamConfigurationMap will
5518              additionally return a min frame duration that is greater than
5519              zero for each supported size-format combination.
5520
5521              For camera devices with LOGICAL_MULTI_CAMERA capability, when the underlying active
5522              physical camera switches, exposureTime, sensitivity, and lens properties may change
5523              even if AE/AF is locked. However, the overall auto exposure and auto focus experience
5524              for users will be consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.
5525              </notes>
5526            </value>
5527            <value optional="true">MANUAL_POST_PROCESSING
5528              <notes>
5529              The camera device post-processing stages can be manually controlled.
5530              The camera device supports basic manual control of the image post-processing
5531              stages. This means the following controls are guaranteed to be supported:
5532
5533              * Manual tonemap control
5534                  * android.tonemap.curve
5535                  * android.tonemap.mode
5536                  * android.tonemap.maxCurvePoints
5537                  * android.tonemap.gamma
5538                  * android.tonemap.presetCurve
5539
5540              * Manual white balance control
5541                  * android.colorCorrection.transform
5542                  * android.colorCorrection.gains
5543              * Manual lens shading map control
5544                    * android.shading.mode
5545                    * android.statistics.lensShadingMapMode
5546                    * android.statistics.lensShadingMap
5547                    * android.lens.info.shadingMapSize
5548              * Manual aberration correction control (if aberration correction is supported)
5549                    * android.colorCorrection.aberrationMode
5550                    * android.colorCorrection.availableAberrationModes
5551              * Auto white balance lock
5552                    * android.control.awbLock
5553
5554              If auto white balance is enabled, then the camera device
5555              will accurately report the values applied by AWB in the result.
5556
5557              A given camera device may also support additional post-processing
5558              controls, but this capability only covers the above list of controls.
5559
5560              For camera devices with LOGICAL_MULTI_CAMERA capability, when underlying active
5561              physical camera switches, tonemap, white balance, and shading map may change even if
5562              awb is locked. However, the overall post-processing experience for users will be
5563              consistent. Refer to LOGICAL_MULTI_CAMERA capability for details.
5564              </notes>
5565            </value>
5566            <value optional="true">RAW
5567              <notes>
5568              The camera device supports outputting RAW buffers and
5569              metadata for interpreting them.
5570
5571              Devices supporting the RAW capability allow both for
5572              saving DNG files, and for direct application processing of
5573              raw sensor images.
5574
5575              * RAW_SENSOR is supported as an output format.
5576              * The maximum available resolution for RAW_SENSOR streams
5577                will match either the value in
5578                android.sensor.info.pixelArraySize or
5579                android.sensor.info.preCorrectionActiveArraySize.
5580              * All DNG-related optional metadata entries are provided
5581                by the camera device.
5582              </notes>
5583            </value>
5584            <value optional="true" visibility="java_public">PRIVATE_REPROCESSING
5585              <notes>
5586              The camera device supports the Zero Shutter Lag reprocessing use case.
5587
5588              * One input stream is supported, that is, `android.request.maxNumInputStreams == 1`.
5589              * {@link android.graphics.ImageFormat#PRIVATE} is supported as an output/input format,
5590                that is, {@link android.graphics.ImageFormat#PRIVATE} is included in the lists of
5591                formats returned by {@link
5592                android.hardware.camera2.params.StreamConfigurationMap#getInputFormats} and {@link
5593                android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats}.
5594              * {@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput}
5595                returns non-empty int[] for each supported input format returned by {@link
5596                android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}.
5597              * Each size returned by {@link
5598                android.hardware.camera2.params.StreamConfigurationMap#getInputSizes
5599                getInputSizes(ImageFormat.PRIVATE)} is also included in {@link
5600                android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes
5601                getOutputSizes(ImageFormat.PRIVATE)}
5602              * Using {@link android.graphics.ImageFormat#PRIVATE} does not cause a frame rate drop
5603                relative to the sensor's maximum capture rate (at that resolution).
5604              * {@link android.graphics.ImageFormat#PRIVATE} will be reprocessable into both
5605                {@link android.graphics.ImageFormat#YUV_420_888} and
5606                {@link android.graphics.ImageFormat#JPEG} formats.
5607              * For a MONOCHROME camera supporting Y8 format, {@link
5608                android.graphics.ImageFormat#PRIVATE} will be reprocessable into
5609                {@link android.graphics.ImageFormat#Y8}.
5610              * The maximum available resolution for PRIVATE streams
5611                (both input/output) will match the maximum available
5612                resolution of JPEG streams.
5613              * Static metadata android.reprocess.maxCaptureStall.
5614              * Only below controls are effective for reprocessing requests and
5615                will be present in capture results, other controls in reprocess
5616                requests will be ignored by the camera device.
5617                    * android.jpeg.*
5618                    * android.noiseReduction.mode
5619                    * android.edge.mode
5620              * android.noiseReduction.availableNoiseReductionModes and
5621                android.edge.availableEdgeModes will both list ZERO_SHUTTER_LAG as a supported mode.
5622              </notes>
5623            </value>
5624            <value optional="true">READ_SENSOR_SETTINGS
5625              <notes>
5626              The camera device supports accurately reporting the sensor settings for many of
5627              the sensor controls while the built-in 3A algorithm is running.  This allows
5628              reporting of sensor settings even when these settings cannot be manually changed.
5629
5630              The values reported for the following controls are guaranteed to be available
5631              in the CaptureResult, including when 3A is enabled:
5632
5633              * Exposure control
5634                  * android.sensor.exposureTime
5635              * Sensitivity control
5636                  * android.sensor.sensitivity
5637              * Lens controls (if the lens is adjustable)
5638                  * android.lens.focusDistance
5639                  * android.lens.aperture
5640
5641              This capability is a subset of the MANUAL_SENSOR control capability, and will
5642              always be included if the MANUAL_SENSOR capability is available.
5643              </notes>
5644            </value>
5645            <value optional="true">BURST_CAPTURE
5646              <notes>
5647              The camera device supports capturing high-resolution images at &gt;= 20 frames per
5648              second, in at least the uncompressed YUV format, when post-processing settings are
5649              set to FAST. Additionally, all image resolutions less than 24 megapixels can be
5650              captured at &gt;= 10 frames per second. Here, 'high resolution' means at least 8
5651              megapixels, or the maximum resolution of the device, whichever is smaller.
5652              </notes>
5653              <sdk_notes>
5654              More specifically, this means that a size matching the camera device's active array
5655              size is listed as a supported size for the {@link
5656              android.graphics.ImageFormat#YUV_420_888} format in either {@link
5657              android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes} or {@link
5658              android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes},
5659              with a minimum frame duration for that format and size of either &lt;= 1/20 s, or
5660              &lt;= 1/10 s if the image size is less than 24 megapixels, respectively; and
5661              the android.control.aeAvailableTargetFpsRanges entry lists at least one FPS range
5662              where the minimum FPS is &gt;= 1 / minimumFrameDuration for the maximum-size
5663              YUV_420_888 format.  If that maximum size is listed in {@link
5664              android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes},
5665              then the list of resolutions for YUV_420_888 from {@link
5666              android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes} contains at
5667              least one resolution &gt;= 8 megapixels, with a minimum frame duration of &lt;= 1/20
5668              s.
5669
5670              If the device supports the {@link
5671              android.graphics.ImageFormat#RAW10|AIMAGE_FORMAT_RAW10}, {@link
5672              android.graphics.ImageFormat#RAW12|AIMAGE_FORMAT_RAW12}, {@link
5673              android.graphics.ImageFormat#Y8|AIMAGE_FORMAT_Y8}, then those can also be
5674              captured at the same rate as the maximum-size YUV_420_888 resolution is.
5675
5676              If the device supports the PRIVATE_REPROCESSING capability, then the same guarantees
5677              as for the YUV_420_888 format also apply to the {@link
5678              android.graphics.ImageFormat#PRIVATE} format.
5679
5680              In addition, the android.sync.maxLatency field is guaranted to have a value between 0
5681              and 4, inclusive. android.control.aeLockAvailable and android.control.awbLockAvailable
5682              are also guaranteed to be `true` so burst capture with these two locks ON yields
5683              consistent image output.
5684              </sdk_notes>
5685              <ndk_notes>
5686              More specifically, this means that at least one output {@link
5687              android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888} size listed in
5688              {@link
5689              android.hardware.camera2.params.StreamConfigurationMap|ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS}
5690              is larger or equal to the 'high resolution' defined above, and can be captured at at
5691              least 20 fps.  For the largest {@link
5692              android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888} size listed in
5693              {@link
5694              android.hardware.camera2.params.StreamConfigurationMap|ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS},
5695              camera device can capture this size for at least 10 frames per second if the size is
5696              less than 24 megapixels. Also the android.control.aeAvailableTargetFpsRanges entry
5697              lists at least one FPS range where the minimum FPS is &gt;= 1 / minimumFrameDuration
5698              for the largest YUV_420_888 size.
5699
5700              If the device supports the {@link
5701              android.graphics.ImageFormat#RAW10|AIMAGE_FORMAT_RAW10}, {@link
5702              android.graphics.ImageFormat#RAW12|AIMAGE_FORMAT_RAW12}, {@link
5703              android.graphics.ImageFormat#Y8|AIMAGE_FORMAT_Y8}, then those can also be
5704              captured at the same rate as the maximum-size YUV_420_888 resolution is.
5705
5706              In addition, the android.sync.maxLatency field is guaranted to have a value between 0
5707              and 4, inclusive. android.control.aeLockAvailable and android.control.awbLockAvailable
5708              are also guaranteed to be `true` so burst capture with these two locks ON yields
5709              consistent image output.
5710              </ndk_notes>
5711            </value>
5712            <value optional="true" visibility="java_public">YUV_REPROCESSING
5713              <notes>
5714              The camera device supports the YUV_420_888 reprocessing use case, similar as
5715              PRIVATE_REPROCESSING, This capability requires the camera device to support the
5716              following:
5717
5718              * One input stream is supported, that is, `android.request.maxNumInputStreams == 1`.
5719              * {@link android.graphics.ImageFormat#YUV_420_888} is supported as an output/input
5720                format, that is, YUV_420_888 is included in the lists of formats returned by {@link
5721                android.hardware.camera2.params.StreamConfigurationMap#getInputFormats} and {@link
5722                android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats}.
5723              * {@link
5724                android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput}
5725                returns non-empty int[] for each supported input format returned by {@link
5726                android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}.
5727              * Each size returned by {@link
5728                android.hardware.camera2.params.StreamConfigurationMap#getInputSizes
5729                getInputSizes(YUV_420_888)} is also included in {@link
5730                android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes
5731                getOutputSizes(YUV_420_888)}
5732              * Using {@link android.graphics.ImageFormat#YUV_420_888} does not cause a frame rate
5733                drop relative to the sensor's maximum capture rate (at that resolution).
5734              * {@link android.graphics.ImageFormat#YUV_420_888} will be reprocessable into both
5735                {@link android.graphics.ImageFormat#YUV_420_888} and {@link
5736                android.graphics.ImageFormat#JPEG} formats.
5737              * The maximum available resolution for {@link
5738                android.graphics.ImageFormat#YUV_420_888} streams (both input/output) will match the
5739                maximum available resolution of {@link android.graphics.ImageFormat#JPEG} streams.
5740              * For a MONOCHROME camera with Y8 format support, all the requirements mentioned
5741                above for YUV_420_888 apply for Y8 format as well.
5742              * Static metadata android.reprocess.maxCaptureStall.
5743              * Only the below controls are effective for reprocessing requests and will be present
5744                in capture results. The reprocess requests are from the original capture results
5745                that are associated with the intermediate {@link
5746                android.graphics.ImageFormat#YUV_420_888} output buffers.  All other controls in the
5747                reprocess requests will be ignored by the camera device.
5748                    * android.jpeg.*
5749                    * android.noiseReduction.mode
5750                    * android.edge.mode
5751                    * android.reprocess.effectiveExposureFactor
5752              * android.noiseReduction.availableNoiseReductionModes and
5753                android.edge.availableEdgeModes will both list ZERO_SHUTTER_LAG as a supported mode.
5754              </notes>
5755            </value>
5756            <value optional="true">DEPTH_OUTPUT
5757              <notes>
5758              The camera device can produce depth measurements from its field of view.
5759
5760              This capability requires the camera device to support the following:
5761
5762              * {@link android.graphics.ImageFormat#DEPTH16|AIMAGE_FORMAT_DEPTH16} is supported as
5763                an output format.
5764              * {@link
5765                android.graphics.ImageFormat#DEPTH_POINT_CLOUD|AIMAGE_FORMAT_DEPTH_POINT_CLOUD} is
5766                optionally supported as an output format.
5767              * This camera device, and all camera devices with the same android.lens.facing, will
5768                list the following calibration metadata entries in both {@link
5769                android.hardware.camera2.CameraCharacteristics|ACameraManager_getCameraCharacteristics}
5770                and {@link
5771                android.hardware.camera2.CaptureResult|ACameraCaptureSession_captureCallback_result}:
5772                  - android.lens.poseTranslation
5773                  - android.lens.poseRotation
5774                  - android.lens.intrinsicCalibration
5775                  - android.lens.distortion
5776              * The android.depth.depthIsExclusive entry is listed by this device.
5777              * As of Android P, the android.lens.poseReference entry is listed by this device.
5778              * A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
5779                normal YUV_420_888, Y8, JPEG, and PRIV-format outputs. It only has to support the
5780                DEPTH16 format.
5781
5782              Generally, depth output operates at a slower frame rate than standard color capture,
5783              so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that
5784              should be accounted for (see {@link
5785              android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration|ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS}).
5786              On a device that supports both depth and color-based output, to enable smooth preview,
5787              using a repeating burst is recommended, where a depth-output target is only included
5788              once every N frames, where N is the ratio between preview output rate and depth output
5789              rate, including depth stall time.
5790              </notes>
5791            </value>
5792            <value optional="true" visibility="java_public">CONSTRAINED_HIGH_SPEED_VIDEO
5793              <notes>
5794              The device supports constrained high speed video recording (frame rate >=120fps) use
5795              case. The camera device will support high speed capture session created by {@link
5796              android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}, which
5797              only accepts high speed request lists created by {@link
5798              android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList}.
5799
5800              A camera device can still support high speed video streaming by advertising the high
5801              speed FPS ranges in android.control.aeAvailableTargetFpsRanges. For this case, all
5802              normal capture request per frame control and synchronization requirements will apply
5803              to the high speed fps ranges, the same as all other fps ranges. This capability
5804              describes the capability of a specialized operating mode with many limitations (see
5805              below), which is only targeted at high speed video recording.
5806
5807              The supported high speed video sizes and fps ranges are specified in {@link
5808              android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges}.
5809              To get desired output frame rates, the application is only allowed to select video
5810              size and FPS range combinations provided by {@link
5811              android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes}.  The
5812              fps range can be controlled via android.control.aeTargetFpsRange.
5813
5814              In this capability, the camera device will override aeMode, awbMode, and afMode to
5815              ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
5816              controls will be overridden to be FAST. Therefore, no manual control of capture
5817              and post-processing parameters is possible. All other controls operate the
5818              same as when android.control.mode == AUTO. This means that all other
5819              android.control.* fields continue to work, such as
5820
5821              * android.control.aeTargetFpsRange
5822              * android.control.aeExposureCompensation
5823              * android.control.aeLock
5824              * android.control.awbLock
5825              * android.control.effectMode
5826              * android.control.aeRegions
5827              * android.control.afRegions
5828              * android.control.awbRegions
5829              * android.control.afTrigger
5830              * android.control.aePrecaptureTrigger
5831              * android.control.zoomRatio
5832
5833              Outside of android.control.*, the following controls will work:
5834
5835              * android.flash.mode (TORCH mode only, automatic flash for still capture will not
5836              work since aeMode is ON)
5837              * android.lens.opticalStabilizationMode (if it is supported)
5838              * android.scaler.cropRegion
5839              * android.statistics.faceDetectMode (if it is supported)
5840
5841              For high speed recording use case, the actual maximum supported frame rate may
5842              be lower than what camera can output, depending on the destination Surfaces for
5843              the image data. For example, if the destination surface is from video encoder,
5844              the application need check if the video encoder is capable of supporting the
5845              high frame rate for a given video size, or it will end up with lower recording
5846              frame rate. If the destination surface is from preview window, the actual preview frame
5847              rate will be bounded by the screen refresh rate.
5848
5849              The camera device will only support up to 2 high speed simultaneous output surfaces
5850              (preview and recording surfaces) in this mode. Above controls will be effective only
5851              if all of below conditions are true:
5852
5853              * The application creates a camera capture session with no more than 2 surfaces via
5854              {@link
5855              android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}. The
5856              targeted surfaces must be preview surface (either from {@link
5857              android.view.SurfaceView} or {@link android.graphics.SurfaceTexture}) or recording
5858              surface(either from {@link android.media.MediaRecorder#getSurface} or {@link
5859              android.media.MediaCodec#createInputSurface}).
5860              * The stream sizes are selected from the sizes reported by
5861              {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes}.
5862              * The FPS ranges are selected from {@link
5863              android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges}.
5864
5865              When above conditions are NOT satistied,
5866              {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}
5867              will fail.
5868
5869              Switching to a FPS range that has different maximum FPS may trigger some camera device
5870              reconfigurations, which may introduce extra latency. It is recommended that
5871              the application avoids unnecessary maximum target FPS changes as much as possible
5872              during high speed streaming.
5873              </notes>
5874            </value>
5875            <value optional="true" hal_version="3.3" >MOTION_TRACKING
5876              <notes>
5877              The camera device supports the MOTION_TRACKING value for
5878              android.control.captureIntent, which limits maximum exposure time to 20 ms.
5879
5880              This limits the motion blur of capture images, resulting in better image tracking
5881              results for use cases such as image stabilization or augmented reality.
5882              </notes>
5883            </value>
5884            <value optional="true" hal_version="3.3">LOGICAL_MULTI_CAMERA
5885              <notes>
5886              The camera device is a logical camera backed by two or more physical cameras.
5887
5888              In API level 28, the physical cameras must also be exposed to the application via
5889              {@link android.hardware.camera2.CameraManager#getCameraIdList}.
5890
5891              Starting from API level 29:
5892
5893              * Some or all physical cameras may not be independently exposed to the application,
5894              in which case the physical camera IDs will not be available in
5895              {@link android.hardware.camera2.CameraManager#getCameraIdList}. But the
5896              application can still query the physical cameras' characteristics by calling
5897              {@link android.hardware.camera2.CameraManager#getCameraCharacteristics}.
5898              * If a physical camera is hidden from camera ID list, the mandatory stream
5899              combinations for that physical camera must be supported through the logical camera
5900              using physical streams. One exception is that in API level 30, a physical camera
5901              may become unavailable via
5902              {@link CameraManager.AvailabilityCallback#onPhysicalCameraUnavailable|ACameraManager_PhysicalCameraAvailabilityCallback}
5903              callback.
5904
5905              Combinations of logical and physical streams, or physical streams from different
5906              physical cameras are not guaranteed. However, if the camera device supports
5907              {@link CameraDevice#isSessionConfigurationSupported|ACameraDevice_isSessionConfigurationSupported},
5908              application must be able to query whether a stream combination involving physical
5909              streams is supported by calling
5910              {@link CameraDevice#isSessionConfigurationSupported|ACameraDevice_isSessionConfigurationSupported}.
5911
5912              Camera application shouldn't assume that there are at most 1 rear camera and 1 front
5913              camera in the system. For an application that switches between front and back cameras,
5914              the recommendation is to switch between the first rear camera and the first front
5915              camera in the list of supported camera devices.
5916
5917              This capability requires the camera device to support the following:
5918
5919              * The IDs of underlying physical cameras are returned via
5920                {@link android.hardware.camera2.CameraCharacteristics#getPhysicalCameraIds}.
5921              * This camera device must list static metadata
5922                android.logicalMultiCamera.sensorSyncType in
5923                {@link android.hardware.camera2.CameraCharacteristics}.
5924              * The underlying physical cameras' static metadata must list the following entries,
5925                so that the application can correlate pixels from the physical streams:
5926                  - android.lens.poseReference
5927                  - android.lens.poseRotation
5928                  - android.lens.poseTranslation
5929                  - android.lens.intrinsicCalibration
5930                  - android.lens.distortion
5931              * The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be
5932                the same.
5933              * The logical camera must be LIMITED or higher device.
5934
5935              A logical camera device's dynamic metadata may contain
5936              android.logicalMultiCamera.activePhysicalId to notify the application of the current
5937              active physical camera Id. An active physical camera is the physical camera from which
5938              the logical camera's main image data outputs (YUV or RAW) and metadata come from.
5939              In addition, this serves as an indication which physical camera is used to output to
5940              a RAW stream, or in case only physical cameras support RAW, which physical RAW stream
5941              the application should request.
5942
5943              Logical camera's static metadata tags below describe the default active physical
5944              camera. An active physical camera is default if it's used when application directly
5945              uses requests built from a template. All templates will default to the same active
5946              physical camera.
5947
5948                - android.sensor.info.sensitivityRange
5949                - android.sensor.info.colorFilterArrangement
5950                - android.sensor.info.exposureTimeRange
5951                - android.sensor.info.maxFrameDuration
5952                - android.sensor.info.physicalSize
5953                - android.sensor.info.whiteLevel
5954                - android.sensor.info.lensShadingApplied
5955                - android.sensor.referenceIlluminant1
5956                - android.sensor.referenceIlluminant2
5957                - android.sensor.calibrationTransform1
5958                - android.sensor.calibrationTransform2
5959                - android.sensor.colorTransform1
5960                - android.sensor.colorTransform2
5961                - android.sensor.forwardMatrix1
5962                - android.sensor.forwardMatrix2
5963                - android.sensor.blackLevelPattern
5964                - android.sensor.maxAnalogSensitivity
5965                - android.sensor.opticalBlackRegions
5966                - android.sensor.availableTestPatternModes
5967                - android.lens.info.hyperfocalDistance
5968                - android.lens.info.minimumFocusDistance
5969                - android.lens.info.focusDistanceCalibration
5970                - android.lens.poseRotation
5971                - android.lens.poseTranslation
5972                - android.lens.intrinsicCalibration
5973                - android.lens.poseReference
5974                - android.lens.distortion
5975
5976              The field of view of non-RAW physical streams must not be smaller than that of the
5977              non-RAW logical streams, or the maximum field-of-view of the physical camera,
5978              whichever is smaller. The application should check the physical capture result
5979              metadata for how the physical streams are cropped or zoomed. More specifically, given
5980              the physical camera result metadata, the effective horizontal field-of-view of the
5981              physical camera is:
5982
5983                  fov = 2 * atan2(cropW * sensorW / (2 * zoomRatio * activeArrayW), focalLength)
5984
5985              where the equation parameters are the physical camera's crop region width, physical
5986              sensor width, zoom ratio, active array width, and focal length respectively. Typically
5987              the physical stream of active physical camera has the same field-of-view as the
5988              logical streams. However, the same may not be true for physical streams from
5989              non-active physical cameras. For example, if the logical camera has a wide-ultrawide
5990              configuration where the wide lens is the default, when the crop region is set to the
5991              logical camera's active array size, (and the zoom ratio set to 1.0 starting from
5992              Android 11), a physical stream for the ultrawide camera may prefer outputing images
5993              with larger field-of-view than that of the wide camera for better stereo matching
5994              margin or more robust motion tracking. At the same time, the physical non-RAW streams'
5995              field of view must not be smaller than the requested crop region and zoom ratio, as
5996              long as it's within the physical lens' capability. For example, for a logical camera
5997              with wide-tele lens configuration where the wide lens is the default, if the logical
5998              camera's crop region is set to maximum size, and zoom ratio set to 1.0, the physical
5999              stream for the tele lens will be configured to its maximum size crop region (no zoom).
6000
6001              *Deprecated:* Prior to Android 11, the field of view of all non-RAW physical streams
6002              cannot be larger than that of non-RAW logical streams. If the logical camera has a
6003              wide-ultrawide lens configuration where the wide lens is the default, when the logical
6004              camera's crop region is set to maximum size, the FOV of the physical streams for the
6005              ultrawide lens will be the same as the logical stream, by making the crop region
6006              smaller than its active array size to compensate for the smaller focal length.
6007
6008              There are two ways for the application to capture RAW images from a logical camera
6009              with RAW capability:
6010
6011              * Because the underlying physical cameras may have different RAW capabilities (such
6012              as resolution or CFA pattern), to maintain backward compatibility, when a RAW stream
6013              is configured, the camera device makes sure the default active physical camera remains
6014              active and does not switch to other physical cameras. (One exception is that, if the
6015              logical camera consists of identical image sensors and advertises multiple focalLength
6016              due to different lenses, the camera device may generate RAW images from different
6017              physical cameras based on the focalLength being set by the application.) This
6018              backward-compatible approach usually results in loss of optical zoom, to telephoto
6019              lens or to ultrawide lens.
6020              * Alternatively, to take advantage of the full zoomRatio range of the logical camera,
6021              the application should use {@link android.hardware.camera2.MultiResolutionImageReader}
6022              to capture RAW images from the currently active physical camera. Because different
6023              physical camera may have different RAW characteristics, the application needs to use
6024              the characteristics and result metadata of the active physical camera for the
6025              relevant RAW metadata.
6026
6027              The capture request and result metadata tags required for backward compatible camera
6028              functionalities will be solely based on the logical camera capability. On the other
6029              hand, the use of manual capture controls (sensor or post-processing) with a
6030              logical camera may result in unexpected behavior when the HAL decides to switch
6031              between physical cameras with different characteristics under the hood. For example,
6032              when the application manually sets exposure time and sensitivity while zooming in,
6033              the brightness of the camera images may suddenly change because HAL switches from one
6034              physical camera to the other.
6035              </notes>
6036            </value>
6037            <value optional="true" hal_version="3.3" >MONOCHROME
6038              <notes>
6039              The camera device is a monochrome camera that doesn't contain a color filter array,
6040              and for YUV_420_888 stream, the pixel values on U and V planes are all 128.
6041
6042              A MONOCHROME camera must support the guaranteed stream combinations required for
6043              its device level and capabilities. Additionally, if the monochrome camera device
6044              supports Y8 format, all mandatory stream combination requirements related to {@link
6045              android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888 YUV_420_888} apply
6046              to {@link android.graphics.ImageFormat#Y8|AIMAGE_FORMAT_Y8 Y8} as well. There are no
6047              mandatory stream combination requirements with regard to
6048              {@link android.graphics.ImageFormat#Y8|AIMAGE_FORMAT_Y8 Y8} for Bayer camera devices.
6049
6050              Starting from Android Q, the SENSOR_INFO_COLOR_FILTER_ARRANGEMENT of a MONOCHROME
6051              camera will be either MONO or NIR.
6052              </notes>
6053            </value>
6054            <value optional="true" hal_version="3.4" >SECURE_IMAGE_DATA
6055              <notes>
6056                The camera device is capable of writing image data into a region of memory
6057                inaccessible to Android userspace or the Android kernel, and only accessible to
6058                trusted execution environments (TEE).
6059              </notes>
6060            </value>
6061            <value optional="true" hal_version="3.5" >SYSTEM_CAMERA
6062              <notes>
6063                The camera device is only accessible by Android's system components and privileged
6064                applications. Processes need to have the android.permission.SYSTEM_CAMERA in
6065                addition to android.permission.CAMERA in order to connect to this camera device.
6066              </notes>
6067            </value>
6068            <value optional="true" visibility="java_public" hal_version="3.5">OFFLINE_PROCESSING
6069              <notes>
6070              The camera device supports the OFFLINE_PROCESSING use case.
6071
6072              With OFFLINE_PROCESSING capability, the application can switch an ongoing
6073              capture session to offline mode by calling the
6074              CameraCaptureSession#switchToOffline method and specify streams to be kept in offline
6075              mode. The camera will then stop currently active repeating requests, prepare for
6076              some requests to go into offline mode, and return an offline session object. After
6077              the switchToOffline call returns, the original capture session is in closed state as
6078              if the CameraCaptureSession#close method has been called.
6079              In the offline mode, all inflight requests will continue to be processed in the
6080              background, and the application can immediately close the camera or create a new
6081              capture session without losing those requests' output images and capture results.
6082
6083              While the camera device is processing offline requests, it
6084              might not be able to support all stream configurations it can support
6085              without offline requests. When that happens, the createCaptureSession
6086              method call will fail. The following stream configurations are guaranteed to work
6087              without hitting the resource busy exception:
6088
6089              * One ongoing offline session: target one output surface of YUV or
6090              JPEG format, any resolution.
6091              * The active camera capture session:
6092                  1. One preview surface (SurfaceView or SurfaceTexture) up to 1920 width
6093                  1. One YUV ImageReader surface up to 1920 width
6094                  1. One Jpeg ImageReader, any resolution: the camera device is
6095                     allowed to slow down JPEG output speed by 50% if there is any ongoing offline
6096                     session.
6097                  1. If the device supports PRIVATE_REPROCESSING, one pair of ImageWriter/ImageReader
6098                     surfaces of private format, with the same resolution that is larger or equal to
6099                     the JPEG ImageReader resolution above.
6100              * Alternatively, the active camera session above can be replaced by an legacy
6101              {@link android.hardware.Camera Camera} with the following parameter settings:
6102                  1. Preview size up to 1920 width
6103                  1. Preview callback size up to 1920 width
6104                  1. Video size up to 1920 width
6105                  1. Picture size, any resolution: the camera device is
6106                      allowed to slow down JPEG output speed by 50% if there is any ongoing offline
6107                      session.
6108              </notes>
6109            </value>
6110            <value optional="true" hal_version="3.6" >ULTRA_HIGH_RESOLUTION_SENSOR
6111              <notes>
6112                This camera device is capable of producing ultra high resolution images in
6113                addition to the image sizes described in the
6114                android.scaler.streamConfigurationMap.
6115                It can operate in 'default' mode and 'max resolution' mode. It generally does this
6116                by binning pixels in 'default' mode and not binning them in 'max resolution' mode.
6117                `android.scaler.streamConfigurationMap` describes the streams supported in 'default'
6118                mode.
6119                The stream configurations supported in 'max resolution' mode are described by
6120                `android.scaler.streamConfigurationMapMaximumResolution`.
6121                The maximum resolution mode pixel array size of a camera device
6122                (`android.sensor.info.pixelArraySize`) with this capability,
6123                will be at least 24 megapixels.
6124              </notes>
6125            </value>
6126            <value optional="true" visibility="java_public" hal_version="3.6">REMOSAIC_REPROCESSING
6127              <notes>
6128              The device supports reprocessing from the `RAW_SENSOR` format with a bayer pattern
6129              given by android.sensor.info.binningFactor (m x n group of pixels with the same
6130              color filter) to a remosaiced regular bayer pattern.
6131
6132              This capability will only be present for devices with
6133              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
6134              capability. When
6135              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
6136              devices do not advertise this capability,
6137              {@link android.graphics.ImageFormat#RAW_SENSOR} images will already have a
6138              regular bayer pattern.
6139
6140              If a `RAW_SENSOR` stream is requested along with another non-RAW stream in a
6141              {@link android.hardware.camera2.CaptureRequest} (if multiple streams are supported
6142              when android.sensor.pixelMode is set to
6143              {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}),
6144              the `RAW_SENSOR` stream will have a regular bayer pattern.
6145
6146              This capability requires the camera device to support the following :
6147              * The {@link android.hardware.camera2.params.StreamConfigurationMap} mentioned below
6148                refers to the one, described by
6149                `android.scaler.streamConfigurationMapMaximumResolution`.
6150              * One input stream is supported, that is, `android.request.maxNumInputStreams == 1`.
6151              * {@link android.graphics.ImageFormat#RAW_SENSOR} is supported as an output/input
6152                format, that is, {@link android.graphics.ImageFormat#RAW_SENSOR} is included in the
6153                lists of formats returned by {@link
6154                android.hardware.camera2.params.StreamConfigurationMap#getInputFormats} and {@link
6155                android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats}.
6156              * {@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput}
6157                returns non-empty int[] for each supported input format returned by {@link
6158                android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}.
6159              * Each size returned by {@link
6160                android.hardware.camera2.params.StreamConfigurationMap#getInputSizes
6161                getInputSizes(ImageFormat.RAW_SENSOR)} is also included in {@link
6162                android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes
6163                getOutputSizes(ImageFormat.RAW_SENSOR)}
6164              * Using {@link android.graphics.ImageFormat#RAW_SENSOR} does not cause a frame rate
6165                drop relative to the sensor's maximum capture rate (at that resolution).
6166              * No CaptureRequest controls will be applicable when a request has an input target
6167                with {@link android.graphics.ImageFormat#RAW_SENSOR} format.
6168              </notes>
6169            </value>
6170          </enum>
6171          <description>List of capabilities that this camera device
6172          advertises as fully supporting.</description>
6173          <details>
6174          A capability is a contract that the camera device makes in order
6175          to be able to satisfy one or more use cases.
6176
6177          Listing a capability guarantees that the whole set of features
6178          required to support a common use will all be available.
6179
6180          Using a subset of the functionality provided by an unsupported
6181          capability may be possible on a specific camera device implementation;
6182          to do this query each of android.request.availableRequestKeys,
6183          android.request.availableResultKeys,
6184          android.request.availableCharacteristicsKeys.
6185
6186          The following capabilities are guaranteed to be available on
6187          android.info.supportedHardwareLevel `==` FULL devices:
6188
6189          * MANUAL_SENSOR
6190          * MANUAL_POST_PROCESSING
6191
6192          Other capabilities may be available on either FULL or LIMITED
6193          devices, but the application should query this key to be sure.
6194          </details>
6195          <hal_details>
6196          Additional constraint details per-capability will be available
6197          in the Compatibility Test Suite.
6198
6199          Minimum baseline requirements required for the
6200          BACKWARD_COMPATIBLE capability are not explicitly listed.
6201          Instead refer to "BC" tags and the camera CTS tests in the
6202          android.hardware.camera2.cts package.
6203
6204          Listed controls that can be either request or result (e.g.
6205          android.sensor.exposureTime) must be available both in the
6206          request and the result in order to be considered to be
6207          capability-compliant.
6208
6209          For example, if the HAL claims to support MANUAL control,
6210          then exposure time must be configurable via the request _and_
6211          the actual exposure applied must be available via
6212          the result.
6213
6214          If MANUAL_SENSOR is omitted, the HAL may choose to omit the
6215          android.scaler.availableMinFrameDurations static property entirely.
6216
6217          For PRIVATE_REPROCESSING and YUV_REPROCESSING capabilities, see
6218          hardware/libhardware/include/hardware/camera3.h Section 10 for more information.
6219
6220          Devices that support the MANUAL_SENSOR capability must support the
6221          CAMERA3_TEMPLATE_MANUAL template defined in camera3.h.
6222
6223          Devices that support the PRIVATE_REPROCESSING capability or the
6224          YUV_REPROCESSING capability must support the
6225          CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template defined in camera3.h.
6226
6227          For DEPTH_OUTPUT, the depth-format keys
6228          android.depth.availableDepthStreamConfigurations,
6229          android.depth.availableDepthMinFrameDurations,
6230          android.depth.availableDepthStallDurations must be available, in
6231          addition to the other keys explicitly mentioned in the DEPTH_OUTPUT
6232          enum notes. The entry android.depth.maxDepthSamples must be available
6233          if the DEPTH_POINT_CLOUD format is supported (HAL pixel format BLOB, dataspace
6234          DEPTH).
6235
6236          For a camera device with LOGICAL_MULTI_CAMERA capability, it should operate in the
6237          same way as a physical camera device based on its hardware level and capabilities.
6238          It's recommended that its feature set is superset of that of individual physical cameras.
6239
6240          * In camera1 API, to maintain application compatibility, for each camera facing, there
6241          may be one or more {logical_camera_id, physical_camera_1_id, physical_camera_2_id, ...}
6242          combinations, where logical_camera_id is composed of physical_camera_N_id, camera
6243          framework will only advertise one camera id
6244          (within the combinations for the particular facing) that is frontmost in the HAL
6245          published camera id list.
6246          For example, if HAL advertises 6 back facing camera IDs (ID0 to ID5), among which ID4
6247          and ID5 are logical cameras backed by ID0+ID1 and ID2+ID3 respectively. In this case,
6248          only ID0 will be available for camera1 API to use.
6249
6250          * Camera HAL is strongly recommended to advertise camera devices with best feature,
6251          power, performance, and latency tradeoffs at the front of the camera id list.
6252
6253          * Camera HAL may switch between physical cameras depending on focalLength, cropRegion, or
6254          zoomRatio. If physical cameras have different sizes, HAL must maintain a single logical
6255          camera activeArraySize/pixelArraySize/preCorrectionActiveArraySize, and must do proper
6256          mapping between logical camera and underlying physical cameras for all related metadata
6257          tags, such as crop region, zoomRatio, 3A regions, and intrinsicCalibration.
6258
6259          * Starting from HIDL ICameraDevice version 3.5, camera HAL must support
6260          isStreamCombinationSupported for application to query whether a particular logical and
6261          physical streams combination are supported.
6262
6263          A MONOCHROME camera device must also advertise BACKWARD_COMPATIBLE capability, and must
6264          not advertise MANUAL_POST_PROCESSING capability.
6265
6266          * To maintain backward compatibility, the camera device must support all
6267          BACKWARD_COMPATIBLE required keys. The android.control.awbAvailableModes key only contains
6268          AUTO, and android.control.awbState are either CONVERGED or LOCKED depending on
6269          android.control.awbLock.
6270
6271          * android.colorCorrection.mode, android.colorCorrection.transform, and
6272          android.colorCorrection.gains must not be in available request and result keys.
6273          As a result, the camera device cannot be a FULL device. However, the HAL can
6274          still advertise other individual capabilites.
6275
6276          * If the device supports tonemap control, only android.tonemap.curveRed is used.
6277          CurveGreen and curveBlue are no-ops.
6278
6279          In Android API level 28, a MONOCHROME camera device must not have RAW capability. From
6280          API level 29, a camera is allowed to have both MONOCHROME and RAW capabilities.
6281
6282          To support the legacy API to ICameraDevice 3.x shim layer, devices advertising
6283          OFFLINE_PROCESSING capability must also support configuring an input stream of the same
6284          size as the picture size if:
6285
6286          * The device supports PRIVATE_REPROCESSING capability
6287          * The device's maximal JPEG resolution can reach 30 FPS min frame duration
6288          * The device does not support HAL based ZSL (android.control.enableZsl)
6289
6290          For devices which support SYSTEM_CAMERA and LOGICAL_MULTI_CAMERA capabilities:
6291
6292          Hidden physical camera ids[1] must not be be shared[2] between public camera devices
6293          and camera devices advertising SYSTEM_CAMERA capability.
6294
6295          [1] - Camera device ids which are advertised in the
6296                ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS list, and not available through
6297                ICameraProvider.getCameraIdList().
6298
6299          [2] - The ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS lists, must not have common
6300                camera ids.
6301          </hal_details>
6302        </entry>
6303        <entry name="availableRequestKeys" type="int32" visibility="ndk_public"
6304               container="array" hwlevel="legacy">
6305          <array>
6306            <size>n</size>
6307          </array>
6308          <description>A list of all keys that the camera device has available
6309          to use with {@link android.hardware.camera2.CaptureRequest|ACaptureRequest}.</description>
6310
6311          <details>Attempting to set a key into a CaptureRequest that is not
6312          listed here will result in an invalid request and will be rejected
6313          by the camera device.
6314
6315          This field can be used to query the feature set of a camera device
6316          at a more granular level than capabilities. This is especially
6317          important for optional keys that are not listed under any capability
6318          in android.request.availableCapabilities.
6319          </details>
6320          <hal_details>
6321          Vendor tags can be listed here. Vendor tag metadata should also
6322          use the extensions C api (refer to camera3.h for more details).
6323
6324          Setting/getting vendor tags will be checked against the metadata
6325          vendor extensions API and not against this field.
6326
6327          The HAL must not consume any request tags that are not listed either
6328          here or in the vendor tag list.
6329
6330          The public camera2 API will always make the vendor tags visible
6331          via
6332          {@link android.hardware.camera2.CameraCharacteristics#getAvailableCaptureRequestKeys}.
6333          </hal_details>
6334        </entry>
6335        <entry name="availableResultKeys" type="int32" visibility="ndk_public"
6336               container="array" hwlevel="legacy">
6337          <array>
6338            <size>n</size>
6339          </array>
6340          <description>A list of all keys that the camera device has available to use with {@link
6341          android.hardware.camera2.CaptureResult|ACameraCaptureSession_captureCallback_result}.
6342          </description>
6343
6344          <details>Attempting to get a key from a CaptureResult that is not
6345          listed here will always return a `null` value. Getting a key from
6346          a CaptureResult that is listed here will generally never return a `null`
6347          value.
6348
6349          The following keys may return `null` unless they are enabled:
6350
6351          * android.statistics.lensShadingMap (non-null iff android.statistics.lensShadingMapMode == ON)
6352
6353          (Those sometimes-null keys will nevertheless be listed here
6354          if they are available.)
6355
6356          This field can be used to query the feature set of a camera device
6357          at a more granular level than capabilities. This is especially
6358          important for optional keys that are not listed under any capability
6359          in android.request.availableCapabilities.
6360          </details>
6361          <hal_details>
6362          Tags listed here must always have an entry in the result metadata,
6363          even if that size is 0 elements. Only array-type tags (e.g. lists,
6364          matrices, strings) are allowed to have 0 elements.
6365
6366          Vendor tags can be listed here. Vendor tag metadata should also
6367          use the extensions C api (refer to camera3.h for more details).
6368
6369          Setting/getting vendor tags will be checked against the metadata
6370          vendor extensions API and not against this field.
6371
6372          The HAL must not produce any result tags that are not listed either
6373          here or in the vendor tag list.
6374
6375          The public camera2 API will always make the vendor tags visible via {@link
6376          android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys}.
6377          </hal_details>
6378        </entry>
6379        <entry name="availableCharacteristicsKeys" type="int32" visibility="ndk_public"
6380               container="array" hwlevel="legacy">
6381          <array>
6382            <size>n</size>
6383          </array>
6384          <description>A list of all keys that the camera device has available to use with {@link
6385          android.hardware.camera2.CameraCharacteristics|ACameraManager_getCameraCharacteristics}.
6386          </description>
6387          <details>This entry follows the same rules as
6388          android.request.availableResultKeys (except that it applies for
6389          CameraCharacteristics instead of CaptureResult). See above for more
6390          details.
6391          </details>
6392          <hal_details>
6393          Keys listed here must always have an entry in the static info metadata,
6394          even if that size is 0 elements. Only array-type tags (e.g. lists,
6395          matrices, strings) are allowed to have 0 elements.
6396
6397          Vendor tags can listed here. Vendor tag metadata should also use
6398          the extensions C api (refer to camera3.h for more details).
6399
6400          Setting/getting vendor tags will be checked against the metadata
6401          vendor extensions API and not against this field.
6402
6403          The HAL must not have any tags in its static info that are not listed
6404          either here or in the vendor tag list.
6405
6406          The public camera2 API will always make the vendor tags visible
6407          via {@link android.hardware.camera2.CameraCharacteristics#getKeys}.
6408          </hal_details>
6409        </entry>
6410        <entry name="availableSessionKeys" type="int32" visibility="ndk_public"
6411               container="array" hwlevel="legacy" hal_version="3.3">
6412          <array>
6413            <size>n</size>
6414          </array>
6415          <description>A subset of the available request keys that the camera device
6416          can pass as part of the capture session initialization.</description>
6417
6418          <details> This is a subset of android.request.availableRequestKeys which
6419          contains a list of keys that are difficult to apply per-frame and
6420          can result in unexpected delays when modified during the capture session
6421          lifetime. Typical examples include parameters that require a
6422          time-consuming hardware re-configuration or internal camera pipeline
6423          change. For performance reasons we advise clients to pass their initial
6424          values as part of
6425          {@link SessionConfiguration#setSessionParameters|ACameraDevice_createCaptureSessionWithSessionParameters}.
6426          Once the camera capture session is enabled it is also recommended to avoid
6427          changing them from their initial values set in
6428          {@link SessionConfiguration#setSessionParameters|ACameraDevice_createCaptureSessionWithSessionParameters}.
6429          Control over session parameters can still be exerted in capture requests
6430          but clients should be aware and expect delays during their application.
6431          An example usage scenario could look like this:
6432
6433          * The camera client starts by quering the session parameter key list via
6434            {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys|ACameraManager_getCameraCharacteristics}.
6435          * Before triggering the capture session create sequence, a capture request
6436            must be built via
6437            {@link CameraDevice#createCaptureRequest|ACameraDevice_createCaptureRequest}
6438            using an appropriate template matching the particular use case.
6439          * The client should go over the list of session parameters and check
6440            whether some of the keys listed matches with the parameters that
6441            they intend to modify as part of the first capture request.
6442          * If there is no such match, the capture request can be  passed
6443            unmodified to
6444            {@link SessionConfiguration#setSessionParameters|ACameraDevice_createCaptureSessionWithSessionParameters}.
6445          * If matches do exist, the client should update the respective values
6446            and pass the request to
6447            {@link SessionConfiguration#setSessionParameters|ACameraDevice_createCaptureSessionWithSessionParameters}.
6448          * After the capture session initialization completes the session parameter
6449            key list can continue to serve as reference when posting or updating
6450            further requests. As mentioned above further changes to session
6451            parameters should ideally be avoided, if updates are necessary
6452            however clients could expect a delay/glitch during the
6453            parameter switch.
6454
6455          </details>
6456          <hal_details>
6457          If android.control.aeTargetFpsRange is part of the session parameters and constrained high
6458          speed mode is enabled, then only modifications of the maximum framerate value will be
6459          monitored by the framework and can trigger camera re-configuration. For more information
6460          about framerate ranges during constrained high speed sessions see
6461          {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}.
6462          Vendor tags can be listed here. Vendor tag metadata should also
6463          use the extensions C api (refer to
6464          android.hardware.camera.device.V3_4.StreamConfiguration.sessionParams for more details).
6465
6466          Setting/getting vendor tags will be checked against the metadata
6467          vendor extensions API and not against this field.
6468
6469          The HAL must not consume any request tags in the session parameters that
6470          are not listed either here or in the vendor tag list.
6471
6472          The public camera2 API will always make the vendor tags visible
6473          via
6474          {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys}.
6475          </hal_details>
6476        </entry>
6477        <entry name="availablePhysicalCameraRequestKeys" type="int32" visibility="ndk_public"
6478               container="array" hwlevel="limited" hal_version="3.3">
6479          <array>
6480            <size>n</size>
6481          </array>
6482          <description>A subset of the available request keys that can be overridden for
6483          physical devices backing a logical multi-camera.</description>
6484          <details>
6485          This is a subset of android.request.availableRequestKeys which contains a list
6486          of keys that can be overridden using {@link CaptureRequest.Builder#setPhysicalCameraKey}.
6487          The respective value of such request key can be obtained by calling
6488          {@link CaptureRequest.Builder#getPhysicalCameraKey}. Capture requests that contain
6489          individual physical device requests must be built via
6490          {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.
6491          </details>
6492          <hal_details>
6493          Vendor tags can be listed here. Vendor tag metadata should also
6494          use the extensions C api (refer to
6495          android.hardware.camera.device.V3_4.CaptureRequest.physicalCameraSettings for more
6496          details).
6497
6498          Setting/getting vendor tags will be checked against the metadata
6499          vendor extensions API and not against this field.
6500
6501          The HAL must not consume any request tags in the session parameters that
6502          are not listed either here or in the vendor tag list.
6503
6504          There should be no overlap between this set of keys and the available session keys
6505          {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys} along
6506          with any other controls that can have impact on the dual-camera sync.
6507
6508          The public camera2 API will always make the vendor tags visible
6509          via
6510          {@link android.hardware.camera2.CameraCharacteristics#getAvailablePhysicalCameraRequestKeys}.
6511          </hal_details>
6512        </entry>
6513        <entry name="characteristicKeysNeedingPermission" type="int32" visibility="hidden"
6514               container="array" hwlevel="legacy" hal_version="3.4">
6515          <array>
6516            <size>n</size>
6517          </array>
6518          <description>A list of camera characteristics keys that are only available
6519          in case the camera client has camera permission.</description>
6520
6521          <details>The entry contains a subset of
6522          {@link android.hardware.camera2.CameraCharacteristics#getKeys} that require camera clients
6523          to acquire the {@link android.Manifest.permission#CAMERA} permission before calling
6524          {@link android.hardware.camera2.CameraManager#getCameraCharacteristics}. If the
6525          permission is not held by the camera client, then the values of the repsective properties
6526          will not be present in {@link android.hardware.camera2.CameraCharacteristics}.
6527          </details>
6528          <hal_details>
6529          Do not set this property directly, camera service will overwrite any previous values.
6530          </hal_details>
6531        </entry>
6532      </static>
6533    </section>
6534    <section name="scaler">
6535      <controls>
6536        <entry name="cropRegion" type="int32" visibility="public"
6537               container="array" typedef="rectangle" hwlevel="legacy">
6538          <array>
6539            <size>4</size>
6540          </array>
6541          <description>The desired region of the sensor to read out for this capture.</description>
6542          <units>Pixel coordinates relative to
6543          android.sensor.info.activeArraySize or
6544          android.sensor.info.preCorrectionActiveArraySize depending on distortion correction
6545          capability and mode</units>
6546          <details>
6547            This control can be used to implement digital zoom.
6548
6549            For devices not supporting android.distortionCorrection.mode control, the coordinate
6550            system always follows that of android.sensor.info.activeArraySize, with `(0, 0)` being
6551            the top-left pixel of the active array.
6552
6553            For devices supporting android.distortionCorrection.mode control, the coordinate system
6554            depends on the mode being set.  When the distortion correction mode is OFF, the
6555            coordinate system follows android.sensor.info.preCorrectionActiveArraySize, with `(0,
6556            0)` being the top-left pixel of the pre-correction active array.  When the distortion
6557            correction mode is not OFF, the coordinate system follows
6558            android.sensor.info.activeArraySize, with `(0, 0)` being the top-left pixel of the
6559            active array.
6560
6561            Output streams use this rectangle to produce their output, cropping to a smaller region
6562            if necessary to maintain the stream's aspect ratio, then scaling the sensor input to
6563            match the output's configured resolution.
6564
6565            The crop region is applied after the RAW to other color space (e.g. YUV)
6566            conversion. Since raw streams (e.g. RAW16) don't have the conversion stage, they are not
6567            croppable. The crop region will be ignored by raw streams.
6568
6569            For non-raw streams, any additional per-stream cropping will be done to maximize the
6570            final pixel area of the stream.
6571
6572            For example, if the crop region is set to a 4:3 aspect ratio, then 4:3 streams will use
6573            the exact crop region. 16:9 streams will further crop vertically (letterbox).
6574
6575            Conversely, if the crop region is set to a 16:9, then 4:3 outputs will crop horizontally
6576            (pillarbox), and 16:9 streams will match exactly. These additional crops will be
6577            centered within the crop region.
6578
6579            To illustrate, here are several scenarios of different crop regions and output streams,
6580            for a hypothetical camera device with an active array of size `(2000,1500)`.  Note that
6581            several of these examples use non-centered crop regions for ease of illustration; such
6582            regions are only supported on devices with FREEFORM capability
6583            (android.scaler.croppingType `== FREEFORM`), but this does not affect the way the crop
6584            rules work otherwise.
6585
6586            * Camera Configuration:
6587                * Active array size: `2000x1500` (3 MP, 4:3 aspect ratio)
6588                * Output stream #1: `640x480` (VGA, 4:3 aspect ratio)
6589                * Output stream #2: `1280x720` (720p, 16:9 aspect ratio)
6590            * Case #1: 4:3 crop region with 2x digital zoom
6591                * Crop region: `Rect(500, 375, 1500, 1125) // (left, top, right, bottom)`
6592                * ![4:3 aspect ratio crop diagram](android.scaler.cropRegion/crop-region-43-ratio.png)
6593                * `640x480` stream source area: `(500, 375, 1500, 1125)` (equal to crop region)
6594                * `1280x720` stream source area: `(500, 469, 1500, 1031)` (letterboxed)
6595            * Case #2: 16:9 crop region with ~1.5x digital zoom.
6596                * Crop region: `Rect(500, 375, 1833, 1125)`
6597                * ![16:9 aspect ratio crop diagram](android.scaler.cropRegion/crop-region-169-ratio.png)
6598                * `640x480` stream source area: `(666, 375, 1666, 1125)` (pillarboxed)
6599                * `1280x720` stream source area: `(500, 375, 1833, 1125)` (equal to crop region)
6600            * Case #3: 1:1 crop region with ~2.6x digital zoom.
6601                * Crop region: `Rect(500, 375, 1250, 1125)`
6602                * ![1:1 aspect ratio crop diagram](android.scaler.cropRegion/crop-region-11-ratio.png)
6603                * `640x480` stream source area: `(500, 469, 1250, 1031)` (letterboxed)
6604                * `1280x720` stream source area: `(500, 543, 1250, 957)` (letterboxed)
6605            * Case #4: Replace `640x480` stream with `1024x1024` stream, with 4:3 crop region:
6606                * Crop region: `Rect(500, 375, 1500, 1125)`
6607                * ![Square output, 4:3 aspect ratio crop diagram](android.scaler.cropRegion/crop-region-43-square-ratio.png)
6608                * `1024x1024` stream source area: `(625, 375, 1375, 1125)` (pillarboxed)
6609                * `1280x720` stream source area: `(500, 469, 1500, 1031)` (letterboxed)
6610                * Note that in this case, neither of the two outputs is a subset of the other, with
6611                  each containing image data the other doesn't have.
6612
6613            If the coordinate system is android.sensor.info.activeArraySize, the width and height
6614            of the crop region cannot be set to be smaller than
6615            `floor( activeArraySize.width / android.scaler.availableMaxDigitalZoom )` and
6616            `floor( activeArraySize.height / android.scaler.availableMaxDigitalZoom )`, respectively.
6617
6618            If the coordinate system is android.sensor.info.preCorrectionActiveArraySize, the width
6619            and height of the crop region cannot be set to be smaller than
6620            `floor( preCorrectionActiveArraySize.width / android.scaler.availableMaxDigitalZoom )`
6621            and
6622            `floor( preCorrectionActiveArraySize.height / android.scaler.availableMaxDigitalZoom )`,
6623            respectively.
6624
6625            The camera device may adjust the crop region to account for rounding and other hardware
6626            requirements; the final crop region used will be included in the output capture result.
6627
6628            The camera sensor output aspect ratio depends on factors such as output stream
6629            combination and android.control.aeTargetFpsRange, and shouldn't be adjusted by using
6630            this control. And the camera device will treat different camera sensor output sizes
6631            (potentially with in-sensor crop) as the same crop of
6632            android.sensor.info.activeArraySize. As a result, the application shouldn't assume the
6633            maximum crop region always maps to the same aspect ratio or field of view for the
6634            sensor output.
6635
6636            Starting from API level 30, it's strongly recommended to use android.control.zoomRatio
6637            to take advantage of better support for zoom with logical multi-camera. The benefits
6638            include better precision with optical-digital zoom combination, and ability to do
6639            zoom-out from 1.0x. When using android.control.zoomRatio for zoom, the crop region in
6640            the capture request should be left as the default activeArray size. The
6641            coordinate system is post-zoom, meaning that the activeArraySize or
6642            preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.  See
6643            android.control.zoomRatio for details.
6644
6645            For camera devices with the
6646            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
6647            capability, android.sensor.info.activeArraySizeMaximumResolution /
6648            android.sensor.info.preCorrectionActiveArraySizeMaximumResolution must be used as the
6649            coordinate system for requests where android.sensor.pixelMode is set to
6650            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
6651          </details>
6652          <ndk_details>
6653            The data representation is int[4], which maps to (left, top, width, height).
6654          </ndk_details>
6655          <hal_details>
6656            The output streams must maintain square pixels at all
6657            times, no matter what the relative aspect ratios of the
6658            crop region and the stream are.  Negative values for
6659            corner are allowed for raw output if full pixel array is
6660            larger than active pixel array. Width and height may be
6661            rounded to nearest larger supportable width, especially
6662            for raw output, where only a few fixed scales may be
6663            possible.
6664
6665            If android.control.zoomRatio is supported by the HAL, the HAL must report the zoom
6666            ratio via android.control.zoomRatio, and change the coordinate system such that
6667            android.sensor.info.preCorrectionActiveArraySize or android.sensor.info.activeArraySize
6668            (depending on whether android.distortionCorrection.mode is supported) is used to
6669            represent the camera field-of-view after zoom. see android.control.zoomRatio for
6670            details.
6671
6672            HAL2.x uses only (x, y, width)
6673          </hal_details>
6674          <tag id="BC" />
6675        </entry>
6676      </controls>
6677      <static>
6678        <entry name="availableFormats" type="int32"
6679        visibility="hidden" deprecated="true" enum="true"
6680        container="array" typedef="imageFormat">
6681          <array>
6682            <size>n</size>
6683          </array>
6684          <enum>
6685            <value optional="true" id="0x20">RAW16
6686              <notes>
6687              RAW16 is a standard, cross-platform format for raw image
6688              buffers with 16-bit pixels.
6689
6690              Buffers of this format are typically expected to have a
6691              Color Filter Array (CFA) layout, which is given in
6692              android.sensor.info.colorFilterArrangement. Sensors with
6693              CFAs that are not representable by a format in
6694              android.sensor.info.colorFilterArrangement should not
6695              use this format.
6696
6697              Buffers of this format will also follow the constraints given for
6698              RAW_OPAQUE buffers, but with relaxed performance constraints.
6699
6700              This format is intended to give users access to the full contents
6701              of the buffers coming directly from the image sensor prior to any
6702              cropping or scaling operations, and all coordinate systems for
6703              metadata used for this format are relative to the size of the
6704              active region of the image sensor before any geometric distortion
6705              correction has been applied (i.e.
6706              android.sensor.info.preCorrectionActiveArraySize). Supported
6707              dimensions for this format are limited to the full dimensions of
6708              the sensor (e.g. either android.sensor.info.pixelArraySize or
6709              android.sensor.info.preCorrectionActiveArraySize will be the
6710              only supported output size).
6711
6712              See android.scaler.availableInputOutputFormatsMap for
6713              the full set of performance guarantees.
6714              </notes>
6715            </value>
6716            <value optional="true" id="0x24">RAW_OPAQUE
6717              <notes>
6718              RAW_OPAQUE (or
6719              {@link android.graphics.ImageFormat#RAW_PRIVATE RAW_PRIVATE}
6720              as referred in public API) is a format for raw image buffers
6721              coming from an image sensor.
6722
6723              The actual structure of buffers of this format is
6724              platform-specific, but must follow several constraints:
6725
6726              1. No image post-processing operations may have been applied to
6727              buffers of this type. These buffers contain raw image data coming
6728              directly from the image sensor.
6729              1. If a buffer of this format is passed to the camera device for
6730              reprocessing, the resulting images will be identical to the images
6731              produced if the buffer had come directly from the sensor and was
6732              processed with the same settings.
6733
6734              The intended use for this format is to allow access to the native
6735              raw format buffers coming directly from the camera sensor without
6736              any additional conversions or decrease in framerate.
6737
6738              See android.scaler.availableInputOutputFormatsMap for the full set of
6739              performance guarantees.
6740              </notes>
6741            </value>
6742            <value optional="true" id="0x32315659">YV12
6743              <notes>YCrCb 4:2:0 Planar</notes>
6744            </value>
6745            <value optional="true" id="0x11">YCrCb_420_SP
6746              <notes>NV21</notes>
6747            </value>
6748            <value id="0x22">IMPLEMENTATION_DEFINED
6749              <notes>System internal format, not application-accessible</notes>
6750            </value>
6751            <value id="0x23">YCbCr_420_888
6752              <notes>Flexible YUV420 Format</notes>
6753            </value>
6754            <value id="0x21">BLOB
6755              <notes>JPEG format</notes>
6756            </value>
6757            <value id="0x25" hal_version="3.4">RAW10
6758              <notes>RAW10</notes>
6759            </value>
6760            <value id="0x26" hal_version="3.4">RAW12
6761              <notes>RAW12</notes>
6762            </value>
6763            <value id="0x20203859" hal_version="3.4">Y8
6764              <notes>Y8</notes>
6765            </value>
6766          </enum>
6767          <description>The list of image formats that are supported by this
6768          camera device for output streams.</description>
6769          <deprecation_description>
6770          Not used in HALv3 or newer
6771          </deprecation_description>
6772          <details>
6773          All camera devices will support JPEG and YUV_420_888 formats.
6774
6775          When set to YUV_420_888, application can access the YUV420 data directly.
6776          </details>
6777          <hal_details>
6778          These format values are from HAL_PIXEL_FORMAT_* in
6779          system/core/libsystem/include/system/graphics-base.h.
6780
6781          When IMPLEMENTATION_DEFINED is used, the platform
6782          gralloc module will select a format based on the usage flags provided
6783          by the camera HAL device and the other endpoint of the stream. It is
6784          usually used by preview and recording streams, where the application doesn't
6785          need access the image data.
6786
6787          YCbCr_420_888 format must be supported by the HAL. When an image stream
6788          needs CPU/application direct access, this format will be used. For a MONOCHROME
6789          camera device, the pixel value of Cb and Cr planes is 128.
6790
6791          The BLOB format must be supported by the HAL. This is used for the JPEG stream.
6792
6793          A RAW_OPAQUE buffer should contain only pixel data. It is strongly
6794          recommended that any information used by the camera device when
6795          processing images is fully expressed by the result metadata
6796          for that image buffer.
6797          </hal_details>
6798          <tag id="BC" />
6799        </entry>
6800        <entry name="availableJpegMinDurations" type="int64" visibility="hidden" deprecated="true"
6801        container="array">
6802          <array>
6803            <size>n</size>
6804          </array>
6805          <description>The minimum frame duration that is supported
6806          for each resolution in android.scaler.availableJpegSizes.
6807          </description>
6808          <deprecation_description>
6809          Not used in HALv3 or newer
6810          </deprecation_description>
6811          <units>Nanoseconds</units>
6812          <range>TODO: Remove property.</range>
6813          <details>
6814          This corresponds to the minimum steady-state frame duration when only
6815          that JPEG stream is active and captured in a burst, with all
6816          processing (typically in android.*.mode) set to FAST.
6817
6818          When multiple streams are configured, the minimum
6819          frame duration will be &amp;gt;= max(individual stream min
6820          durations)</details>
6821          <tag id="BC" />
6822        </entry>
6823        <entry name="availableJpegSizes" type="int32" visibility="hidden"
6824        deprecated="true" container="array" typedef="size">
6825          <array>
6826            <size>n</size>
6827            <size>2</size>
6828          </array>
6829          <description>The JPEG resolutions that are supported by this camera device.</description>
6830          <deprecation_description>
6831          Not used in HALv3 or newer
6832          </deprecation_description>
6833          <range>TODO: Remove property.</range>
6834          <details>
6835          The resolutions are listed as `(width, height)` pairs. All camera devices will support
6836          sensor maximum resolution (defined by android.sensor.info.activeArraySize).
6837          </details>
6838          <hal_details>
6839          The HAL must include sensor maximum resolution
6840          (defined by android.sensor.info.activeArraySize),
6841          and should include half/quarter of sensor maximum resolution.
6842          </hal_details>
6843          <tag id="BC" />
6844        </entry>
6845        <entry name="availableMaxDigitalZoom" type="float" visibility="public"
6846              hwlevel="legacy">
6847          <description>The maximum ratio between both active area width
6848          and crop region width, and active area height and
6849          crop region height, for android.scaler.cropRegion.
6850          </description>
6851          <units>Zoom scale factor</units>
6852          <range>&amp;gt;=1</range>
6853          <details>
6854          This represents the maximum amount of zooming possible by
6855          the camera device, or equivalently, the minimum cropping
6856          window size.
6857
6858          Crop regions that have a width or height that is smaller
6859          than this ratio allows will be rounded up to the minimum
6860          allowed size by the camera device.
6861
6862          Starting from API level 30, when using android.control.zoomRatio to zoom in or out,
6863          the application must use android.control.zoomRatioRange to query both the minimum and
6864          maximum zoom ratio.
6865          </details>
6866          <hal_details>
6867          If the HAL supports android.control.zoomRatio, this value must be equal to or less than
6868          the maximum supported zoomRatio specified in android.control.zoomRatioRange.
6869          </hal_details>
6870          <tag id="BC" />
6871        </entry>
6872        <entry name="availableProcessedMinDurations" type="int64" visibility="hidden" deprecated="true"
6873        container="array">
6874          <array>
6875            <size>n</size>
6876          </array>
6877          <description>For each available processed output size (defined in
6878          android.scaler.availableProcessedSizes), this property lists the
6879          minimum supportable frame duration for that size.
6880          </description>
6881          <deprecation_description>
6882          Not used in HALv3 or newer
6883          </deprecation_description>
6884          <units>Nanoseconds</units>
6885          <details>
6886          This should correspond to the frame duration when only that processed
6887          stream is active, with all processing (typically in android.*.mode)
6888          set to FAST.
6889
6890          When multiple streams are configured, the minimum frame duration will
6891          be &amp;gt;= max(individual stream min durations).
6892          </details>
6893          <tag id="BC" />
6894        </entry>
6895        <entry name="availableProcessedSizes" type="int32" visibility="hidden"
6896        deprecated="true" container="array" typedef="size">
6897          <array>
6898            <size>n</size>
6899            <size>2</size>
6900          </array>
6901          <description>The resolutions available for use with
6902          processed output streams, such as YV12, NV12, and
6903          platform opaque YUV/RGB streams to the GPU or video
6904          encoders.</description>
6905          <deprecation_description>
6906          Not used in HALv3 or newer
6907          </deprecation_description>
6908          <details>
6909          The resolutions are listed as `(width, height)` pairs.
6910
6911          For a given use case, the actual maximum supported resolution
6912          may be lower than what is listed here, depending on the destination
6913          Surface for the image data. For example, for recording video,
6914          the video encoder chosen may have a maximum size limit (e.g. 1080p)
6915          smaller than what the camera (e.g. maximum resolution is 3264x2448)
6916          can provide.
6917
6918          Please reference the documentation for the image data destination to
6919          check if it limits the maximum size for image data.
6920          </details>
6921          <hal_details>
6922          For FULL capability devices (`android.info.supportedHardwareLevel == FULL`),
6923          the HAL must include all JPEG sizes listed in android.scaler.availableJpegSizes
6924          and each below resolution if it is smaller than or equal to the sensor
6925          maximum resolution (if they are not listed in JPEG sizes already):
6926
6927          * 240p (320 x 240)
6928          * 480p (640 x 480)
6929          * 720p (1280 x 720)
6930          * 1080p (1920 x 1080)
6931
6932          For LIMITED capability devices (`android.info.supportedHardwareLevel == LIMITED`),
6933          the HAL only has to list up to the maximum video size supported by the devices.
6934          </hal_details>
6935          <tag id="BC" />
6936        </entry>
6937        <entry name="availableRawMinDurations" type="int64" deprecated="true"
6938        container="array">
6939          <array>
6940            <size>n</size>
6941          </array>
6942          <description>
6943          For each available raw output size (defined in
6944          android.scaler.availableRawSizes), this property lists the minimum
6945          supportable frame duration for that size.
6946          </description>
6947          <deprecation_description>
6948          Not used in HALv3 or newer
6949          </deprecation_description>
6950          <units>Nanoseconds</units>
6951          <details>
6952          Should correspond to the frame duration when only the raw stream is
6953          active.
6954
6955          When multiple streams are configured, the minimum
6956          frame duration will be &amp;gt;= max(individual stream min
6957          durations)</details>
6958          <tag id="BC" />
6959        </entry>
6960        <entry name="availableRawSizes" type="int32" deprecated="true"
6961        container="array" typedef="size">
6962          <array>
6963            <size>n</size>
6964            <size>2</size>
6965          </array>
6966          <description>The resolutions available for use with raw
6967          sensor output streams, listed as width,
6968          height</description>
6969          <deprecation_description>
6970          Not used in HALv3 or newer
6971          </deprecation_description>
6972        </entry>
6973      </static>
6974      <dynamic>
6975        <clone entry="android.scaler.cropRegion" kind="controls">
6976        </clone>
6977      </dynamic>
6978      <static>
6979        <entry name="availableInputOutputFormatsMap" type="int32" visibility="hidden"
6980          typedef="reprocessFormatsMap">
6981          <description>The mapping of image formats that are supported by this
6982          camera device for input streams, to their corresponding output formats.
6983          </description>
6984          <details>
6985          All camera devices with at least 1
6986          android.request.maxNumInputStreams will have at least one
6987          available input format.
6988
6989          The camera device will support the following map of formats,
6990          if its dependent capability (android.request.availableCapabilities) is supported:
6991
6992            Input Format                                    | Output Format                                     | Capability
6993          :-------------------------------------------------|:--------------------------------------------------|:----------
6994          {@link android.graphics.ImageFormat#PRIVATE}      | {@link android.graphics.ImageFormat#JPEG}         | PRIVATE_REPROCESSING
6995          {@link android.graphics.ImageFormat#PRIVATE}      | {@link android.graphics.ImageFormat#YUV_420_888}  | PRIVATE_REPROCESSING
6996          {@link android.graphics.ImageFormat#YUV_420_888}  | {@link android.graphics.ImageFormat#JPEG}         | YUV_REPROCESSING
6997          {@link android.graphics.ImageFormat#YUV_420_888}  | {@link android.graphics.ImageFormat#YUV_420_888}  | YUV_REPROCESSING
6998
6999          PRIVATE refers to a device-internal format that is not directly application-visible.  A
7000          PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance}
7001          with {@link android.graphics.ImageFormat#PRIVATE} as the format.
7002
7003          For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input
7004          or output will never hurt maximum frame rate (i.e.  {@link
7005          android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration
7006          getOutputStallDuration(ImageFormat.PRIVATE, size)} is always 0),
7007
7008          Attempting to configure an input stream with output streams not
7009          listed as available in this map is not valid.
7010
7011          Additionally, if the camera device is MONOCHROME with Y8 support, it will also support
7012          the following map of formats if its dependent capability
7013          (android.request.availableCapabilities) is supported:
7014
7015            Input Format                                    | Output Format                                     | Capability
7016          :-------------------------------------------------|:--------------------------------------------------|:----------
7017          {@link android.graphics.ImageFormat#PRIVATE}      | {@link android.graphics.ImageFormat#Y8}           | PRIVATE_REPROCESSING
7018          {@link android.graphics.ImageFormat#Y8}           | {@link android.graphics.ImageFormat#JPEG}         | YUV_REPROCESSING
7019          {@link android.graphics.ImageFormat#Y8}           | {@link android.graphics.ImageFormat#Y8}           | YUV_REPROCESSING
7020
7021          </details>
7022          <hal_details>
7023          For the formats, see `system/core/libsystem/include/system/graphics-base.h` for a
7024          definition of the image format enumerations. The PRIVATE format refers to the
7025          HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED format. The HAL could determine
7026          the actual format by using the gralloc usage flags.
7027          For ZSL use case in particular, the HAL could choose appropriate format (partially
7028          processed YUV or RAW based format) by checking the format and GRALLOC_USAGE_HW_CAMERA_ZSL.
7029          See camera3.h for more details.
7030
7031          This value is encoded as a variable-size array-of-arrays.
7032          The inner array always contains `[format, length, ...]` where
7033          `...` has `length` elements. An inner array is followed by another
7034          inner array if the total metadata entry size hasn't yet been exceeded.
7035
7036          A code sample to read/write this encoding (with a device that
7037          supports reprocessing IMPLEMENTATION_DEFINED to YUV_420_888, and JPEG,
7038          and reprocessing YUV_420_888 to YUV_420_888 and JPEG):
7039
7040              // reading
7041              int32_t* contents = &amp;entry.i32[0];
7042              for (size_t i = 0; i &lt; entry.count; ) {
7043                  int32_t format = contents[i++];
7044                  int32_t length = contents[i++];
7045                  int32_t output_formats[length];
7046                  memcpy(&amp;output_formats[0], &amp;contents[i],
7047                         length * sizeof(int32_t));
7048                  i += length;
7049              }
7050
7051              // writing (static example, PRIVATE_REPROCESSING + YUV_REPROCESSING)
7052              int32_t[] contents = {
7053                IMPLEMENTATION_DEFINED, 2, YUV_420_888, BLOB,
7054                YUV_420_888, 2, YUV_420_888, BLOB,
7055              };
7056              update_camera_metadata_entry(metadata, index, &amp;contents[0],
7057                    sizeof(contents)/sizeof(contents[0]), &amp;updated_entry);
7058
7059          If the HAL claims to support any of the capabilities listed in the
7060          above details, then it must also support all the input-output
7061          combinations listed for that capability. It can optionally support
7062          additional formats if it so chooses.
7063          </hal_details>
7064          <tag id="REPROC" />
7065        </entry>
7066        <entry name="availableStreamConfigurations" type="int32" visibility="ndk_public"
7067               enum="true" container="array" typedef="streamConfiguration" hwlevel="legacy">
7068          <array>
7069            <size>n</size>
7070            <size>4</size>
7071          </array>
7072          <enum>
7073            <value>OUTPUT</value>
7074            <value>INPUT</value>
7075          </enum>
7076          <description>The available stream configurations that this
7077          camera device supports
7078          (i.e. format, width, height, output/input stream).
7079          </description>
7080          <details>
7081          The configurations are listed as `(format, width, height, input?)`
7082          tuples.
7083
7084          For a given use case, the actual maximum supported resolution
7085          may be lower than what is listed here, depending on the destination
7086          Surface for the image data. For example, for recording video,
7087          the video encoder chosen may have a maximum size limit (e.g. 1080p)
7088          smaller than what the camera (e.g. maximum resolution is 3264x2448)
7089          can provide.
7090
7091          Please reference the documentation for the image data destination to
7092          check if it limits the maximum size for image data.
7093
7094          Not all output formats may be supported in a configuration with
7095          an input stream of a particular format. For more details, see
7096          android.scaler.availableInputOutputFormatsMap.
7097
7098          For applications targeting SDK version older than 31, the following table
7099          describes the minimum required output stream configurations based on the hardware level
7100          (android.info.supportedHardwareLevel):
7101
7102          Format         | Size                                         | Hardware Level | Notes
7103          :-------------:|:--------------------------------------------:|:--------------:|:--------------:
7104          JPEG           | android.sensor.info.activeArraySize          | Any            |
7105          JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
7106          JPEG           | 1280x720 (720)                               | Any            | if 720p &lt;= activeArraySize
7107          JPEG           | 640x480 (480p)                               | Any            | if 480p &lt;= activeArraySize
7108          JPEG           | 320x240 (240p)                               | Any            | if 240p &lt;= activeArraySize
7109          YUV_420_888    | all output sizes available for JPEG          | FULL           |
7110          YUV_420_888    | all output sizes available for JPEG, up to the maximum video size | LIMITED        |
7111          IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |
7112
7113          For applications targeting SDK version 31 or newer, if the mobile device declares to be
7114          {@link android.os.Build.VERSION_CDOES.MEDIA_PERFORMANCE_CLASS media performance class} S,
7115          the primary camera devices (first rear/front camera in the camera ID list) will not
7116          support JPEG sizes smaller than 1080p. If the application configures a JPEG stream
7117          smaller than 1080p, the camera device will round up the JPEG image size to at least
7118          1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same.
7119          This new minimum required output stream configurations are illustrated by the table below:
7120
7121          Format         | Size                                         | Hardware Level | Notes
7122          :-------------:|:--------------------------------------------:|:--------------:|:--------------:
7123          JPEG           | android.sensor.info.activeArraySize          | Any            |
7124          JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
7125          YUV_420_888    | android.sensor.info.activeArraySize          | FULL           |
7126          YUV_420_888    | 1920x1080 (1080p)                            | FULL           | if 1080p &lt;= activeArraySize
7127          YUV_420_888    | 1280x720 (720)                               | FULL           | if 720p &lt;= activeArraySize
7128          YUV_420_888    | 640x480 (480p)                               | FULL           | if 480p &lt;= activeArraySize
7129          YUV_420_888    | 320x240 (240p)                               | FULL           | if 240p &lt;= activeArraySize
7130          YUV_420_888    | all output sizes available for FULL hardware level, up to the maximum video size | LIMITED        |
7131          IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |
7132
7133          For applications targeting SDK version 31 or newer, if the mobile device doesn't declare
7134          to be media performance class S, or if the camera device isn't a primary rear/front
7135          camera, the minimum required output stream configurations are the same as for applications
7136          targeting SDK version older than 31.
7137
7138          Refer to android.request.availableCapabilities for additional
7139          mandatory stream configurations on a per-capability basis.
7140
7141          Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for
7142          downscaling from larger resolution to smaller, and the QCIF resolution sometimes is not
7143          fully supported due to this limitation on devices with high-resolution image sensors.
7144          Therefore, trying to configure a QCIF resolution stream together with any other
7145          stream larger than 1920x1080 resolution (either width or height) might not be supported,
7146          and capture session creation will fail if it is not.
7147
7148          </details>
7149          <hal_details>
7150          It is recommended (but not mandatory) to also include half/quarter
7151          of sensor maximum resolution for JPEG formats (regardless of hardware
7152          level).
7153
7154          (The following is a rewording of the above required table):
7155
7156          For JPEG format, the sizes may be restricted by below conditions:
7157
7158          * The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones
7159          (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution
7160          (defined by android.sensor.info.activeArraySize) has an aspect ratio other than these,
7161          it does not have to be included in the supported JPEG sizes.
7162          * Some hardware JPEG encoders may have pixel boundary alignment requirements, such as
7163          the dimensions being a multiple of 16.
7164
7165          Therefore, the maximum JPEG size may be smaller than sensor maximum resolution.
7166          However, the largest JPEG size must be as close as possible to the sensor maximum
7167          resolution given above constraints. It is required that after aspect ratio adjustments,
7168          additional size reduction due to other issues must be less than 3% in area. For example,
7169          if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect
7170          ratio 4:3, the JPEG encoder alignment requirement is 16, the maximum JPEG size will be
7171          3264x2448.
7172
7173          For FULL capability devices (`android.info.supportedHardwareLevel == FULL`),
7174          the HAL must include all YUV_420_888 sizes that have JPEG sizes listed
7175          here as output streams.
7176
7177          It must also include each below resolution if it is smaller than or
7178          equal to the sensor maximum resolution (for both YUV_420_888 and JPEG
7179          formats), as output streams:
7180
7181          * 240p (320 x 240)
7182          * 480p (640 x 480)
7183          * 720p (1280 x 720)
7184          * 1080p (1920 x 1080)
7185
7186          Note that for Performance Class 12 primary cameras (first rear/front facing camera in the
7187          camera ID list), camera framework filters out JPEG sizes smaller than 1080p depending on
7188          applications' targetSdkLevel. The camera HAL must still support the smaller JPEG sizes
7189          to maintain backward comopatibility.
7190
7191          For LIMITED capability devices
7192          (`android.info.supportedHardwareLevel == LIMITED`),
7193          the HAL only has to list up to the maximum video size
7194          supported by the device.
7195
7196          Regardless of hardware level, every output resolution available for
7197          YUV_420_888 must also be available for IMPLEMENTATION_DEFINED.
7198
7199          This supercedes the following fields, which are now deprecated:
7200
7201          * availableFormats
7202          * available[Processed,Raw,Jpeg]Sizes
7203          </hal_details>
7204        </entry>
7205        <entry name="availableMinFrameDurations" type="int64" visibility="ndk_public"
7206               container="array" typedef="streamConfigurationDuration" hwlevel="legacy">
7207          <array>
7208            <size>4</size>
7209            <size>n</size>
7210          </array>
7211          <description>This lists the minimum frame duration for each
7212          format/size combination.
7213          </description>
7214          <units>(format, width, height, ns) x n</units>
7215          <details>
7216          This should correspond to the frame duration when only that
7217          stream is active, with all processing (typically in android.*.mode)
7218          set to either OFF or FAST.
7219
7220          When multiple streams are used in a request, the minimum frame
7221          duration will be max(individual stream min durations).
7222
7223          See android.sensor.frameDuration and
7224          android.scaler.availableStallDurations for more details about
7225          calculating the max frame rate.
7226          </details>
7227          <tag id="V1" />
7228        </entry>
7229        <entry name="availableStallDurations" type="int64" visibility="ndk_public"
7230               container="array" typedef="streamConfigurationDuration" hwlevel="legacy">
7231          <array>
7232            <size>4</size>
7233            <size>n</size>
7234          </array>
7235          <description>This lists the maximum stall duration for each
7236          output format/size combination.
7237          </description>
7238          <units>(format, width, height, ns) x n</units>
7239          <details>
7240          A stall duration is how much extra time would get added
7241          to the normal minimum frame duration for a repeating request
7242          that has streams with non-zero stall.
7243
7244          For example, consider JPEG captures which have the following
7245          characteristics:
7246
7247          * JPEG streams act like processed YUV streams in requests for which
7248          they are not included; in requests in which they are directly
7249          referenced, they act as JPEG streams. This is because supporting a
7250          JPEG stream requires the underlying YUV data to always be ready for
7251          use by a JPEG encoder, but the encoder will only be used (and impact
7252          frame duration) on requests that actually reference a JPEG stream.
7253          * The JPEG processor can run concurrently to the rest of the camera
7254          pipeline, but cannot process more than 1 capture at a time.
7255
7256          In other words, using a repeating YUV request would result
7257          in a steady frame rate (let's say it's 30 FPS). If a single
7258          JPEG request is submitted periodically, the frame rate will stay
7259          at 30 FPS (as long as we wait for the previous JPEG to return each
7260          time). If we try to submit a repeating YUV + JPEG request, then
7261          the frame rate will drop from 30 FPS.
7262
7263          In general, submitting a new request with a non-0 stall time
7264          stream will _not_ cause a frame rate drop unless there are still
7265          outstanding buffers for that stream from previous requests.
7266
7267          Submitting a repeating request with streams (call this `S`)
7268          is the same as setting the minimum frame duration from
7269          the normal minimum frame duration corresponding to `S`, added with
7270          the maximum stall duration for `S`.
7271
7272          If interleaving requests with and without a stall duration,
7273          a request will stall by the maximum of the remaining times
7274          for each can-stall stream with outstanding buffers.
7275
7276          This means that a stalling request will not have an exposure start
7277          until the stall has completed.
7278
7279          This should correspond to the stall duration when only that stream is
7280          active, with all processing (typically in android.*.mode) set to FAST
7281          or OFF. Setting any of the processing modes to HIGH_QUALITY
7282          effectively results in an indeterminate stall duration for all
7283          streams in a request (the regular stall calculation rules are
7284          ignored).
7285
7286          The following formats may always have a stall duration:
7287
7288          * {@link android.graphics.ImageFormat#JPEG|AIMAGE_FORMAT_JPEG}
7289          * {@link android.graphics.ImageFormat#RAW_SENSOR|AIMAGE_FORMAT_RAW16}
7290
7291          The following formats will never have a stall duration:
7292
7293          * {@link android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888}
7294          * {@link android.graphics.ImageFormat#RAW10|AIMAGE_FORMAT_RAW10}
7295          * {@link android.graphics.ImageFormat#RAW12|AIMAGE_FORMAT_RAW12}
7296          * {@link android.graphics.ImageFormat#Y8|AIMAGE_FORMAT_Y8}
7297
7298          All other formats may or may not have an allowed stall duration on
7299          a per-capability basis; refer to android.request.availableCapabilities
7300          for more details.
7301
7302          See android.sensor.frameDuration for more information about
7303          calculating the max frame rate (absent stalls).
7304          </details>
7305          <hal_details>
7306          If possible, it is recommended that all non-JPEG formats
7307          (such as RAW16) should not have a stall duration. RAW10, RAW12, RAW_OPAQUE
7308          and IMPLEMENTATION_DEFINED must not have stall durations.
7309          </hal_details>
7310          <tag id="V1" />
7311        </entry>
7312        <entry name="streamConfigurationMap" type="int32" visibility="java_public"
7313               synthetic="true" typedef="streamConfigurationMap"
7314               hwlevel="legacy">
7315          <description>The available stream configurations that this
7316          camera device supports; also includes the minimum frame durations
7317          and the stall durations for each format/size combination.
7318          </description>
7319          <details>
7320          All camera devices will support sensor maximum resolution (defined by
7321          android.sensor.info.activeArraySize) for the JPEG format.
7322
7323          For a given use case, the actual maximum supported resolution
7324          may be lower than what is listed here, depending on the destination
7325          Surface for the image data. For example, for recording video,
7326          the video encoder chosen may have a maximum size limit (e.g. 1080p)
7327          smaller than what the camera (e.g. maximum resolution is 3264x2448)
7328          can provide.
7329
7330          Please reference the documentation for the image data destination to
7331          check if it limits the maximum size for image data.
7332
7333          The following table describes the minimum required output stream
7334          configurations based on the hardware level
7335          (android.info.supportedHardwareLevel):
7336
7337          Format                                             | Size                                         | Hardware Level | Notes
7338          :-------------------------------------------------:|:--------------------------------------------:|:--------------:|:--------------:
7339          {@link android.graphics.ImageFormat#JPEG}          | android.sensor.info.activeArraySize (*1)     | Any            |
7340          {@link android.graphics.ImageFormat#JPEG}          | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
7341          {@link android.graphics.ImageFormat#JPEG}          | 1280x720 (720p)                               | Any            | if 720p &lt;= activeArraySize
7342          {@link android.graphics.ImageFormat#JPEG}          | 640x480 (480p)                               | Any            | if 480p &lt;= activeArraySize
7343          {@link android.graphics.ImageFormat#JPEG}          | 320x240 (240p)                               | Any            | if 240p &lt;= activeArraySize
7344          {@link android.graphics.ImageFormat#YUV_420_888}   | all output sizes available for JPEG          | FULL           |
7345          {@link android.graphics.ImageFormat#YUV_420_888}   | all output sizes available for JPEG, up to the maximum video size | LIMITED        |
7346          {@link android.graphics.ImageFormat#PRIVATE}       | same as YUV_420_888                          | Any            |
7347
7348          Refer to android.request.availableCapabilities and {@link
7349          android.hardware.camera2.CameraDevice#createCaptureSession} for additional mandatory
7350          stream configurations on a per-capability basis.
7351
7352          *1: For JPEG format, the sizes may be restricted by below conditions:
7353
7354          * The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones
7355          (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution
7356          (defined by android.sensor.info.activeArraySize) has an aspect ratio other than these,
7357          it does not have to be included in the supported JPEG sizes.
7358          * Some hardware JPEG encoders may have pixel boundary alignment requirements, such as
7359          the dimensions being a multiple of 16.
7360          Therefore, the maximum JPEG size may be smaller than sensor maximum resolution.
7361          However, the largest JPEG size will be as close as possible to the sensor maximum
7362          resolution given above constraints. It is required that after aspect ratio adjustments,
7363          additional size reduction due to other issues must be less than 3% in area. For example,
7364          if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect
7365          ratio 4:3, and the JPEG encoder alignment requirement is 16, the maximum JPEG size will be
7366          3264x2448.
7367
7368          Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability on
7369          downscaling from larger resolution to smaller ones, and the QCIF resolution can sometimes
7370          not be fully supported due to this limitation on devices with high-resolution image
7371          sensors. Therefore, trying to configure a QCIF resolution stream together with any other
7372          stream larger than 1920x1080 resolution (either width or height) might not be supported,
7373          and capture session creation will fail if it is not.
7374
7375          </details>
7376          <hal_details>
7377          Do not set this property directly
7378          (it is synthetic and will not be available at the HAL layer);
7379          set the android.scaler.availableStreamConfigurations instead.
7380
7381          Not all output formats may be supported in a configuration with
7382          an input stream of a particular format. For more details, see
7383          android.scaler.availableInputOutputFormatsMap.
7384
7385          It is recommended (but not mandatory) to also include half/quarter
7386          of sensor maximum resolution for JPEG formats (regardless of hardware
7387          level).
7388
7389          (The following is a rewording of the above required table):
7390
7391          The HAL must include sensor maximum resolution (defined by
7392          android.sensor.info.activeArraySize).
7393
7394          For FULL capability devices (`android.info.supportedHardwareLevel == FULL`),
7395          the HAL must include all YUV_420_888 sizes that have JPEG sizes listed
7396          here as output streams.
7397
7398          It must also include each below resolution if it is smaller than or
7399          equal to the sensor maximum resolution (for both YUV_420_888 and JPEG
7400          formats), as output streams:
7401
7402          * 240p (320 x 240)
7403          * 480p (640 x 480)
7404          * 720p (1280 x 720)
7405          * 1080p (1920 x 1080)
7406
7407          For LIMITED capability devices
7408          (`android.info.supportedHardwareLevel == LIMITED`),
7409          the HAL only has to list up to the maximum video size
7410          supported by the device.
7411
7412          Regardless of hardware level, every output resolution available for
7413          YUV_420_888 must also be available for IMPLEMENTATION_DEFINED.
7414
7415          This supercedes the following fields, which are now deprecated:
7416
7417          * availableFormats
7418          * available[Processed,Raw,Jpeg]Sizes
7419          </hal_details>
7420        </entry>
7421        <entry name="croppingType" type="byte" visibility="public" enum="true"
7422               hwlevel="legacy">
7423          <enum>
7424            <value>CENTER_ONLY
7425              <notes>
7426                The camera device only supports centered crop regions.
7427              </notes>
7428            </value>
7429            <value>FREEFORM
7430              <notes>
7431                The camera device supports arbitrarily chosen crop regions.
7432              </notes>
7433            </value>
7434          </enum>
7435          <description>The crop type that this camera device supports.</description>
7436          <details>
7437          When passing a non-centered crop region (android.scaler.cropRegion) to a camera
7438          device that only supports CENTER_ONLY cropping, the camera device will move the
7439          crop region to the center of the sensor active array (android.sensor.info.activeArraySize)
7440          and keep the crop region width and height unchanged. The camera device will return the
7441          final used crop region in metadata result android.scaler.cropRegion.
7442
7443          Camera devices that support FREEFORM cropping will support any crop region that
7444          is inside of the active array. The camera device will apply the same crop region and
7445          return the final used crop region in capture result metadata android.scaler.cropRegion.
7446
7447          Starting from API level 30,
7448
7449          * If the camera device supports FREEFORM cropping, in order to do FREEFORM cropping, the
7450          application must set android.control.zoomRatio to 1.0, and use android.scaler.cropRegion
7451          for zoom.
7452          * To do CENTER_ONLY zoom, the application has below 2 options:
7453              1. Set android.control.zoomRatio to 1.0; adjust zoom by android.scaler.cropRegion.
7454              2. Adjust zoom by android.control.zoomRatio; use android.scaler.cropRegion to crop
7455              the field of view vertically (letterboxing) or horizontally (pillarboxing), but not
7456              windowboxing.
7457          * Setting android.control.zoomRatio to values different than 1.0 and
7458          android.scaler.cropRegion to be windowboxing at the same time are not supported. In this
7459          case, the camera framework will override the android.scaler.cropRegion to be the active
7460          array.
7461
7462          LEGACY capability devices will only support CENTER_ONLY cropping.
7463          </details>
7464          <hal_details>
7465          If the HAL supports android.control.zoomRatio, this tag must be set to CENTER_ONLY.
7466          </hal_details>
7467        </entry>
7468        <entry name="availableRecommendedStreamConfigurations" type="int32" visibility="ndk_public"
7469            optional="true" enum="true" container="array" typedef="recommendedStreamConfiguration"
7470            hal_version="3.4">
7471          <array>
7472            <size>n</size>
7473            <size>5</size>
7474          </array>
7475          <enum>
7476            <value id="0x0">PREVIEW
7477            <notes>
7478                Preview must only include non-stalling processed stream configurations with
7479                output formats like
7480                {@link android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888},
7481                {@link android.graphics.ImageFormat#PRIVATE|AIMAGE_FORMAT_PRIVATE}, etc.
7482            </notes>
7483            </value>
7484            <value id="0x1">RECORD
7485            <notes>
7486                Video record must include stream configurations that match the advertised
7487                supported media profiles {@link android.media.CamcorderProfile} with
7488                IMPLEMENTATION_DEFINED format.
7489            </notes>
7490            </value>
7491            <value id="0x2">VIDEO_SNAPSHOT
7492            <notes>
7493                Video snapshot must include stream configurations at least as big as
7494                the maximum RECORD resolutions and only with
7495                {@link android.graphics.ImageFormat#JPEG|AIMAGE_FORMAT_JPEG JPEG output format}.
7496                Additionally the configurations shouldn't cause preview glitches and also be able to
7497                run at 30 fps.
7498            </notes>
7499            </value>
7500            <value id="0x3">SNAPSHOT
7501            <notes>
7502                Recommended snapshot stream configurations must include at least one with
7503                size close to android.sensor.info.activeArraySize and
7504                {@link android.graphics.ImageFormat#JPEG|AIMAGE_FORMAT_JPEG JPEG output format}.
7505                Taking into account restrictions on aspect ratio, alignment etc. the area of the
7506                maximum suggested size shouldn’t be less than 97% of the sensor array size area.
7507            </notes>
7508            </value>
7509            <value id="0x4">ZSL
7510            <notes>
7511                If supported, recommended input stream configurations must only be advertised with
7512                ZSL along with other processed and/or stalling output formats.
7513            </notes>
7514            </value>
7515            <value id="0x5">RAW
7516            <notes>
7517                If supported, recommended raw stream configurations must only include RAW based
7518                output formats.
7519            </notes>
7520            </value>
7521            <value id="0x6">LOW_LATENCY_SNAPSHOT
7522            <notes>
7523                If supported, the recommended low latency stream configurations must have
7524                end-to-end latency that does not exceed 200 ms. under standard operating conditions
7525                (reasonable light levels, not loaded system) and using template
7526                TEMPLATE_STILL_CAPTURE. This is primarily for listing configurations for the
7527                {@link android.graphics.ImageFormat#JPEG|AIMAGE_FORMAT_JPEG JPEG output format}
7528                however other supported output formats can be added as well.
7529            </notes>
7530            </value>
7531            <value id="0x7">PUBLIC_END
7532            </value>
7533            <value id="0x18">VENDOR_START
7534            <notes>
7535                Vendor defined use cases. These depend on the vendor implementation.
7536            </notes>
7537            </value>
7538          </enum>
7539          <description>Recommended stream configurations for common client use cases.
7540          </description>
7541          <details>Optional subset of the android.scaler.availableStreamConfigurations that contains
7542          similar tuples listed as
7543          (i.e. width, height, format, output/input stream, usecase bit field).
7544          Camera devices will be able to suggest particular stream configurations which are
7545          power and performance efficient for specific use cases. For more information about
7546          retrieving the suggestions see
7547          {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap}.
7548          </details>
7549          <ndk_details>
7550          The data representation is int[5], which maps to
7551          (width, height, format, output/input stream, usecase bit field). The array can be
7552          parsed using the following pseudo code:
7553
7554          struct StreamConfiguration {
7555          int32_t format;
7556          int32_t width;
7557          int32_t height;
7558          int32_t isInput; };
7559
7560          void getPreferredStreamConfigurations(
7561              int32_t *array, size_t count, int32_t usecaseId,
7562              Vector &lt; StreamConfiguration &gt; * scs) {
7563              const size_t STREAM_CONFIGURATION_SIZE = 5;
7564              const size_t STREAM_WIDTH_OFFSET = 0;
7565              const size_t STREAM_HEIGHT_OFFSET = 1;
7566              const size_t STREAM_FORMAT_OFFSET = 2;
7567              const size_t STREAM_IS_INPUT_OFFSET = 3;
7568              const size_t STREAM_USECASE_BITMAP_OFFSET = 4;
7569
7570              for (size_t i = 0; i &lt; count; i+= STREAM_CONFIGURATION_SIZE) {
7571                  int32_t width = array[i + STREAM_WIDTH_OFFSET];
7572                  int32_t height = array[i + STREAM_HEIGHT_OFFSET];
7573                  int32_t format = array[i + STREAM_FORMAT_OFFSET];
7574                  int32_t isInput = array[i + STREAM_IS_INPUT_OFFSET];
7575                  int32_t supportedUsecases = array[i + STREAM_USECASE_BITMAP_OFFSET];
7576                  if (supportedUsecases &amp; (1 &lt;&lt; usecaseId)) {
7577                      StreamConfiguration sc = {format, width, height, isInput};
7578                      scs->add(sc);
7579                  }
7580              }
7581          }
7582
7583          </ndk_details>
7584          <hal_details>
7585          There are some requirements that need to be considered regarding the usecases and the
7586          suggested configurations:
7587
7588          * If android.scaler.availableRecommendedStreamConfigurations is set, then recommended
7589          stream configurations must be present for all mandatory usecases PREVIEW,
7590          SNAPSHOT, RECORD, VIDEO_SNAPSHOT. ZSL and RAW are
7591          required depending on device capabilities see android.request.availableCapabilities.
7592          * Non-existing usecases and non-vendor usecases within the range
7593          (RAW : VENDOR_START] are prohibited as well as stream configurations not
7594          present in the exhaustive android.scaler.availableStreamConfigurations list.
7595
7596          For example, in case the camera device supports only 4K and 1080p and both resolutions are
7597          recommended for the mandatory usecases except preview which can run efficiently only
7598          on 1080p. The array may look like this:
7599
7600          [3840, 2160, HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,
7601           ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT,
7602           (1&lt;&lt; ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RECORD |
7603           1&lt;&lt; ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_SNAPSHOT |
7604           1&lt;&lt; ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VIDEO_SNAPSHOT),
7605
7606           1920, 1080, HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED,
7607           ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_OUTPUT,
7608           (1&lt;&lt; ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_PREVIEW |
7609           1&lt;&lt; ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_RECORD |
7610           1&lt;&lt; ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_SNAPSHOT |
7611           1&lt;&lt; ANDROID_SCALER_AVAILABLE_RECOMMENDED_STREAM_CONFIGURATIONS_VIDEO_SNAPSHOT)]
7612
7613          </hal_details>
7614        </entry>
7615        <entry name="availableRecommendedInputOutputFormatsMap" type="int32" visibility="ndk_public"
7616          optional="true" typedef="reprocessFormatsMap" hal_version="3.4">
7617          <description>Recommended mappings of image formats that are supported by this
7618          camera device for input streams, to their corresponding output formats.
7619          </description>
7620          <details>
7621          This is a recommended subset of the complete list of mappings found in
7622          android.scaler.availableInputOutputFormatsMap. The same requirements apply here as well.
7623          The list however doesn't need to contain all available and supported mappings. Instead of
7624          this developers must list only recommended and efficient entries.
7625          If set, the information will be available in the ZERO_SHUTTER_LAG recommended stream
7626          configuration see
7627          {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap}.
7628          </details>
7629          <hal_details>
7630          For a code sample of the required data encoding please check
7631          android.scaler.availableInputOutputFormatsMap.
7632          </hal_details>
7633          <tag id="REPROC" />
7634        </entry>
7635        <entry name="mandatoryStreamCombinations" type="int32" visibility="java_public"
7636          synthetic="true" container="array" typedef="mandatoryStreamCombination" hwlevel="limited">
7637          <array>
7638            <size>n</size>
7639          </array>
7640          <description>
7641          An array of mandatory stream combinations generated according to the camera device
7642          {@link android.hardware.camera2.CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL}
7643          and {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES}.
7644          This is an app-readable conversion of the mandatory stream combination
7645          {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.
7646          </description>
7647          <details>
7648          The array of
7649          {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
7650          generated according to the documented
7651          {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} based on
7652          specific device level and capabilities.
7653          Clients can use the array as a quick reference to find an appropriate camera stream
7654          combination.
7655          As per documentation, the stream combinations with given PREVIEW, RECORD and
7656          MAXIMUM resolutions and anything smaller from the list given by
7657          {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes} are
7658          guaranteed to work.
7659          For a physical camera not independently exposed in
7660          {@link android.hardware.camera2.CameraManager#getCameraIdList}, the mandatory stream
7661          combinations for that physical camera Id are also generated, so that the application can
7662          configure them as physical streams via the logical camera.
7663          The mandatory stream combination array will be {@code null} in case the device is not
7664          backward compatible.
7665          </details>
7666          <hal_details>
7667          Do not set this property directly
7668          (it is synthetic and will not be available at the HAL layer).
7669          </hal_details>
7670        </entry>
7671        <entry name="mandatoryConcurrentStreamCombinations" type="int32" visibility="java_public"
7672          synthetic="true" container="array" typedef="mandatoryStreamCombination">
7673          <array>
7674            <size>n</size>
7675          </array>
7676          <description>
7677          An array of mandatory concurrent stream combinations.
7678          This is an app-readable conversion of the concurrent mandatory stream combination
7679          {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.
7680          </description>
7681          <details>
7682          The array of
7683          {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
7684          generated according to the documented
7685          {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for each
7686          device which has its Id present in the set returned by
7687          {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds}.
7688          Clients can use the array as a quick reference to find an appropriate camera stream
7689          combination.
7690          The mandatory stream combination array will be {@code null} in case the device is not a
7691          part of at least one set of combinations returned by
7692          {@link android.hardware.camera2.CameraManager#getConcurrentCameraIds}.
7693          </details>
7694          <hal_details>
7695          Do not set this property directly
7696          (it is synthetic and will not be available at the HAL layer).
7697          </hal_details>
7698        </entry>
7699        <entry name="availableRotateAndCropModes" type="byte" visibility="public"
7700               type_notes="list of enums" container="array" typedef="enumList"
7701               hal_version="3.5">
7702          <array>
7703            <size>n</size>
7704          </array>
7705          <description>
7706            List of rotate-and-crop modes for android.scaler.rotateAndCrop that are supported by this camera device.
7707          </description>
7708          <range>Any value listed in android.scaler.rotateAndCrop</range>
7709          <details>
7710            This entry lists the valid modes for android.scaler.rotateAndCrop for this camera device.
7711
7712            Starting with API level 30, all devices will list at least `ROTATE_AND_CROP_NONE`.
7713            Devices with support for rotate-and-crop will additionally list at least
7714            `ROTATE_AND_CROP_AUTO` and `ROTATE_AND_CROP_90`.
7715          </details>
7716        </entry>
7717      </static>
7718      <controls>
7719        <entry name="rotateAndCrop" type="byte" visibility="public" enum="true"
7720               hal_version="3.5">
7721          <enum>
7722            <value>NONE
7723              <notes>No rotate and crop is applied. Processed outputs are in the sensor orientation.
7724              </notes>
7725            </value>
7726            <value>90
7727              <notes>Processed images are rotated by 90 degrees clockwise, and then cropped
7728               to the original aspect ratio.</notes>
7729            </value>
7730            <value>180
7731              <notes>Processed images are rotated by 180 degrees.  Since the aspect ratio does not
7732              change, no cropping is performed.</notes>
7733            </value>
7734            <value>270
7735              <notes>Processed images are rotated by 270 degrees clockwise, and then cropped
7736               to the original aspect ratio.</notes>
7737            </value>
7738            <value>AUTO
7739              <notes>The camera API automatically selects the best concrete value for
7740              rotate-and-crop based on the application's support for resizability and the current
7741              multi-window mode.
7742
7743              If the application does not support resizing but the display mode for its main
7744              Activity is not in a typical orientation, the camera API will set `ROTATE_AND_CROP_90`
7745              or some other supported rotation value, depending on device configuration,
7746              to ensure preview and captured images are correctly shown to the user. Otherwise,
7747              `ROTATE_AND_CROP_NONE` will be selected.
7748
7749              When a value other than NONE is selected, several metadata fields will also be parsed
7750              differently to ensure that coordinates are correctly handled for features like drawing
7751              face detection boxes or passing in tap-to-focus coordinates.  The camera API will
7752              convert positions in the active array coordinate system to/from the cropped-and-rotated
7753              coordinate system to make the operation transparent for applications.
7754
7755              No coordinate mapping will be done when the application selects a non-AUTO mode.
7756              </notes>
7757            </value>
7758          </enum>
7759          <description>Whether a rotation-and-crop operation is applied to processed
7760          outputs from the camera.</description>
7761          <range>android.scaler.availableRotateAndCropModes</range>
7762          <details>
7763            This control is primarily intended to help camera applications with no support for
7764            multi-window modes to work correctly on devices where multi-window scenarios are
7765            unavoidable, such as foldables or other devices with variable display geometry or more
7766            free-form window placement (such as laptops, which often place portrait-orientation apps
7767            in landscape with pillarboxing).
7768
7769            If supported, the default value is `ROTATE_AND_CROP_AUTO`, which allows the camera API
7770            to enable backwards-compatibility support for applications that do not support resizing
7771            / multi-window modes, when the device is in fact in a multi-window mode (such as inset
7772            portrait on laptops, or on a foldable device in some fold states).  In addition,
7773            `ROTATE_AND_CROP_NONE` and `ROTATE_AND_CROP_90` will always be available if this control
7774            is supported by the device.  If not supported, devices API level 30 or higher will always
7775            list only `ROTATE_AND_CROP_NONE`.
7776
7777            When `CROP_AUTO` is in use, and the camera API activates backward-compatibility mode,
7778            several metadata fields will also be parsed differently to ensure that coordinates are
7779            correctly handled for features like drawing face detection boxes or passing in
7780            tap-to-focus coordinates.  The camera API will convert positions in the active array
7781            coordinate system to/from the cropped-and-rotated coordinate system to make the
7782            operation transparent for applications.  The following controls are affected:
7783
7784            *  android.control.aeRegions
7785            *  android.control.afRegions
7786            *  android.control.awbRegions
7787            *  android.statistics.faces
7788
7789            Capture results will contain the actual value selected by the API;
7790            `ROTATE_AND_CROP_AUTO` will never be seen in a capture result.
7791
7792            Applications can also select their preferred cropping mode, either to opt out of the
7793            backwards-compatibility treatment, or to use the cropping feature themselves as needed.
7794            In this case, no coordinate translation will be done automatically, and all controls
7795            will continue to use the normal active array coordinates.
7796
7797            Cropping and rotating is done after the application of digital zoom (via either
7798            android.scaler.cropRegion or android.control.zoomRatio), but before each individual
7799            output is further cropped and scaled. It only affects processed outputs such as
7800            YUV, PRIVATE, and JPEG.  It has no effect on RAW outputs.
7801
7802            When `CROP_90` or `CROP_270` are selected, there is a significant loss to the field of
7803            view. For example, with a 4:3 aspect ratio output of 1600x1200, `CROP_90` will still
7804            produce 1600x1200 output, but these buffers are cropped from a vertical 3:4 slice at the
7805            center of the 4:3 area, then rotated to be 4:3, and then upscaled to 1600x1200.  Only
7806            56.25% of the original FOV is still visible.  In general, for an aspect ratio of `w:h`,
7807            the crop and rotate operation leaves `(h/w)^2` of the field of view visible. For 16:9,
7808            this is ~31.6%.
7809
7810            As a visual example, the figure below shows the effect of `ROTATE_AND_CROP_90` on the
7811            outputs for the following parameters:
7812
7813            * Sensor active array: `2000x1500`
7814            * Crop region: top-left: `(500, 375)`, size: `(1000, 750)` (4:3 aspect ratio)
7815            * Output streams: YUV `640x480` and YUV `1280x720`
7816            * `ROTATE_AND_CROP_90`
7817
7818            ![Effect of ROTATE_AND_CROP_90](android.scaler.rotateAndCrop/crop-region-rotate-90-43-ratio.png)
7819
7820            With these settings, the regions of the active array covered by the output streams are:
7821
7822            * 640x480 stream crop: top-left: `(219, 375)`, size: `(562, 750)`
7823            * 1280x720 stream crop: top-left: `(289, 375)`, size: `(422, 750)`
7824
7825            Since the buffers are rotated, the buffers as seen by the application are:
7826
7827            * 640x480 stream: top-left: `(781, 375)` on active array, size: `(640, 480)`, downscaled 1.17x from sensor pixels
7828            * 1280x720 stream: top-left: `(711, 375)` on active array, size: `(1280, 720)`, upscaled 1.71x from sensor pixels
7829          </details>
7830          <hal_details>
7831            ROTATE_AND_CROP_AUTO will never be sent to the HAL, though it must be set as the default
7832            value in all the capture request templates by the HAL.  The camera service will
7833            translate AUTO to a specific rotation value based on the current application's
7834            multi-window state and its support of resizability.
7835
7836            The HAL also does not need to consider coordinate transforms for ROTATE_AND_CROP - all
7837            capture request and result fields should be kept in the active array coordinate frame.
7838            Any translation required to implement ROTATE_AND_CROP_AUTO will be handled by the camera
7839            service.
7840          </hal_details>
7841        </entry>
7842      </controls>
7843      <dynamic>
7844        <clone entry="android.scaler.rotateAndCrop" kind="controls" hal_version="3.5">
7845        </clone>
7846      </dynamic>
7847      <static>
7848        <entry name="defaultSecureImageSize" type="int32" visibility="public"
7849               type_notes="width/height for the default secure image data size" container="array"
7850               typedef="size" hal_version="3.6">
7851          <array>
7852            <size>2</size>
7853          </array>
7854          <description>
7855            Default YUV/PRIVATE size to use for requesting secure image buffers.
7856          </description>
7857          <units>Pixels</units>
7858          <details>
7859            This entry lists the default size supported in the secure camera mode. This entry is
7860            optional on devices support the SECURE_IMAGE_DATA capability. This entry will be null
7861            if the camera device does not list SECURE_IMAGE_DATA capability.
7862
7863            When the key is present, only a PRIVATE/YUV output of the specified size is guaranteed
7864            to be supported by the camera HAL in the secure camera mode. Any other format or
7865            resolutions might not be supported. Use
7866            {@link CameraDevice#isSessionConfigurationSupported|ACameraDevice_isSessionConfigurationSupported}
7867            API to query if a secure session configuration is supported if the device supports this
7868            API.
7869
7870            If this key returns null on a device with SECURE_IMAGE_DATA capability, the application
7871            can assume all output sizes listed in the
7872            {@link
7873            android.hardware.camera2.params.StreamConfigurationMap|ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}
7874            are supported.
7875          </details>
7876        </entry>
7877        <entry name="physicalCameraMultiResolutionStreamConfigurations" type="int32"
7878               visibility="ndk_public" optional="true" enum="true" container="array"
7879               typedef="streamConfiguration" hwlevel="limited" hal_version="3.6">
7880          <array>
7881            <size>n</size>
7882            <size>4</size>
7883          </array>
7884          <enum>
7885            <value>OUTPUT</value>
7886            <value>INPUT</value>
7887          </enum>
7888          <description>The available multi-resolution stream configurations that this
7889          physical camera device supports
7890          (i.e. format, width, height, output/input stream).
7891          </description>
7892          <details>
7893          This list contains a subset of the parent logical camera's multi-resolution stream
7894          configurations which belong to this physical camera, and it will advertise and will only
7895          advertise the maximum supported resolutions for a particular format.
7896
7897          If this camera device isn't a physical camera device constituting a logical camera,
7898          but a standalone {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
7899          camera, this field represents the multi-resolution input/output stream configurations of
7900          default mode and max resolution modes. The sizes will be the maximum resolution of a
7901          particular format for default mode and max resolution mode.
7902
7903          This field will only be advertised if the device is a physical camera of a
7904          logical multi-camera device or an ultra high resolution sensor camera. For a logical
7905          multi-camera, the camera API will derive the logical camera’s multi-resolution stream
7906          configurations from all physical cameras. For an ultra high resolution sensor camera, this
7907          is used directly as the camera’s multi-resolution stream configurations.
7908          </details>
7909          <hal_details>
7910          If this field contains input stream configurations, and the camera device is a physical
7911          camera (not a standalone ultra-high resolution camera), the
7912          android.logicalMultiCamera.activePhysicalId tag must be set to the physical camera Id in
7913          the physical camera result metadata. This is to make sure during multi-resolution
7914          reprocessing, the camera HAL is notified of which physical camera the reprocessing
7915          request comes from.
7916          </hal_details>
7917        </entry>
7918        <entry name="multiResolutionStreamConfigurationMap" type="int32" visibility="java_public"
7919               synthetic="true" optional="true" typedef="multiResolutionStreamConfigurationMap">
7920          <description>The multi-resolution stream configurations supported by this logical camera
7921          or ultra high resolution sensor camera device.
7922          </description>
7923          <details>
7924          Multi-resolution streams can be used by a LOGICAL_MULTI_CAMERA or an
7925          ULTRA_HIGH_RESOLUTION_SENSOR camera where the images sent or received can vary in
7926          resolution per frame. This is useful in cases where the camera device's effective full
7927          resolution changes depending on factors such as the current zoom level, lighting
7928          condition, focus distance, or pixel mode.
7929
7930          * For a logical multi-camera implementing optical zoom, at different zoom level, a
7931          different physical camera may be active, resulting in different full-resolution image
7932          sizes.
7933          * For an ultra high resolution camera, depending on whether the camera operates in default
7934          mode, or maximum resolution mode, the output full-size images may be of either binned
7935          resolution or maximum resolution.
7936
7937          To use multi-resolution output streams, the supported formats can be queried by {@link
7938          android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputFormats}.
7939          A {@link android.hardware.camera2.MultiResolutionImageReader} can then be created for a
7940          supported format with the MultiResolutionStreamInfo group queried by {@link
7941          android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputInfo}.
7942
7943          If a camera device supports multi-resolution output streams for a particular format, for
7944          each of its mandatory stream combinations, the camera device will support using a
7945          MultiResolutionImageReader for the MAXIMUM stream of supported formats. Refer to
7946          {@link android.hardware.camera2.CameraDevice#createCaptureSession} for additional details.
7947
7948          To use multi-resolution input streams, the supported formats can be queried by {@link
7949          android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getInputFormats}.
7950          A reprocessable CameraCaptureSession can then be created using an {@link
7951          android.hardware.camera2.params.InputConfiguration InputConfiguration} constructed with
7952          the input MultiResolutionStreamInfo group, queried by {@link
7953          android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getInputInfo}.
7954
7955          If a camera device supports multi-resolution {@code YUV} input and multi-resolution
7956          {@code YUV} output, or multi-resolution {@code PRIVATE} input and multi-resolution
7957          {@code PRIVATE} output, {@code JPEG} and {@code YUV} are guaranteed to be supported
7958          multi-resolution output stream formats. Refer to
7959          {@link android.hardware.camera2.CameraDevice#createCaptureSession} for
7960          details about the additional mandatory stream combinations in this case.
7961          </details>
7962          <hal_details>
7963          Do not set this property directly
7964          (it is synthetic and will not be available at the HAL layer).
7965          </hal_details>
7966        </entry>
7967        <entry name="availableStreamConfigurationsMaximumResolution" type="int32"
7968              visibility="ndk_public" enum="true" container="array" typedef="streamConfiguration"
7969              hal_version="3.6">
7970          <array>
7971            <size>n</size>
7972            <size>4</size>
7973          </array>
7974          <enum>
7975            <value>OUTPUT</value>
7976            <value>INPUT</value>
7977          </enum>
7978          <description>The available stream configurations that this
7979            camera device supports (i.e. format, width, height, output/input stream) for a
7980            CaptureRequest with android.sensor.pixelMode set to
7981            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
7982          </description>
7983          <details>
7984          Analogous to android.scaler.availableStreamConfigurations, for configurations
7985          which are applicable when android.sensor.pixelMode is set to
7986          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
7987
7988          Not all output formats may be supported in a configuration with
7989          an input stream of a particular format. For more details, see
7990          android.scaler.availableInputOutputFormatsMapMaximumResolution.
7991          </details>
7992          <hal_details>
7993            Refer to hal_details for android.scaler.availableStreamConfigurations.
7994          </hal_details>
7995        </entry>
7996        <entry name="availableMinFrameDurationsMaximumResolution" type="int64" visibility="ndk_public"
7997               container="array" typedef="streamConfigurationDuration" hal_version="3.6">
7998          <array>
7999            <size>4</size>
8000            <size>n</size>
8001          </array>
8002          <description>This lists the minimum frame duration for each
8003            format/size combination when the camera device is sent a CaptureRequest with
8004            android.sensor.pixelMode set to
8005            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8006          </description>
8007          <units>(format, width, height, ns) x n</units>
8008          <details>
8009          Analogous to android.scaler.availableMinFrameDurations, for configurations
8010          which are applicable when android.sensor.pixelMode is set to
8011          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8012
8013          When multiple streams are used in a request (if supported, when android.sensor.pixelMode
8014          is set to
8015          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}), the
8016          minimum frame duration will be max(individual stream min durations).
8017
8018          See android.sensor.frameDuration and
8019          android.scaler.availableStallDurationsMaximumResolution for more details about
8020          calculating the max frame rate.
8021          </details>
8022        </entry>
8023        <entry name="availableStallDurationsMaximumResolution" type="int64" visibility="ndk_public"
8024               container="array" typedef="streamConfigurationDuration" hal_version="3.6">
8025          <array>
8026            <size>4</size>
8027            <size>n</size>
8028          </array>
8029          <description>This lists the maximum stall duration for each
8030            output format/size combination when CaptureRequests are submitted with
8031            android.sensor.pixelMode set to
8032            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}
8033          </description>
8034          <units>(format, width, height, ns) x n</units>
8035          <details>
8036          Analogous to android.scaler.availableMinFrameDurations, for configurations
8037          which are applicable when android.sensor.pixelMode is set to
8038          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8039          </details>
8040          <hal_details>
8041          If possible, it is recommended that all non-JPEG formats
8042          (such as RAW16) should not have a stall duration. RAW10, RAW12, RAW_OPAQUE
8043          and IMPLEMENTATION_DEFINED must not have stall durations.
8044          </hal_details>
8045        </entry>
8046        <entry name="streamConfigurationMapMaximumResolution" type="int32" visibility="java_public"
8047               synthetic="true" typedef="streamConfigurationMap">
8048          <description>The available stream configurations that this
8049            camera device supports when given a CaptureRequest with android.sensor.pixelMode
8050            set to
8051            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION};
8052            also includes the minimum frame durations
8053            and the stall durations for each format/size combination.
8054          </description>
8055          <details>
8056          Analogous to android.scaler.streamConfigurationMap for CaptureRequests where
8057          android.sensor.pixelMode is
8058          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8059          </details>
8060          <hal_details>
8061          Do not set this property directly
8062          (it is synthetic and will not be available at the HAL layer);
8063          set the android.scaler.availableStreamConfigurationsMaximumResolution instead.
8064
8065          Not all output formats may be supported in a configuration with
8066          an input stream of a particular format. For more details, see
8067          android.scaler.availableInputOutputFormatsMapMaximumResolution.
8068          </hal_details>
8069        </entry>
8070        <entry name="availableInputOutputFormatsMapMaximumResolution" type="int32"
8071          visibility="hidden" typedef="reprocessFormatsMap" hal_version="3.6">
8072          <description>The mapping of image formats that are supported by this
8073          camera device for input streams, to their corresponding output formats, when
8074          android.sensor.pixelMode is set to
8075          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8076          </description>
8077          <details>
8078          Analogous to android.scaler.availableInputOutputFormatsMap for CaptureRequests where
8079          android.sensor.pixelMode is
8080          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8081          </details>
8082          <hal_details>
8083          Refer to hal details for android.scaler.availableInputOutputFormatsMapMaximumResolution.
8084          </hal_details>
8085          <tag id="REPROC" />
8086        </entry>
8087        <entry name="mandatoryMaximumResolutionStreamCombinations" type="int32"
8088          visibility="java_public" synthetic="true" container="array"
8089          typedef="mandatoryStreamCombination">
8090          <array>
8091            <size>n</size>
8092          </array>
8093          <description>
8094          An array of mandatory stream combinations which are applicable when
8095          {@link android.hardware.camera2.CaptureRequest} has android.sensor.pixelMode set
8096          to {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8097          This is an app-readable conversion of the maximum resolution mandatory stream combination
8098          {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.
8099          </description>
8100          <details>
8101          The array of
8102          {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
8103          generated according to the documented
8104          {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for each
8105          device which has the
8106          {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
8107          capability.
8108          Clients can use the array as a quick reference to find an appropriate camera stream
8109          combination.
8110          The mandatory stream combination array will be {@code null} in case the device is not an
8111          {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
8112          device.
8113          </details>
8114          <hal_details>
8115          Do not set this property directly
8116          (it is synthetic and will not be available at the HAL layer).
8117          </hal_details>
8118        </entry>
8119        <entry name="multiResolutionStreamSupported" type="byte" visibility="ndk_public" enum="true"
8120          typedef="boolean" hwlevel="limited" hal_version="3.6">
8121          <enum>
8122            <value>FALSE</value>
8123            <value>TRUE</value>
8124          </enum>
8125          <description>Whether the camera device supports multi-resolution input or output streams
8126          </description>
8127          <details>
8128          A logical multi-camera or an ultra high resolution camera may support multi-resolution
8129          input or output streams. With multi-resolution output streams, the camera device is able
8130          to output different resolution images depending on the current active physical camera or
8131          pixel mode. With multi-resolution input streams, the camera device can reprocess images
8132          of different resolutions from different physical cameras or sensor pixel modes.
8133
8134          When set to TRUE:
8135          * For a logical multi-camera, the camera framework derives
8136          android.scaler.multiResolutionStreamConfigurationMap by combining the
8137          android.scaler.physicalCameraMultiResolutionStreamConfigurations from its physical
8138          cameras.
8139          * For an ultra-high resolution sensor camera, the camera framework directly copies
8140          the value of android.scaler.physicalCameraMultiResolutionStreamConfigurations to
8141          android.scaler.multiResolutionStreamConfigurationMap.
8142          </details>
8143          <hal_details>
8144          For the HAL to claim support for multi-resolution streams:
8145          * The HAL must support the buffer management API by setting
8146          supportedBufferManagementVersion to HIDL_DEVICE_3_5.
8147          * For a logical multi-camera, when combined from all its physical cameras, there must be
8148          at a minimum one input or output stream format with at least two different
8149          physicalCameraMultiResolutionStreamConfigurations entries for that format.
8150          * For an ultra high resolution sensor camera, for each supported multi-resolution format,
8151          the physicalCameraMultiResolutionStreamConfigurations must contain both the largest stream
8152          configuration within the android.scaler.streamConfigurationMap and the largest stream
8153          configuration within the android.scaler.streamConfigurationMapMaximumResolution.
8154          * If the HAL advertises multi-resolution input stream support for a particular format
8155          (namely PRIVATE, or YUV), the logical multi-camera or ultra high resolution sensor camera
8156          must have the corresponding reprocessing capabilities (PRIVATE_REPROCESSING,
8157          or YUV_REPROCESSING respectively). The camera HAL must support reprocessing the
8158          multi-resolution input stream to the output formats specified in the camera's
8159          android.scaler.availableInputOutputFormatsMap.
8160          </hal_details>
8161        </entry>
8162      </static>
8163      <controls>
8164        <entry name="cropRegionSet" type="byte" visibility="fwk_only"
8165               enum="true" typedef="boolean">
8166          <enum>
8167            <value>TRUE
8168            <notes>Crop region (android.scaler.cropRegion) has been set by the
8169              camera client.
8170            </notes>
8171            </value>
8172            <value>FALSE
8173            <notes>
8174              Scaler crop regions (android.scaler.cropRegion) has not been set by the camera
8175              client.
8176            </notes>
8177            </value>
8178          </enum>
8179          <description>
8180            Framework-only private key which informs camera fwk that the scaler crop region
8181            (android.scaler.cropRegion) has been set by the client and it need
8182            not be corrected when android.sensor.pixelMode is set to MAXIMUM_RESOLUTION.
8183          </description>
8184          <details>
8185            This must be set to TRUE by the camera2 java fwk when the camera client sets
8186            android.scaler.cropRegion.
8187          </details>
8188        </entry>
8189      </controls>
8190    </section>
8191    <section name="sensor">
8192      <controls>
8193        <entry name="exposureTime" type="int64" visibility="public" hwlevel="full">
8194          <description>Duration each pixel is exposed to
8195          light.</description>
8196          <units>Nanoseconds</units>
8197          <range>android.sensor.info.exposureTimeRange</range>
8198          <details>If the sensor can't expose this exact duration, it will shorten the
8199          duration exposed to the nearest possible value (rather than expose longer).
8200          The final exposure time used will be available in the output capture result.
8201
8202          This control is only effective if android.control.aeMode or android.control.mode is set to
8203          OFF; otherwise the auto-exposure algorithm will override this value.
8204          </details>
8205          <tag id="V1" />
8206        </entry>
8207        <entry name="frameDuration" type="int64" visibility="public" hwlevel="full">
8208          <description>Duration from start of frame exposure to
8209          start of next frame exposure.</description>
8210          <units>Nanoseconds</units>
8211          <range>See android.sensor.info.maxFrameDuration, {@link
8212          android.hardware.camera2.params.StreamConfigurationMap|ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}.
8213          The duration is capped to `max(duration, exposureTime + overhead)`.</range>
8214          <details>
8215          The maximum frame rate that can be supported by a camera subsystem is
8216          a function of many factors:
8217
8218          * Requested resolutions of output image streams
8219          * Availability of binning / skipping modes on the imager
8220          * The bandwidth of the imager interface
8221          * The bandwidth of the various ISP processing blocks
8222
8223          Since these factors can vary greatly between different ISPs and
8224          sensors, the camera abstraction tries to represent the bandwidth
8225          restrictions with as simple a model as possible.
8226
8227          The model presented has the following characteristics:
8228
8229          * The image sensor is always configured to output the smallest
8230          resolution possible given the application's requested output stream
8231          sizes.  The smallest resolution is defined as being at least as large
8232          as the largest requested output stream size; the camera pipeline must
8233          never digitally upsample sensor data when the crop region covers the
8234          whole sensor. In general, this means that if only small output stream
8235          resolutions are configured, the sensor can provide a higher frame
8236          rate.
8237          * Since any request may use any or all the currently configured
8238          output streams, the sensor and ISP must be configured to support
8239          scaling a single capture to all the streams at the same time.  This
8240          means the camera pipeline must be ready to produce the largest
8241          requested output size without any delay.  Therefore, the overall
8242          frame rate of a given configured stream set is governed only by the
8243          largest requested stream resolution.
8244          * Using more than one output stream in a request does not affect the
8245          frame duration.
8246          * Certain format-streams may need to do additional background processing
8247          before data is consumed/produced by that stream. These processors
8248          can run concurrently to the rest of the camera pipeline, but
8249          cannot process more than 1 capture at a time.
8250
8251          The necessary information for the application, given the model above, is provided via
8252          {@link
8253          android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration|ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}.
8254          These are used to determine the maximum frame rate / minimum frame duration that is
8255          possible for a given stream configuration.
8256
8257          Specifically, the application can use the following rules to
8258          determine the minimum frame duration it can request from the camera
8259          device:
8260
8261          1. Let the set of currently configured input/output streams be called `S`.
8262          1. Find the minimum frame durations for each stream in `S`, by looking it up in {@link
8263          android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration|ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}
8264          (with its respective size/format). Let this set of frame durations be called `F`.
8265          1. For any given request `R`, the minimum frame duration allowed for `R` is the maximum
8266          out of all values in `F`. Let the streams used in `R` be called `S_r`.
8267
8268          If none of the streams in `S_r` have a stall time (listed in {@link
8269          android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration|ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS}
8270          using its respective size/format), then the frame duration in `F` determines the steady
8271          state frame rate that the application will get if it uses `R` as a repeating request. Let
8272          this special kind of request be called `Rsimple`.
8273
8274          A repeating request `Rsimple` can be _occasionally_ interleaved by a single capture of a
8275          new request `Rstall` (which has at least one in-use stream with a non-0 stall time) and if
8276          `Rstall` has the same minimum frame duration this will not cause a frame rate loss if all
8277          buffers from the previous `Rstall` have already been delivered.
8278
8279          For more details about stalling, see {@link
8280          android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration|ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS}.
8281
8282          This control is only effective if android.control.aeMode or android.control.mode is set to
8283          OFF; otherwise the auto-exposure algorithm will override this value.
8284          </details>
8285          <hal_details>
8286          For more details about stalling, see
8287          android.scaler.availableStallDurations.
8288          </hal_details>
8289          <tag id="V1" />
8290        </entry>
8291        <entry name="sensitivity" type="int32" visibility="public" hwlevel="full">
8292          <description>The amount of gain applied to sensor data
8293          before processing.</description>
8294          <units>ISO arithmetic units</units>
8295          <range>android.sensor.info.sensitivityRange</range>
8296          <details>
8297          The sensitivity is the standard ISO sensitivity value,
8298          as defined in ISO 12232:2006.
8299
8300          The sensitivity must be within android.sensor.info.sensitivityRange, and
8301          if if it less than android.sensor.maxAnalogSensitivity, the camera device
8302          is guaranteed to use only analog amplification for applying the gain.
8303
8304          If the camera device cannot apply the exact sensitivity
8305          requested, it will reduce the gain to the nearest supported
8306          value. The final sensitivity used will be available in the
8307          output capture result.
8308
8309          This control is only effective if android.control.aeMode or android.control.mode is set to
8310          OFF; otherwise the auto-exposure algorithm will override this value.
8311
8312          Note that for devices supporting postRawSensitivityBoost, the total sensitivity applied
8313          to the final processed image is the combination of android.sensor.sensitivity and
8314          android.control.postRawSensitivityBoost. In case the application uses the sensor
8315          sensitivity from last capture result of an auto request for a manual request, in order
8316          to achieve the same brightness in the output image, the application should also
8317          set postRawSensitivityBoost.
8318          </details>
8319          <hal_details>ISO 12232:2006 REI method is acceptable.</hal_details>
8320          <tag id="V1" />
8321        </entry>
8322      </controls>
8323      <static>
8324        <namespace name="info">
8325          <entry name="activeArraySize" type="int32" visibility="public"
8326          type_notes="Four ints defining the active pixel rectangle"
8327          container="array" typedef="rectangle" hwlevel="legacy">
8328            <array>
8329              <size>4</size>
8330            </array>
8331            <description>
8332            The area of the image sensor which corresponds to active pixels after any geometric
8333            distortion correction has been applied.
8334            </description>
8335            <units>Pixel coordinates on the image sensor</units>
8336            <details>
8337            This is the rectangle representing the size of the active region of the sensor (i.e.
8338            the region that actually receives light from the scene) after any geometric correction
8339            has been applied, and should be treated as the maximum size in pixels of any of the
8340            image output formats aside from the raw formats.
8341
8342            This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
8343            the full pixel array, and the size of the full pixel array is given by
8344            android.sensor.info.pixelArraySize.
8345
8346            The coordinate system for most other keys that list pixel coordinates, including
8347            android.scaler.cropRegion, is defined relative to the active array rectangle given in
8348            this field, with `(0, 0)` being the top-left of this rectangle.
8349
8350            The active array may be smaller than the full pixel array, since the full array may
8351            include black calibration pixels or other inactive regions.
8352
8353            For devices that do not support android.distortionCorrection.mode control, the active
8354            array must be the same as android.sensor.info.preCorrectionActiveArraySize.
8355
8356            For devices that support android.distortionCorrection.mode control, the active array must
8357            be enclosed by android.sensor.info.preCorrectionActiveArraySize. The difference between
8358            pre-correction active array and active array accounts for scaling or cropping caused
8359            by lens geometric distortion correction.
8360
8361            In general, application should always refer to active array size for controls like
8362            metering regions or crop region. Two exceptions are when the application is dealing with
8363            RAW image buffers (RAW_SENSOR, RAW10, RAW12 etc), or when application explicitly set
8364            android.distortionCorrection.mode to OFF. In these cases, application should refer
8365            to android.sensor.info.preCorrectionActiveArraySize.
8366            </details>
8367            <ndk_details>
8368            The data representation is `int[4]`, which maps to `(left, top, width, height)`.
8369            </ndk_details>
8370            <hal_details>
8371            This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be
8372            &amp;gt;= `(0,0)`.
8373            The `(width, height)` must be &amp;lt;= `android.sensor.info.pixelArraySize`.
8374            </hal_details>
8375            <tag id="RAW" />
8376          </entry>
8377          <entry name="sensitivityRange" type="int32" visibility="public"
8378          type_notes="Range of supported sensitivities"
8379          container="array" typedef="rangeInt"
8380          hwlevel="full">
8381            <array>
8382              <size>2</size>
8383            </array>
8384            <description>Range of sensitivities for android.sensor.sensitivity supported by this
8385            camera device.</description>
8386            <range>Min &lt;= 100, Max &amp;gt;= 800</range>
8387            <details>
8388              The values are the standard ISO sensitivity values,
8389              as defined in ISO 12232:2006.
8390            </details>
8391
8392            <tag id="BC" />
8393            <tag id="V1" />
8394          </entry>
8395          <entry name="colorFilterArrangement" type="byte" visibility="public" enum="true"
8396            hwlevel="full">
8397            <enum>
8398              <value>RGGB</value>
8399              <value>GRBG</value>
8400              <value>GBRG</value>
8401              <value>BGGR</value>
8402              <value>RGB
8403              <notes>Sensor is not Bayer; output has 3 16-bit
8404              values for each pixel, instead of just 1 16-bit value
8405              per pixel.</notes></value>
8406              <value hal_version="3.4">MONO
8407              <notes>Sensor doesn't have any Bayer color filter.
8408              Such sensor captures visible light in monochrome. The exact weighting and
8409              wavelengths captured is not specified, but generally only includes the visible
8410              frequencies. This value implies a MONOCHROME camera.</notes></value>
8411              <value hal_version="3.4">NIR
8412              <notes>Sensor has a near infrared filter capturing light with wavelength between
8413              roughly 750nm and 1400nm, and the same filter covers the whole sensor array. This
8414              value implies a MONOCHROME camera.</notes></value>
8415            </enum>
8416            <description>The arrangement of color filters on sensor;
8417            represents the colors in the top-left 2x2 section of
8418            the sensor, in reading order, for a Bayer camera, or the
8419            light spectrum it captures for MONOCHROME camera.
8420            </description>
8421            <hal_details>
8422            Starting from Android Q, the colorFilterArrangement for a MONOCHROME camera must be
8423            single color patterns, such as MONO or NIR.
8424            </hal_details>
8425            <tag id="RAW" />
8426          </entry>
8427          <entry name="exposureTimeRange" type="int64" visibility="public"
8428                 type_notes="nanoseconds" container="array" typedef="rangeLong"
8429                 hwlevel="full">
8430            <array>
8431              <size>2</size>
8432            </array>
8433            <description>The range of image exposure times for android.sensor.exposureTime supported
8434            by this camera device.
8435            </description>
8436            <units>Nanoseconds</units>
8437            <range>The minimum exposure time will be less than 100 us. For FULL
8438            capability devices (android.info.supportedHardwareLevel == FULL),
8439            the maximum exposure time will be greater than 100ms.</range>
8440            <hal_details>For FULL capability devices (android.info.supportedHardwareLevel == FULL),
8441            The maximum of the range SHOULD be at least 1 second (1e9), MUST be at least
8442            100ms.
8443            </hal_details>
8444            <tag id="V1" />
8445          </entry>
8446          <entry name="maxFrameDuration" type="int64" visibility="public"
8447                 hwlevel="full">
8448            <description>The maximum possible frame duration (minimum frame rate) for
8449            android.sensor.frameDuration that is supported this camera device.</description>
8450            <units>Nanoseconds</units>
8451            <range>For FULL capability devices
8452            (android.info.supportedHardwareLevel == FULL), at least 100ms.
8453            </range>
8454            <details>Attempting to use frame durations beyond the maximum will result in the frame
8455            duration being clipped to the maximum. See that control for a full definition of frame
8456            durations.
8457
8458            Refer to {@link
8459            android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration|ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}
8460            for the minimum frame duration values.
8461            </details>
8462            <hal_details>
8463            For FULL capability devices (android.info.supportedHardwareLevel == FULL),
8464            The maximum of the range SHOULD be at least
8465            1 second (1e9), MUST be at least 100ms (100e6).
8466
8467            android.sensor.info.maxFrameDuration must be greater or
8468            equal to the android.sensor.info.exposureTimeRange max
8469            value (since exposure time overrides frame duration).
8470
8471            Available minimum frame durations for JPEG must be no greater
8472            than that of the YUV_420_888/IMPLEMENTATION_DEFINED
8473            minimum frame durations (for that respective size).
8474
8475            Since JPEG processing is considered offline and can take longer than
8476            a single uncompressed capture, refer to
8477            android.scaler.availableStallDurations
8478            for details about encoding this scenario.
8479            </hal_details>
8480            <tag id="V1" />
8481          </entry>
8482          <entry name="physicalSize" type="float" visibility="public"
8483          type_notes="width x height"
8484          container="array" typedef="sizeF" hwlevel="legacy">
8485            <array>
8486              <size>2</size>
8487            </array>
8488            <description>The physical dimensions of the full pixel
8489            array.</description>
8490            <units>Millimeters</units>
8491            <details>This is the physical size of the sensor pixel
8492            array defined by android.sensor.info.pixelArraySize.
8493            </details>
8494            <hal_details>Needed for FOV calculation for old API</hal_details>
8495            <tag id="V1" />
8496            <tag id="BC" />
8497          </entry>
8498          <entry name="pixelArraySize" type="int32" visibility="public"
8499          container="array" typedef="size" hwlevel="legacy">
8500            <array>
8501              <size>2</size>
8502            </array>
8503            <description>Dimensions of the full pixel array, possibly
8504            including black calibration pixels.</description>
8505            <units>Pixels</units>
8506            <details>The pixel count of the full pixel array of the image sensor, which covers
8507            android.sensor.info.physicalSize area.  This represents the full pixel dimensions of
8508            the raw buffers produced by this sensor.
8509
8510            If a camera device supports raw sensor formats, either this or
8511            android.sensor.info.preCorrectionActiveArraySize is the maximum dimensions for the raw
8512            output formats listed in {@link
8513            android.hardware.camera2.params.StreamConfigurationMap|ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS}
8514            (this depends on whether or not the image sensor returns buffers containing pixels that
8515            are not part of the active array region for blacklevel calibration or other purposes).
8516
8517            Some parts of the full pixel array may not receive light from the scene,
8518            or be otherwise inactive.  The android.sensor.info.preCorrectionActiveArraySize key
8519            defines the rectangle of active pixels that will be included in processed image
8520            formats.
8521            </details>
8522            <tag id="RAW" />
8523            <tag id="BC" />
8524          </entry>
8525          <entry name="whiteLevel" type="int32" visibility="public">
8526            <description>
8527            Maximum raw value output by sensor.
8528            </description>
8529            <range>&amp;gt; 255 (8-bit output)</range>
8530            <details>
8531            This specifies the fully-saturated encoding level for the raw
8532            sample values from the sensor.  This is typically caused by the
8533            sensor becoming highly non-linear or clipping. The minimum for
8534            each channel is specified by the offset in the
8535            android.sensor.blackLevelPattern key.
8536
8537            The white level is typically determined either by sensor bit depth
8538            (8-14 bits is expected), or by the point where the sensor response
8539            becomes too non-linear to be useful.  The default value for this is
8540            maximum representable value for a 16-bit raw sample (2^16 - 1).
8541
8542            The white level values of captured images may vary for different
8543            capture settings (e.g., android.sensor.sensitivity). This key
8544            represents a coarse approximation for such case. It is recommended
8545            to use android.sensor.dynamicWhiteLevel for captures when supported
8546            by the camera device, which provides more accurate white level values.
8547            </details>
8548            <hal_details>
8549            The full bit depth of the sensor must be available in the raw data,
8550            so the value for linear sensors should not be significantly lower
8551            than maximum raw value supported, i.e. 2^(sensor bits per pixel).
8552            </hal_details>
8553            <tag id="RAW" />
8554          </entry>
8555          <entry name="timestampSource" type="byte" visibility="public"
8556                 enum="true" hwlevel="legacy">
8557            <enum>
8558              <value>UNKNOWN
8559                <notes>
8560                Timestamps from android.sensor.timestamp are in nanoseconds and monotonic, but can
8561                not be compared to timestamps from other subsystems (e.g. accelerometer, gyro etc.),
8562                or other instances of the same or different camera devices in the same system with
8563                accuracy. However, the timestamps are roughly in the same timebase as
8564                {@link android.os.SystemClock#uptimeMillis}.  The accuracy is sufficient for tasks
8565                like A/V synchronization for video recording, at least, and the timestamps can be
8566                directly used together with timestamps from the audio subsystem for that task.
8567
8568                Timestamps between streams and results for a single camera instance are comparable,
8569                and the timestamps for all buffers and the result metadata generated by a single
8570                capture are identical.
8571                </notes>
8572              </value>
8573              <value>REALTIME
8574                <notes>
8575                Timestamps from android.sensor.timestamp are in the same timebase as
8576                {@link android.os.SystemClock#elapsedRealtimeNanos},
8577                and they can be compared to other timestamps using that base.
8578
8579                When buffers from a REALTIME device are passed directly to a video encoder from the
8580                camera, automatic compensation is done to account for differing timebases of the
8581                audio and camera subsystems.  If the application is receiving buffers and then later
8582                sending them to a video encoder or other application where they are compared with
8583                audio subsystem timestamps or similar, this compensation is not present.  In those
8584                cases, applications need to adjust the timestamps themselves.  Since {@link
8585                android.os.SystemClock#elapsedRealtimeNanos} and {@link
8586                android.os.SystemClock#uptimeMillis} only diverge while the device is asleep, an
8587                offset between the two sources can be measured once per active session and applied
8588                to timestamps for sufficient accuracy for A/V sync.
8589                </notes>
8590              </value>
8591            </enum>
8592            <description>The time base source for sensor capture start timestamps.</description>
8593            <details>
8594            The timestamps provided for captures are always in nanoseconds and monotonic, but
8595            may not based on a time source that can be compared to other system time sources.
8596
8597            This characteristic defines the source for the timestamps, and therefore whether they
8598            can be compared against other system time sources/timestamps.
8599            </details>
8600            <hal_details>
8601            For camera devices implement UNKNOWN, the camera framework expects that the timestamp
8602            source to be SYSTEM_TIME_MONOTONIC. For camera devices implement REALTIME, the camera
8603            framework expects that the timestamp source to be SYSTEM_TIME_BOOTTIME. See
8604            system/core/include/utils/Timers.h for the definition of SYSTEM_TIME_MONOTONIC and
8605            SYSTEM_TIME_BOOTTIME. Note that HAL must follow above expectation; otherwise video
8606            recording might suffer unexpected behavior.
8607
8608            Also, camera devices which implement REALTIME must pass the ITS sensor fusion test which
8609            tests the alignment between camera timestamps and gyro sensor timestamps.
8610            </hal_details>
8611          <tag id="V1" />
8612        </entry>
8613        <entry name="lensShadingApplied" type="byte" visibility="public" enum="true"
8614               typedef="boolean">
8615          <enum>
8616            <value>FALSE</value>
8617            <value>TRUE</value>
8618          </enum>
8619          <description>Whether the RAW images output from this camera device are subject to
8620          lens shading correction.</description>
8621          <details>
8622          If TRUE, all images produced by the camera device in the RAW image formats will
8623          have lens shading correction already applied to it. If FALSE, the images will
8624          not be adjusted for lens shading correction.
8625          See android.request.maxNumOutputRaw for a list of RAW image formats.
8626
8627          This key will be `null` for all devices do not report this information.
8628          Devices with RAW capability will always report this information in this key.
8629          </details>
8630        </entry>
8631        <entry name="preCorrectionActiveArraySize" type="int32" visibility="public"
8632          type_notes="Four ints defining the active pixel rectangle" container="array"
8633          typedef="rectangle" hwlevel="legacy">
8634            <array>
8635              <size>4</size>
8636            </array>
8637            <description>
8638            The area of the image sensor which corresponds to active pixels prior to the
8639            application of any geometric distortion correction.
8640            </description>
8641            <units>Pixel coordinates on the image sensor</units>
8642            <details>
8643            This is the rectangle representing the size of the active region of the sensor (i.e.
8644            the region that actually receives light from the scene) before any geometric correction
8645            has been applied, and should be treated as the active region rectangle for any of the
8646            raw formats.  All metadata associated with raw processing (e.g. the lens shading
8647            correction map, and radial distortion fields) treats the top, left of this rectangle as
8648            the origin, (0,0).
8649
8650            The size of this region determines the maximum field of view and the maximum number of
8651            pixels that an image from this sensor can contain, prior to the application of
8652            geometric distortion correction. The effective maximum pixel dimensions of a
8653            post-distortion-corrected image is given by the android.sensor.info.activeArraySize
8654            field, and the effective maximum field of view for a post-distortion-corrected image
8655            can be calculated by applying the geometric distortion correction fields to this
8656            rectangle, and cropping to the rectangle given in android.sensor.info.activeArraySize.
8657
8658            E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
8659            dimensions in android.sensor.info.activeArraySize given the position of a pixel,
8660            (x', y'), in the raw pixel array with dimensions given in
8661            android.sensor.info.pixelArraySize:
8662
8663            1. Choose a pixel (x', y') within the active array region of the raw buffer given in
8664            android.sensor.info.preCorrectionActiveArraySize, otherwise this pixel is considered
8665            to be outside of the FOV, and will not be shown in the processed output image.
8666            1. Apply geometric distortion correction to get the post-distortion pixel coordinate,
8667            (x_i, y_i). When applying geometric correction metadata, note that metadata for raw
8668            buffers is defined relative to the top, left of the
8669            android.sensor.info.preCorrectionActiveArraySize rectangle.
8670            1. If the resulting corrected pixel coordinate is within the region given in
8671            android.sensor.info.activeArraySize, then the position of this pixel in the
8672            processed output image buffer is `(x_i - activeArray.left, y_i - activeArray.top)`,
8673            when the top, left coordinate of that buffer is treated as (0, 0).
8674
8675            Thus, for pixel x',y' = (25, 25) on a sensor where android.sensor.info.pixelArraySize
8676            is (100,100), android.sensor.info.preCorrectionActiveArraySize is (10, 10, 100, 100),
8677            android.sensor.info.activeArraySize is (20, 20, 80, 80), and the geometric distortion
8678            correction doesn't change the pixel coordinate, the resulting pixel selected in
8679            pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer
8680            with dimensions given in android.sensor.info.pixelArraySize, and would be (5, 5)
8681            relative to the top,left of post-processed YUV output buffer with dimensions given in
8682            android.sensor.info.activeArraySize.
8683
8684            The currently supported fields that correct for geometric distortion are:
8685
8686            1. android.lens.distortion.
8687
8688            If the camera device doesn't support geometric distortion correction, or all of the
8689            geometric distortion fields are no-ops, this rectangle will be the same as the
8690            post-distortion-corrected rectangle given in android.sensor.info.activeArraySize.
8691
8692            This rectangle is defined relative to the full pixel array; (0,0) is the top-left of
8693            the full pixel array, and the size of the full pixel array is given by
8694            android.sensor.info.pixelArraySize.
8695
8696            The pre-correction active array may be smaller than the full pixel array, since the
8697            full array may include black calibration pixels or other inactive regions.
8698            </details>
8699            <ndk_details>
8700            The data representation is `int[4]`, which maps to `(left, top, width, height)`.
8701            </ndk_details>
8702            <hal_details>
8703            This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be
8704            &amp;gt;= `(0,0)`.
8705            The `(width, height)` must be &amp;lt;= `android.sensor.info.pixelArraySize`.
8706
8707            If omitted by the HAL implementation, the camera framework will assume that this is
8708            the same as the post-correction active array region given in
8709            android.sensor.info.activeArraySize.
8710            </hal_details>
8711            <tag id="RAW" />
8712          </entry>
8713          <entry name="activeArraySizeMaximumResolution" type="int32" visibility="public"
8714            type_notes="Four ints defining the active pixel rectangle"
8715            container="array" typedef="rectangle" hal_version="3.6">
8716            <array>
8717              <size>4</size>
8718            </array>
8719            <description>
8720            The area of the image sensor which corresponds to active pixels after any geometric
8721            distortion correction has been applied, when the sensor runs in maximum resolution mode.
8722            </description>
8723            <units>Pixel coordinates on the image sensor</units>
8724            <details>
8725            Analogous to android.sensor.info.activeArraySize, when android.sensor.pixelMode
8726            is set to
8727            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8728            Refer to android.sensor.info.activeArraySize for details, with sensor array related keys
8729            replaced with their
8730            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}
8731            counterparts.
8732            This key will only be present for devices which advertise the
8733            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
8734            capability.
8735            </details>
8736            <ndk_details>
8737            The data representation is `int[4]`, which maps to `(left, top, width, height)`.
8738            </ndk_details>
8739            <hal_details>
8740            This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be
8741            &amp;gt;= `(0,0)`.
8742            The `(width, height)` must be &amp;lt;= `android.sensor.info.pixelArraySizeMaximumResolution`.
8743            </hal_details>
8744            <tag id="RAW" />
8745          </entry>
8746          <entry name="pixelArraySizeMaximumResolution" type="int32" visibility="public"
8747            container="array" typedef="size" hal_version="3.6">
8748            <array>
8749              <size>2</size>
8750            </array>
8751            <description>Dimensions of the full pixel array, possibly
8752            including black calibration pixels, when the sensor runs in maximum resolution mode.
8753            Analogous to android.sensor.info.pixelArraySize, when android.sensor.pixelMode is
8754            set to
8755            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8756            </description>
8757            <units>Pixels</units>
8758            <details>
8759            The pixel count of the full pixel array of the image sensor, which covers
8760            android.sensor.info.physicalSize area. This represents the full pixel dimensions of
8761            the raw buffers produced by this sensor, when it runs in maximum resolution mode. That
8762            is, when android.sensor.pixelMode is set to
8763            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8764            This key will only be present for devices which advertise the
8765            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
8766            capability.
8767            </details>
8768            <tag id="RAW" />
8769          </entry>
8770          <entry name="preCorrectionActiveArraySizeMaximumResolution" type="int32"
8771            visibility="public" type_notes="Four ints defining the active pixel rectangle"
8772            container="array" typedef="rectangle" hal_version="3.6">
8773            <array>
8774              <size>4</size>
8775            </array>
8776            <description>
8777            The area of the image sensor which corresponds to active pixels prior to the
8778            application of any geometric distortion correction, when the sensor runs in maximum
8779            resolution mode. This key must be used for crop / metering regions, only when
8780            android.sensor.pixelMode is set to
8781            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8782            </description>
8783            <units>Pixel coordinates on the image sensor</units>
8784            <details>
8785            Analogous to android.sensor.info.preCorrectionActiveArraySize,
8786            when android.sensor.pixelMode is set to
8787            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
8788            This key will only be present for devices which advertise the
8789            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
8790            capability.
8791            </details>
8792            <ndk_details>
8793            The data representation is `int[4]`, which maps to `(left, top, width, height)`.
8794            </ndk_details>
8795            <hal_details>
8796            This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be
8797            &amp;gt;= `(0,0)`.
8798            The `(width, height)` must be &amp;lt;= `android.sensor.info.pixelArraySizeMaximumResolution`.
8799
8800            If omitted by the HAL implementation, the camera framework will assume that this is
8801            the same as the post-correction active array region given in
8802            android.sensor.info.activeArraySizeMaximumResolution.
8803            </hal_details>
8804            <tag id="RAW" />
8805          </entry>
8806          <entry name="binningFactor" type="int32" visibility="public"
8807                container="array" typedef="size" hal_version="3.6">
8808          <array>
8809            <size>2</size>
8810          </array>
8811          <description> Dimensions of the group of pixels which are under the same color filter.
8812            This specifies the width and height (pair of integers) of the group of pixels which fall
8813            under the same color filter for ULTRA_HIGH_RESOLUTION sensors.
8814          </description>
8815          <units>Pixels</units>
8816          <details> Sensors can have pixels grouped together under the same color filter in order
8817            to improve various aspects of imaging such as noise reduction, low light
8818            performance etc. These groups can be of various sizes such as 2X2 (quad bayer),
8819            3X3 (nona-bayer). This key specifies the length and width of the pixels grouped under
8820            the same color filter.
8821
8822            This key will not be present if REMOSAIC_REPROCESSING is not supported, since RAW images
8823            will have a regular bayer pattern.
8824
8825            This key will not be present for sensors which don't have the
8826            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
8827            capability.
8828          </details>
8829        </entry>
8830        </namespace>
8831        <entry name="referenceIlluminant1" type="byte" visibility="public"
8832               enum="true" permission_needed="true" >
8833          <enum>
8834            <value id="1">DAYLIGHT</value>
8835            <value id="2">FLUORESCENT</value>
8836            <value id="3">TUNGSTEN
8837              <notes>Incandescent light</notes>
8838            </value>
8839            <value id="4">FLASH</value>
8840            <value id="9">FINE_WEATHER</value>
8841            <value id="10">CLOUDY_WEATHER</value>
8842            <value id="11">SHADE</value>
8843            <value id="12">DAYLIGHT_FLUORESCENT
8844              <notes>D 5700 - 7100K</notes>
8845            </value>
8846            <value id="13">DAY_WHITE_FLUORESCENT
8847              <notes>N 4600 - 5400K</notes>
8848            </value>
8849            <value id="14">COOL_WHITE_FLUORESCENT
8850              <notes>W 3900 - 4500K</notes>
8851            </value>
8852            <value id="15">WHITE_FLUORESCENT
8853              <notes>WW 3200 - 3700K</notes>
8854            </value>
8855            <value id="17">STANDARD_A</value>
8856            <value id="18">STANDARD_B</value>
8857            <value id="19">STANDARD_C</value>
8858            <value id="20">D55</value>
8859            <value id="21">D65</value>
8860            <value id="22">D75</value>
8861            <value id="23">D50</value>
8862            <value id="24">ISO_STUDIO_TUNGSTEN</value>
8863          </enum>
8864          <description>
8865          The standard reference illuminant used as the scene light source when
8866          calculating the android.sensor.colorTransform1,
8867          android.sensor.calibrationTransform1, and
8868          android.sensor.forwardMatrix1 matrices.
8869          </description>
8870          <details>
8871          The values in this key correspond to the values defined for the
8872          EXIF LightSource tag. These illuminants are standard light sources
8873          that are often used calibrating camera devices.
8874
8875          If this key is present, then android.sensor.colorTransform1,
8876          android.sensor.calibrationTransform1, and
8877          android.sensor.forwardMatrix1 will also be present.
8878
8879          Some devices may choose to provide a second set of calibration
8880          information for improved quality, including
8881          android.sensor.referenceIlluminant2 and its corresponding matrices.
8882
8883          Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
8884          the camera device has RAW capability.
8885          </details>
8886          <hal_details>
8887          The first reference illuminant (android.sensor.referenceIlluminant1)
8888          and corresponding matrices must be present to support the RAW capability
8889          and DNG output.
8890
8891          When producing raw images with a color profile that has only been
8892          calibrated against a single light source, it is valid to omit
8893          android.sensor.referenceIlluminant2 along with the
8894          android.sensor.colorTransform2, android.sensor.calibrationTransform2,
8895          and android.sensor.forwardMatrix2 matrices.
8896
8897          If only android.sensor.referenceIlluminant1 is included, it should be
8898          chosen so that it is representative of typical scene lighting.  In
8899          general, D50 or DAYLIGHT will be chosen for this case.
8900
8901          If both android.sensor.referenceIlluminant1 and
8902          android.sensor.referenceIlluminant2 are included, they should be
8903          chosen to represent the typical range of scene lighting conditions.
8904          In general, low color temperature illuminant such as Standard-A will
8905          be chosen for the first reference illuminant and a higher color
8906          temperature illuminant such as D65 will be chosen for the second
8907          reference illuminant.
8908          </hal_details>
8909          <tag id="RAW" />
8910        </entry>
8911        <entry name="referenceIlluminant2" type="byte" visibility="public"
8912        permission_needed="true" >
8913          <description>
8914          The standard reference illuminant used as the scene light source when
8915          calculating the android.sensor.colorTransform2,
8916          android.sensor.calibrationTransform2, and
8917          android.sensor.forwardMatrix2 matrices.
8918          </description>
8919          <range>Any value listed in android.sensor.referenceIlluminant1</range>
8920          <details>
8921          See android.sensor.referenceIlluminant1 for more details.
8922
8923          If this key is present, then android.sensor.colorTransform2,
8924          android.sensor.calibrationTransform2, and
8925          android.sensor.forwardMatrix2 will also be present.
8926
8927          Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
8928          the camera device has RAW capability.
8929          </details>
8930          <tag id="RAW" />
8931        </entry>
8932        <entry name="calibrationTransform1" type="rational"
8933        visibility="public" optional="true"
8934        type_notes="3x3 matrix in row-major-order" container="array"
8935        typedef="colorSpaceTransform" permission_needed="true" >
8936          <array>
8937            <size>3</size>
8938            <size>3</size>
8939          </array>
8940          <description>
8941          A per-device calibration transform matrix that maps from the
8942          reference sensor colorspace to the actual device sensor colorspace.
8943          </description>
8944          <details>
8945          This matrix is used to correct for per-device variations in the
8946          sensor colorspace, and is used for processing raw buffer data.
8947
8948          The matrix is expressed as a 3x3 matrix in row-major-order, and
8949          contains a per-device calibration transform that maps colors
8950          from reference sensor color space (i.e. the "golden module"
8951          colorspace) into this camera device's native sensor color
8952          space under the first reference illuminant
8953          (android.sensor.referenceIlluminant1).
8954
8955          Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
8956          the camera device has RAW capability.
8957          </details>
8958          <tag id="RAW" />
8959        </entry>
8960        <entry name="calibrationTransform2" type="rational"
8961        visibility="public" optional="true"
8962        type_notes="3x3 matrix in row-major-order" container="array"
8963        typedef="colorSpaceTransform" permission_needed="true" >
8964          <array>
8965            <size>3</size>
8966            <size>3</size>
8967          </array>
8968          <description>
8969          A per-device calibration transform matrix that maps from the
8970          reference sensor colorspace to the actual device sensor colorspace
8971          (this is the colorspace of the raw buffer data).
8972          </description>
8973          <details>
8974          This matrix is used to correct for per-device variations in the
8975          sensor colorspace, and is used for processing raw buffer data.
8976
8977          The matrix is expressed as a 3x3 matrix in row-major-order, and
8978          contains a per-device calibration transform that maps colors
8979          from reference sensor color space (i.e. the "golden module"
8980          colorspace) into this camera device's native sensor color
8981          space under the second reference illuminant
8982          (android.sensor.referenceIlluminant2).
8983
8984          This matrix will only be present if the second reference
8985          illuminant is present.
8986
8987          Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
8988          the camera device has RAW capability.
8989          </details>
8990          <tag id="RAW" />
8991        </entry>
8992        <entry name="colorTransform1" type="rational"
8993        visibility="public" optional="true"
8994        type_notes="3x3 matrix in row-major-order" container="array"
8995        typedef="colorSpaceTransform" permission_needed="true" >
8996          <array>
8997            <size>3</size>
8998            <size>3</size>
8999          </array>
9000          <description>
9001          A matrix that transforms color values from CIE XYZ color space to
9002          reference sensor color space.
9003          </description>
9004          <details>
9005          This matrix is used to convert from the standard CIE XYZ color
9006          space to the reference sensor colorspace, and is used when processing
9007          raw buffer data.
9008
9009          The matrix is expressed as a 3x3 matrix in row-major-order, and
9010          contains a color transform matrix that maps colors from the CIE
9011          XYZ color space to the reference sensor color space (i.e. the
9012          "golden module" colorspace) under the first reference illuminant
9013          (android.sensor.referenceIlluminant1).
9014
9015          The white points chosen in both the reference sensor color space
9016          and the CIE XYZ colorspace when calculating this transform will
9017          match the standard white point for the first reference illuminant
9018          (i.e. no chromatic adaptation will be applied by this transform).
9019
9020          Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
9021          the camera device has RAW capability.
9022          </details>
9023          <tag id="RAW" />
9024        </entry>
9025        <entry name="colorTransform2" type="rational"
9026        visibility="public" optional="true"
9027        type_notes="3x3 matrix in row-major-order" container="array"
9028        typedef="colorSpaceTransform" permission_needed="true" >
9029          <array>
9030            <size>3</size>
9031            <size>3</size>
9032          </array>
9033          <description>
9034          A matrix that transforms color values from CIE XYZ color space to
9035          reference sensor color space.
9036          </description>
9037          <details>
9038          This matrix is used to convert from the standard CIE XYZ color
9039          space to the reference sensor colorspace, and is used when processing
9040          raw buffer data.
9041
9042          The matrix is expressed as a 3x3 matrix in row-major-order, and
9043          contains a color transform matrix that maps colors from the CIE
9044          XYZ color space to the reference sensor color space (i.e. the
9045          "golden module" colorspace) under the second reference illuminant
9046          (android.sensor.referenceIlluminant2).
9047
9048          The white points chosen in both the reference sensor color space
9049          and the CIE XYZ colorspace when calculating this transform will
9050          match the standard white point for the second reference illuminant
9051          (i.e. no chromatic adaptation will be applied by this transform).
9052
9053          This matrix will only be present if the second reference
9054          illuminant is present.
9055
9056          Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
9057          the camera device has RAW capability.
9058          </details>
9059          <tag id="RAW" />
9060        </entry>
9061        <entry name="forwardMatrix1" type="rational"
9062        visibility="public" optional="true"
9063        type_notes="3x3 matrix in row-major-order" container="array"
9064        typedef="colorSpaceTransform" permission_needed="true" >
9065          <array>
9066            <size>3</size>
9067            <size>3</size>
9068          </array>
9069          <description>
9070          A matrix that transforms white balanced camera colors from the reference
9071          sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.
9072          </description>
9073          <details>
9074          This matrix is used to convert to the standard CIE XYZ colorspace, and
9075          is used when processing raw buffer data.
9076
9077          This matrix is expressed as a 3x3 matrix in row-major-order, and contains
9078          a color transform matrix that maps white balanced colors from the
9079          reference sensor color space to the CIE XYZ color space with a D50 white
9080          point.
9081
9082          Under the first reference illuminant (android.sensor.referenceIlluminant1)
9083          this matrix is chosen so that the standard white point for this reference
9084          illuminant in the reference sensor colorspace is mapped to D50 in the
9085          CIE XYZ colorspace.
9086
9087          Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
9088          the camera device has RAW capability.
9089          </details>
9090          <tag id="RAW" />
9091        </entry>
9092        <entry name="forwardMatrix2" type="rational"
9093        visibility="public" optional="true"
9094        type_notes="3x3 matrix in row-major-order" container="array"
9095        typedef="colorSpaceTransform" permission_needed="true" >
9096          <array>
9097            <size>3</size>
9098            <size>3</size>
9099          </array>
9100          <description>
9101          A matrix that transforms white balanced camera colors from the reference
9102          sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.
9103          </description>
9104          <details>
9105          This matrix is used to convert to the standard CIE XYZ colorspace, and
9106          is used when processing raw buffer data.
9107
9108          This matrix is expressed as a 3x3 matrix in row-major-order, and contains
9109          a color transform matrix that maps white balanced colors from the
9110          reference sensor color space to the CIE XYZ color space with a D50 white
9111          point.
9112
9113          Under the second reference illuminant (android.sensor.referenceIlluminant2)
9114          this matrix is chosen so that the standard white point for this reference
9115          illuminant in the reference sensor colorspace is mapped to D50 in the
9116          CIE XYZ colorspace.
9117
9118          This matrix will only be present if the second reference
9119          illuminant is present.
9120
9121          Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
9122          the camera device has RAW capability.
9123          </details>
9124          <tag id="RAW" />
9125        </entry>
9126        <entry name="baseGainFactor" type="rational"
9127        optional="true">
9128          <description>Gain factor from electrons to raw units when
9129          ISO=100</description>
9130          <tag id="FUTURE" />
9131        </entry>
9132        <entry name="blackLevelPattern" type="int32" visibility="public"
9133        optional="true" type_notes="2x2 raw count block" container="array"
9134        typedef="blackLevelPattern">
9135          <array>
9136            <size>4</size>
9137          </array>
9138          <description>
9139          A fixed black level offset for each of the color filter arrangement
9140          (CFA) mosaic channels.
9141          </description>
9142          <range>&amp;gt;= 0 for each.</range>
9143          <details>
9144          This key specifies the zero light value for each of the CFA mosaic
9145          channels in the camera sensor.  The maximal value output by the
9146          sensor is represented by the value in android.sensor.info.whiteLevel.
9147
9148          The values are given in the same order as channels listed for the CFA
9149          layout key (see android.sensor.info.colorFilterArrangement), i.e. the
9150          nth value given corresponds to the black level offset for the nth
9151          color channel listed in the CFA.
9152
9153          The black level values of captured images may vary for different
9154          capture settings (e.g., android.sensor.sensitivity). This key
9155          represents a coarse approximation for such case. It is recommended to
9156          use android.sensor.dynamicBlackLevel or use pixels from
9157          android.sensor.opticalBlackRegions directly for captures when
9158          supported by the camera device, which provides more accurate black
9159          level values. For raw capture in particular, it is recommended to use
9160          pixels from android.sensor.opticalBlackRegions to calculate black
9161          level values for each frame.
9162
9163          For a MONOCHROME camera device, all of the 2x2 channels must have the same values.
9164          </details>
9165          <hal_details>
9166          The values are given in row-column scan order, with the first value
9167          corresponding to the element of the CFA in row=0, column=0.
9168          </hal_details>
9169          <tag id="RAW" />
9170        </entry>
9171        <entry name="maxAnalogSensitivity" type="int32" visibility="public"
9172               optional="true" hwlevel="full">
9173          <description>Maximum sensitivity that is implemented
9174          purely through analog gain.</description>
9175          <details>For android.sensor.sensitivity values less than or
9176          equal to this, all applied gain must be analog. For
9177          values above this, the gain applied can be a mix of analog and
9178          digital.</details>
9179          <tag id="V1" />
9180          <tag id="FULL" />
9181        </entry>
9182        <entry name="orientation" type="int32" visibility="public"
9183               hwlevel="legacy">
9184          <description>Clockwise angle through which the output image needs to be rotated to be
9185          upright on the device screen in its native orientation.
9186          </description>
9187          <units>Degrees of clockwise rotation; always a multiple of
9188          90</units>
9189          <range>0, 90, 180, 270</range>
9190          <details>
9191          Also defines the direction of rolling shutter readout, which is from top to bottom in
9192          the sensor's coordinate system.
9193          </details>
9194          <tag id="BC" />
9195        </entry>
9196        <entry name="profileHueSatMapDimensions" type="int32"
9197        visibility="system" optional="true"
9198        type_notes="Number of samples for hue, saturation, and value"
9199        container="array">
9200          <array>
9201            <size>3</size>
9202          </array>
9203          <description>
9204          The number of input samples for each dimension of
9205          android.sensor.profileHueSatMap.
9206          </description>
9207          <range>
9208          Hue &amp;gt;= 1,
9209          Saturation &amp;gt;= 2,
9210          Value &amp;gt;= 1
9211          </range>
9212          <details>
9213          The number of input samples for the hue, saturation, and value
9214          dimension of android.sensor.profileHueSatMap. The order of the
9215          dimensions given is hue, saturation, value; where hue is the 0th
9216          element.
9217          </details>
9218          <tag id="RAW" />
9219        </entry>
9220      </static>
9221      <dynamic>
9222        <clone entry="android.sensor.exposureTime" kind="controls">
9223        </clone>
9224        <clone entry="android.sensor.frameDuration"
9225        kind="controls"></clone>
9226        <clone entry="android.sensor.sensitivity" kind="controls">
9227        </clone>
9228        <entry name="timestamp" type="int64" visibility="public"
9229               hwlevel="legacy">
9230          <description>Time at start of exposure of first
9231          row of the image sensor active array, in nanoseconds.</description>
9232          <units>Nanoseconds</units>
9233          <range>&amp;gt; 0</range>
9234          <details>The timestamps are also included in all image
9235          buffers produced for the same capture, and will be identical
9236          on all the outputs.
9237
9238          When android.sensor.info.timestampSource `==` UNKNOWN,
9239          the timestamps measure time since an unspecified starting point,
9240          and are monotonically increasing. They can be compared with the
9241          timestamps for other captures from the same camera device, but are
9242          not guaranteed to be comparable to any other time source.
9243
9244          When android.sensor.info.timestampSource `==` REALTIME, the
9245          timestamps measure time in the same timebase as {@link
9246          android.os.SystemClock#elapsedRealtimeNanos}, and they can
9247          be compared to other timestamps from other subsystems that
9248          are using that base.
9249
9250          For reprocessing, the timestamp will match the start of exposure of
9251          the input image, i.e. {@link CaptureResult#SENSOR_TIMESTAMP the
9252          timestamp} in the TotalCaptureResult that was used to create the
9253          reprocess capture request.
9254          </details>
9255          <hal_details>
9256          All timestamps must be in reference to the kernel's
9257          CLOCK_BOOTTIME monotonic clock, which properly accounts for
9258          time spent asleep. This allows for synchronization with
9259          sensors that continue to operate while the system is
9260          otherwise asleep.
9261
9262          If android.sensor.info.timestampSource `==` REALTIME,
9263          The timestamp must be synchronized with the timestamps from other
9264          sensor subsystems that are using the same timebase.
9265
9266          For reprocessing, the input image's start of exposure can be looked up
9267          with android.sensor.timestamp from the metadata included in the
9268          capture request.
9269          </hal_details>
9270          <tag id="BC" />
9271        </entry>
9272        <entry name="temperature" type="float"
9273        optional="true">
9274          <description>The temperature of the sensor, sampled at the time
9275          exposure began for this frame.
9276
9277          The thermal diode being queried should be inside the sensor PCB, or
9278          somewhere close to it.
9279          </description>
9280
9281          <units>Celsius</units>
9282          <range>Optional. This value is missing if no temperature is available.</range>
9283          <tag id="FUTURE" />
9284        </entry>
9285        <entry name="neutralColorPoint" type="rational" visibility="public"
9286        optional="true" container="array">
9287          <array>
9288            <size>3</size>
9289          </array>
9290          <description>
9291          The estimated camera neutral color in the native sensor colorspace at
9292          the time of capture.
9293          </description>
9294          <details>
9295          This value gives the neutral color point encoded as an RGB value in the
9296          native sensor color space.  The neutral color point indicates the
9297          currently estimated white point of the scene illumination.  It can be
9298          used to interpolate between the provided color transforms when
9299          processing raw sensor data.
9300
9301          The order of the values is R, G, B; where R is in the lowest index.
9302
9303          Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
9304          the camera device has RAW capability.
9305          </details>
9306          <tag id="RAW" />
9307        </entry>
9308        <entry name="noiseProfile" type="double" visibility="public"
9309        optional="true" type_notes="Pairs of noise model coefficients"
9310        container="array" typedef="pairDoubleDouble">
9311          <array>
9312            <size>2</size>
9313            <size>CFA Channels</size>
9314          </array>
9315          <description>
9316          Noise model coefficients for each CFA mosaic channel.
9317          </description>
9318          <details>
9319          This key contains two noise model coefficients for each CFA channel
9320          corresponding to the sensor amplification (S) and sensor readout
9321          noise (O).  These are given as pairs of coefficients for each channel
9322          in the same order as channels listed for the CFA layout key
9323          (see android.sensor.info.colorFilterArrangement).  This is
9324          represented as an array of Pair&amp;lt;Double, Double&amp;gt;, where
9325          the first member of the Pair at index n is the S coefficient and the
9326          second member is the O coefficient for the nth color channel in the CFA.
9327
9328          These coefficients are used in a two parameter noise model to describe
9329          the amount of noise present in the image for each CFA channel.  The
9330          noise model used here is:
9331
9332          N(x) = sqrt(Sx + O)
9333
9334          Where x represents the recorded signal of a CFA channel normalized to
9335          the range [0, 1], and S and O are the noise model coeffiecients for
9336          that channel.
9337
9338          A more detailed description of the noise model can be found in the
9339          Adobe DNG specification for the NoiseProfile tag.
9340
9341          For a MONOCHROME camera, there is only one color channel. So the noise model coefficients
9342          will only contain one S and one O.
9343
9344          </details>
9345          <hal_details>
9346          For a CFA layout of RGGB, the list of coefficients would be given as
9347          an array of doubles S0,O0,S1,O1,..., where S0 and O0 are the coefficients
9348          for the red channel, S1 and O1 are the coefficients for the first green
9349          channel, etc.
9350          </hal_details>
9351          <tag id="RAW" />
9352        </entry>
9353        <entry name="profileHueSatMap" type="float"
9354        visibility="system" optional="true"
9355        type_notes="Mapping for hue, saturation, and value"
9356        container="array">
9357          <array>
9358            <size>hue_samples</size>
9359            <size>saturation_samples</size>
9360            <size>value_samples</size>
9361            <size>3</size>
9362          </array>
9363          <description>
9364          A mapping containing a hue shift, saturation scale, and value scale
9365          for each pixel.
9366          </description>
9367          <units>
9368          The hue shift is given in degrees; saturation and value scale factors are
9369          unitless and are between 0 and 1 inclusive
9370          </units>
9371          <details>
9372          hue_samples, saturation_samples, and value_samples are given in
9373          android.sensor.profileHueSatMapDimensions.
9374
9375          Each entry of this map contains three floats corresponding to the
9376          hue shift, saturation scale, and value scale, respectively; where the
9377          hue shift has the lowest index. The map entries are stored in the key
9378          in nested loop order, with the value divisions in the outer loop, the
9379          hue divisions in the middle loop, and the saturation divisions in the
9380          inner loop. All zero input saturation entries are required to have a
9381          value scale factor of 1.0.
9382          </details>
9383          <tag id="RAW" />
9384        </entry>
9385        <entry name="profileToneCurve" type="float"
9386        visibility="system" optional="true"
9387        type_notes="Samples defining a spline for a tone-mapping curve"
9388        container="array">
9389          <array>
9390            <size>samples</size>
9391            <size>2</size>
9392          </array>
9393          <description>
9394          A list of x,y samples defining a tone-mapping curve for gamma adjustment.
9395          </description>
9396          <range>
9397          Each sample has an input range of `[0, 1]` and an output range of
9398          `[0, 1]`.  The first sample is required to be `(0, 0)`, and the last
9399          sample is required to be `(1, 1)`.
9400          </range>
9401          <details>
9402          This key contains a default tone curve that can be applied while
9403          processing the image as a starting point for user adjustments.
9404          The curve is specified as a list of value pairs in linear gamma.
9405          The curve is interpolated using a cubic spline.
9406          </details>
9407          <tag id="RAW" />
9408        </entry>
9409        <entry name="greenSplit" type="float" visibility="public" optional="true">
9410          <description>
9411          The worst-case divergence between Bayer green channels.
9412          </description>
9413          <range>
9414          &amp;gt;= 0
9415          </range>
9416          <details>
9417          This value is an estimate of the worst case split between the
9418          Bayer green channels in the red and blue rows in the sensor color
9419          filter array.
9420
9421          The green split is calculated as follows:
9422
9423          1. A 5x5 pixel (or larger) window W within the active sensor array is
9424          chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
9425          mosaic channels (R, Gr, Gb, B).  The location and size of the window
9426          chosen is implementation defined, and should be chosen to provide a
9427          green split estimate that is both representative of the entire image
9428          for this camera sensor, and can be calculated quickly.
9429          1. The arithmetic mean of the green channels from the red
9430          rows (mean_Gr) within W is computed.
9431          1. The arithmetic mean of the green channels from the blue
9432          rows (mean_Gb) within W is computed.
9433          1. The maximum ratio R of the two means is computed as follows:
9434          `R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))`
9435
9436          The ratio R is the green split divergence reported for this property,
9437          which represents how much the green channels differ in the mosaic
9438          pattern.  This value is typically used to determine the treatment of
9439          the green mosaic channels when demosaicing.
9440
9441          The green split value can be roughly interpreted as follows:
9442
9443          * R &amp;lt; 1.03 is a negligible split (&amp;lt;3% divergence).
9444          * 1.20 &amp;lt;= R &amp;gt;= 1.03 will require some software
9445          correction to avoid demosaic errors (3-20% divergence).
9446          * R &amp;gt; 1.20 will require strong software correction to produce
9447          a usuable image (&amp;gt;20% divergence).
9448
9449          Starting from Android Q, this key will not be present for a MONOCHROME camera, even if
9450          the camera device has RAW capability.
9451          </details>
9452          <hal_details>
9453          The green split given may be a static value based on prior
9454          characterization of the camera sensor using the green split
9455          calculation method given here over a large, representative, sample
9456          set of images.  Other methods of calculation that produce equivalent
9457          results, and can be interpreted in the same manner, may be used.
9458          </hal_details>
9459          <tag id="RAW" />
9460        </entry>
9461      </dynamic>
9462      <controls>
9463        <entry name="testPatternData" type="int32" visibility="public" optional="true" container="array">
9464          <array>
9465            <size>4</size>
9466          </array>
9467          <description>
9468            A pixel `[R, G_even, G_odd, B]` that supplies the test pattern
9469            when android.sensor.testPatternMode is SOLID_COLOR.
9470          </description>
9471          <details>
9472          Each color channel is treated as an unsigned 32-bit integer.
9473          The camera device then uses the most significant X bits
9474          that correspond to how many bits are in its Bayer raw sensor
9475          output.
9476
9477          For example, a sensor with RAW10 Bayer output would use the
9478          10 most significant bits from each color channel.
9479          </details>
9480          <hal_details>
9481          </hal_details>
9482        </entry>
9483        <entry name="testPatternMode" type="int32" visibility="public" optional="true"
9484          enum="true">
9485          <enum>
9486            <value>OFF
9487              <notes>No test pattern mode is used, and the camera
9488              device returns captures from the image sensor.
9489
9490              This is the default if the key is not set.</notes>
9491            </value>
9492            <value>SOLID_COLOR
9493              <notes>
9494              Each pixel in `[R, G_even, G_odd, B]` is replaced by its
9495              respective color channel provided in
9496              android.sensor.testPatternData.
9497
9498              For example:
9499
9500                  android.sensor.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
9501
9502              All green pixels are 100% green. All red/blue pixels are black.
9503
9504                  android.sensor.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
9505
9506              All red pixels are 100% red. Only the odd green pixels
9507              are 100% green. All blue pixels are 100% black.
9508              </notes>
9509            </value>
9510            <value>COLOR_BARS
9511              <notes>
9512              All pixel data is replaced with an 8-bar color pattern.
9513
9514              The vertical bars (left-to-right) are as follows:
9515
9516              * 100% white
9517              * yellow
9518              * cyan
9519              * green
9520              * magenta
9521              * red
9522              * blue
9523              * black
9524
9525              In general the image would look like the following:
9526
9527                 W Y C G M R B K
9528                 W Y C G M R B K
9529                 W Y C G M R B K
9530                 W Y C G M R B K
9531                 W Y C G M R B K
9532                 . . . . . . . .
9533                 . . . . . . . .
9534                 . . . . . . . .
9535
9536                 (B = Blue, K = Black)
9537
9538             Each bar should take up 1/8 of the sensor pixel array width.
9539             When this is not possible, the bar size should be rounded
9540             down to the nearest integer and the pattern can repeat
9541             on the right side.
9542
9543             Each bar's height must always take up the full sensor
9544             pixel array height.
9545
9546             Each pixel in this test pattern must be set to either
9547             0% intensity or 100% intensity.
9548             </notes>
9549            </value>
9550            <value>COLOR_BARS_FADE_TO_GRAY
9551              <notes>
9552              The test pattern is similar to COLOR_BARS, except that
9553              each bar should start at its specified color at the top,
9554              and fade to gray at the bottom.
9555
9556              Furthermore each bar is further subdivided into a left and
9557              right half. The left half should have a smooth gradient,
9558              and the right half should have a quantized gradient.
9559
9560              In particular, the right half's should consist of blocks of the
9561              same color for 1/16th active sensor pixel array width.
9562
9563              The least significant bits in the quantized gradient should
9564              be copied from the most significant bits of the smooth gradient.
9565
9566              The height of each bar should always be a multiple of 128.
9567              When this is not the case, the pattern should repeat at the bottom
9568              of the image.
9569              </notes>
9570            </value>
9571            <value>PN9
9572              <notes>
9573              All pixel data is replaced by a pseudo-random sequence
9574              generated from a PN9 512-bit sequence (typically implemented
9575              in hardware with a linear feedback shift register).
9576
9577              The generator should be reset at the beginning of each frame,
9578              and thus each subsequent raw frame with this test pattern should
9579              be exactly the same as the last.
9580              </notes>
9581            </value>
9582            <value visibility="test" hal_version="3.6">BLACK
9583              <notes>
9584              All pixel data is replaced by 0% intensity (black) values.
9585
9586              This test pattern is identical to SOLID_COLOR with a value of `[0, 0, 0, 0]` for
9587              android.sensor.testPatternData.  It is recommended that devices implement full
9588              SOLID_COLOR support instead, but BLACK can be used to provide minimal support for a
9589              test pattern suitable for privacy use cases.
9590              </notes>
9591            </value>
9592            <value id="256">CUSTOM1
9593              <notes>The first custom test pattern. All custom patterns that are
9594              available only on this camera device are at least this numeric
9595              value.
9596
9597              All of the custom test patterns will be static
9598              (that is the raw image must not vary from frame to frame).
9599              </notes>
9600            </value>
9601          </enum>
9602          <description>When enabled, the sensor sends a test pattern instead of
9603          doing a real exposure from the camera.
9604          </description>
9605          <range>android.sensor.availableTestPatternModes</range>
9606          <details>
9607          When a test pattern is enabled, all manual sensor controls specified
9608          by android.sensor.* will be ignored. All other controls should
9609          work as normal.
9610
9611          For example, if manual flash is enabled, flash firing should still
9612          occur (and that the test pattern remain unmodified, since the flash
9613          would not actually affect it).
9614
9615          Defaults to OFF.
9616          </details>
9617          <hal_details>
9618          All test patterns are specified in the Bayer domain.
9619
9620          The HAL may choose to substitute test patterns from the sensor
9621          with test patterns from on-device memory. In that case, it should be
9622          indistinguishable to the ISP whether the data came from the
9623          sensor interconnect bus (such as CSI2) or memory.
9624          </hal_details>
9625        </entry>
9626      </controls>
9627      <dynamic>
9628        <clone entry="android.sensor.testPatternData" kind="controls">
9629        </clone>
9630        <clone entry="android.sensor.testPatternMode" kind="controls">
9631        </clone>
9632      </dynamic>
9633      <static>
9634        <entry name="availableTestPatternModes" type="int32" visibility="public" optional="true"
9635          type_notes="list of enums" container="array">
9636          <array>
9637            <size>n</size>
9638          </array>
9639          <description>List of sensor test pattern modes for android.sensor.testPatternMode
9640          supported by this camera device.
9641          </description>
9642          <range>Any value listed in android.sensor.testPatternMode</range>
9643          <details>
9644            Defaults to OFF, and always includes OFF if defined.
9645          </details>
9646          <hal_details>
9647            All custom modes must be >= CUSTOM1.
9648          </hal_details>
9649        </entry>
9650      </static>
9651      <dynamic>
9652        <entry name="rollingShutterSkew" type="int64" visibility="public" hwlevel="limited">
9653          <description>Duration between the start of exposure for the first row of the image sensor,
9654          and the start of exposure for one past the last row of the image sensor.</description>
9655          <units>Nanoseconds</units>
9656          <range> &amp;gt;= 0 and &amp;lt;
9657          {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration}.</range>
9658          <details>
9659          This is the exposure time skew between the first and `(last+1)` row exposure start times. The
9660          first row and the last row are the first and last rows inside of the
9661          android.sensor.info.activeArraySize.
9662
9663          For typical camera sensors that use rolling shutters, this is also equivalent to the frame
9664          readout time.
9665
9666          If the image sensor is operating in a binned or cropped mode due to the current output
9667          target resolutions, it's possible this skew is reported to be larger than the exposure
9668          time, for example, since it is based on the full array even if a partial array is read
9669          out. Be sure to scale the number to cover the section of the sensor actually being used
9670          for the outputs you care about. So if your output covers N rows of the active array of
9671          height H, scale this value by N/H to get the total skew for that viewport.
9672
9673          *Note:* Prior to Android 11, this field was described as measuring duration from
9674          first to last row of the image sensor, which is not equal to the frame readout time for a
9675          rolling shutter sensor. Implementations generally reported the latter value, so to resolve
9676          the inconsistency, the description has been updated to range from (first, last+1) row
9677          exposure start, instead.
9678          </details>
9679          <hal_details>
9680          The HAL must report `0` if the sensor is using global shutter, where all pixels begin
9681          exposure at the same time.
9682          </hal_details>
9683          <tag id="V1" />
9684        </entry>
9685      </dynamic>
9686      <static>
9687        <entry name="opticalBlackRegions" type="int32" visibility="public" optional="true"
9688          container="array" typedef="rectangle">
9689          <array>
9690            <size>4</size>
9691            <size>num_regions</size>
9692          </array>
9693          <description>List of disjoint rectangles indicating the sensor
9694          optically shielded black pixel regions.
9695          </description>
9696          <details>
9697            In most camera sensors, the active array is surrounded by some
9698            optically shielded pixel areas. By blocking light, these pixels
9699            provides a reliable black reference for black level compensation
9700            in active array region.
9701
9702            This key provides a list of disjoint rectangles specifying the
9703            regions of optically shielded (with metal shield) black pixel
9704            regions if the camera device is capable of reading out these black
9705            pixels in the output raw images. In comparison to the fixed black
9706            level values reported by android.sensor.blackLevelPattern, this key
9707            may provide a more accurate way for the application to calculate
9708            black level of each captured raw images.
9709
9710            When this key is reported, the android.sensor.dynamicBlackLevel and
9711            android.sensor.dynamicWhiteLevel will also be reported.
9712          </details>
9713          <ndk_details>
9714            The data representation is `int[4]`, which maps to `(left, top, width, height)`.
9715          </ndk_details>
9716          <hal_details>
9717            This array contains (xmin, ymin, width, height). The (xmin, ymin)
9718            must be &amp;gt;= (0,0) and &amp;lt;=
9719            android.sensor.info.pixelArraySize. The (width, height) must be
9720            &amp;lt;= android.sensor.info.pixelArraySize. Each region must be
9721            outside the region reported by
9722            android.sensor.info.preCorrectionActiveArraySize.
9723
9724            The HAL must report minimal number of disjoint regions for the
9725            optically shielded back pixel regions. For example, if a region can
9726            be covered by one rectangle, the HAL must not split this region into
9727            multiple rectangles.
9728          </hal_details>
9729        </entry>
9730      </static>
9731      <dynamic>
9732        <entry name="dynamicBlackLevel" type="float" visibility="public"
9733        optional="true" type_notes="2x2 raw count block" container="array">
9734          <array>
9735            <size>4</size>
9736          </array>
9737          <description>
9738          A per-frame dynamic black level offset for each of the color filter
9739          arrangement (CFA) mosaic channels.
9740          </description>
9741          <range>&amp;gt;= 0 for each.</range>
9742          <details>
9743          Camera sensor black levels may vary dramatically for different
9744          capture settings (e.g. android.sensor.sensitivity). The fixed black
9745          level reported by android.sensor.blackLevelPattern may be too
9746          inaccurate to represent the actual value on a per-frame basis. The
9747          camera device internal pipeline relies on reliable black level values
9748          to process the raw images appropriately. To get the best image
9749          quality, the camera device may choose to estimate the per frame black
9750          level values either based on optically shielded black regions
9751          (android.sensor.opticalBlackRegions) or its internal model.
9752
9753          This key reports the camera device estimated per-frame zero light
9754          value for each of the CFA mosaic channels in the camera sensor. The
9755          android.sensor.blackLevelPattern may only represent a coarse
9756          approximation of the actual black level values. This value is the
9757          black level used in camera device internal image processing pipeline
9758          and generally more accurate than the fixed black level values.
9759          However, since they are estimated values by the camera device, they
9760          may not be as accurate as the black level values calculated from the
9761          optical black pixels reported by android.sensor.opticalBlackRegions.
9762
9763          The values are given in the same order as channels listed for the CFA
9764          layout key (see android.sensor.info.colorFilterArrangement), i.e. the
9765          nth value given corresponds to the black level offset for the nth
9766          color channel listed in the CFA.
9767
9768          For a MONOCHROME camera, all of the 2x2 channels must have the same values.
9769
9770          This key will be available if android.sensor.opticalBlackRegions is available or the
9771          camera device advertises this key via {@link
9772          android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys|ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}.
9773          </details>
9774          <hal_details>
9775          The values are given in row-column scan order, with the first value
9776          corresponding to the element of the CFA in row=0, column=0.
9777          </hal_details>
9778          <tag id="RAW" />
9779        </entry>
9780        <entry name="dynamicWhiteLevel" type="int32" visibility="public"
9781        optional="true" >
9782          <description>
9783          Maximum raw value output by sensor for this frame.
9784          </description>
9785          <range> &amp;gt;= 0</range>
9786          <details>
9787          Since the android.sensor.blackLevelPattern may change for different
9788          capture settings (e.g., android.sensor.sensitivity), the white
9789          level will change accordingly. This key is similar to
9790          android.sensor.info.whiteLevel, but specifies the camera device
9791          estimated white level for each frame.
9792
9793          This key will be available if android.sensor.opticalBlackRegions is
9794          available or the camera device advertises this key via
9795          {@link android.hardware.camera2.CameraCharacteristics#getAvailableCaptureRequestKeys|ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}.
9796          </details>
9797          <hal_details>
9798          The full bit depth of the sensor must be available in the raw data,
9799          so the value for linear sensors should not be significantly lower
9800          than maximum raw value supported, i.e. 2^(sensor bits per pixel).
9801          </hal_details>
9802          <tag id="RAW" />
9803        </entry>
9804      </dynamic>
9805      <static>
9806        <entry name="opaqueRawSize" type="int32" visibility="system" container="array">
9807          <array>
9808            <size>n</size>
9809            <size>3</size>
9810          </array>
9811          <description>Size in bytes for all the listed opaque RAW buffer sizes</description>
9812          <range>Must be large enough to fit the opaque RAW of corresponding size produced by
9813          the camera</range>
9814          <details>
9815          This configurations are listed as `(width, height, size_in_bytes)` tuples.
9816          This is used for sizing the gralloc buffers for opaque RAW buffers.
9817          All RAW_OPAQUE output stream configuration listed in
9818          android.scaler.availableStreamConfigurations will have a corresponding tuple in
9819          this key.
9820          </details>
9821          <hal_details>
9822          This key is added in legacy HAL3.4.
9823
9824          For legacy HAL3.4 or above: devices advertising RAW_OPAQUE format output must list this
9825          key.  For legacy HAL3.3 or earlier devices: if RAW_OPAQUE ouput is advertised, camera
9826          framework will derive this key by assuming each pixel takes two bytes and no padding bytes
9827          between rows.
9828          </hal_details>
9829        </entry>
9830        <entry name="opaqueRawSizeMaximumResolution" type="int32" visibility="system"
9831          container="array" hal_version="3.6">
9832          <array>
9833            <size>n</size>
9834            <size>3</size>
9835          </array>
9836          <description>Size in bytes for all the listed opaque RAW buffer sizes when
9837            android.sensor.pixelMode is set to
9838            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
9839          </description>
9840          <range>Must be large enough to fit the opaque RAW of corresponding size produced by
9841          the camera</range>
9842          <details>
9843          Refer to android.sensor.opaqueRawSize for details.
9844          </details>
9845          <hal_details>
9846          Refer to android.sensor.opaqueRawSize for details.
9847          </hal_details>
9848        </entry>
9849      </static>
9850      <controls>
9851        <entry name="pixelMode" type="byte" visibility="public" enum="true"
9852               hal_version="3.6">
9853          <enum>
9854            <value>DEFAULT
9855            <notes> This is the default sensor pixel mode. This is the only sensor pixel mode
9856              supported unless a camera device advertises
9857              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}.
9858              </notes>
9859            </value>
9860            <value>MAXIMUM_RESOLUTION
9861            <notes> This sensor pixel mode is offered by devices with capability
9862              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}.
9863              In this mode, sensors typically do not bin pixels, as a result can offer larger
9864              image sizes.
9865            </notes>
9866            </value>
9867          </enum>
9868          <description>
9869           Switches sensor pixel mode between maximum resolution mode and default mode.
9870          </description>
9871          <details>
9872            This key controls whether the camera sensor operates in
9873            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}
9874            mode or not. By default, all camera devices operate in
9875            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT} mode.
9876            When operating in
9877            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT} mode, sensors
9878            with {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
9879            capability would typically perform pixel binning in order to improve low light
9880            performance, noise reduction etc. However, in
9881            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}
9882            mode (supported only
9883            by {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
9884            sensors), sensors typically operate in unbinned mode allowing for a larger image size.
9885            The stream configurations supported in
9886            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}
9887            mode are also different from those of
9888            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT} mode.
9889            They can be queried through
9890            {@link android.hardware.camera2.CameraCharacteristics#get} with
9891            {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION)}.
9892            Unless reported by both
9893            {@link android.hardware.camera2.params.StreamConfigurationMap}s, the outputs from
9894            `android.scaler.streamConfigurationMapMaximumResolution` and
9895            `android.scaler.streamConfigurationMap`
9896            must not be mixed in the same CaptureRequest. In other words, these outputs are
9897            exclusive to each other.
9898            This key does not need to be set for reprocess requests.
9899          </details>
9900        </entry>
9901      </controls>
9902      <dynamic>
9903        <clone entry="android.sensor.pixelMode" kind="controls">
9904        </clone>
9905        <entry name="rawBinningFactorUsed" type="byte" visibility="public" enum="true"
9906          typedef="boolean" hal_version="3.6">
9907          <enum>
9908            <value>TRUE
9909            <notes> The `RAW` targets in this capture have android.sensor.info.binningFactor as the
9910              bayer pattern.
9911              </notes>
9912            </value>
9913            <value>FALSE
9914            <notes> The `RAW` targets have a regular bayer pattern in this capture.
9915            </notes>
9916            </value>
9917          </enum>
9918          <description>
9919            Whether `RAW` images requested have their bayer pattern as described by
9920            android.sensor.info.binningFactor.
9921          </description>
9922          <details>
9923            This key will only be present in devices advertisting the
9924            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
9925            capability which also advertise `REMOSAIC_REPROCESSING` capability. On all other devices
9926            RAW targets will have a regular bayer pattern.
9927          </details>
9928        </entry>
9929      </dynamic>
9930    </section>
9931    <section name="shading">
9932      <controls>
9933        <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full">
9934          <enum>
9935            <value>OFF
9936            <notes>No lens shading correction is applied.</notes></value>
9937            <value>FAST
9938            <notes>Apply lens shading corrections, without slowing
9939            frame rate relative to sensor raw output</notes></value>
9940            <value>HIGH_QUALITY
9941            <notes>Apply high-quality lens shading correction, at the
9942            cost of possibly reduced frame rate.</notes></value>
9943          </enum>
9944          <description>Quality of lens shading correction applied
9945          to the image data.</description>
9946          <range>android.shading.availableModes</range>
9947          <details>
9948          When set to OFF mode, no lens shading correction will be applied by the
9949          camera device, and an identity lens shading map data will be provided
9950          if `android.statistics.lensShadingMapMode == ON`. For example, for lens
9951          shading map with size of `[ 4, 3 ]`,
9952          the output android.statistics.lensShadingCorrectionMap for this case will be an identity
9953          map shown below:
9954
9955              [ 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
9956               1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
9957               1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
9958               1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
9959               1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
9960               1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
9961
9962          When set to other modes, lens shading correction will be applied by the camera
9963          device. Applications can request lens shading map data by setting
9964          android.statistics.lensShadingMapMode to ON, and then the camera device will provide lens
9965          shading map data in android.statistics.lensShadingCorrectionMap; the returned shading map
9966          data will be the one applied by the camera device for this capture request.
9967
9968          The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
9969          the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
9970          AWB are in AUTO modes(android.control.aeMode `!=` OFF and android.control.awbMode `!=`
9971          OFF), to get best results, it is recommended that the applications wait for the AE and AWB
9972          to be converged before using the returned shading map data.
9973          </details>
9974        </entry>
9975        <entry name="strength" type="byte">
9976          <description>Control the amount of shading correction
9977          applied to the images</description>
9978          <units>unitless: 1-10; 10 is full shading
9979          compensation</units>
9980          <tag id="FUTURE" />
9981        </entry>
9982      </controls>
9983      <dynamic>
9984        <clone entry="android.shading.mode" kind="controls">
9985        </clone>
9986      </dynamic>
9987      <static>
9988        <entry name="availableModes" type="byte" visibility="public"
9989            type_notes="List of enums (android.shading.mode)." container="array"
9990            typedef="enumList" hwlevel="legacy">
9991          <array>
9992            <size>n</size>
9993          </array>
9994          <description>
9995          List of lens shading modes for android.shading.mode that are supported by this camera device.
9996          </description>
9997          <range>Any value listed in android.shading.mode</range>
9998          <details>
9999              This list contains lens shading modes that can be set for the camera device.
10000              Camera devices that support the MANUAL_POST_PROCESSING capability will always
10001              list OFF and FAST mode. This includes all FULL level devices.
10002              LEGACY devices will always only support FAST mode.
10003          </details>
10004          <hal_details>
10005            HAL must support both FAST and HIGH_QUALITY if lens shading correction control is
10006            available on the camera device, but the underlying implementation can be the same for
10007            both modes. That is, if the highest quality implementation on the camera device does not
10008            slow down capture rate, then FAST and HIGH_QUALITY will generate the same output.
10009          </hal_details>
10010        </entry>
10011      </static>
10012    </section>
10013    <section name="statistics">
10014      <controls>
10015        <entry name="faceDetectMode" type="byte" visibility="public" enum="true"
10016               hwlevel="legacy">
10017          <enum>
10018            <value>OFF
10019            <notes>Do not include face detection statistics in capture
10020            results.</notes></value>
10021            <value optional="true">SIMPLE
10022            <notes>Return face rectangle and confidence values only.
10023            </notes></value>
10024            <value optional="true">FULL
10025            <notes>Return all face
10026            metadata.
10027
10028            In this mode, face rectangles, scores, landmarks, and face IDs are all valid.
10029            </notes></value>
10030          </enum>
10031          <description>Operating mode for the face detector
10032          unit.</description>
10033          <range>android.statistics.info.availableFaceDetectModes</range>
10034          <details>Whether face detection is enabled, and whether it
10035          should output just the basic fields or the full set of
10036          fields.</details>
10037          <hal_details>
10038            SIMPLE mode must fill in android.statistics.faceRectangles and
10039            android.statistics.faceScores.
10040            FULL mode must also fill in android.statistics.faceIds, and
10041            android.statistics.faceLandmarks.
10042          </hal_details>
10043          <tag id="BC" />
10044        </entry>
10045        <entry name="histogramMode" type="byte" enum="true" typedef="boolean">
10046          <enum>
10047            <value>OFF</value>
10048            <value>ON</value>
10049          </enum>
10050          <description>Operating mode for histogram
10051          generation</description>
10052          <tag id="FUTURE" />
10053        </entry>
10054        <entry name="sharpnessMapMode" type="byte" enum="true" typedef="boolean">
10055          <enum>
10056            <value>OFF</value>
10057            <value>ON</value>
10058          </enum>
10059          <description>Operating mode for sharpness map
10060          generation</description>
10061          <tag id="FUTURE" />
10062        </entry>
10063        <entry name="hotPixelMapMode" type="byte" visibility="public" enum="true"
10064        typedef="boolean">
10065          <enum>
10066            <value>OFF
10067            <notes>Hot pixel map production is disabled.
10068            </notes></value>
10069            <value>ON
10070            <notes>Hot pixel map production is enabled.
10071            </notes></value>
10072          </enum>
10073          <description>
10074          Operating mode for hot pixel map generation.
10075          </description>
10076          <range>android.statistics.info.availableHotPixelMapModes</range>
10077          <details>
10078          If set to `true`, a hot pixel map is returned in android.statistics.hotPixelMap.
10079          If set to `false`, no hot pixel map will be returned.
10080          </details>
10081          <tag id="V1" />
10082          <tag id="RAW" />
10083        </entry>
10084      </controls>
10085      <static>
10086        <namespace name="info">
10087          <entry name="availableFaceDetectModes" type="byte"
10088                 visibility="public"
10089                 type_notes="List of enums from android.statistics.faceDetectMode"
10090                 container="array"
10091                 typedef="enumList"
10092                 hwlevel="legacy">
10093            <array>
10094              <size>n</size>
10095            </array>
10096            <description>List of face detection modes for android.statistics.faceDetectMode that are
10097            supported by this camera device.
10098            </description>
10099            <range>Any value listed in android.statistics.faceDetectMode</range>
10100            <details>OFF is always supported.
10101            </details>
10102          </entry>
10103          <entry name="histogramBucketCount" type="int32">
10104            <description>Number of histogram buckets
10105            supported</description>
10106            <range>&amp;gt;= 64</range>
10107            <tag id="FUTURE" />
10108          </entry>
10109          <entry name="maxFaceCount" type="int32" visibility="public" hwlevel="legacy">
10110            <description>The maximum number of simultaneously detectable
10111            faces.</description>
10112            <range>0 for cameras without available face detection; otherwise:
10113            `&gt;=4` for LIMITED or FULL hwlevel devices or
10114            `&gt;0` for LEGACY devices.</range>
10115            <tag id="BC" />
10116          </entry>
10117          <entry name="maxHistogramCount" type="int32">
10118            <description>Maximum value possible for a histogram
10119            bucket</description>
10120            <tag id="FUTURE" />
10121          </entry>
10122          <entry name="maxSharpnessMapValue" type="int32">
10123            <description>Maximum value possible for a sharpness map
10124            region.</description>
10125            <tag id="FUTURE" />
10126          </entry>
10127          <entry name="sharpnessMapSize" type="int32"
10128          type_notes="width x height" container="array" typedef="size">
10129            <array>
10130              <size>2</size>
10131            </array>
10132            <description>Dimensions of the sharpness
10133            map</description>
10134            <range>Must be at least 32 x 32</range>
10135            <tag id="FUTURE" />
10136          </entry>
10137          <entry name="availableHotPixelMapModes" type="byte" visibility="public"
10138                 type_notes="list of enums" container="array" typedef="boolean">
10139            <array>
10140              <size>n</size>
10141            </array>
10142            <description>
10143            List of hot pixel map output modes for android.statistics.hotPixelMapMode that are
10144            supported by this camera device.
10145            </description>
10146            <range>Any value listed in android.statistics.hotPixelMapMode</range>
10147            <details>
10148            If no hotpixel map output is available for this camera device, this will contain only
10149            `false`.
10150
10151            ON is always supported on devices with the RAW capability.
10152            </details>
10153            <tag id="V1" />
10154            <tag id="RAW" />
10155          </entry>
10156          <entry name="availableLensShadingMapModes" type="byte" visibility="public"
10157                 type_notes="list of enums" container="array" typedef="enumList">
10158            <array>
10159              <size>n</size>
10160            </array>
10161            <description>
10162            List of lens shading map output modes for android.statistics.lensShadingMapMode that
10163            are supported by this camera device.
10164            </description>
10165            <range>Any value listed in android.statistics.lensShadingMapMode</range>
10166            <details>
10167            If no lens shading map output is available for this camera device, this key will
10168            contain only OFF.
10169
10170            ON is always supported on devices with the RAW capability.
10171            LEGACY mode devices will always only support OFF.
10172            </details>
10173          </entry>
10174          <entry name="availableOisDataModes" type="byte" visibility="public"
10175                 type_notes="list of enums" container="array" typedef="enumList" hal_version="3.3">
10176            <array>
10177              <size>n</size>
10178            </array>
10179            <description>
10180            List of OIS data output modes for android.statistics.oisDataMode that
10181            are supported by this camera device.
10182            </description>
10183            <range>Any value listed in android.statistics.oisDataMode</range>
10184            <details>
10185            If no OIS data output is available for this camera device, this key will
10186            contain only OFF.
10187            </details>
10188          </entry>
10189        </namespace>
10190      </static>
10191      <dynamic>
10192        <clone entry="android.statistics.faceDetectMode"
10193               kind="controls"></clone>
10194        <entry name="faceIds" type="int32" visibility="ndk_public"
10195               container="array" hwlevel="legacy">
10196          <array>
10197            <size>n</size>
10198          </array>
10199          <description>List of unique IDs for detected faces.</description>
10200          <details>
10201          Each detected face is given a unique ID that is valid for as long as the face is visible
10202          to the camera device.  A face that leaves the field of view and later returns may be
10203          assigned a new ID.
10204
10205          Only available if android.statistics.faceDetectMode == FULL</details>
10206          <tag id="BC" />
10207        </entry>
10208        <entry name="faceLandmarks" type="int32" visibility="ndk_public"
10209               type_notes="(leftEyeX, leftEyeY, rightEyeX, rightEyeY, mouthX, mouthY)"
10210               container="array" hwlevel="legacy">
10211          <array>
10212            <size>n</size>
10213            <size>6</size>
10214          </array>
10215          <description>List of landmarks for detected
10216          faces.</description>
10217          <details>
10218            For devices not supporting android.distortionCorrection.mode control, the coordinate
10219            system always follows that of android.sensor.info.activeArraySize, with `(0, 0)` being
10220            the top-left pixel of the active array.
10221
10222            For devices supporting android.distortionCorrection.mode control, the coordinate
10223            system depends on the mode being set.
10224            When the distortion correction mode is OFF, the coordinate system follows
10225            android.sensor.info.preCorrectionActiveArraySize, with
10226            `(0, 0)` being the top-left pixel of the pre-correction active array.
10227            When the distortion correction mode is not OFF, the coordinate system follows
10228            android.sensor.info.activeArraySize, with
10229            `(0, 0)` being the top-left pixel of the active array.
10230
10231            Only available if android.statistics.faceDetectMode == FULL.
10232
10233            Starting from API level 30, the coordinate system of activeArraySize or
10234            preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
10235            pre-zoomRatio field of view. This means that if the relative position of faces and
10236            the camera device doesn't change, when zooming in by increasing
10237            android.control.zoomRatio, the face landmarks move farther away from the center of the
10238            activeArray or preCorrectionActiveArray. If android.control.zoomRatio is set to 1.0
10239            (default), the face landmarks coordinates won't change as android.scaler.cropRegion
10240            changes. See android.control.zoomRatio for details. Whether to use activeArraySize or
10241            preCorrectionActiveArraySize still depends on distortion correction mode.
10242          </details>
10243          <hal_details>
10244            HAL must always report face landmarks in the coordinate system of pre-correction
10245            active array.
10246          </hal_details>
10247          <tag id="BC" />
10248        </entry>
10249        <entry name="faceRectangles" type="int32" visibility="ndk_public"
10250               type_notes="(xmin, ymin, xmax, ymax). (0,0) is top-left of active pixel area"
10251               container="array" typedef="rectangle" hwlevel="legacy">
10252          <array>
10253            <size>n</size>
10254            <size>4</size>
10255          </array>
10256          <description>List of the bounding rectangles for detected
10257          faces.</description>
10258          <details>
10259            For devices not supporting android.distortionCorrection.mode control, the coordinate
10260            system always follows that of android.sensor.info.activeArraySize, with `(0, 0)` being
10261            the top-left pixel of the active array.
10262
10263            For devices supporting android.distortionCorrection.mode control, the coordinate
10264            system depends on the mode being set.
10265            When the distortion correction mode is OFF, the coordinate system follows
10266            android.sensor.info.preCorrectionActiveArraySize, with
10267            `(0, 0)` being the top-left pixel of the pre-correction active array.
10268            When the distortion correction mode is not OFF, the coordinate system follows
10269            android.sensor.info.activeArraySize, with
10270            `(0, 0)` being the top-left pixel of the active array.
10271
10272            Only available if android.statistics.faceDetectMode != OFF.
10273
10274            Starting from API level 30, the coordinate system of activeArraySize or
10275            preCorrectionActiveArraySize is used to represent post-zoomRatio field of view, not
10276            pre-zoomRatio field of view. This means that if the relative position of faces and
10277            the camera device doesn't change, when zooming in by increasing
10278            android.control.zoomRatio, the face rectangles grow larger and move farther away from
10279            the center of the activeArray or preCorrectionActiveArray. If android.control.zoomRatio
10280            is set to 1.0 (default), the face rectangles won't change as android.scaler.cropRegion
10281            changes. See android.control.zoomRatio for details. Whether to use activeArraySize or
10282            preCorrectionActiveArraySize still depends on distortion correction mode.
10283          </details>
10284          <ndk_details>
10285            The data representation is `int[4]`, which maps to `(left, top, right, bottom)`.
10286          </ndk_details>
10287          <hal_details>
10288            HAL must always report face rectangles in the coordinate system of pre-correction
10289            active array.
10290          </hal_details>
10291          <tag id="BC" />
10292        </entry>
10293        <entry name="faceScores" type="byte" visibility="ndk_public"
10294               container="array" hwlevel="legacy">
10295          <array>
10296            <size>n</size>
10297          </array>
10298          <description>List of the face confidence scores for
10299          detected faces</description>
10300          <range>1-100</range>
10301          <details>Only available if android.statistics.faceDetectMode != OFF.
10302          </details>
10303          <hal_details>
10304          The value should be meaningful (for example, setting 100 at
10305          all times is illegal).</hal_details>
10306          <tag id="BC" />
10307        </entry>
10308        <entry name="faces" type="int32" visibility="java_public" synthetic="true"
10309               container="array" typedef="face" hwlevel="legacy">
10310          <array>
10311            <size>n</size>
10312          </array>
10313          <description>List of the faces detected through camera face detection
10314          in this capture.</description>
10315          <details>
10316          Only available if android.statistics.faceDetectMode `!=` OFF.
10317          </details>
10318        </entry>
10319        <entry name="histogram" type="int32"
10320        type_notes="count of pixels for each color channel that fall into each histogram bucket, scaled to be between 0 and maxHistogramCount"
10321        container="array">
10322          <array>
10323            <size>n</size>
10324            <size>3</size>
10325          </array>
10326          <description>A 3-channel histogram based on the raw
10327          sensor data</description>
10328          <details>The k'th bucket (0-based) covers the input range
10329          (with w = android.sensor.info.whiteLevel) of [ k * w/N,
10330          (k + 1) * w / N ). If only a monochrome sharpness map is
10331          supported, all channels should have the same data</details>
10332          <tag id="FUTURE" />
10333        </entry>
10334        <clone entry="android.statistics.histogramMode"
10335        kind="controls"></clone>
10336        <entry name="sharpnessMap" type="int32"
10337        type_notes="estimated sharpness for each region of the input image. Normalized to be between 0 and maxSharpnessMapValue. Higher values mean sharper (better focused)"
10338        container="array">
10339          <array>
10340            <size>n</size>
10341            <size>m</size>
10342            <size>3</size>
10343          </array>
10344          <description>A 3-channel sharpness map, based on the raw
10345          sensor data</description>
10346          <details>If only a monochrome sharpness map is supported,
10347          all channels should have the same data</details>
10348          <tag id="FUTURE" />
10349        </entry>
10350        <clone entry="android.statistics.sharpnessMapMode"
10351               kind="controls"></clone>
10352        <entry name="lensShadingCorrectionMap" type="byte" visibility="java_public"
10353               typedef="lensShadingMap" hwlevel="full">
10354          <description>The shading map is a low-resolution floating-point map
10355          that lists the coefficients used to correct for vignetting, for each
10356          Bayer color channel.</description>
10357          <range>Each gain factor is &amp;gt;= 1</range>
10358          <details>
10359          The map provided here is the same map that is used by the camera device to
10360          correct both color shading and vignetting for output non-RAW images.
10361
10362          When there is no lens shading correction applied to RAW
10363          output images (android.sensor.info.lensShadingApplied `==`
10364          false), this map is the complete lens shading correction
10365          map; when there is some lens shading correction applied to
10366          the RAW output image (android.sensor.info.lensShadingApplied
10367          `==` true), this map reports the remaining lens shading
10368          correction map that needs to be applied to get shading
10369          corrected images that match the camera device's output for
10370          non-RAW formats.
10371
10372          For a complete shading correction map, the least shaded
10373          section of the image will have a gain factor of 1; all
10374          other sections will have gains above 1.
10375
10376          When android.colorCorrection.mode = TRANSFORM_MATRIX, the map
10377          will take into account the colorCorrection settings.
10378
10379          The shading map is for the entire active pixel array, and is not
10380          affected by the crop region specified in the request. Each shading map
10381          entry is the value of the shading compensation map over a specific
10382          pixel on the sensor.  Specifically, with a (N x M) resolution shading
10383          map, and an active pixel array size (W x H), shading map entry
10384          (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
10385          pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
10386          The map is assumed to be bilinearly interpolated between the sample points.
10387
10388          The channel order is [R, Geven, Godd, B], where Geven is the green
10389          channel for the even rows of a Bayer pattern, and Godd is the odd rows.
10390          The shading map is stored in a fully interleaved format.
10391
10392          The shading map will generally have on the order of 30-40 rows and columns,
10393          and will be smaller than 64x64.
10394
10395          As an example, given a very small map defined as:
10396
10397              width,height = [ 4, 3 ]
10398              values =
10399              [ 1.3, 1.2, 1.15, 1.2,  1.2, 1.2, 1.15, 1.2,
10400                  1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
10401                1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
10402                  1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
10403                1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
10404                  1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
10405
10406          The low-resolution scaling map images for each channel are
10407          (displayed using nearest-neighbor interpolation):
10408
10409          ![Red lens shading map](android.statistics.lensShadingMap/red_shading.png)
10410          ![Green (even rows) lens shading map](android.statistics.lensShadingMap/green_e_shading.png)
10411          ![Green (odd rows) lens shading map](android.statistics.lensShadingMap/green_o_shading.png)
10412          ![Blue lens shading map](android.statistics.lensShadingMap/blue_shading.png)
10413
10414          As a visualization only, inverting the full-color map to recover an
10415          image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:
10416
10417          ![Image of a uniform white wall (inverse shading map)](android.statistics.lensShadingMap/inv_shading.png)
10418
10419          For a MONOCHROME camera, all of the 2x2 channels must have the same values. An example
10420          shading map for such a camera is defined as:
10421
10422              android.lens.info.shadingMapSize = [ 4, 3 ]
10423              android.statistics.lensShadingMap =
10424              [ 1.3, 1.3, 1.3, 1.3,  1.2, 1.2, 1.2, 1.2,
10425                  1.1, 1.1, 1.1, 1.1,  1.3, 1.3, 1.3, 1.3,
10426                1.2, 1.2, 1.2, 1.2,  1.1, 1.1, 1.1, 1.1,
10427                  1.0, 1.0, 1.0, 1.0,  1.2, 1.2, 1.2, 1.2,
10428                1.3, 1.3, 1.3, 1.3,   1.2, 1.2, 1.2, 1.2,
10429                  1.2, 1.2, 1.2, 1.2,  1.3, 1.3, 1.3, 1.3 ]
10430
10431          </details>
10432        </entry>
10433        <entry name="lensShadingMap" type="float" visibility="ndk_public"
10434               type_notes="2D array of float gain factors per channel to correct lens shading"
10435               container="array" hwlevel="full">
10436          <array>
10437            <size>4</size>
10438            <size>n</size>
10439            <size>m</size>
10440          </array>
10441          <description>The shading map is a low-resolution floating-point map
10442          that lists the coefficients used to correct for vignetting and color shading,
10443          for each Bayer color channel of RAW image data.</description>
10444          <range>Each gain factor is &amp;gt;= 1</range>
10445          <details>
10446          The map provided here is the same map that is used by the camera device to
10447          correct both color shading and vignetting for output non-RAW images.
10448
10449          When there is no lens shading correction applied to RAW
10450          output images (android.sensor.info.lensShadingApplied `==`
10451          false), this map is the complete lens shading correction
10452          map; when there is some lens shading correction applied to
10453          the RAW output image (android.sensor.info.lensShadingApplied
10454          `==` true), this map reports the remaining lens shading
10455          correction map that needs to be applied to get shading
10456          corrected images that match the camera device's output for
10457          non-RAW formats.
10458
10459          For a complete shading correction map, the least shaded
10460          section of the image will have a gain factor of 1; all
10461          other sections will have gains above 1.
10462
10463          When android.colorCorrection.mode = TRANSFORM_MATRIX, the map
10464          will take into account the colorCorrection settings.
10465
10466          The shading map is for the entire active pixel array, and is not
10467          affected by the crop region specified in the request. Each shading map
10468          entry is the value of the shading compensation map over a specific
10469          pixel on the sensor.  Specifically, with a (N x M) resolution shading
10470          map, and an active pixel array size (W x H), shading map entry
10471          (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
10472          pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
10473          The map is assumed to be bilinearly interpolated between the sample points.
10474
10475          For a Bayer camera, the channel order is [R, Geven, Godd, B], where Geven is
10476          the green channel for the even rows of a Bayer pattern, and Godd is the odd rows.
10477          The shading map is stored in a fully interleaved format, and its size
10478          is provided in the camera static metadata by android.lens.info.shadingMapSize.
10479
10480          The shading map will generally have on the order of 30-40 rows and columns,
10481          and will be smaller than 64x64.
10482
10483          As an example, given a very small map for a Bayer camera defined as:
10484
10485              android.lens.info.shadingMapSize = [ 4, 3 ]
10486              android.statistics.lensShadingMap =
10487              [ 1.3, 1.2, 1.15, 1.2,  1.2, 1.2, 1.15, 1.2,
10488                  1.1, 1.2, 1.2, 1.2,  1.3, 1.2, 1.3, 1.3,
10489                1.2, 1.2, 1.25, 1.1,  1.1, 1.1, 1.1, 1.0,
10490                  1.0, 1.0, 1.0, 1.0,  1.2, 1.3, 1.25, 1.2,
10491                1.3, 1.2, 1.2, 1.3,   1.2, 1.15, 1.1, 1.2,
10492                  1.2, 1.1, 1.0, 1.2,  1.3, 1.15, 1.2, 1.3 ]
10493
10494          The low-resolution scaling map images for each channel are
10495          (displayed using nearest-neighbor interpolation):
10496
10497          ![Red lens shading map](android.statistics.lensShadingMap/red_shading.png)
10498          ![Green (even rows) lens shading map](android.statistics.lensShadingMap/green_e_shading.png)
10499          ![Green (odd rows) lens shading map](android.statistics.lensShadingMap/green_o_shading.png)
10500          ![Blue lens shading map](android.statistics.lensShadingMap/blue_shading.png)
10501
10502          As a visualization only, inverting the full-color map to recover an
10503          image of a gray wall (using bicubic interpolation for visual quality)
10504          as captured by the sensor gives:
10505
10506          ![Image of a uniform white wall (inverse shading map)](android.statistics.lensShadingMap/inv_shading.png)
10507
10508          For a MONOCHROME camera, all of the 2x2 channels must have the same values. An example
10509          shading map for such a camera is defined as:
10510
10511              android.lens.info.shadingMapSize = [ 4, 3 ]
10512              android.statistics.lensShadingMap =
10513              [ 1.3, 1.3, 1.3, 1.3,  1.2, 1.2, 1.2, 1.2,
10514                  1.1, 1.1, 1.1, 1.1,  1.3, 1.3, 1.3, 1.3,
10515                1.2, 1.2, 1.2, 1.2,  1.1, 1.1, 1.1, 1.1,
10516                  1.0, 1.0, 1.0, 1.0,  1.2, 1.2, 1.2, 1.2,
10517                1.3, 1.3, 1.3, 1.3,   1.2, 1.2, 1.2, 1.2,
10518                  1.2, 1.2, 1.2, 1.2,  1.3, 1.3, 1.3, 1.3 ]
10519
10520          Note that the RAW image data might be subject to lens shading
10521          correction not reported on this map. Query
10522          android.sensor.info.lensShadingApplied to see if RAW image data has subject
10523          to lens shading correction. If android.sensor.info.lensShadingApplied
10524          is TRUE, the RAW image data is subject to partial or full lens shading
10525          correction. In the case full lens shading correction is applied to RAW
10526          images, the gain factor map reported in this key will contain all 1.0 gains.
10527          In other words, the map reported in this key is the remaining lens shading
10528          that needs to be applied on the RAW image to get images without lens shading
10529          artifacts. See android.request.maxNumOutputRaw for a list of RAW image
10530          formats.
10531          </details>
10532          <hal_details>
10533          The lens shading map calculation may depend on exposure and white balance statistics.
10534          When AE and AWB are in AUTO modes
10535          (android.control.aeMode `!=` OFF and android.control.awbMode `!=` OFF), the HAL
10536          may have all the information it need to generate most accurate lens shading map. When
10537          AE or AWB are in manual mode
10538          (android.control.aeMode `==` OFF or android.control.awbMode `==` OFF), the shading map
10539          may be adversely impacted by manual exposure or white balance parameters. To avoid
10540          generating unreliable shading map data, the HAL may choose to lock the shading map with
10541          the latest known good map generated when the AE and AWB are in AUTO modes.
10542          </hal_details>
10543        </entry>
10544        <entry name="predictedColorGains" type="float"
10545               visibility="hidden"
10546               deprecated="true"
10547               optional="true"
10548               type_notes="A 1D array of floats for 4 color channel gains"
10549               container="array">
10550          <array>
10551            <size>4</size>
10552          </array>
10553          <description>The best-fit color channel gains calculated
10554          by the camera device's statistics units for the current output frame.
10555          </description>
10556          <deprecation_description>
10557          Never fully implemented or specified; do not use
10558          </deprecation_description>
10559          <details>
10560          This may be different than the gains used for this frame,
10561          since statistics processing on data from a new frame
10562          typically completes after the transform has already been
10563          applied to that frame.
10564
10565          The 4 channel gains are defined in Bayer domain,
10566          see android.colorCorrection.gains for details.
10567
10568          This value should always be calculated by the auto-white balance (AWB) block,
10569          regardless of the android.control.* current values.
10570          </details>
10571        </entry>
10572        <entry name="predictedColorTransform" type="rational"
10573               visibility="hidden"
10574               deprecated="true"
10575               optional="true"
10576               type_notes="3x3 rational matrix in row-major order"
10577               container="array">
10578          <array>
10579            <size>3</size>
10580            <size>3</size>
10581          </array>
10582          <description>The best-fit color transform matrix estimate
10583          calculated by the camera device's statistics units for the current
10584          output frame.</description>
10585          <deprecation_description>
10586          Never fully implemented or specified; do not use
10587          </deprecation_description>
10588          <details>The camera device will provide the estimate from its
10589          statistics unit on the white balance transforms to use
10590          for the next frame. These are the values the camera device believes
10591          are the best fit for the current output frame. This may
10592          be different than the transform used for this frame, since
10593          statistics processing on data from a new frame typically
10594          completes after the transform has already been applied to
10595          that frame.
10596
10597          These estimates must be provided for all frames, even if
10598          capture settings and color transforms are set by the application.
10599
10600          This value should always be calculated by the auto-white balance (AWB) block,
10601          regardless of the android.control.* current values.
10602          </details>
10603        </entry>
10604        <entry name="sceneFlicker" type="byte" visibility="public" enum="true"
10605               hwlevel="full">
10606          <enum>
10607            <value>NONE
10608            <notes>The camera device does not detect any flickering illumination
10609            in the current scene.</notes></value>
10610            <value>50HZ
10611            <notes>The camera device detects illumination flickering at 50Hz
10612            in the current scene.</notes></value>
10613            <value>60HZ
10614            <notes>The camera device detects illumination flickering at 60Hz
10615            in the current scene.</notes></value>
10616          </enum>
10617          <description>The camera device estimated scene illumination lighting
10618          frequency.</description>
10619          <details>
10620          Many light sources, such as most fluorescent lights, flicker at a rate
10621          that depends on the local utility power standards. This flicker must be
10622          accounted for by auto-exposure routines to avoid artifacts in captured images.
10623          The camera device uses this entry to tell the application what the scene
10624          illuminant frequency is.
10625
10626          When manual exposure control is enabled
10627          (`android.control.aeMode == OFF` or `android.control.mode ==
10628          OFF`), the android.control.aeAntibandingMode doesn't perform
10629          antibanding, and the application can ensure it selects
10630          exposure times that do not cause banding issues by looking
10631          into this metadata field. See
10632          android.control.aeAntibandingMode for more details.
10633
10634          Reports NONE if there doesn't appear to be flickering illumination.
10635          </details>
10636        </entry>
10637        <clone entry="android.statistics.hotPixelMapMode" kind="controls">
10638        </clone>
10639        <entry name="hotPixelMap" type="int32" visibility="public"
10640        type_notes="list of coordinates based on android.sensor.pixelArraySize"
10641        container="array" typedef="point">
10642          <array>
10643            <size>2</size>
10644            <size>n</size>
10645          </array>
10646          <description>
10647          List of `(x, y)` coordinates of hot/defective pixels on the sensor.
10648          </description>
10649          <range>
10650          n &lt;= number of pixels on the sensor.
10651          The `(x, y)` coordinates must be bounded by
10652          android.sensor.info.pixelArraySize.
10653          </range>
10654          <details>
10655          A coordinate `(x, y)` must lie between `(0, 0)`, and
10656          `(width - 1, height - 1)` (inclusive), which are the top-left and
10657          bottom-right of the pixel array, respectively. The width and
10658          height dimensions are given in android.sensor.info.pixelArraySize.
10659          This may include hot pixels that lie outside of the active array
10660          bounds given by android.sensor.info.activeArraySize.
10661          </details>
10662          <hal_details>
10663          A hotpixel map contains the coordinates of pixels on the camera
10664          sensor that do report valid values (usually due to defects in
10665          the camera sensor). This includes pixels that are stuck at certain
10666          values, or have a response that does not accuractly encode the
10667          incoming light from the scene.
10668
10669          To avoid performance issues, there should be significantly fewer hot
10670          pixels than actual pixels on the camera sensor.
10671          </hal_details>
10672          <tag id="V1" />
10673          <tag id="RAW" />
10674        </entry>
10675      </dynamic>
10676      <controls>
10677        <entry name="lensShadingMapMode" type="byte" visibility="public" enum="true" hwlevel="full">
10678          <enum>
10679            <value>OFF
10680            <notes>Do not include a lens shading map in the capture result.</notes></value>
10681            <value>ON
10682            <notes>Include a lens shading map in the capture result.</notes></value>
10683          </enum>
10684          <description>Whether the camera device will output the lens
10685          shading map in output result metadata.</description>
10686          <range>android.statistics.info.availableLensShadingMapModes</range>
10687          <details>When set to ON,
10688          android.statistics.lensShadingMap will be provided in
10689          the output result metadata.
10690
10691          ON is always supported on devices with the RAW capability.
10692          </details>
10693          <tag id="RAW" />
10694        </entry>
10695      </controls>
10696      <dynamic>
10697        <clone entry="android.statistics.lensShadingMapMode" kind="controls">
10698        </clone>
10699      </dynamic>
10700      <controls>
10701        <entry name="oisDataMode" type="byte" visibility="public" enum="true" hal_version="3.3">
10702          <enum>
10703            <value>OFF
10704            <notes>Do not include OIS data in the capture result.</notes></value>
10705            <value>ON
10706            <notes>Include OIS data in the capture result.</notes>
10707            <sdk_notes>android.statistics.oisSamples provides OIS sample data in the
10708            output result metadata.
10709            </sdk_notes>
10710            <ndk_notes>android.statistics.oisTimestamps, android.statistics.oisXShifts,
10711            and android.statistics.oisYShifts provide OIS data in the output result metadata.
10712            </ndk_notes>
10713            </value>
10714          </enum>
10715          <description>A control for selecting whether optical stabilization (OIS) position
10716          information is included in output result metadata.</description>
10717          <range>android.statistics.info.availableOisDataModes</range>
10718          <details>
10719          Since optical image stabilization generally involves motion much faster than the duration
10720          of individual image exposure, multiple OIS samples can be included for a single capture
10721          result. For example, if the OIS reporting operates at 200 Hz, a typical camera operating
10722          at 30fps may have 6-7 OIS samples per capture result. This information can be combined
10723          with the rolling shutter skew to account for lens motion during image exposure in
10724          post-processing algorithms.
10725          </details>
10726        </entry>
10727      </controls>
10728      <dynamic>
10729        <clone entry="android.statistics.oisDataMode" kind="controls">
10730        </clone>
10731        <entry name="oisTimestamps" type="int64" visibility="ndk_public" container="array" hal_version="3.3">
10732          <array>
10733            <size>n</size>
10734          </array>
10735          <description>
10736          An array of timestamps of OIS samples, in nanoseconds.
10737          </description>
10738          <units>nanoseconds</units>
10739          <details>
10740          The array contains the timestamps of OIS samples. The timestamps are in the same
10741          timebase as and comparable to android.sensor.timestamp.
10742          </details>
10743        </entry>
10744        <entry name="oisXShifts" type="float" visibility="ndk_public" container="array" hal_version="3.3">
10745          <array>
10746            <size>n</size>
10747          </array>
10748          <description>
10749          An array of shifts of OIS samples, in x direction.
10750          </description>
10751          <units>Pixels in active array.</units>
10752          <details>
10753          The array contains the amount of shifts in x direction, in pixels, based on OIS samples.
10754          A positive value is a shift from left to right in the pre-correction active array
10755          coordinate system. For example, if the optical center is (1000, 500) in pre-correction
10756          active array coordinates, a shift of (3, 0) puts the new optical center at (1003, 500).
10757
10758          The number of shifts must match the number of timestamps in
10759          android.statistics.oisTimestamps.
10760
10761          The OIS samples are not affected by whether lens distortion correction is enabled (on
10762          supporting devices). They are always reported in pre-correction active array coordinates,
10763          since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
10764          is needed.
10765          </details>
10766        </entry>
10767        <entry name="oisYShifts" type="float" visibility="ndk_public" container="array" hal_version="3.3">
10768          <array>
10769            <size>n</size>
10770          </array>
10771          <description>
10772          An array of shifts of OIS samples, in y direction.
10773          </description>
10774          <units>Pixels in active array.</units>
10775          <details>
10776          The array contains the amount of shifts in y direction, in pixels, based on OIS samples.
10777          A positive value is a shift from top to bottom in pre-correction active array coordinate
10778          system. For example, if the optical center is (1000, 500) in active array coordinates, a
10779          shift of (0, 5) puts the new optical center at (1000, 505).
10780
10781          The number of shifts must match the number of timestamps in
10782          android.statistics.oisTimestamps.
10783
10784          The OIS samples are not affected by whether lens distortion correction is enabled (on
10785          supporting devices). They are always reported in pre-correction active array coordinates,
10786          since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
10787          is needed.
10788          </details>
10789        </entry>
10790        <entry name="oisSamples" type="float" visibility="java_public" synthetic="true"
10791               container="array" typedef="oisSample" hal_version="3.3">
10792          <array>
10793            <size>n</size>
10794          </array>
10795          <description>
10796          An array of optical stabilization (OIS) position samples.
10797          </description>
10798          <details>
10799          Each OIS sample contains the timestamp and the amount of shifts in x and y direction,
10800          in pixels, of the OIS sample.
10801
10802          A positive value for a shift in x direction is a shift from left to right in the
10803          pre-correction active array coordinate system. For example, if the optical center is
10804          (1000, 500) in pre-correction active array coordinates, a shift of (3, 0) puts the new
10805          optical center at (1003, 500).
10806
10807          A positive value for a shift in y direction is a shift from top to bottom in
10808          pre-correction active array coordinate system. For example, if the optical center is
10809          (1000, 500) in active array coordinates, a shift of (0, 5) puts the new optical center at
10810          (1000, 505).
10811
10812          The OIS samples are not affected by whether lens distortion correction is enabled (on
10813          supporting devices). They are always reported in pre-correction active array coordinates,
10814          since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
10815          is needed.
10816          </details>
10817        </entry>
10818      </dynamic>
10819    </section>
10820    <section name="tonemap">
10821      <controls>
10822        <entry name="curveBlue" type="float" visibility="ndk_public"
10823        type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
10824        container="array" hwlevel="full">
10825          <array>
10826            <size>n</size>
10827            <size>2</size>
10828          </array>
10829          <description>Tonemapping / contrast / gamma curve for the blue
10830          channel, to use when android.tonemap.mode is
10831          CONTRAST_CURVE.</description>
10832          <details>See android.tonemap.curveRed for more details.</details>
10833        </entry>
10834        <entry name="curveGreen" type="float" visibility="ndk_public"
10835        type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
10836        container="array" hwlevel="full">
10837          <array>
10838            <size>n</size>
10839            <size>2</size>
10840          </array>
10841          <description>Tonemapping / contrast / gamma curve for the green
10842          channel, to use when android.tonemap.mode is
10843          CONTRAST_CURVE.</description>
10844          <details>See android.tonemap.curveRed for more details.</details>
10845        </entry>
10846        <entry name="curveRed" type="float" visibility="ndk_public"
10847        type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
10848        container="array" hwlevel="full">
10849          <array>
10850            <size>n</size>
10851            <size>2</size>
10852          </array>
10853          <description>Tonemapping / contrast / gamma curve for the red
10854          channel, to use when android.tonemap.mode is
10855          CONTRAST_CURVE.</description>
10856          <range>0-1 on both input and output coordinates, normalized
10857          as a floating-point value such that 0 == black and 1 == white.
10858          </range>
10859          <details>
10860          Each channel's curve is defined by an array of control points:
10861
10862              android.tonemap.curveRed =
10863                [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
10864              2 &lt;= N &lt;= android.tonemap.maxCurvePoints
10865
10866          These are sorted in order of increasing `Pin`; it is
10867          required that input values 0.0 and 1.0 are included in the list to
10868          define a complete mapping. For input values between control points,
10869          the camera device must linearly interpolate between the control
10870          points.
10871
10872          Each curve can have an independent number of points, and the number
10873          of points can be less than max (that is, the request doesn't have to
10874          always provide a curve with number of points equivalent to
10875          android.tonemap.maxCurvePoints).
10876
10877          For devices with MONOCHROME capability, all three channels must have the same set of
10878          control points.
10879
10880          A few examples, and their corresponding graphical mappings; these
10881          only specify the red channel and the precision is limited to 4
10882          digits, for conciseness.
10883
10884          Linear mapping:
10885
10886              android.tonemap.curveRed = [ 0, 0, 1.0, 1.0 ]
10887
10888          ![Linear mapping curve](android.tonemap.curveRed/linear_tonemap.png)
10889
10890          Invert mapping:
10891
10892              android.tonemap.curveRed = [ 0, 1.0, 1.0, 0 ]
10893
10894          ![Inverting mapping curve](android.tonemap.curveRed/inverse_tonemap.png)
10895
10896          Gamma 1/2.2 mapping, with 16 control points:
10897
10898              android.tonemap.curveRed = [
10899                0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
10900                0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
10901                0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
10902                0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
10903
10904          ![Gamma = 1/2.2 tonemapping curve](android.tonemap.curveRed/gamma_tonemap.png)
10905
10906          Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:
10907
10908              android.tonemap.curveRed = [
10909                0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
10910                0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
10911                0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
10912                0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
10913
10914          ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png)
10915        </details>
10916        <hal_details>
10917          For good quality of mapping, at least 128 control points are
10918          preferred.
10919
10920          A typical use case of this would be a gamma-1/2.2 curve, with as many
10921          control points used as are available.
10922        </hal_details>
10923        </entry>
10924        <entry name="curve" type="float" visibility="java_public" synthetic="true"
10925               typedef="tonemapCurve"
10926               hwlevel="full">
10927          <description>Tonemapping / contrast / gamma curve to use when android.tonemap.mode
10928          is CONTRAST_CURVE.</description>
10929          <details>
10930          The tonemapCurve consist of three curves for each of red, green, and blue
10931          channels respectively. The following example uses the red channel as an
10932          example. The same logic applies to green and blue channel.
10933          Each channel's curve is defined by an array of control points:
10934
10935              curveRed =
10936                [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ]
10937              2 &lt;= N &lt;= android.tonemap.maxCurvePoints
10938
10939          These are sorted in order of increasing `Pin`; it is always
10940          guaranteed that input values 0.0 and 1.0 are included in the list to
10941          define a complete mapping. For input values between control points,
10942          the camera device must linearly interpolate between the control
10943          points.
10944
10945          Each curve can have an independent number of points, and the number
10946          of points can be less than max (that is, the request doesn't have to
10947          always provide a curve with number of points equivalent to
10948          android.tonemap.maxCurvePoints).
10949
10950          For devices with MONOCHROME capability, all three channels must have the same set of
10951          control points.
10952
10953          A few examples, and their corresponding graphical mappings; these
10954          only specify the red channel and the precision is limited to 4
10955          digits, for conciseness.
10956
10957          Linear mapping:
10958
10959              curveRed = [ (0, 0), (1.0, 1.0) ]
10960
10961          ![Linear mapping curve](android.tonemap.curveRed/linear_tonemap.png)
10962
10963          Invert mapping:
10964
10965              curveRed = [ (0, 1.0), (1.0, 0) ]
10966
10967          ![Inverting mapping curve](android.tonemap.curveRed/inverse_tonemap.png)
10968
10969          Gamma 1/2.2 mapping, with 16 control points:
10970
10971              curveRed = [
10972                (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812),
10973                (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072),
10974                (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685),
10975                (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ]
10976
10977          ![Gamma = 1/2.2 tonemapping curve](android.tonemap.curveRed/gamma_tonemap.png)
10978
10979          Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:
10980
10981              curveRed = [
10982                (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845),
10983                (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130),
10984                (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721),
10985                (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ]
10986
10987          ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png)
10988        </details>
10989        <hal_details>
10990            This entry is created by the framework from the curveRed, curveGreen and
10991            curveBlue entries.
10992        </hal_details>
10993        </entry>
10994        <entry name="mode" type="byte" visibility="public" enum="true"
10995               hwlevel="full">
10996          <enum>
10997            <value>CONTRAST_CURVE
10998              <notes>Use the tone mapping curve specified in
10999              the android.tonemap.curve* entries.
11000
11001              All color enhancement and tonemapping must be disabled, except
11002              for applying the tonemapping curve specified by
11003              android.tonemap.curve.
11004
11005              Must not slow down frame rate relative to raw
11006              sensor output.
11007              </notes>
11008            </value>
11009            <value>FAST
11010              <notes>
11011              Advanced gamma mapping and color enhancement may be applied, without
11012              reducing frame rate compared to raw sensor output.
11013              </notes>
11014            </value>
11015            <value>HIGH_QUALITY
11016              <notes>
11017              High-quality gamma mapping and color enhancement will be applied, at
11018              the cost of possibly reduced frame rate compared to raw sensor output.
11019              </notes>
11020            </value>
11021            <value>GAMMA_VALUE
11022              <notes>
11023              Use the gamma value specified in android.tonemap.gamma to peform
11024              tonemapping.
11025
11026              All color enhancement and tonemapping must be disabled, except
11027              for applying the tonemapping curve specified by android.tonemap.gamma.
11028
11029              Must not slow down frame rate relative to raw sensor output.
11030              </notes>
11031            </value>
11032            <value>PRESET_CURVE
11033              <notes>
11034              Use the preset tonemapping curve specified in
11035              android.tonemap.presetCurve to peform tonemapping.
11036
11037              All color enhancement and tonemapping must be disabled, except
11038              for applying the tonemapping curve specified by
11039              android.tonemap.presetCurve.
11040
11041              Must not slow down frame rate relative to raw sensor output.
11042              </notes>
11043            </value>
11044          </enum>
11045          <description>High-level global contrast/gamma/tonemapping control.
11046          </description>
11047          <range>android.tonemap.availableToneMapModes</range>
11048          <details>
11049          When switching to an application-defined contrast curve by setting
11050          android.tonemap.mode to CONTRAST_CURVE, the curve is defined
11051          per-channel with a set of `(in, out)` points that specify the
11052          mapping from input high-bit-depth pixel value to the output
11053          low-bit-depth value.  Since the actual pixel ranges of both input
11054          and output may change depending on the camera pipeline, the values
11055          are specified by normalized floating-point numbers.
11056
11057          More-complex color mapping operations such as 3D color look-up
11058          tables, selective chroma enhancement, or other non-linear color
11059          transforms will be disabled when android.tonemap.mode is
11060          CONTRAST_CURVE.
11061
11062          When using either FAST or HIGH_QUALITY, the camera device will
11063          emit its own tonemap curve in android.tonemap.curve.
11064          These values are always available, and as close as possible to the
11065          actually used nonlinear/nonglobal transforms.
11066
11067          If a request is sent with CONTRAST_CURVE with the camera device's
11068          provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
11069          roughly the same.</details>
11070        </entry>
11071      </controls>
11072      <static>
11073        <entry name="maxCurvePoints" type="int32" visibility="public"
11074               hwlevel="full">
11075          <description>Maximum number of supported points in the
11076            tonemap curve that can be used for android.tonemap.curve.
11077          </description>
11078          <details>
11079          If the actual number of points provided by the application (in android.tonemap.curve*) is
11080          less than this maximum, the camera device will resample the curve to its internal
11081          representation, using linear interpolation.
11082
11083          The output curves in the result metadata may have a different number
11084          of points than the input curves, and will represent the actual
11085          hardware curves used as closely as possible when linearly interpolated.
11086          </details>
11087          <hal_details>
11088          This value must be at least 64. This should be at least 128.
11089          </hal_details>
11090        </entry>
11091        <entry name="availableToneMapModes" type="byte" visibility="public"
11092        type_notes="list of enums" container="array" typedef="enumList" hwlevel="full">
11093          <array>
11094            <size>n</size>
11095          </array>
11096          <description>
11097          List of tonemapping modes for android.tonemap.mode that are supported by this camera
11098          device.
11099          </description>
11100          <range>Any value listed in android.tonemap.mode</range>
11101          <details>
11102          Camera devices that support the MANUAL_POST_PROCESSING capability will always contain
11103          at least one of below mode combinations:
11104
11105          * CONTRAST_CURVE, FAST and HIGH_QUALITY
11106          * GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY
11107
11108          This includes all FULL level devices.
11109          </details>
11110          <hal_details>
11111            HAL must support both FAST and HIGH_QUALITY if automatic tonemap control is available
11112            on the camera device, but the underlying implementation can be the same for both modes.
11113            That is, if the highest quality implementation on the camera device does not slow down
11114            capture rate, then FAST and HIGH_QUALITY will generate the same output.
11115          </hal_details>
11116        </entry>
11117      </static>
11118      <dynamic>
11119        <clone entry="android.tonemap.curveBlue" kind="controls">
11120        </clone>
11121        <clone entry="android.tonemap.curveGreen" kind="controls">
11122        </clone>
11123        <clone entry="android.tonemap.curveRed" kind="controls">
11124        </clone>
11125        <clone entry="android.tonemap.curve" kind="controls">
11126        </clone>
11127        <clone entry="android.tonemap.mode" kind="controls">
11128        </clone>
11129      </dynamic>
11130      <controls>
11131        <entry name="gamma" type="float" visibility="public">
11132          <description> Tonemapping curve to use when android.tonemap.mode is
11133          GAMMA_VALUE
11134          </description>
11135          <details>
11136          The tonemap curve will be defined the following formula:
11137          * OUT = pow(IN, 1.0 / gamma)
11138          where IN and OUT is the input pixel value scaled to range [0.0, 1.0],
11139          pow is the power function and gamma is the gamma value specified by this
11140          key.
11141
11142          The same curve will be applied to all color channels. The camera device
11143          may clip the input gamma value to its supported range. The actual applied
11144          value will be returned in capture result.
11145
11146          The valid range of gamma value varies on different devices, but values
11147          within [1.0, 5.0] are guaranteed not to be clipped.
11148          </details>
11149        </entry>
11150        <entry name="presetCurve" type="byte" visibility="public" enum="true">
11151          <enum>
11152            <value>SRGB
11153              <notes>Tonemapping curve is defined by sRGB</notes>
11154            </value>
11155            <value>REC709
11156              <notes>Tonemapping curve is defined by ITU-R BT.709</notes>
11157            </value>
11158          </enum>
11159          <description> Tonemapping curve to use when android.tonemap.mode is
11160          PRESET_CURVE
11161          </description>
11162          <details>
11163          The tonemap curve will be defined by specified standard.
11164
11165          sRGB (approximated by 16 control points):
11166
11167          ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png)
11168
11169          Rec. 709 (approximated by 16 control points):
11170
11171          ![Rec. 709 tonemapping curve](android.tonemap.curveRed/rec709_tonemap.png)
11172
11173          Note that above figures show a 16 control points approximation of preset
11174          curves. Camera devices may apply a different approximation to the curve.
11175          </details>
11176        </entry>
11177      </controls>
11178      <dynamic>
11179        <clone entry="android.tonemap.gamma" kind="controls">
11180        </clone>
11181        <clone entry="android.tonemap.presetCurve" kind="controls">
11182        </clone>
11183      </dynamic>
11184    </section>
11185    <section name="led">
11186      <controls>
11187        <entry name="transmit" type="byte" visibility="hidden" optional="true"
11188               enum="true" typedef="boolean">
11189          <enum>
11190            <value>OFF</value>
11191            <value>ON</value>
11192          </enum>
11193          <description>This LED is nominally used to indicate to the user
11194          that the camera is powered on and may be streaming images back to the
11195          Application Processor. In certain rare circumstances, the OS may
11196          disable this when video is processed locally and not transmitted to
11197          any untrusted applications.
11198
11199          In particular, the LED *must* always be on when the data could be
11200          transmitted off the device. The LED *should* always be on whenever
11201          data is stored locally on the device.
11202
11203          The LED *may* be off if a trusted application is using the data that
11204          doesn't violate the above rules.
11205          </description>
11206        </entry>
11207      </controls>
11208      <dynamic>
11209        <clone entry="android.led.transmit" kind="controls"></clone>
11210      </dynamic>
11211      <static>
11212        <entry name="availableLeds" type="byte" visibility="hidden" optional="true"
11213               enum="true"
11214               container="array">
11215          <array>
11216            <size>n</size>
11217          </array>
11218          <enum>
11219            <value>TRANSMIT
11220              <notes>android.led.transmit control is used.</notes>
11221            </value>
11222          </enum>
11223          <description>A list of camera LEDs that are available on this system.
11224          </description>
11225        </entry>
11226      </static>
11227    </section>
11228    <section name="info">
11229      <static>
11230        <entry name="supportedHardwareLevel" type="byte" visibility="public"
11231               enum="true" hwlevel="legacy">
11232          <enum>
11233            <value>
11234              LIMITED
11235              <notes>
11236              This camera device does not have enough capabilities to qualify as a `FULL` device or
11237              better.
11238
11239              Only the stream configurations listed in the `LEGACY` and `LIMITED` tables in the
11240              {@link android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession
11241              createCaptureSession} documentation are guaranteed to be supported.
11242
11243              All `LIMITED` devices support the `BACKWARDS_COMPATIBLE` capability, indicating basic
11244              support for color image capture. The only exception is that the device may
11245              alternatively support only the `DEPTH_OUTPUT` capability, if it can only output depth
11246              measurements and not color images.
11247
11248              `LIMITED` devices and above require the use of android.control.aePrecaptureTrigger
11249              to lock exposure metering (and calculate flash power, for cameras with flash) before
11250              capturing a high-quality still image.
11251
11252              A `LIMITED` device that only lists the `BACKWARDS_COMPATIBLE` capability is only
11253              required to support full-automatic operation and post-processing (`OFF` is not
11254              supported for android.control.aeMode, android.control.afMode, or
11255              android.control.awbMode)
11256
11257              Additional capabilities may optionally be supported by a `LIMITED`-level device, and
11258              can be checked for in android.request.availableCapabilities.
11259              </notes>
11260            </value>
11261            <value>
11262              FULL
11263              <notes>
11264              This camera device is capable of supporting advanced imaging applications.
11265
11266              The stream configurations listed in the `FULL`, `LEGACY` and `LIMITED` tables in the
11267              {@link android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession
11268              createCaptureSession} documentation are guaranteed to be supported.
11269
11270              A `FULL` device will support below capabilities:
11271
11272              * `BURST_CAPTURE` capability (android.request.availableCapabilities contains
11273                `BURST_CAPTURE`)
11274              * Per frame control (android.sync.maxLatency `==` PER_FRAME_CONTROL)
11275              * Manual sensor control (android.request.availableCapabilities contains `MANUAL_SENSOR`)
11276              * Manual post-processing control (android.request.availableCapabilities contains
11277                `MANUAL_POST_PROCESSING`)
11278              * The required exposure time range defined in android.sensor.info.exposureTimeRange
11279              * The required maxFrameDuration defined in android.sensor.info.maxFrameDuration
11280
11281              Note:
11282              Pre-API level 23, FULL devices also supported arbitrary cropping region
11283              (android.scaler.croppingType `== FREEFORM`); this requirement was relaxed in API level
11284              23, and `FULL` devices may only support `CENTERED` cropping.
11285              </notes>
11286            </value>
11287            <value>
11288              LEGACY
11289              <notes>
11290              This camera device is running in backward compatibility mode.
11291
11292              Only the stream configurations listed in the `LEGACY` table in the {@link
11293              android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession
11294              createCaptureSession} documentation are supported.
11295
11296              A `LEGACY` device does not support per-frame control, manual sensor control, manual
11297              post-processing, arbitrary cropping regions, and has relaxed performance constraints.
11298              No additional capabilities beyond `BACKWARD_COMPATIBLE` will ever be listed by a
11299              `LEGACY` device in android.request.availableCapabilities.
11300
11301              In addition, the android.control.aePrecaptureTrigger is not functional on `LEGACY`
11302              devices. Instead, every request that includes a JPEG-format output target is treated
11303              as triggering a still capture, internally executing a precapture trigger.  This may
11304              fire the flash for flash power metering during precapture, and then fire the flash
11305              for the final capture, if a flash is available on the device and the AE mode is set to
11306              enable the flash.
11307
11308              Devices that initially shipped with Android version {@link
11309              android.os.Build.VERSION_CODES#Q Q} or newer will not include any LEGACY-level devices.
11310              </notes>
11311            </value>
11312            <value>
11313              3
11314              <notes>
11315              This camera device is capable of YUV reprocessing and RAW data capture, in addition to
11316              FULL-level capabilities.
11317
11318              The stream configurations listed in the `LEVEL_3`, `RAW`, `FULL`, `LEGACY` and
11319              `LIMITED` tables in the {@link
11320              android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession
11321              createCaptureSession} documentation are guaranteed to be supported.
11322
11323              The following additional capabilities are guaranteed to be supported:
11324
11325              * `YUV_REPROCESSING` capability (android.request.availableCapabilities contains
11326                `YUV_REPROCESSING`)
11327              * `RAW` capability (android.request.availableCapabilities contains
11328                `RAW`)
11329              </notes>
11330            </value>
11331            <value hal_version="3.3">
11332              EXTERNAL
11333              <notes>
11334              This camera device is backed by an external camera connected to this Android device.
11335
11336              The device has capability identical to a LIMITED level device, with the following
11337              exceptions:
11338
11339              * The device may not report lens/sensor related information such as
11340                  - android.lens.focalLength
11341                  - android.lens.info.hyperfocalDistance
11342                  - android.sensor.info.physicalSize
11343                  - android.sensor.info.whiteLevel
11344                  - android.sensor.blackLevelPattern
11345                  - android.sensor.info.colorFilterArrangement
11346                  - android.sensor.rollingShutterSkew
11347              * The device will report 0 for android.sensor.orientation
11348              * The device has less guarantee on stable framerate, as the framerate partly depends
11349                on the external camera being used.
11350              </notes>
11351            </value>
11352          </enum>
11353          <description>
11354          Generally classifies the overall set of the camera device functionality.
11355          </description>
11356          <details>
11357          The supported hardware level is a high-level description of the camera device's
11358          capabilities, summarizing several capabilities into one field.  Each level adds additional
11359          features to the previous one, and is always a strict superset of the previous level.
11360          The ordering is `LEGACY &lt; LIMITED &lt; FULL &lt; LEVEL_3`.
11361
11362          Starting from `LEVEL_3`, the level enumerations are guaranteed to be in increasing
11363          numerical value as well. To check if a given device is at least at a given hardware level,
11364          the following code snippet can be used:
11365
11366              // Returns true if the device supports the required hardware level, or better.
11367              boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) {
11368                  final int[] sortedHwLevels = {
11369                      CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY,
11370                      CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL,
11371                      CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED,
11372                      CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL,
11373                      CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3
11374                  };
11375                  int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
11376                  if (requiredLevel == deviceLevel) {
11377                      return true;
11378                  }
11379
11380                  for (int sortedlevel : sortedHwLevels) {
11381                      if (sortedlevel == requiredLevel) {
11382                          return true;
11383                      } else if (sortedlevel == deviceLevel) {
11384                          return false;
11385                      }
11386                  }
11387                  return false; // Should never reach here
11388              }
11389
11390          At a high level, the levels are:
11391
11392          * `LEGACY` devices operate in a backwards-compatibility mode for older
11393            Android devices, and have very limited capabilities.
11394          * `LIMITED` devices represent the
11395            baseline feature set, and may also include additional capabilities that are
11396            subsets of `FULL`.
11397          * `FULL` devices additionally support per-frame manual control of sensor, flash, lens and
11398            post-processing settings, and image capture at a high rate.
11399          * `LEVEL_3` devices additionally support YUV reprocessing and RAW image capture, along
11400            with additional output stream configurations.
11401          * `EXTERNAL` devices are similar to `LIMITED` devices with exceptions like some sensor or
11402            lens information not reported or less stable framerates.
11403
11404          See the individual level enums for full descriptions of the supported capabilities.  The
11405          android.request.availableCapabilities entry describes the device's capabilities at a
11406          finer-grain level, if needed. In addition, many controls have their available settings or
11407          ranges defined in individual entries from {@link
11408          android.hardware.camera2.CameraCharacteristics|ACameraManager_getCameraCharacteristics}.
11409
11410          Some features are not part of any particular hardware level or capability and must be
11411          queried separately. These include:
11412
11413          * Calibrated timestamps (android.sensor.info.timestampSource `==` REALTIME)
11414          * Precision lens control (android.lens.info.focusDistanceCalibration `==` CALIBRATED)
11415          * Face detection (android.statistics.info.availableFaceDetectModes)
11416          * Optical or electrical image stabilization
11417            (android.lens.info.availableOpticalStabilization,
11418             android.control.availableVideoStabilizationModes)
11419
11420          </details>
11421          <hal_details>
11422          A camera HALv3 device can implement one of three possible operational modes; LIMITED,
11423          FULL, and LEVEL_3.
11424
11425          FULL support or better is expected from new higher-end devices. Limited
11426          mode has hardware requirements roughly in line with those for a camera HAL device v1
11427          implementation, and is expected from older or inexpensive devices. Each level is a strict
11428          superset of the previous level, and they share the same essential operational flow.
11429
11430          For full details refer to "S3. Operational Modes" in camera3.h
11431
11432          Camera HAL3+ must not implement LEGACY mode. It is there for backwards compatibility in
11433          the `android.hardware.camera2` user-facing API only on legacy HALv1 devices, and is
11434          implemented by the camera framework code.
11435
11436          EXTERNAL level devices have lower peformance bar in CTS since the peformance might depend
11437          on the external camera being used and is not fully controlled by the device manufacturer.
11438          The ITS test suite is exempted for the same reason.
11439          </hal_details>
11440        </entry>
11441        <entry name="version" type="byte" visibility="public" typedef="string" hal_version="3.3">
11442          <description>
11443              A short string for manufacturer version information about the camera device, such as
11444              ISP hardware, sensors, etc.
11445          </description>
11446          <details>
11447              This can be used in {@link android.media.ExifInterface#TAG_IMAGE_DESCRIPTION TAG_IMAGE_DESCRIPTION}
11448              in jpeg EXIF. This key may be absent if no version information is available on the
11449              device.
11450          </details>
11451          <hal_details>
11452              The string must consist of only alphanumeric characters, punctuation, and
11453              whitespace, i.e. it must match regular expression "[\p{Alnum}\p{Punct}\p{Space}]*".
11454              It must not exceed 256 characters.
11455          </hal_details>
11456        </entry>
11457        <entry name="supportedBufferManagementVersion" type="byte" visibility="system"
11458               enum="true" hal_version="3.4">
11459          <enum>
11460            <value>
11461              HIDL_DEVICE_3_5
11462              <notes>
11463              This camera device supports and opts in to the buffer management APIs provided by
11464              HIDL ICameraDevice version 3.5.
11465              </notes>
11466            </value>
11467          </enum>
11468          <description>
11469              The version of buffer management API this camera device supports and opts into.
11470          </description>
11471          <details>
11472              When this key is not present, camera framework will interact with this camera device
11473              without any buffer management HAL API. When this key is present and camera framework
11474              supports the buffer management API version, camera framework will interact with camera
11475              HAL using such version of buffer management API.
11476          </details>
11477        </entry>
11478      </static>
11479    </section>
11480    <section name="blackLevel">
11481      <controls>
11482        <entry name="lock" type="byte" visibility="public" enum="true"
11483               typedef="boolean" hwlevel="full">
11484          <enum>
11485            <value>OFF</value>
11486            <value>ON</value>
11487          </enum>
11488          <description> Whether black-level compensation is locked
11489          to its current values, or is free to vary.</description>
11490          <details>When set to `true` (ON), the values used for black-level
11491          compensation will not change until the lock is set to
11492          `false` (OFF).
11493
11494          Since changes to certain capture parameters (such as
11495          exposure time) may require resetting of black level
11496          compensation, the camera device must report whether setting
11497          the black level lock was successful in the output result
11498          metadata.
11499
11500          For example, if a sequence of requests is as follows:
11501
11502          * Request 1: Exposure = 10ms, Black level lock = OFF
11503          * Request 2: Exposure = 10ms, Black level lock = ON
11504          * Request 3: Exposure = 10ms, Black level lock = ON
11505          * Request 4: Exposure = 20ms, Black level lock = ON
11506          * Request 5: Exposure = 20ms, Black level lock = ON
11507          * Request 6: Exposure = 20ms, Black level lock = ON
11508
11509          And the exposure change in Request 4 requires the camera
11510          device to reset the black level offsets, then the output
11511          result metadata is expected to be:
11512
11513          * Result 1: Exposure = 10ms, Black level lock = OFF
11514          * Result 2: Exposure = 10ms, Black level lock = ON
11515          * Result 3: Exposure = 10ms, Black level lock = ON
11516          * Result 4: Exposure = 20ms, Black level lock = OFF
11517          * Result 5: Exposure = 20ms, Black level lock = ON
11518          * Result 6: Exposure = 20ms, Black level lock = ON
11519
11520          This indicates to the application that on frame 4, black
11521          levels were reset due to exposure value changes, and pixel
11522          values may not be consistent across captures.
11523
11524          The camera device will maintain the lock to the extent
11525          possible, only overriding the lock to OFF when changes to
11526          other request parameters require a black level recalculation
11527          or reset.
11528          </details>
11529          <hal_details>
11530          If for some reason black level locking is no longer possible
11531          (for example, the analog gain has changed, which forces
11532          black level offsets to be recalculated), then the HAL must
11533          override this request (and it must report 'OFF' when this
11534          does happen) until the next capture for which locking is
11535          possible again.</hal_details>
11536          <tag id="HAL2" />
11537        </entry>
11538      </controls>
11539      <dynamic>
11540        <clone entry="android.blackLevel.lock"
11541          kind="controls">
11542          <details>
11543            Whether the black level offset was locked for this frame.  Should be
11544            ON if android.blackLevel.lock was ON in the capture request, unless
11545            a change in other capture settings forced the camera device to
11546            perform a black level reset.
11547          </details>
11548        </clone>
11549      </dynamic>
11550    </section>
11551    <section name="sync">
11552      <dynamic>
11553        <entry name="frameNumber" type="int64" visibility="ndk_public"
11554               enum="true" hwlevel="legacy">
11555          <enum>
11556            <value id="-1">CONVERGING
11557              <notes>
11558              The current result is not yet fully synchronized to any request.
11559
11560              Synchronization is in progress, and reading metadata from this
11561              result may include a mix of data that have taken effect since the
11562              last synchronization time.
11563
11564              In some future result, within android.sync.maxLatency frames,
11565              this value will update to the actual frame number frame number
11566              the result is guaranteed to be synchronized to (as long as the
11567              request settings remain constant).
11568            </notes>
11569            </value>
11570            <value id="-2">UNKNOWN
11571              <notes>
11572              The current result's synchronization status is unknown.
11573
11574              The result may have already converged, or it may be in
11575              progress.  Reading from this result may include some mix
11576              of settings from past requests.
11577
11578              After a settings change, the new settings will eventually all
11579              take effect for the output buffers and results. However, this
11580              value will not change when that happens. Altering settings
11581              rapidly may provide outcomes using mixes of settings from recent
11582              requests.
11583
11584              This value is intended primarily for backwards compatibility with
11585              the older camera implementations (for android.hardware.Camera).
11586            </notes>
11587            </value>
11588          </enum>
11589          <description>The frame number corresponding to the last request
11590          with which the output result (metadata + buffers) has been fully
11591          synchronized.</description>
11592          <range>Either a non-negative value corresponding to a
11593          `frame_number`, or one of the two enums (CONVERGING / UNKNOWN).
11594          </range>
11595          <details>
11596          When a request is submitted to the camera device, there is usually a
11597          delay of several frames before the controls get applied. A camera
11598          device may either choose to account for this delay by implementing a
11599          pipeline and carefully submit well-timed atomic control updates, or
11600          it may start streaming control changes that span over several frame
11601          boundaries.
11602
11603          In the latter case, whenever a request's settings change relative to
11604          the previous submitted request, the full set of changes may take
11605          multiple frame durations to fully take effect. Some settings may
11606          take effect sooner (in less frame durations) than others.
11607
11608          While a set of control changes are being propagated, this value
11609          will be CONVERGING.
11610
11611          Once it is fully known that a set of control changes have been
11612          finished propagating, and the resulting updated control settings
11613          have been read back by the camera device, this value will be set
11614          to a non-negative frame number (corresponding to the request to
11615          which the results have synchronized to).
11616
11617          Older camera device implementations may not have a way to detect
11618          when all camera controls have been applied, and will always set this
11619          value to UNKNOWN.
11620
11621          FULL capability devices will always have this value set to the
11622          frame number of the request corresponding to this result.
11623
11624          _Further details_:
11625
11626          * Whenever a request differs from the last request, any future
11627          results not yet returned may have this value set to CONVERGING (this
11628          could include any in-progress captures not yet returned by the camera
11629          device, for more details see pipeline considerations below).
11630          * Submitting a series of multiple requests that differ from the
11631          previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
11632          moves the new synchronization frame to the last non-repeating
11633          request (using the smallest frame number from the contiguous list of
11634          repeating requests).
11635          * Submitting the same request repeatedly will not change this value
11636          to CONVERGING, if it was already a non-negative value.
11637          * When this value changes to non-negative, that means that all of the
11638          metadata controls from the request have been applied, all of the
11639          metadata controls from the camera device have been read to the
11640          updated values (into the result), and all of the graphics buffers
11641          corresponding to this result are also synchronized to the request.
11642
11643          _Pipeline considerations_:
11644
11645          Submitting a request with updated controls relative to the previously
11646          submitted requests may also invalidate the synchronization state
11647          of all the results corresponding to currently in-flight requests.
11648
11649          In other words, results for this current request and up to
11650          android.request.pipelineMaxDepth prior requests may have their
11651          android.sync.frameNumber change to CONVERGING.
11652          </details>
11653          <hal_details>
11654          Using UNKNOWN here is illegal unless android.sync.maxLatency
11655          is also UNKNOWN.
11656
11657          FULL capability devices should simply set this value to the
11658          `frame_number` of the request this result corresponds to.
11659          </hal_details>
11660          <tag id="V1" />
11661        </entry>
11662      </dynamic>
11663      <static>
11664        <entry name="maxLatency" type="int32" visibility="public" enum="true"
11665               hwlevel="legacy">
11666          <enum>
11667            <value id="0">PER_FRAME_CONTROL
11668              <notes>
11669              Every frame has the requests immediately applied.
11670
11671              Changing controls over multiple requests one after another will
11672              produce results that have those controls applied atomically
11673              each frame.
11674
11675              All FULL capability devices will have this as their maxLatency.
11676              </notes>
11677            </value>
11678            <value id="-1">UNKNOWN
11679              <notes>
11680              Each new frame has some subset (potentially the entire set)
11681              of the past requests applied to the camera settings.
11682
11683              By submitting a series of identical requests, the camera device
11684              will eventually have the camera settings applied, but it is
11685              unknown when that exact point will be.
11686
11687              All LEGACY capability devices will have this as their maxLatency.
11688              </notes>
11689            </value>
11690          </enum>
11691          <description>
11692          The maximum number of frames that can occur after a request
11693          (different than the previous) has been submitted, and before the
11694          result's state becomes synchronized.
11695          </description>
11696          <units>Frame counts</units>
11697          <range>A positive value, PER_FRAME_CONTROL, or UNKNOWN.</range>
11698          <details>
11699          This defines the maximum distance (in number of metadata results),
11700          between the frame number of the request that has new controls to apply
11701          and the frame number of the result that has all the controls applied.
11702
11703          In other words this acts as an upper boundary for how many frames
11704          must occur before the camera device knows for a fact that the new
11705          submitted camera settings have been applied in outgoing frames.
11706          </details>
11707          <hal_details>
11708          For example if maxLatency was 2,
11709
11710              initial request = X (repeating)
11711              request1 = X
11712              request2 = Y
11713              request3 = Y
11714              request4 = Y
11715
11716              where requestN has frameNumber N, and the first of the repeating
11717              initial request's has frameNumber F (and F &lt; 1).
11718
11719              initial result = X' + { android.sync.frameNumber == F }
11720              result1 = X' + { android.sync.frameNumber == F }
11721              result2 = X' + { android.sync.frameNumber == CONVERGING }
11722              result3 = X' + { android.sync.frameNumber == CONVERGING }
11723              result4 = X' + { android.sync.frameNumber == 2 }
11724
11725              where resultN has frameNumber N.
11726
11727          Since `result4` has a `frameNumber == 4` and
11728          `android.sync.frameNumber == 2`, the distance is clearly
11729          `4 - 2 = 2`.
11730
11731          Use `frame_count` from camera3_request_t instead of
11732          android.request.frameCount or
11733          `{@link android.hardware.camera2.CaptureResult#getFrameNumber}`.
11734
11735          LIMITED devices are strongly encouraged to use a non-negative
11736          value. If UNKNOWN is used here then app developers do not have a way
11737          to know when sensor settings have been applied.
11738          </hal_details>
11739          <tag id="V1" />
11740        </entry>
11741      </static>
11742    </section>
11743    <section name="reprocess">
11744      <controls>
11745        <entry name="effectiveExposureFactor" type="float" visibility="java_public" hwlevel="limited">
11746            <description>
11747            The amount of exposure time increase factor applied to the original output
11748            frame by the application processing before sending for reprocessing.
11749            </description>
11750            <units>Relative exposure time increase factor.</units>
11751            <range> &amp;gt;= 1.0</range>
11752            <details>
11753            This is optional, and will be supported if the camera device supports YUV_REPROCESSING
11754            capability (android.request.availableCapabilities contains YUV_REPROCESSING).
11755
11756            For some YUV reprocessing use cases, the application may choose to filter the original
11757            output frames to effectively reduce the noise to the same level as a frame that was
11758            captured with longer exposure time. To be more specific, assuming the original captured
11759            images were captured with a sensitivity of S and an exposure time of T, the model in
11760            the camera device is that the amount of noise in the image would be approximately what
11761            would be expected if the original capture parameters had been a sensitivity of
11762            S/effectiveExposureFactor and an exposure time of T*effectiveExposureFactor, rather
11763            than S and T respectively. If the captured images were processed by the application
11764            before being sent for reprocessing, then the application may have used image processing
11765            algorithms and/or multi-frame image fusion to reduce the noise in the
11766            application-processed images (input images). By using the effectiveExposureFactor
11767            control, the application can communicate to the camera device the actual noise level
11768            improvement in the application-processed image. With this information, the camera
11769            device can select appropriate noise reduction and edge enhancement parameters to avoid
11770            excessive noise reduction (android.noiseReduction.mode) and insufficient edge
11771            enhancement (android.edge.mode) being applied to the reprocessed frames.
11772
11773            For example, for multi-frame image fusion use case, the application may fuse
11774            multiple output frames together to a final frame for reprocessing. When N image are
11775            fused into 1 image for reprocessing, the exposure time increase factor could be up to
11776            square root of N (based on a simple photon shot noise model). The camera device will
11777            adjust the reprocessing noise reduction and edge enhancement parameters accordingly to
11778            produce the best quality images.
11779
11780            This is relative factor, 1.0 indicates the application hasn't processed the input
11781            buffer in a way that affects its effective exposure time.
11782
11783            This control is only effective for YUV reprocessing capture request. For noise
11784            reduction reprocessing, it is only effective when `android.noiseReduction.mode != OFF`.
11785            Similarly, for edge enhancement reprocessing, it is only effective when
11786            `android.edge.mode != OFF`.
11787            </details>
11788          <tag id="REPROC" />
11789        </entry>
11790      </controls>
11791      <dynamic>
11792      <clone entry="android.reprocess.effectiveExposureFactor" kind="controls">
11793      </clone>
11794      </dynamic>
11795      <static>
11796        <entry name="maxCaptureStall" type="int32" visibility="java_public" hwlevel="limited">
11797          <description>
11798          The maximal camera capture pipeline stall (in unit of frame count) introduced by a
11799          reprocess capture request.
11800          </description>
11801          <units>Number of frames.</units>
11802          <range> &amp;lt;= 4</range>
11803          <details>
11804          The key describes the maximal interference that one reprocess (input) request
11805          can introduce to the camera simultaneous streaming of regular (output) capture
11806          requests, including repeating requests.
11807
11808          When a reprocessing capture request is submitted while a camera output repeating request
11809          (e.g. preview) is being served by the camera device, it may preempt the camera capture
11810          pipeline for at least one frame duration so that the camera device is unable to process
11811          the following capture request in time for the next sensor start of exposure boundary.
11812          When this happens, the application may observe a capture time gap (longer than one frame
11813          duration) between adjacent capture output frames, which usually exhibits as preview
11814          glitch if the repeating request output targets include a preview surface. This key gives
11815          the worst-case number of frame stall introduced by one reprocess request with any kind of
11816          formats/sizes combination.
11817
11818          If this key reports 0, it means a reprocess request doesn't introduce any glitch to the
11819          ongoing camera repeating request outputs, as if this reprocess request is never issued.
11820
11821          This key is supported if the camera device supports PRIVATE or YUV reprocessing (
11822          i.e. android.request.availableCapabilities contains PRIVATE_REPROCESSING or
11823          YUV_REPROCESSING).
11824          </details>
11825          <tag id="REPROC" />
11826        </entry>
11827      </static>
11828    </section>
11829    <section name="depth">
11830      <static>
11831        <entry name="maxDepthSamples" type="int32" visibility="system" hwlevel="limited">
11832          <description>Maximum number of points that a depth point cloud may contain.
11833          </description>
11834          <details>
11835            If a camera device supports outputting depth range data in the form of a depth point
11836            cloud ({@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD}), this is the maximum
11837            number of points an output buffer may contain.
11838
11839            Any given buffer may contain between 0 and maxDepthSamples points, inclusive.
11840            If output in the depth point cloud format is not supported, this entry will
11841            not be defined.
11842          </details>
11843          <tag id="DEPTH" />
11844        </entry>
11845        <entry name="availableDepthStreamConfigurations" type="int32" visibility="ndk_public"
11846               enum="true" container="array" typedef="streamConfiguration" hwlevel="limited">
11847          <array>
11848            <size>n</size>
11849            <size>4</size>
11850          </array>
11851          <enum>
11852            <value>OUTPUT</value>
11853            <value>INPUT</value>
11854          </enum>
11855          <description>The available depth dataspace stream
11856          configurations that this camera device supports
11857          (i.e. format, width, height, output/input stream).
11858          </description>
11859          <details>
11860            These are output stream configurations for use with
11861            dataSpace HAL_DATASPACE_DEPTH. The configurations are
11862            listed as `(format, width, height, input?)` tuples.
11863
11864            Only devices that support depth output for at least
11865            the HAL_PIXEL_FORMAT_Y16 dense depth map may include
11866            this entry.
11867
11868            A device that also supports the HAL_PIXEL_FORMAT_BLOB
11869            sparse depth point cloud must report a single entry for
11870            the format in this list as `(HAL_PIXEL_FORMAT_BLOB,
11871            android.depth.maxDepthSamples, 1, OUTPUT)` in addition to
11872            the entries for HAL_PIXEL_FORMAT_Y16.
11873          </details>
11874          <tag id="DEPTH" />
11875        </entry>
11876        <entry name="availableDepthMinFrameDurations" type="int64" visibility="ndk_public"
11877               container="array" typedef="streamConfigurationDuration" hwlevel="limited">
11878          <array>
11879            <size>4</size>
11880            <size>n</size>
11881          </array>
11882          <description>This lists the minimum frame duration for each
11883          format/size combination for depth output formats.
11884          </description>
11885          <units>(format, width, height, ns) x n</units>
11886          <details>
11887          This should correspond to the frame duration when only that
11888          stream is active, with all processing (typically in android.*.mode)
11889          set to either OFF or FAST.
11890
11891          When multiple streams are used in a request, the minimum frame
11892          duration will be max(individual stream min durations).
11893
11894          The minimum frame duration of a stream (of a particular format, size)
11895          is the same regardless of whether the stream is input or output.
11896
11897          See android.sensor.frameDuration and
11898          android.scaler.availableStallDurations for more details about
11899          calculating the max frame rate.
11900          </details>
11901          <tag id="DEPTH" />
11902        </entry>
11903        <entry name="availableDepthStallDurations" type="int64" visibility="ndk_public"
11904               container="array" typedef="streamConfigurationDuration" hwlevel="limited">
11905          <array>
11906            <size>4</size>
11907            <size>n</size>
11908          </array>
11909          <description>This lists the maximum stall duration for each
11910          output format/size combination for depth streams.
11911          </description>
11912          <units>(format, width, height, ns) x n</units>
11913          <details>
11914          A stall duration is how much extra time would get added
11915          to the normal minimum frame duration for a repeating request
11916          that has streams with non-zero stall.
11917
11918          This functions similarly to
11919          android.scaler.availableStallDurations for depth
11920          streams.
11921
11922          All depth output stream formats may have a nonzero stall
11923          duration.
11924          </details>
11925          <tag id="DEPTH" />
11926        </entry>
11927        <entry name="depthIsExclusive" type="byte" visibility="public"
11928               enum="true" typedef="boolean" hwlevel="limited">
11929          <enum>
11930            <value>FALSE</value>
11931            <value>TRUE</value>
11932          </enum>
11933          <description>Indicates whether a capture request may target both a
11934          DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as
11935          YUV_420_888, JPEG, or RAW) simultaneously.
11936          </description>
11937          <details>
11938          If TRUE, including both depth and color outputs in a single
11939          capture request is not supported. An application must interleave color
11940          and depth requests.  If FALSE, a single request can target both types
11941          of output.
11942
11943          Typically, this restriction exists on camera devices that
11944          need to emit a specific pattern or wavelength of light to
11945          measure depth values, which causes the color image to be
11946          corrupted during depth measurement.
11947          </details>
11948        </entry>
11949        <entry name="availableRecommendedDepthStreamConfigurations" type="int32"
11950            visibility="ndk_public" optional="true" container="array"
11951            typedef="recommendedStreamConfiguration" hal_version="3.4">
11952          <array>
11953            <size>n</size>
11954            <size>5</size>
11955          </array>
11956          <description>Recommended depth stream configurations for common client use cases.
11957          </description>
11958          <details>Optional subset of the android.depth.availableDepthStreamConfigurations that
11959          contains similar tuples listed as
11960          (i.e. width, height, format, output/input stream, usecase bit field).
11961          Camera devices will be able to suggest particular depth stream configurations which are
11962          power and performance efficient for specific use cases. For more information about
11963          retrieving the suggestions see
11964          {@link android.hardware.camera2.CameraCharacteristics#getRecommendedStreamConfigurationMap}.
11965          </details>
11966          <ndk_details>
11967          For data representation please refer to
11968          android.scaler.availableRecommendedStreamConfigurations
11969          </ndk_details>
11970          <hal_details>
11971          Recommended depth configurations are expected to be declared with SNAPSHOT and/or
11972          ZSL if supported by the device.
11973          For additional details on how to declare recommended stream configurations, check
11974          android.scaler.availableRecommendedStreamConfigurations.
11975          For additional requirements on depth streams please consider
11976          android.depth.availableDepthStreamConfigurations.
11977          </hal_details>
11978        </entry>
11979        <entry name="availableDynamicDepthStreamConfigurations" type="int32" visibility="ndk_public"
11980               enum="true" container="array" typedef="streamConfiguration" hal_version="3.4">
11981          <array>
11982            <size>n</size>
11983            <size>4</size>
11984          </array>
11985          <enum>
11986            <value>OUTPUT</value>
11987            <value>INPUT</value>
11988          </enum>
11989          <description>The available dynamic depth dataspace stream
11990          configurations that this camera device supports
11991          (i.e. format, width, height, output/input stream).
11992          </description>
11993          <details>
11994            These are output stream configurations for use with
11995            dataSpace DYNAMIC_DEPTH. The configurations are
11996            listed as `(format, width, height, input?)` tuples.
11997
11998            Only devices that support depth output for at least
11999            the HAL_PIXEL_FORMAT_Y16 dense depth map along with
12000            HAL_PIXEL_FORMAT_BLOB with the same size or size with
12001            the same aspect ratio can have dynamic depth dataspace
12002            stream configuration. android.depth.depthIsExclusive also
12003            needs to be set to FALSE.
12004          </details>
12005          <hal_details>
12006            Do not set this property directly.
12007            It is populated by camera framework and must not be set
12008            at the HAL layer.
12009          </hal_details>
12010          <tag id="DEPTH" />
12011        </entry>
12012        <entry name="availableDynamicDepthMinFrameDurations" type="int64" visibility="ndk_public"
12013               container="array" typedef="streamConfigurationDuration" hal_version="3.4">
12014          <array>
12015            <size>4</size>
12016            <size>n</size>
12017          </array>
12018          <description>This lists the minimum frame duration for each
12019          format/size combination for dynamic depth output streams.
12020          </description>
12021          <units>(format, width, height, ns) x n</units>
12022          <details>
12023          This should correspond to the frame duration when only that
12024          stream is active, with all processing (typically in android.*.mode)
12025          set to either OFF or FAST.
12026
12027          When multiple streams are used in a request, the minimum frame
12028          duration will be max(individual stream min durations).
12029
12030          The minimum frame duration of a stream (of a particular format, size)
12031          is the same regardless of whether the stream is input or output.
12032          </details>
12033          <hal_details>
12034            Do not set this property directly.
12035            It is populated by camera framework and must not be set
12036            at the HAL layer.
12037          </hal_details>
12038          <tag id="DEPTH" />
12039        </entry>
12040        <entry name="availableDynamicDepthStallDurations" type="int64" visibility="ndk_public"
12041               container="array" typedef="streamConfigurationDuration" hal_version="3.4">
12042          <array>
12043            <size>4</size>
12044            <size>n</size>
12045          </array>
12046          <description>This lists the maximum stall duration for each
12047          output format/size combination for dynamic depth streams.
12048          </description>
12049          <units>(format, width, height, ns) x n</units>
12050          <details>
12051          A stall duration is how much extra time would get added
12052          to the normal minimum frame duration for a repeating request
12053          that has streams with non-zero stall.
12054
12055          All dynamic depth output streams may have a nonzero stall
12056          duration.
12057          </details>
12058          <hal_details>
12059            Do not set this property directly.
12060            It is populated by camera framework and must not be set
12061            at the HAL layer.
12062          </hal_details>
12063          <tag id="DEPTH" />
12064        </entry>
12065        <entry name="availableDepthStreamConfigurationsMaximumResolution" type="int32"
12066          visibility="ndk_public" enum="true" container="array" typedef="streamConfiguration"
12067          hal_version="3.6">
12068          <array>
12069            <size>n</size>
12070            <size>4</size>
12071          </array>
12072          <enum>
12073            <value>OUTPUT</value>
12074            <value>INPUT</value>
12075          </enum>
12076          <description>The available depth dataspace stream
12077          configurations that this camera device supports
12078          (i.e. format, width, height, output/input stream) when a CaptureRequest is submitted with
12079          android.sensor.pixelMode set to
12080          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12081          </description>
12082          <details>
12083            Analogous to android.depth.availableDepthStreamConfigurations, for configurations which
12084            are applicable when android.sensor.pixelMode is set to
12085            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12086          </details>
12087          <tag id="DEPTH" />
12088        </entry>
12089        <entry name="availableDepthMinFrameDurationsMaximumResolution" type="int64"
12090          visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
12091          hal_version="3.6">
12092          <array>
12093            <size>4</size>
12094            <size>n</size>
12095          </array>
12096          <description>This lists the minimum frame duration for each
12097          format/size combination for depth output formats when a CaptureRequest is submitted with
12098          android.sensor.pixelMode set to
12099          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12100          </description>
12101          <units>(format, width, height, ns) x n</units>
12102          <details>
12103          Analogous to android.depth.availableDepthMinFrameDurations, for configurations which
12104          are applicable when android.sensor.pixelMode is set to
12105          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12106
12107          See android.sensor.frameDuration and
12108          android.scaler.availableStallDurationsMaximumResolution for more details about
12109          calculating the max frame rate.
12110          </details>
12111          <tag id="DEPTH" />
12112        </entry>
12113        <entry name="availableDepthStallDurationsMaximumResolution" type="int64"
12114          visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
12115          hal_version="3.6">
12116          <array>
12117            <size>4</size>
12118            <size>n</size>
12119          </array>
12120          <description>This lists the maximum stall duration for each
12121          output format/size combination for depth streams for CaptureRequests where
12122          android.sensor.pixelMode is set to
12123          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12124          </description>
12125          <units>(format, width, height, ns) x n</units>
12126          <details>
12127          Analogous to android.depth.availableDepthStallDurations, for configurations which
12128          are applicable when android.sensor.pixelMode is set to
12129          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12130          </details>
12131          <tag id="DEPTH" />
12132        </entry>
12133        <entry name="availableDynamicDepthStreamConfigurationsMaximumResolution" type="int32"
12134          visibility="ndk_public" enum="true" container="array" typedef="streamConfiguration"
12135          hal_version="3.6">
12136          <array>
12137            <size>n</size>
12138            <size>4</size>
12139          </array>
12140          <enum>
12141            <value>OUTPUT</value>
12142            <value>INPUT</value>
12143          </enum>
12144          <description>The available dynamic depth dataspace stream
12145          configurations that this camera device supports (i.e. format, width, height,
12146          output/input stream) for CaptureRequests where android.sensor.pixelMode is set to
12147          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12148          </description>
12149          <details>
12150          Analogous to android.depth.availableDynamicDepthStreamConfigurations, for configurations
12151          which are applicable when android.sensor.pixelMode is set to
12152          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12153          </details>
12154          <hal_details>
12155            Do not set this property directly.
12156            It is populated by camera framework and must not be set
12157            at the HAL layer.
12158          </hal_details>
12159          <tag id="DEPTH" />
12160        </entry>
12161        <entry name="availableDynamicDepthMinFrameDurationsMaximumResolution" type="int64"
12162          visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
12163          hal_version="3.6">
12164          <array>
12165            <size>4</size>
12166            <size>n</size>
12167          </array>
12168          <description>This lists the minimum frame duration for each
12169          format/size combination for dynamic depth output streams  for CaptureRequests where
12170          android.sensor.pixelMode is set to
12171          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12172          </description>
12173          <units>(format, width, height, ns) x n</units>
12174          <details>
12175          Analogous to android.depth.availableDynamicDepthMinFrameDurations, for configurations
12176          which are applicable when android.sensor.pixelMode is set to
12177          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12178          </details>
12179          <hal_details>
12180            Do not set this property directly.
12181            It is populated by camera framework and must not be set
12182            at the HAL layer.
12183          </hal_details>
12184          <tag id="DEPTH" />
12185        </entry>
12186        <entry name="availableDynamicDepthStallDurationsMaximumResolution" type="int64"
12187               visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
12188               hal_version="3.6">
12189          <array>
12190            <size>4</size>
12191            <size>n</size>
12192          </array>
12193          <description>This lists the maximum stall duration for each
12194          output format/size combination for dynamic depth streams for CaptureRequests where
12195          android.sensor.pixelMode is set to
12196          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12197          </description>
12198          <units>(format, width, height, ns) x n</units>
12199          <details>
12200          Analogous to android.depth.availableDynamicDepthStallDurations, for configurations
12201          which are applicable when android.sensor.pixelMode is set to
12202          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12203          </details>
12204          <hal_details>
12205            Do not set this property directly.
12206            It is populated by camera framework and must not be set
12207            at the HAL layer.
12208          </hal_details>
12209          <tag id="DEPTH" />
12210        </entry>
12211      </static>
12212    </section>
12213    <section name="logicalMultiCamera">
12214      <static>
12215        <entry name="physicalIds" type="byte" visibility="ndk_public"
12216               container="array" hwlevel="limited" hal_version="3.3">
12217          <array>
12218            <size>n</size>
12219          </array>
12220          <description>String containing the ids of the underlying physical cameras.
12221          </description>
12222          <units>UTF-8 null-terminated string</units>
12223          <details>
12224            For a logical camera, this is concatenation of all underlying physical camera IDs.
12225            The null terminator for physical camera ID must be preserved so that the whole string
12226            can be tokenized using '\0' to generate list of physical camera IDs.
12227
12228            For example, if the physical camera IDs of the logical camera are "2" and "3", the
12229            value of this tag will be ['2', '\0', '3', '\0'].
12230
12231            The number of physical camera IDs must be no less than 2.
12232          </details>
12233          <tag id="LOGICALCAMERA" />
12234        </entry>
12235        <entry name="sensorSyncType" type="byte" visibility="public"
12236               enum="true" hwlevel="limited" hal_version="3.3">
12237          <enum>
12238            <value>APPROXIMATE
12239              <notes>
12240              A software mechanism is used to synchronize between the physical cameras. As a result,
12241              the timestamp of an image from a physical stream is only an approximation of the
12242              image sensor start-of-exposure time.
12243              </notes>
12244            </value>
12245            <value>CALIBRATED
12246              <notes>
12247              The camera device supports frame timestamp synchronization at the hardware level,
12248              and the timestamp of a physical stream image accurately reflects its
12249              start-of-exposure time.
12250              </notes>
12251            </value>
12252          </enum>
12253          <description>The accuracy of frame timestamp synchronization between physical cameras</description>
12254          <details>
12255          The accuracy of the frame timestamp synchronization determines the physical cameras'
12256          ability to start exposure at the same time. If the sensorSyncType is CALIBRATED, the
12257          physical camera sensors usually run in leader/follower mode where one sensor generates a
12258          timing signal for the other, so that their shutter time is synchronized. For APPROXIMATE
12259          sensorSyncType, the camera sensors usually run in leader/leader mode, where both sensors
12260          use their own timing generator, and there could be offset between their start of exposure.
12261
12262          In both cases, all images generated for a particular capture request still carry the same
12263          timestamps, so that they can be used to look up the matching frame number and
12264          onCaptureStarted callback.
12265
12266          This tag is only applicable if the logical camera device supports concurrent physical
12267          streams from different physical cameras.
12268          </details>
12269          <tag id="LOGICALCAMERA" />
12270        </entry>
12271      </static>
12272      <dynamic>
12273      <entry name="activePhysicalId" type="byte" visibility="public"
12274             typedef="string" hal_version="3.4">
12275        <description>String containing the ID of the underlying active physical camera.
12276        </description>
12277        <units>UTF-8 null-terminated string</units>
12278        <details>
12279          The ID of the active physical camera that's backing the logical camera. All camera
12280          streams and metadata that are not physical camera specific will be originating from this
12281          physical camera.
12282
12283          For a logical camera made up of physical cameras where each camera's lenses have
12284          different characteristics, the camera device may choose to switch between the physical
12285          cameras when application changes FOCAL_LENGTH or SCALER_CROP_REGION.
12286          At the time of lens switch, this result metadata reflects the new active physical camera
12287          ID.
12288
12289          This key will be available if the camera device advertises this key via {@link
12290          android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys|ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}.
12291          When available, this must be one of valid physical IDs backing this logical multi-camera.
12292          If this key is not available for a logical multi-camera, the camera device implementation
12293          may still switch between different active physical cameras based on use case, but the
12294          current active physical camera information won't be available to the application.
12295        </details>
12296        <hal_details>
12297          Staring from HIDL ICameraDevice version 3.5, the tag must be available in the capture
12298          result metadata to indicate current active physical camera ID.
12299        </hal_details>
12300        <tag id="LOGICALCAMERA" />
12301      </entry>
12302    </dynamic>
12303    </section>
12304    <section name="distortionCorrection">
12305      <controls>
12306        <entry name="mode" type="byte" visibility="public" enum="true" hal_version="3.3">
12307          <enum>
12308            <value>OFF
12309            <notes>No distortion correction is applied.</notes></value>
12310            <value>FAST <notes>Lens distortion correction is applied without reducing frame rate
12311            relative to sensor output. It may be the same as OFF if distortion correction would
12312            reduce frame rate relative to sensor.</notes></value>
12313            <value>HIGH_QUALITY <notes>High-quality distortion correction is applied, at the cost of
12314            possibly reduced frame rate relative to sensor output.</notes></value>
12315          </enum>
12316          <description>Mode of operation for the lens distortion correction block.</description>
12317          <range>android.distortionCorrection.availableModes</range>
12318          <details>The lens distortion correction block attempts to improve image quality by fixing
12319          radial, tangential, or other geometric aberrations in the camera device's optics.  If
12320          available, the android.lens.distortion field documents the lens's distortion parameters.
12321
12322          OFF means no distortion correction is done.
12323
12324          FAST/HIGH_QUALITY both mean camera device determined distortion correction will be
12325          applied. HIGH_QUALITY mode indicates that the camera device will use the highest-quality
12326          correction algorithms, even if it slows down capture rate. FAST means the camera device
12327          will not slow down capture rate when applying correction. FAST may be the same as OFF if
12328          any correction at all would slow down capture rate.  Every output stream will have a
12329          similar amount of enhancement applied.
12330
12331          The correction only applies to processed outputs such as YUV, Y8, JPEG, or DEPTH16; it is
12332          not applied to any RAW output.
12333
12334          This control will be on by default on devices that support this control. Applications
12335          disabling distortion correction need to pay extra attention with the coordinate system of
12336          metering regions, crop region, and face rectangles. When distortion correction is OFF,
12337          metadata coordinates follow the coordinate system of
12338          android.sensor.info.preCorrectionActiveArraySize. When distortion is not OFF, metadata
12339          coordinates follow the coordinate system of android.sensor.info.activeArraySize.  The
12340          camera device will map these metadata fields to match the corrected image produced by the
12341          camera device, for both capture requests and results.  However, this mapping is not very
12342          precise, since rectangles do not generally map to rectangles when corrected.  Only linear
12343          scaling between the active array and precorrection active array coordinates is
12344          performed. Applications that require precise correction of metadata need to undo that
12345          linear scaling, and apply a more complete correction that takes into the account the app's
12346          own requirements.
12347
12348          The full list of metadata that is affected in this way by distortion correction is:
12349
12350          * android.control.afRegions
12351          * android.control.aeRegions
12352          * android.control.awbRegions
12353          * android.scaler.cropRegion
12354          * android.statistics.faces
12355          </details>
12356        </entry>
12357      </controls>
12358      <static>
12359        <entry name="availableModes" type="byte" visibility="public"
12360        type_notes="list of enums" container="array" typedef="enumList" hal_version="3.3">
12361          <array>
12362            <size>n</size>
12363          </array>
12364          <description>
12365          List of distortion correction modes for android.distortionCorrection.mode that are
12366          supported by this camera device.
12367          </description>
12368          <range>Any value listed in android.distortionCorrection.mode</range>
12369          <details>
12370            No device is required to support this API; such devices will always list only 'OFF'.
12371            All devices that support this API will list both FAST and HIGH_QUALITY.
12372          </details>
12373          <hal_details>
12374          HAL must support both FAST and HIGH_QUALITY if distortion correction is available
12375          on the camera device, but the underlying implementation can be the same for both modes.
12376          That is, if the highest quality implementation on the camera device does not slow down
12377          capture rate, then FAST and HIGH_QUALITY will generate the same output.
12378          </hal_details>
12379          <tag id="V1" />
12380          <tag id="REPROC" />
12381        </entry>
12382      </static>
12383      <dynamic>
12384        <clone entry="android.distortionCorrection.mode" kind="controls" hal_version="3.3">
12385        </clone>
12386      </dynamic>
12387    </section>
12388    <section name="heic">
12389      <static>
12390        <namespace name="info">
12391          <entry name="supported" type="byte" visibility="system" enum="true"
12392                 typedef="boolean" hwlevel="limited" hal_version="3.4">
12393            <enum>
12394              <value>FALSE</value>
12395              <value>TRUE</value>
12396            </enum>
12397            <description>Whether this camera device can support identical set of stream combinations
12398            involving HEIC image format, compared to the
12399            {@link android.hardware.camera2.CameraDevice#createCaptureSession table of combinations}
12400            involving JPEG image format required for the device's hardware level and capabilities.
12401            </description>
12402            <details>
12403            All the static, control and dynamic metadata tags related to JPEG apply to HEIC formats
12404            as well. For example, the same android.jpeg.orientation and android.jpeg.quality are
12405            used to control the orientation and quality of the HEIC image. Configuring JPEG and
12406            HEIC streams at the same time is not supported.
12407
12408            If a camera device supports HEIC format (ISO/IEC 23008-12), not only does it
12409            support the existing mandatory stream
12410            {@link android.hardware.camera2.CameraDevice#createCaptureSession combinations}
12411            required for the device's hardware level and capabilities, it also supports swapping
12412            each JPEG stream with HEIC stream in all guaranteed combinations.
12413
12414            For every HEIC stream configured by the application, the camera framework sets up 2
12415            internal streams with camera HAL:
12416
12417            * A YUV_420_888 or IMPLEMENTATION_DEFINED HAL stream as input to HEIC or HEVC encoder.
12418            * A BLOB stream with JPEG_APPS_SEGMENTS dataspace to extract application markers
12419            including EXIF and thumbnail to be saved in HEIF container.
12420
12421            A camera device can output HEIC format to the application if and only if:
12422
12423            * The system contains a HEIC or HEVC encoder with constant quality mode, and
12424            * This tag is set to TRUE, meaning that camera HAL supports replacing JPEG streams in
12425            all mandatory stream combinations with a [YUV_420_888/IMPLEMENTATION_DEFINED stream +
12426            JPEG_APPS_SEGMENT BLOB stream] combo.
12427
12428            As an example, if the camera device's hardware level is LIMITED, and it supports HEIC,
12429            in addition to the required stream combinations, HAL must support below stream
12430            combinations as well:
12431
12432            * IMPLEMENTATION_DEFINED/YUV_420_888 MAXIMUM + JPEG_SEGMENTS_BLOB,
12433            * PRIV PREVIEW + IMPLEMENTATION_DEFINED/YUV_420_888 MAXIMUM + JPEG_SEGMENTS_BLOB,
12434            * YUV PREVIEW + IMPLEMENTATION_DEFINED/YUV_420_888 MAXIMUM + JPEG_SEGMENTS_BLOB,
12435            * PRIV PREVIEW + YUV PREVIEW + IMPLEMENTATION_DEFINED/YUV_420_888 MAXIMUM +
12436            JPEG_SEGMENTS_BLOB
12437
12438            The selection logic between YUV_420_888 and IMPLEMENTATION_DEFINED for HAL internal
12439            stream is as follows:
12440
12441                if (HEIC encoder exists and supports the size) {
12442                    use IMPLEMENTATION_DEFINED with GRALLOC_USAGE_HW_IMAGE_ENCODER usage flag;
12443                } else {
12444                    // HVC encoder exists
12445                    if (size is less than framework predefined tile size) {
12446                        use IMPLEMENTATINO_DEFINED with GRALLOC_USAGE_HW_VIDEO_ENCODER usage flag;
12447                    } else {
12448                        use YUV_420_888;
12449                    }
12450                }
12451          </details>
12452          <tag id="HEIC" />
12453          </entry>
12454          <entry name="maxJpegAppSegmentsCount" type="byte" visibility="system"
12455                 hwlevel="limited" hal_version="3.4">
12456            <description>The maximum number of Jpeg APP segments supported by the camera HAL device.
12457            </description>
12458            <details>
12459            The camera framework will use this value to derive the size of the BLOB buffer with
12460            JPEG_APP_SEGMENTS dataspace, with each APP segment occupying at most 64K bytes. If the
12461            value of this tag is n, the size of the framework allocated buffer will be:
12462
12463                n * (2 + 0xFFFF) + sizeof(struct CameraBlob)
12464
12465            where 2 is number of bytes for APP marker, 0xFFFF is the maximum size per APP segment
12466            (including segment size).
12467
12468            The value of this tag must be at least 1, and APP1 marker (0xFFE1) segment must be the
12469            first segment stored in the JPEG_APPS_SEGMENTS BLOB buffer. APP1 segment stores EXIF and
12470            thumbnail.
12471
12472            Since media encoder embeds the orientation in the metadata of the output image, to be
12473            consistent between main image and thumbnail, camera HAL must not rotate the thumbnail
12474            image data based on android.jpeg.orientation. The framework will write the orientation
12475            into EXIF and HEIC container.
12476
12477            APP1 segment is followed immediately by one or multiple APP2 segments, and APPn
12478            segments. After the HAL fills and returns the JPEG_APP_SEGMENTS buffer, the camera
12479            framework modifies the APP1 segment by filling in the EXIF tags that are related to
12480            main image bitstream and the tags that can be derived from capture result metadata,
12481            before saving them into the HEIC container.
12482
12483            The value of this tag must not be more than 16.
12484            </details>
12485            <tag id="HEIC" />
12486          </entry>
12487        </namespace>
12488
12489        <entry name="availableHeicStreamConfigurations" type="int32" visibility="ndk_public"
12490            enum="true" container="array" typedef="streamConfiguration"
12491            hwlevel="limited" hal_version="3.4">
12492          <array>
12493            <size>n</size>
12494            <size>4</size>
12495          </array>
12496          <enum>
12497            <value>OUTPUT</value>
12498            <value>INPUT</value>
12499          </enum>
12500          <description>The available HEIC (ISO/IEC 23008-12) stream
12501          configurations that this camera device supports
12502          (i.e. format, width, height, output/input stream).
12503          </description>
12504          <details>
12505          The configurations are listed as `(format, width, height, input?)` tuples.
12506
12507          If the camera device supports HEIC image format, it will support identical set of stream
12508          combinations involving HEIC image format, compared to the combinations involving JPEG
12509          image format as required by the device's hardware level and capabilities.
12510
12511          All the static, control, and dynamic metadata tags related to JPEG apply to HEIC formats.
12512          Configuring JPEG and HEIC streams at the same time is not supported.
12513          </details>
12514          <ndk_details>
12515          All the configuration tuples `(format, width, height, input?)` will contain
12516          AIMAGE_FORMAT_HEIC format as OUTPUT only.
12517          </ndk_details>
12518          <hal_details>
12519          These are output stream configurations for use with dataSpace HAL_DATASPACE_HEIF.
12520
12521          Do not set this property directly. It is populated by camera framework and must not be
12522          set by the HAL layer.
12523          </hal_details>
12524         <tag id="HEIC" />
12525        </entry>
12526        <entry name="availableHeicMinFrameDurations" type="int64" visibility="ndk_public"
12527               container="array" typedef="streamConfigurationDuration" hwlevel="limited"
12528               hal_version="3.4">
12529          <array>
12530            <size>4</size>
12531            <size>n</size>
12532          </array>
12533          <description>This lists the minimum frame duration for each
12534          format/size combination for HEIC output formats.
12535          </description>
12536          <units>(format, width, height, ns) x n</units>
12537          <details>
12538          This should correspond to the frame duration when only that
12539          stream is active, with all processing (typically in android.*.mode)
12540          set to either OFF or FAST.
12541
12542          When multiple streams are used in a request, the minimum frame
12543          duration will be max(individual stream min durations).
12544
12545          See android.sensor.frameDuration and
12546          android.scaler.availableStallDurations for more details about
12547          calculating the max frame rate.
12548          </details>
12549          <hal_details>
12550          Do not set this property directly. It is populated by camera framework and must not be
12551          set by the HAL layer.
12552          </hal_details>
12553          <tag id="HEIC" />
12554        </entry>
12555        <entry name="availableHeicStallDurations" type="int64" visibility="ndk_public"
12556               container="array" typedef="streamConfigurationDuration" hwlevel="limited"
12557               hal_version="3.4">
12558          <array>
12559            <size>4</size>
12560            <size>n</size>
12561          </array>
12562          <description>This lists the maximum stall duration for each
12563          output format/size combination for HEIC streams.
12564          </description>
12565          <units>(format, width, height, ns) x n</units>
12566          <details>
12567          A stall duration is how much extra time would get added
12568          to the normal minimum frame duration for a repeating request
12569          that has streams with non-zero stall.
12570
12571          This functions similarly to
12572          android.scaler.availableStallDurations for HEIC
12573          streams.
12574
12575          All HEIC output stream formats may have a nonzero stall
12576          duration.
12577          </details>
12578          <hal_details>
12579          Do not set this property directly. It is populated by camera framework and must not be
12580          set by the HAL layer.
12581          </hal_details>
12582          <tag id="HEIC" />
12583        </entry>
12584        <entry name="availableHeicStreamConfigurationsMaximumResolution" type="int32"
12585          visibility="ndk_public" enum="true" container="array" typedef="streamConfiguration"
12586          hal_version="3.6">
12587          <array>
12588            <size>n</size>
12589            <size>4</size>
12590          </array>
12591          <enum>
12592            <value>OUTPUT</value>
12593            <value>INPUT</value>
12594          </enum>
12595          <description>The available HEIC (ISO/IEC 23008-12) stream
12596          configurations that this camera device supports
12597          (i.e. format, width, height, output/input stream).
12598          </description>
12599          <details>
12600          Refer to android.heic.availableHeicStreamConfigurations for details.
12601          </details>
12602          <ndk_details>
12603          All the configuration tuples `(format, width, height, input?)` will contain
12604          AIMAGE_FORMAT_HEIC format as OUTPUT only.
12605          </ndk_details>
12606          <hal_details>
12607          These are output stream configurations for use with dataSpace HAL_DATASPACE_HEIF.
12608
12609          Do not set this property directly. It is populated by camera framework and must not be
12610          set by the HAL layer.
12611          </hal_details>
12612         <tag id="HEIC" />
12613        </entry>
12614        <entry name="availableHeicMinFrameDurationsMaximumResolution" type="int64"
12615          visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
12616          hal_version="3.6">
12617          <array>
12618            <size>4</size>
12619            <size>n</size>
12620          </array>
12621          <description>This lists the minimum frame duration for each
12622          format/size combination for HEIC output formats for CaptureRequests where
12623          android.sensor.pixelMode is set to
12624          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12625          </description>
12626          <units>(format, width, height, ns) x n</units>
12627          <details>
12628          Refer to android.heic.availableHeicMinFrameDurations for details.
12629          </details>
12630          <hal_details>
12631          Do not set this property directly. It is populated by camera framework and must not be
12632          set by the HAL layer.
12633          </hal_details>
12634          <tag id="HEIC" />
12635        </entry>
12636        <entry name="availableHeicStallDurationsMaximumResolution" type="int64"
12637          visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
12638          hal_version="3.6">
12639          <array>
12640            <size>4</size>
12641            <size>n</size>
12642          </array>
12643          <description>This lists the maximum stall duration for each
12644          output format/size combination for HEIC streams for CaptureRequests where
12645          android.sensor.pixelMode is set to
12646          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
12647          </description>
12648          <units>(format, width, height, ns) x n</units>
12649          <details>
12650          Refer to android.heic.availableHeicStallDurations for details.
12651          </details>
12652          <hal_details>
12653          Do not set this property directly. It is populated by camera framework and must not be
12654          set by the HAL layer.
12655          </hal_details>
12656          <tag id="HEIC" />
12657        </entry>
12658      </static>
12659    </section>
12660  </namespace>
12661</metadata>
12662