blob: 2b7a1c8a19c4aad1861e73e8a5b790eaa36a49c4 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2012 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<metadata xmlns="http://schemas.android.com/service/camera/metadata/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata_definitions.xsd">
<tags>
<tag id="BC">
Needed for backwards compatibility with old Java API
</tag>
<tag id="V1">
New features for first camera 2 release (API1)
</tag>
<tag id="RAW">
Needed for useful RAW image processing and DNG file support
</tag>
<tag id="HAL2">
Entry is only used by camera device legacy HAL 2.x
</tag>
<tag id="FULL">
Entry is required for full hardware level devices, and optional for other hardware levels
</tag>
<tag id="DEPTH">
Entry is required for the depth capability.
</tag>
<tag id="REPROC">
Entry is required for the YUV or PRIVATE reprocessing capability.
</tag>
<tag id="LOGICALCAMERA">
Entry is required for logical multi-camera capability.
</tag>
<tag id="FUTURE">
Entry is under-specified and is not required for now. This is for book-keeping purpose,
do not implement or use it, it may be revised for future.
</tag>
</tags>
<types>
<typedef name="pairFloatFloat">
<language name="java">android.util.Pair&lt;Float,Float&gt;</language>
</typedef>
<typedef name="pairDoubleDouble">
<language name="java">android.util.Pair&lt;Double,Double&gt;</language>
</typedef>
<typedef name="rectangle">
<language name="java">android.graphics.Rect</language>
</typedef>
<typedef name="size">
<language name="java">android.util.Size</language>
</typedef>
<typedef name="string">
<language name="java">String</language>
</typedef>
<typedef name="boolean">
<language name="java">boolean</language>
</typedef>
<typedef name="imageFormat">
<language name="java">int</language>
</typedef>
<typedef name="streamConfigurationMap">
<language name="java">android.hardware.camera2.params.StreamConfigurationMap</language>
</typedef>
<typedef name="streamConfiguration">
<language name="java">android.hardware.camera2.params.StreamConfiguration</language>
</typedef>
<typedef name="recommendedStreamConfiguration">
<language
name="java">android.hardware.camera2.params.RecommendedStreamConfiguration</language>
</typedef>
<typedef name="streamConfigurationDuration">
<language name="java">android.hardware.camera2.params.StreamConfigurationDuration</language>
</typedef>
<typedef name="face">
<language name="java">android.hardware.camera2.params.Face</language>
</typedef>
<typedef name="meteringRectangle">
<language name="java">android.hardware.camera2.params.MeteringRectangle</language>
</typedef>
<typedef name="rangeFloat">
<language name="java">android.util.Range&lt;Float&gt;</language>
</typedef>
<typedef name="rangeInt">
<language name="java">android.util.Range&lt;Integer&gt;</language>
</typedef>
<typedef name="rangeLong">
<language name="java">android.util.Range&lt;Long&gt;</language>
</typedef>
<typedef name="colorSpaceTransform">
<language name="java">android.hardware.camera2.params.ColorSpaceTransform</language>
</typedef>
<typedef name="rggbChannelVector">
<language name="java">android.hardware.camera2.params.RggbChannelVector</language>
</typedef>
<typedef name="blackLevelPattern">
<language name="java">android.hardware.camera2.params.BlackLevelPattern</language>
</typedef>
<typedef name="enumList">
<language name="java">int</language>
</typedef>
<typedef name="sizeF">
<language name="java">android.util.SizeF</language>
</typedef>
<typedef name="point">
<language name="java">android.graphics.Point</language>
</typedef>
<typedef name="tonemapCurve">
<language name="java">android.hardware.camera2.params.TonemapCurve</language>
</typedef>
<typedef name="lensShadingMap">
<language name="java">android.hardware.camera2.params.LensShadingMap</language>
</typedef>
<typedef name="location">
<language name="java">android.location.Location</language>
</typedef>
<typedef name="highSpeedVideoConfiguration">
<language name="java">android.hardware.camera2.params.HighSpeedVideoConfiguration</language>
</typedef>
<typedef name="reprocessFormatsMap">
<language name="java">android.hardware.camera2.params.ReprocessFormatsMap</language>
</typedef>
<typedef name="oisSample">
<language name="java">android.hardware.camera2.params.OisSample</language>
</typedef>
</types>
<namespace name="android">
<section name="colorCorrection">
<controls>
<entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full">
<enum>
<value>TRANSFORM_MATRIX
<notes>Use the android.colorCorrection.transform matrix
and android.colorCorrection.gains to do color conversion.
All advanced white balance adjustments (not specified
by our white balance pipeline) must be disabled.
If AWB is enabled with `android.control.awbMode != OFF`, then
TRANSFORM_MATRIX is ignored. The camera device will override
this value to either FAST or HIGH_QUALITY.
</notes>
</value>
<value>FAST
<notes>Color correction processing must not slow down
capture rate relative to sensor raw output.
Advanced white balance adjustments above and beyond
the specified white balance pipeline may be applied.
If AWB is enabled with `android.control.awbMode != OFF`, then
the camera device uses the last frame's AWB values
(or defaults if AWB has never been run).
</notes>
</value>
<value>HIGH_QUALITY
<notes>Color correction processing operates at improved
quality but the capture rate might be reduced (relative to sensor
raw output rate)
Advanced white balance adjustments above and beyond
the specified white balance pipeline may be applied.
If AWB is enabled with `android.control.awbMode != OFF`, then
the camera device uses the last frame's AWB values
(or defaults if AWB has never been run).
</notes>
</value>
</enum>
<description>
The mode control selects how the image data is converted from the
sensor's native color into linear sRGB color.
</description>
<details>
When auto-white balance (AWB) is enabled with android.control.awbMode, this
control is overridden by the AWB routine. When AWB is disabled, the
application controls how the color mapping is performed.
We define the expected processing pipeline below. For consistency
across devices, this is always the case with TRANSFORM_MATRIX.
When either FULL or HIGH_QUALITY is used, the camera device may
do additional processing but android.colorCorrection.gains and
android.colorCorrection.transform will still be provided by the
camera device (in the results) and be roughly correct.
Switching to TRANSFORM_MATRIX and using the data provided from
FAST or HIGH_QUALITY will yield a picture with the same white point
as what was produced by the camera device in the earlier frame.
The expected processing pipeline is as follows:
![White balance processing pipeline](android.colorCorrection.mode/processing_pipeline.png)
The white balance is encoded by two values, a 4-channel white-balance
gain vector (applied in the Bayer domain), and a 3x3 color transform
matrix (applied after demosaic).
The 4-channel white-balance gains are defined as:
android.colorCorrection.gains = [ R G_even G_odd B ]
where `G_even` is the gain for green pixels on even rows of the
output, and `G_odd` is the gain for green pixels on the odd rows.
These may be identical for a given camera device implementation; if
the camera device does not support a separate gain for even/odd green
channels, it will use the `G_even` value, and write `G_odd` equal to
`G_even` in the output result metadata.
The matrices for color transforms are defined as a 9-entry vector:
android.colorCorrection.transform = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
which define a transform from input sensor colors, `P_in = [ r g b ]`,
to output linear sRGB, `P_out = [ r' g' b' ]`,
with colors as follows:
r' = I0r + I1g + I2b
g' = I3r + I4g + I5b
b' = I6r + I7g + I8b
Both the input and output value ranges must match. Overflow/underflow
values are clipped to fit within the range.
</details>
<hal_details>
HAL must support both FAST and HIGH_QUALITY if color correction control is available
on the camera device, but the underlying implementation can be the same for both modes.
That is, if the highest quality implementation on the camera device does not slow down
capture rate, then FAST and HIGH_QUALITY should generate the same output.
</hal_details>
</entry>
<entry name="transform" type="rational" visibility="public"
type_notes="3x3 rational matrix in row-major order"
container="array" typedef="colorSpaceTransform" hwlevel="full">
<array>
<size>3</size>
<size>3</size>
</array>
<description>A color transform matrix to use to transform
from sensor RGB color space to output linear sRGB color space.
</description>
<units>Unitless scale factors</units>
<details>This matrix is either set by the camera device when the request
android.colorCorrection.mode is not TRANSFORM_MATRIX, or
directly by the application in the request when the
android.colorCorrection.mode is TRANSFORM_MATRIX.
In the latter case, the camera device may round the matrix to account
for precision issues; the final rounded matrix should be reported back
in this matrix result metadata. The transform should keep the magnitude
of the output color values within `[0, 1.0]` (assuming input color
values is within the normalized range `[0, 1.0]`), or clipping may occur.
The valid range of each matrix element varies on different devices, but
values within [-1.5, 3.0] are guaranteed not to be clipped.
</details>
</entry>
<entry name="gains" type="float" visibility="public"
type_notes="A 1D array of floats for 4 color channel gains"
container="array" typedef="rggbChannelVector" hwlevel="full">
<array>
<size>4</size>
</array>
<description>Gains applying to Bayer raw color channels for
white-balance.</description>
<units>Unitless gain factors</units>
<details>
These per-channel gains are either set by the camera device
when the request android.colorCorrection.mode is not
TRANSFORM_MATRIX, or directly by the application in the
request when the android.colorCorrection.mode is
TRANSFORM_MATRIX.
The gains in the result metadata are the gains actually
applied by the camera device to the current frame.
The valid range of gains varies on different devices, but gains
between [1.0, 3.0] are guaranteed not to be clipped. Even if a given
device allows gains below 1.0, this is usually not recommended because
this can create color artifacts.
</details>
<hal_details>
The 4-channel white-balance gains are defined in
the order of `[R G_even G_odd B]`, where `G_even` is the gain
for green pixels on even rows of the output, and `G_odd`
is the gain for green pixels on the odd rows.
If a HAL does not support a separate gain for even/odd green
channels, it must use the `G_even` value, and write
`G_odd` equal to `G_even` in the output result metadata.
</hal_details>
</entry>
<entry name="aberrationMode" type="byte" visibility="public" enum="true" hwlevel="legacy">
<enum>
<value>OFF
<notes>
No aberration correction is applied.
</notes>
</value>
<value>FAST
<notes>
Aberration correction will not slow down capture rate
relative to sensor raw output.
</notes>
</value>
<value>HIGH_QUALITY
<notes>
Aberration correction operates at improved quality but the capture rate might be
reduced (relative to sensor raw output rate)
</notes>
</value>
</enum>
<description>
Mode of operation for the chromatic aberration correction algorithm.
</description>
<range>android.colorCorrection.availableAberrationModes</range>
<details>
Chromatic (color) aberration is caused by the fact that different wavelengths of light
can not focus on the same point after exiting from the lens. This metadata defines
the high level control of chromatic aberration correction algorithm, which aims to
minimize the chromatic artifacts that may occur along the object boundaries in an
image.
FAST/HIGH_QUALITY both mean that camera device determined aberration
correction will be applied. HIGH_QUALITY mode indicates that the camera device will
use the highest-quality aberration correction algorithms, even if it slows down
capture rate. FAST means the camera device will not slow down capture rate when
applying aberration correction.
LEGACY devices will always be in FAST mode.
</details>
</entry>
</controls>
<dynamic>
<clone entry="android.colorCorrection.mode" kind="controls">
</clone>
<clone entry="android.colorCorrection.transform" kind="controls">
</clone>
<clone entry="android.colorCorrection.gains" kind="controls">
</clone>
<clone entry="android.colorCorrection.aberrationMode" kind="controls">
</clone>
</dynamic>
<static>
<entry name="availableAberrationModes" type="byte" visibility="public"
type_notes="list of enums" container="array" typedef="enumList" hwlevel="legacy">
<array>
<size>n</size>
</array>
<description>
List of aberration correction modes for android.colorCorrection.aberrationMode that are
supported by this camera device.
</description>
<range>Any value listed in android.colorCorrection.aberrationMode</range>
<details>
This key lists the valid modes for android.colorCorrection.aberrationMode. If no
aberration correction modes are available for a device, this list will solely include
OFF mode. All camera devices will support either OFF or FAST mode.
Camera devices that support the MANUAL_POST_PROCESSING capability will always list
OFF mode. This includes all FULL level devices.
LEGACY devices will always only support FAST mode.
</details>
<hal_details>
HAL must support both FAST and HIGH_QUALITY if chromatic aberration control is available
on the camera device, but the underlying implementation can be the same for both modes.
That is, if the highest quality implementation on the camera device does not slow down
capture rate, then FAST and HIGH_QUALITY will generate the same output.
</hal_details>
<tag id="V1" />
</entry>
</static>
</section>
<section name="control">
<controls>
<entry name="aeAntibandingMode" type="byte" visibility="public"
enum="true" hwlevel="legacy">
<enum>
<value>OFF
<notes>
The camera device will not adjust exposure duration to
avoid banding problems.
</notes>
</value>
<value>50HZ
<notes>
The camera device will adjust exposure duration to
avoid banding problems with 50Hz illumination sources.
</notes>
</value>
<value>60HZ
<notes>
The camera device will adjust exposure duration to
avoid banding problems with 60Hz illumination
sources.
</notes>
</value>
<value>AUTO
<notes>
The camera device will automatically adapt its
antibanding routine to the current illumination
condition. This is the default mode if AUTO is
available on given camera device.
</notes>
</value>
</enum>
<description>
The desired setting for the camera device's auto-exposure
algorithm's antibanding compensation.
</description>
<range>
android.control.aeAvailableAntibandingModes
</range>
<details>
Some kinds of lighting fixtures, such as some fluorescent
lights, flicker at the rate of the power supply frequency
(60Hz or 50Hz, depending on country). While this is
typically not noticeable to a person, it can be visible to
a camera device. If a camera sets its exposure time to the
wrong value, the flicker may become visible in the
viewfinder as flicker or in a final captured image, as a
set of variable-brightness bands across the image.
Therefore, the auto-exposure routines of camera devices
include antibanding routines that ensure that the chosen
exposure value will not cause such banding. The choice of
exposure time depends on the rate of flicker, which the
camera device can detect automatically, or the expected
rate can be selected by the application using this
control.
A given camera device may not support all of the possible
options for the antibanding mode. The
android.control.aeAvailableAntibandingModes key contains
the available modes for a given camera device.
AUTO mode is the default if it is available on given
camera device. When AUTO mode is not available, the
default will be either 50HZ or 60HZ, and both 50HZ
and 60HZ will be available.
If manual exposure control is enabled (by setting
android.control.aeMode or android.control.mode to OFF),
then this setting has no effect, and the application must
ensure it selects exposure times that do not cause banding
issues. The android.statistics.sceneFlicker key can assist
the application in this.
</details>
<hal_details>
For all capture request templates, this field must be set
to AUTO if AUTO mode is available. If AUTO is not available,
the default must be either 50HZ or 60HZ, and both 50HZ and
60HZ must be available.
If manual exposure control is enabled (by setting
android.control.aeMode or android.control.mode to OFF),
then the exposure values provided by the application must not be
adjusted for antibanding.
</hal_details>
<tag id="BC" />
</entry>
<entry name="aeExposureCompensation" type="int32" visibility="public" hwlevel="legacy">
<description>Adjustment to auto-exposure (AE) target image
brightness.</description>
<units>Compensation steps</units>
<range>android.control.aeCompensationRange</range>
<details>
The adjustment is measured as a count of steps, with the
step size defined by android.control.aeCompensationStep and the
allowed range by android.control.aeCompensationRange.
For example, if the exposure value (EV) step is 0.333, '6'
will mean an exposure compensation of +2 EV; -3 will mean an
exposure compensation of -1 EV. One EV represents a doubling
of image brightness. Note that this control will only be
effective if android.control.aeMode `!=` OFF. This control
will take effect even when android.control.aeLock `== true`.
In the event of exposure compensation value being changed, camera device
may take several frames to reach the newly requested exposure target.
During that time, android.control.aeState field will be in the SEARCHING
state. Once the new exposure target is reached, android.control.aeState will
change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
FLASH_REQUIRED (if the scene is too dark for still capture).
</details>
<tag id="BC" />
</entry>
<entry name="aeLock" type="byte" visibility="public" enum="true"
typedef="boolean" hwlevel="legacy">
<enum>
<value>OFF
<notes>Auto-exposure lock is disabled; the AE algorithm
is free to update its parameters.</notes></value>
<value>ON
<notes>Auto-exposure lock is enabled; the AE algorithm
must not update the exposure and sensitivity parameters
while the lock is active.
android.control.aeExposureCompensation setting changes
will still take effect while auto-exposure is locked.
Some rare LEGACY devices may not support
this, in which case the value will always be overridden to OFF.
</notes></value>
</enum>
<description>Whether auto-exposure (AE) is currently locked to its latest
calculated values.</description>
<details>
When set to `true` (ON), the AE algorithm is locked to its latest parameters,
and will not change exposure settings until the lock is set to `false` (OFF).
Note that even when AE is locked, the flash may be fired if
the android.control.aeMode is ON_AUTO_FLASH /
ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.
When android.control.aeExposureCompensation is changed, even if the AE lock
is ON, the camera device will still adjust its exposure value.
If AE precapture is triggered (see android.control.aePrecaptureTrigger)
when AE is already locked, the camera device will not change the exposure time
(android.sensor.exposureTime) and sensitivity (android.sensor.sensitivity)
parameters. The flash may be fired if the android.control.aeMode
is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
android.control.aeMode is ON_ALWAYS_FLASH, the scene may become overexposed.
Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.
When an AE precapture sequence is triggered, AE unlock will not be able to unlock
the AE if AE is locked by the camera device internally during precapture metering
sequence In other words, submitting requests with AE unlock has no effect for an
ongoing precapture metering sequence. Otherwise, the precapture metering sequence
will never succeed in a sequence of preview requests where AE lock is always set
to `false`.
Since the camera device has a pipeline of in-flight requests, the settings that
get locked do not necessarily correspond to the settings that were present in the
latest capture result received from the camera device, since additional captures
and AE updates may have occurred even before the result was sent out. If an
application is switching between automatic and manual control and wishes to eliminate
any flicker during the switch, the following procedure is recommended:
1. Starting in auto-AE mode:
2. Lock AE
3. Wait for the first result to be output that has the AE locked
4. Copy exposure settings from that result into a request, set the request to manual AE
5. Submit the capture request, proceed to run manual AE as desired.
See android.control.aeState for AE lock related state transition details.
</details>
<tag id="BC" />
</entry>
<entry name="aeMode" type="byte" visibility="public" enum="true" hwlevel="legacy">
<enum>
<value>OFF
<notes>
The camera device's autoexposure routine is disabled.
The application-selected android.sensor.exposureTime,
android.sensor.sensitivity and
android.sensor.frameDuration are used by the camera
device, along with android.flash.* fields, if there's
a flash unit for this camera device.
Note that auto-white balance (AWB) and auto-focus (AF)
behavior is device dependent when AE is in OFF mode.
To have consistent behavior across different devices,
it is recommended to either set AWB and AF to OFF mode
or lock AWB and AF before setting AE to OFF.
See android.control.awbMode, android.control.afMode,
android.control.awbLock, and android.control.afTrigger
for more details.
LEGACY devices do not support the OFF mode and will
override attempts to use this value to ON.
</notes>
</value>
<value>ON
<notes>
The camera device's autoexposure routine is active,
with no flash control.
The application's values for
android.sensor.exposureTime,
android.sensor.sensitivity, and
android.sensor.frameDuration are ignored. The
application has control over the various
android.flash.* fields.
</notes>
</value>
<value>ON_AUTO_FLASH
<notes>
Like ON, except that the camera device also controls
the camera's flash unit, firing it in low-light
conditions.
The flash may be fired during a precapture sequence
(triggered by android.control.aePrecaptureTrigger) and
may be fired for captures for which the
android.control.captureIntent field is set to
STILL_CAPTURE
</notes>
</value>
<value>ON_ALWAYS_FLASH
<notes>
Like ON, except that the camera device also controls
the camera's flash unit, always firing it for still
captures.
The flash may be fired during a precapture sequence
(triggered by android.control.aePrecaptureTrigger) and
will always be fired for captures for which the
android.control.captureIntent field is set to
STILL_CAPTURE
</notes>
</value>
<value>ON_AUTO_FLASH_REDEYE
<notes>
Like ON_AUTO_FLASH, but with automatic red eye
reduction.
If deemed necessary by the camera device, a red eye
reduction flash will fire during the precapture
sequence.
</notes>
</value>
<value hal_version="3.3">ON_EXTERNAL_FLASH
<notes>
An external flash has been turned on.
It informs the camera device that an external flash has been turned on, and that
metering (and continuous focus if active) should be quickly recaculated to account
for the external flash. Otherwise, this mode acts like ON.
When the external flash is turned off, AE mode should be changed to one of the
other available AE modes.
If the camera device supports AE external flash mode, android.control.aeState must
be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without
flash.
</notes>
</value>
</enum>
<description>The desired mode for the camera device's
auto-exposure routine.</description>
<range>android.control.aeAvailableModes</range>
<details>
This control is only effective if android.control.mode is
AUTO.
When set to any of the ON modes, the camera device's
auto-exposure routine is enabled, overriding the
application's selected exposure time, sensor sensitivity,
and frame duration (android.sensor.exposureTime,
android.sensor.sensitivity, and
android.sensor.frameDuration). If one of the FLASH modes
is selected, the camera device's flash unit controls are
also overridden.
The FLASH modes are only available if the camera device
has a flash unit (android.flash.info.available is `true`).
If flash TORCH mode is desired, this field must be set to
ON or OFF, and android.flash.mode set to TORCH.
When set to any of the ON modes, the values chosen by the
camera device auto-exposure routine for the overridden
fields for a given capture will be available in its
CaptureResult.
</details>
<tag id="BC" />
</entry>
<entry name="aeRegions" type="int32" visibility="public"
optional="true" container="array" typedef="meteringRectangle">
<array>
<size>5</size>
<size>area_count</size>
</array>
<description>List of metering areas to use for auto-exposure adjustment.</description>
<units>Pixel coordinates within android.sensor.info.activeArraySize or
android.sensor.info.preCorrectionActiveArraySize depending on
distortion correction capability and mode</units>
<range>Coordinates must be between `[(0,0), (width, height))` of
android.sensor.info.activeArraySize or android.sensor.info.preCorrectionActiveArraySize
depending on distortion correction capability and mode</range>
<details>
Not available if android.control.maxRegionsAe is 0.
Otherwise will always be present.
The maximum number of regions supported by the device is determined by the value
of android.control.maxRegionsAe.
For devices not supporting android.distortionCorrection.mode control, the coordinate
system always follows that of android.sensor.info.activeArraySize, with (0,0) being
the top-left pixel in the active pixel array, and
(android.sensor.info.activeArraySize.width - 1,
android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
active pixel array.
For devices supporting android.distortionCorrection.mode control, the coordinate
system depends on the mode being set.
When the distortion correction mode is OFF, the coordinate system follows
android.sensor.info.preCorrectionActiveArraySize, with
`(0, 0)` being the top-left pixel of the pre-correction active array, and
(android.sensor.info.preCorrectionActiveArraySize.width - 1,
android.sensor.info.preCorrectionActiveArraySize.height - 1) being the bottom-right
pixel in the pre-correction active pixel array.
When the distortion correction mode is not OFF, the coordinate system follows
android.sensor.info.activeArraySize, with
`(0, 0)` being the top-left pixel of the active array, and
(android.sensor.info.activeArraySize.width - 1,
android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
active pixel array.
The weight must be within `[0, 1000]`, and represents a weight
for every pixel in the area. This means that a large metering area
with the same weight as a smaller area will have more effect in
the metering result. Metering areas can partially overlap and the
camera device will add the weights in the overlap region.
The weights are relative to weights of other exposure metering regions, so if only one
region is used, all non-zero weights will have the same effect. A region with 0
weight is ignored.
If all regions have 0 weight, then no specific metering area needs to be used by the
camera device.
If the metering region is outside the used android.scaler.cropRegion returned in
capture result metadata, the camera device will ignore the sections outside the crop
region and output only the intersection rectangle as the metering region in the result
metadata. If the region is entirely outside the crop region, it will be ignored and
not reported in the result metadata.
</details>
<ndk_details>
The data representation is `int[5 * area_count]`.
Every five elements represent a metering region of `(xmin, ymin, xmax, ymax, weight)`.
The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
ymax.
</ndk_details>
<hal_details>
The HAL level representation of MeteringRectangle[] is a
int[5 * area_count].
Every five elements represent a metering region of
(xmin, ymin, xmax, ymax, weight).
The rectangle is defined to be inclusive on xmin and ymin, but
exclusive on xmax and ymax.
HAL must always report metering regions in the coordinate system of pre-correction
active array.
</hal_details>
<tag id="BC" />
</entry>
<entry name="aeTargetFpsRange" type="int32" visibility="public"
container="array" typedef="rangeInt" hwlevel="legacy">
<array>
<size>2</size>
</array>
<description>Range over which the auto-exposure routine can
adjust the capture frame rate to maintain good
exposure.</description>
<units>Frames per second (FPS)</units>
<range>Any of the entries in android.control.aeAvailableTargetFpsRanges</range>
<details>Only constrains auto-exposure (AE) algorithm, not
manual control of android.sensor.exposureTime and
android.sensor.frameDuration.</details>
<tag id="BC" />
</entry>
<entry name="aePrecaptureTrigger" type="byte" visibility="public"
enum="true" hwlevel="limited">
<enum>
<value>IDLE
<notes>The trigger is idle.</notes>
</value>
<value>START
<notes>The precapture metering sequence will be started
by the camera device.
The exact effect of the precapture trigger depends on
the current AE mode and state.</notes>
</value>
<value>CANCEL
<notes>The camera device will cancel any currently active or completed
precapture metering sequence, the auto-exposure routine will return to its
initial state.</notes>
</value>
</enum>
<description>Whether the camera device will trigger a precapture
metering sequence when it processes this request.</description>
<details>This entry is normally set to IDLE, or is not
included at all in the request settings. When included and
set to START, the camera device will trigger the auto-exposure (AE)
precapture metering sequence.
When set to CANCEL, the camera device will cancel any active
precapture metering trigger, and return to its initial AE state.
If a precapture metering sequence is already completed, and the camera
device has implicitly locked the AE for subsequent still capture, the
CANCEL trigger will unlock the AE and return to its initial AE state.
The precapture sequence should be triggered before starting a
high-quality still capture for final metering decisions to
be made, and for firing pre-capture flash pulses to estimate
scene brightness and required final capture flash power, when
the flash is enabled.
Normally, this entry should be set to START for only a
single request, and the application should wait until the
sequence completes before starting a new one.
When a precapture metering sequence is finished, the camera device
may lock the auto-exposure routine internally to be able to accurately expose the
subsequent still capture image (`android.control.captureIntent == STILL_CAPTURE`).
For this case, the AE may not resume normal scan if no subsequent still capture is
submitted. To ensure that the AE routine restarts normal scan, the application should
submit a request with `android.control.aeLock == true`, followed by a request
with `android.control.aeLock == false`, if the application decides not to submit a
still capture request after the precapture sequence completes. Alternatively, for
API level 23 or newer devices, the CANCEL can be used to unlock the camera device
internally locked AE if the application doesn't submit a still capture request after
the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not
be used in devices that have earlier API levels.
The exact effect of auto-exposure (AE) precapture trigger
depends on the current AE mode and state; see
android.control.aeState for AE precapture state transition
details.
On LEGACY-level devices, the precapture trigger is not supported;
capturing a high-resolution JPEG image will automatically trigger a
precapture sequence before the high-resolution capture, including
potentially firing a pre-capture flash.
Using the precapture trigger and the auto-focus trigger android.control.afTrigger
simultaneously is allowed. However, since these triggers often require cooperation between
the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
focus sweep), the camera device may delay acting on a later trigger until the previous
trigger has been fully handled. This may lead to longer intervals between the trigger and
changes to android.control.aeState indicating the start of the precapture sequence, for
example.
If both the precapture and the auto-focus trigger are activated on the same request, then
the camera device will complete them in the optimal order for that device.
</details>
<hal_details>
The HAL must support triggering the AE precapture trigger while an AF trigger is active
(and vice versa), or at the same time as the AF trigger. It is acceptable for the HAL to
treat these as two consecutive triggers, for example handling the AF trigger and then the
AE trigger. Or the HAL may choose to optimize the case with both triggers fired at once,
to minimize the latency for converging both focus and exposure/flash usage.
</hal_details>
<tag id="BC" />
</entry>
<entry name="afMode" type="byte" visibility="public" enum="true"
hwlevel="legacy">
<enum>
<value>OFF
<notes>The auto-focus routine does not control the lens;
android.lens.focusDistance is controlled by the
application.</notes></value>
<value>AUTO
<notes>Basic automatic focus mode.
In this mode, the lens does not move unless
the autofocus trigger action is called. When that trigger
is activated, AF will transition to ACTIVE_SCAN, then to
the outcome of the scan (FOCUSED or NOT_FOCUSED).
Always supported if lens is not fixed focus.
Use android.lens.info.minimumFocusDistance to determine if lens
is fixed-focus.
Triggering AF_CANCEL resets the lens position to default,
and sets the AF state to INACTIVE.</notes></value>
<value>MACRO
<notes>Close-up focusing mode.
In this mode, the lens does not move unless the
autofocus trigger action is called. When that trigger is
activated, AF will transition to ACTIVE_SCAN, then to
the outcome of the scan (FOCUSED or NOT_FOCUSED). This
mode is optimized for focusing on objects very close to
the camera.
When that trigger is activated, AF will transition to
ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
NOT_FOCUSED). Triggering cancel AF resets the lens
position to default, and sets the AF state to
INACTIVE.</notes></value>
<value>CONTINUOUS_VIDEO
<notes>In this mode, the AF algorithm modifies the lens
position continually to attempt to provide a
constantly-in-focus image stream.
The focusing behavior should be suitable for good quality
video recording; typically this means slower focus
movement and no overshoots. When the AF trigger is not
involved, the AF algorithm should start in INACTIVE state,
and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
states as appropriate. When the AF trigger is activated,
the algorithm should immediately transition into
AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
lens position until a cancel AF trigger is received.
Once cancel is received, the algorithm should transition
back to INACTIVE and resume passive scan. Note that this
behavior is not identical to CONTINUOUS_PICTURE, since an
ongoing PASSIVE_SCAN must immediately be
canceled.</notes></value>
<value>CONTINUOUS_PICTURE
<notes>In this mode, the AF algorithm modifies the lens
position continually to attempt to provide a
constantly-in-focus image stream.
The focusing behavior should be suitable for still image
capture; typically this means focusing as fast as
possible. When the AF trigger is not involved, the AF
algorithm should start in INACTIVE state, and then
transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
appropriate as it attempts to maintain focus. When the AF
trigger is activated, the algorithm should finish its
PASSIVE_SCAN if active, and then transition into
AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
lens position until a cancel AF trigger is received.
When the AF cancel trigger is activated, the algorithm
should transition back to INACTIVE and then act as if it
has just been started.</notes></value>
<value>EDOF
<notes>Extended depth of field (digital focus) mode.
The camera device will produce images with an extended
depth of field automatically; no special focusing
operations need to be done before taking a picture.
AF triggers are ignored, and the AF state will always be
INACTIVE.</notes></value>
</enum>
<description>Whether auto-focus (AF) is currently enabled, and what
mode it is set to.</description>
<range>android.control.afAvailableModes</range>
<details>Only effective if android.control.mode = AUTO and the lens is not fixed focus
(i.e. `android.lens.info.minimumFocusDistance &gt; 0`). Also note that
when android.control.aeMode is OFF, the behavior of AF is device
dependent. It is recommended to lock AF by using android.control.afTrigger before
setting android.control.aeMode to OFF, or set AF mode to OFF when AE is OFF.
If the lens is controlled by the camera device auto-focus algorithm,
the camera device will report the current AF status in android.control.afState
in result metadata.</details>
<hal_details>
When afMode is AUTO or MACRO, the lens must not move until an AF trigger is sent in a
request (android.control.afTrigger `==` START). After an AF trigger, the afState will end
up with either FOCUSED_LOCKED or NOT_FOCUSED_LOCKED state (see
android.control.afState for detailed state transitions), which indicates that the lens is
locked and will not move. If camera movement (e.g. tilting camera) causes the lens to move
after the lens is locked, the HAL must compensate this movement appropriately such that
the same focal plane remains in focus.
When afMode is one of the continuous auto focus modes, the HAL is free to start a AF
scan whenever it's not locked. When the lens is locked after an AF trigger
(see android.control.afState for detailed state transitions), the HAL should maintain the
same lock behavior as above.
When afMode is OFF, the application controls focus manually. The accuracy of the
focus distance control depends on the android.lens.info.focusDistanceCalibration.
However, the lens must not move regardless of the camera movement for any focus distance
manual control.
To put this in concrete terms, if the camera has lens elements which may move based on
camera orientation or motion (e.g. due to gravity), then the HAL must drive the lens to
remain in a fixed position invariant to the camera's orientation or motion, for example,
by using accelerometer measurements in the lens control logic. This is a typical issue
that will arise on camera modules with open-loop VCMs.
</hal_details>
<tag id="BC" />
</entry>
<entry name="afRegions" type="int32" visibility="public"
optional="true" container="array" typedef="meteringRectangle">
<array>
<size>5</size>
<size>area_count</size>
</array>
<description>List of metering areas to use for auto-focus.</description>
<units>Pixel coordinates within android.sensor.info.activeArraySize or
android.sensor.info.preCorrectionActiveArraySize depending on
distortion correction capability and mode</units>
<range>Coordinates must be between `[(0,0), (width, height))` of
android.sensor.info.activeArraySize or android.sensor.info.preCorrectionActiveArraySize
depending on distortion correction capability and mode</range>
<details>
Not available if android.control.maxRegionsAf is 0.
Otherwise will always be present.
The maximum number of focus areas supported by the device is determined by the value
of android.control.maxRegionsAf.
For devices not supporting android.distortionCorrection.mode control, the coordinate
system always follows that of android.sensor.info.activeArraySize, with (0,0) being
the top-left pixel in the active pixel array, and
(android.sensor.info.activeArraySize.width - 1,
android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
active pixel array.
For devices supporting android.distortionCorrection.mode control, the coordinate
system depends on the mode being set.
When the distortion correction mode is OFF, the coordinate system follows
android.sensor.info.preCorrectionActiveArraySize, with
`(0, 0)` being the top-left pixel of the pre-correction active array, and
(android.sensor.info.preCorrectionActiveArraySize.width - 1,
android.sensor.info.preCorrectionActiveArraySize.height - 1) being the bottom-right
pixel in the pre-correction active pixel array.
When the distortion correction mode is not OFF, the coordinate system follows
android.sensor.info.activeArraySize, with
`(0, 0)` being the top-left pixel of the active array, and
(android.sensor.info.activeArraySize.width - 1,
android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
active pixel array.
The weight must be within `[0, 1000]`, and represents a weight
for every pixel in the area. This means that a large metering area
with the same weight as a smaller area will have more effect in
the metering result. Metering areas can partially overlap and the
camera device will add the weights in the overlap region.
The weights are relative to weights of other metering regions, so if only one region
is used, all non-zero weights will have the same effect. A region with 0 weight is
ignored.
If all regions have 0 weight, then no specific metering area needs to be used by the
camera device. The capture result will either be a zero weight region as well, or
the region selected by the camera device as the focus area of interest.
If the metering region is outside the used android.scaler.cropRegion returned in
capture result metadata, the camera device will ignore the sections outside the crop
region and output only the intersection rectangle as the metering region in the result
metadata. If the region is entirely outside the crop region, it will be ignored and
not reported in the result metadata.
</details>
<ndk_details>
The data representation is `int[5 * area_count]`.
Every five elements represent a metering region of `(xmin, ymin, xmax, ymax, weight)`.
The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
ymax.
</ndk_details>
<hal_details>
The HAL level representation of MeteringRectangle[] is a
int[5 * area_count].
Every five elements represent a metering region of
(xmin, ymin, xmax, ymax, weight).
The rectangle is defined to be inclusive on xmin and ymin, but
exclusive on xmax and ymax.
HAL must always report metering regions in the coordinate system of pre-correction
active array.
</hal_details>
<tag id="BC" />
</entry>
<entry name="afTrigger" type="byte" visibility="public" enum="true"
hwlevel="legacy">
<enum>
<value>IDLE
<notes>The trigger is idle.</notes>
</value>
<value>START
<notes>Autofocus will trigger now.</notes>
</value>
<value>CANCEL
<notes>Autofocus will return to its initial
state, and cancel any currently active trigger.</notes>
</value>
</enum>
<description>
Whether the camera device will trigger autofocus for this request.
</description>
<details>This entry is normally set to IDLE, or is not
included at all in the request settings.
When included and set to START, the camera device will trigger the
autofocus algorithm. If autofocus is disabled, this trigger has no effect.
When set to CANCEL, the camera device will cancel any active trigger,
and return to its initial AF state.
Generally, applications should set this entry to START or CANCEL for only a
single capture, and then return it to IDLE (or not set at all). Specifying
START for multiple captures in a row means restarting the AF operation over
and over again.
See android.control.afState for what the trigger means for each AF mode.
Using the autofocus trigger and the precapture trigger android.control.aePrecaptureTrigger
simultaneously is allowed. However, since these triggers often require cooperation between
the auto-focus and auto-exposure routines (for example, the may need to be enabled for a
focus sweep), the camera device may delay acting on a later trigger until the previous
trigger has been fully handled. This may lead to longer intervals between the trigger and
changes to android.control.afState, for example.
</details>
<hal_details>
The HAL must support triggering the AF trigger while an AE precapture trigger is active
(and vice versa), or at the same time as the AE trigger. It is acceptable for the HAL to
treat these as two consecutive triggers, for example handling the AF trigger and then the
AE trigger. Or the HAL may choose to optimize the case with both triggers fired at once,
to minimize the latency for converging both focus and exposure/flash usage.
</hal_details>
<tag id="BC" />
</entry>
<entry name="awbLock" type="byte" visibility="public" enum="true"
typedef="boolean" hwlevel="legacy">
<enum>
<value>OFF
<notes>Auto-white balance lock is disabled; the AWB
algorithm is free to update its parameters if in AUTO
mode.</notes></value>
<value>ON
<notes>Auto-white balance lock is enabled; the AWB
algorithm will not update its parameters while the lock
is active.</notes></value>
</enum>
<description>Whether auto-white balance (AWB) is currently locked to its
latest calculated values.</description>
<details>
When set to `true` (ON), the AWB algorithm is locked to its latest parameters,
and will not change color balance settings until the lock is set to `false` (OFF).
Since the camera device has a pipeline of in-flight requests, the settings that
get locked do not necessarily correspond to the settings that were present in the
latest capture result received from the camera device, since additional captures
and AWB updates may have occurred even before the result was sent out. If an
application is switching between automatic and manual control and wishes to eliminate
any flicker during the switch, the following procedure is recommended:
1. Starting in auto-AWB mode:
2. Lock AWB
3. Wait for the first result to be output that has the AWB locked
4. Copy AWB settings from that result into a request, set the request to manual AWB
5. Submit the capture request, proceed to run manual AWB as desired.
Note that AWB lock is only meaningful when
android.control.awbMode is in the AUTO mode; in other modes,
AWB is already fixed to a specific setting.
Some LEGACY devices may not support ON; the value is then overridden to OFF.
</details>
<tag id="BC" />
</entry>
<entry name="awbMode" type="byte" visibility="public" enum="true"
hwlevel="legacy">
<enum>
<value>OFF
<notes>
The camera device's auto-white balance routine is disabled.
The application-selected color transform matrix
(android.colorCorrection.transform) and gains
(android.colorCorrection.gains) are used by the camera
device for manual white balance control.
</notes>
</value>
<value>AUTO
<notes>
The camera device's auto-white balance routine is active.
The application's values for android.colorCorrection.transform
and android.colorCorrection.gains are ignored.
For devices that support the MANUAL_POST_PROCESSING capability, the
values used by the camera device for the transform and gains
will be available in the capture result for this request.
</notes>
</value>
<value>INCANDESCENT
<notes>
The camera device's auto-white balance routine is disabled;
the camera device uses incandescent light as the assumed scene
illumination for white balance.
While the exact white balance transforms are up to the
camera device, they will approximately match the CIE
standard illuminant A.
The application's values for android.colorCorrection.transform
and android.colorCorrection.gains are ignored.
For devices that support the MANUAL_POST_PROCESSING capability, the
values used by the camera device for the transform and gains
will be available in the capture result for this request.
</notes>
</value>
<value>FLUORESCENT
<notes>
The camera device's auto-white balance routine is disabled;
the camera device uses fluorescent light as the assumed scene
illumination for white balance.
While the exact white balance transforms are up to the
camera device, they will approximately match the CIE
standard illuminant F2.
The application's values for android.colorCorrection.transform
and android.colorCorrection.gains are ignored.
For devices that support the MANUAL_POST_PROCESSING capability, the
values used by the camera device for the transform and gains
will be available in the capture result for this request.
</notes>
</value>
<value>WARM_FLUORESCENT
<notes>
The camera device's auto-white balance routine is disabled;
the camera device uses warm fluorescent light as the assumed scene
illumination for white balance.
While the exact white balance transforms are up to the
camera device, they will approximately match the CIE
standard illuminant F4.
The application's values for android.colorCorrection.transform
and android.colorCorrection.gains are ignored.
For devices that support the MANUAL_POST_PROCESSING capability, the
values used by the camera device for the transform and gains
will be available in the capture result for this request.
</notes>
</value>
<value>DAYLIGHT
<notes>
The camera device's auto-white balance routine is disabled;
the camera device uses daylight light as the assumed scene
illumination for white balance.
While the exact white balance transforms are up to the
camera device, they will approximately match the CIE
standard illuminant D65.
The application's values for android.colorCorrection.transform
and android.colorCorrection.gains are ignored.
For devices that support the MANUAL_POST_PROCESSING capability, the
values used by the camera device for the transform and gains
will be available in the capture result for this request.
</notes>
</value>
<value>CLOUDY_DAYLIGHT
<notes>
The camera device's auto-white balance routine is disabled;
the camera device uses cloudy daylight light as the assumed scene
illumination for white balance.
The application's values for android.colorCorrection.transform
and android.colorCorrection.gains are ignored.
For devices that support the MANUAL_POST_PROCESSING capability, the
values used by the camera device for the transform and gains
will be available in the capture result for this request.
</notes>
</value>
<value>TWILIGHT
<notes>
The camera device's auto-white balance routine is disabled;
the camera device uses twilight light as the assumed scene
illumination for white balance.
The application's values for android.colorCorrection.transform
and android.colorCorrection.gains are ignored.
For devices that support the MANUAL_POST_PROCESSING capability, the
values used by the camera device for the transform and gains
will be available in the capture result for this request.
</notes>
</value>
<value>SHADE
<notes>
The camera device's auto-white balance routine is disabled;
the camera device uses shade light as the assumed scene
illumination for white balance.
The application's values for android.colorCorrection.transform
and android.colorCorrection.gains are ignored.
For devices that support the MANUAL_POST_PROCESSING capability, the
values used by the camera device for the transform and gains
will be available in the capture result for this request.
</notes>
</value>
</enum>
<description>Whether auto-white balance (AWB) is currently setting the color
transform fields, and what its illumination target
is.</description>
<range>android.control.awbAvailableModes</range>
<details>
This control is only effective if android.control.mode is AUTO.
When set to the ON mode, the camera device's auto-white balance
routine is enabled, overriding the application's selected
android.colorCorrection.transform, android.colorCorrection.gains and
android.colorCorrection.mode. Note that when android.control.aeMode
is OFF, the behavior of AWB is device dependent. It is recommened to
also set AWB mode to OFF or lock AWB by using android.control.awbLock before
setting AE mode to OFF.
When set to the OFF mode, the camera device's auto-white balance
routine is disabled. The application manually controls the white
balance by android.colorCorrection.transform, android.colorCorrection.gains
and android.colorCorrection.mode.
When set to any other modes, the camera device's auto-white
balance routine is disabled. The camera device uses each
particular illumination target for white balance
adjustment. The application's values for
android.colorCorrection.transform,
android.colorCorrection.gains and
android.colorCorrection.mode are ignored.
</details>
<tag id="BC" />
</entry>
<entry name="awbRegions" type="int32" visibility="public"
optional="true" container="array" typedef="meteringRectangle">
<array>
<size>5</size>
<size>area_count</size>
</array>
<description>List of metering areas to use for auto-white-balance illuminant
estimation.</description>
<units>Pixel coordinates within android.sensor.info.activeArraySize or
android.sensor.info.preCorrectionActiveArraySize depending on
distortion correction capability and mode</units>
<range>Coordinates must be between `[(0,0), (width, height))` of
android.sensor.info.activeArraySize or android.sensor.info.preCorrectionActiveArraySize
depending on distortion correction capability and mode</range>
<details>
Not available if android.control.maxRegionsAwb is 0.
Otherwise will always be present.
The maximum number of regions supported by the device is determined by the value
of android.control.maxRegionsAwb.
For devices not supporting android.distortionCorrection.mode control, the coordinate
system always follows that of android.sensor.info.activeArraySize, with (0,0) being
the top-left pixel in the active pixel array, and
(android.sensor.info.activeArraySize.width - 1,
android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
active pixel array.
For devices supporting android.distortionCorrection.mode control, the coordinate
system depends on the mode being set.
When the distortion correction mode is OFF, the coordinate system follows
android.sensor.info.preCorrectionActiveArraySize, with
`(0, 0)` being the top-left pixel of the pre-correction active array, and
(android.sensor.info.preCorrectionActiveArraySize.width - 1,
android.sensor.info.preCorrectionActiveArraySize.height - 1) being the bottom-right
pixel in the pre-correction active pixel array.
When the distortion correction mode is not OFF, the coordinate system follows
android.sensor.info.activeArraySize, with
`(0, 0)` being the top-left pixel of the active array, and
(android.sensor.info.activeArraySize.width - 1,
android.sensor.info.activeArraySize.height - 1) being the bottom-right pixel in the
active pixel array.
The weight must range from 0 to 1000, and represents a weight
for every pixel in the area. This means that a large metering area
with the same weight as a smaller area will have more effect in
the metering result. Metering areas can partially overlap and the
camera device will add the weights in the overlap region.
The weights are relative to weights of other white balance metering regions, so if
only one region is used, all non-zero weights will have the same effect. A region with
0 weight is ignored.
If all regions have 0 weight, then no specific metering area needs to be used by the
camera device.
If the metering region is outside the used android.scaler.cropRegion returned in
capture result metadata, the camera device will ignore the sections outside the crop
region and output only the intersection rectangle as the metering region in the result
metadata. If the region is entirely outside the crop region, it will be ignored and
not reported in the result metadata.
</details>
<ndk_details>
The data representation is `int[5 * area_count]`.
Every five elements represent a metering region of `(xmin, ymin, xmax, ymax, weight)`.
The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and
ymax.
</ndk_details>
<hal_details>
The HAL level representation of MeteringRectangle[] is a
int[5 * area_count].
Every five elements represent a metering region of
(xmin, ymin, xmax, ymax, weight).
The rectangle is defined to be inclusive on xmin and ymin, but
exclusive on xmax and ymax.
HAL must always report metering regions in the coordinate system of pre-correction
active array.
</hal_details>
<tag id="BC" />
</entry>
<entry name="captureIntent" type="byte" visibility="public" enum="true"
hwlevel="legacy">
<enum>
<value>CUSTOM
<notes>The goal of this request doesn't fall into the other
categories. The camera device will default to preview-like
behavior.</notes></value>
<value>PREVIEW
<notes>This request is for a preview-like use case.
The precapture trigger may be used to start off a metering
w/flash sequence.
</notes></value>
<value>STILL_CAPTURE
<notes>This request is for a still capture-type
use case.
If the flash unit is under automatic control, it may fire as needed.
</notes></value>
<value>VIDEO_RECORD
<notes>This request is for a video recording
use case.</notes></value>
<value>VIDEO_SNAPSHOT
<notes>This request is for a video snapshot (still
image while recording video) use case.
The camera device should take the highest-quality image
possible (given the other settings) without disrupting the
frame rate of video recording. </notes></value>
<value>ZERO_SHUTTER_LAG
<notes>This request is for a ZSL usecase; the
application will stream full-resolution images and
reprocess one or several later for a final
capture.
</notes></value>
<value>MANUAL
<notes>This request is for manual capture use case where
the applications want to directly control the capture parameters.
For example, the application may wish to manually control
android.sensor.exposureTime, android.sensor.sensitivity, etc.
</notes></value>
<value hal_version="3.3">MOTION_TRACKING
<notes>This request is for a motion tracking use case, where
the application will use camera and inertial sensor data to
locate and track objects in the world.
The camera device auto-exposure routine will limit the exposure time
of the camera to no more than 20 milliseconds, to minimize motion blur.
</notes></value>
</enum>
<description>Information to the camera device 3A (auto-exposure,
auto-focus, auto-white balance) routines about the purpose
of this capture, to help the camera device to decide optimal 3A
strategy.</description>
<details>This control (except for MANUAL) is only effective if
`android.control.mode != OFF` and any 3A routine is active.
All intents are supported by all devices, except that:
* ZERO_SHUTTER_LAG will be supported if android.request.availableCapabilities contains
PRIVATE_REPROCESSING or YUV_REPROCESSING.
* MANUAL will be supported if android.request.availableCapabilities contains
MANUAL_SENSOR.
* MOTION_TRACKING will be supported if android.request.availableCapabilities contains
MOTION_TRACKING.
</details>
<tag id="BC" />
</entry>
<entry name="effectMode" type="byte" visibility="public" enum="true"
hwlevel="legacy">
<enum>
<value>OFF
<notes>
No color effect will be applied.
</notes>
</value>
<value optional="true">MONO
<notes>
A "monocolor" effect where the image is mapped into
a single color.
This will typically be grayscale.
</notes>
</value>
<value optional="true">NEGATIVE
<notes>
A "photo-negative" effect where the image's colors
are inverted.
</notes>
</value>
<value optional="true">SOLARIZE
<notes>
A "solarisation" effect (Sabattier effect) where the
image is wholly or partially reversed in
tone.
</notes>
</value>
<value optional="true">SEPIA
<notes>
A "sepia" effect where the image is mapped into warm
gray, red, and brown tones.
</notes>
</value>
<value optional="true">POSTERIZE
<notes>
A "posterization" effect where the image uses
discrete regions of tone rather than a continuous
gradient of tones.
</notes>
</value>
<value optional="true">WHITEBOARD
<notes>
A "whiteboard" effect where the image is typically displayed
as regions of white, with black or grey details.
</notes>
</value>
<value optional="true">BLACKBOARD
<notes>
A "blackboard" effect where the image is typically displayed
as regions of black, with white or grey details.
</notes>
</value>
<value optional="true">AQUA
<notes>
An "aqua" effect where a blue hue is added to the image.
</notes>
</value>
</enum>
<description>A special color effect to apply.</description>
<range>android.control.availableEffects</range>
<details>
When this mode is set, a color effect will be applied
to images produced by the camera device. The interpretation
and implementation of these color effects is left to the
implementor of the camera device, and should not be
depended on to be consistent (or present) across all
devices.
</details>
<tag id="BC" />
</entry>
<entry name="mode" type="byte" visibility="public" enum="true"
hwlevel="legacy">
<enum>
<value>OFF
<notes>Full application control of pipeline.
All control by the device's metering and focusing (3A)
routines is disabled, and no other settings in
android.control.* have any effect, except that
android.control.captureIntent may be used by the camera
device to select post-processing values for processing
blocks that do not allow for manual control, or are not
exposed by the camera API.
However, the camera device's 3A routines may continue to
collect statistics and update their internal state so that
when control is switched to AUTO mode, good control values
can be immediately applied.
</notes></value>
<value>AUTO
<notes>Use settings for each individual 3A routine.
Manual control of capture parameters is disabled. All
controls in android.control.* besides sceneMode take
effect.</notes></value>
<value optional="true">USE_SCENE_MODE
<notes>Use a specific scene mode.
Enabling this disables control.aeMode, control.awbMode and
control.afMode controls; the camera device will ignore
those settings while USE_SCENE_MODE is active (except for
FACE_PRIORITY scene mode). Other control entries are still active.
This setting can only be used if scene mode is supported (i.e.
android.control.availableSceneModes
contain some modes other than DISABLED).</notes></value>
<value optional="true">OFF_KEEP_STATE
<notes>Same as OFF mode, except that this capture will not be
used by camera device background auto-exposure, auto-white balance and
auto-focus algorithms (3A) to update their statistics.
Specifically, the 3A routines are locked to the last
values set from a request with AUTO, OFF, or
USE_SCENE_MODE, and any statistics or state updates
collected from manual captures with OFF_KEEP_STATE will be
discarded by the camera device.
</notes></value>
</enum>
<description>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
routines.</description>
<range>android.control.availableModes</range>
<details>
This is a top-level 3A control switch. When set to OFF, all 3A control
by the camera device is disabled. The application must set the fields for
capture parameters itself.
When set to AUTO, the individual algorithm controls in
android.control.* are in effect, such as android.control.afMode.
When set to USE_SCENE_MODE, the individual controls in
android.control.* are mostly disabled, and the camera device
implements one of the scene mode settings (such as ACTION,
SUNSET, or PARTY) as it wishes. The camera device scene mode
3A settings are provided by {@link
android.hardware.camera2.CaptureResult|ACameraCaptureSession_captureCallback_result
capture results}.
When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
is that this frame will not be used by camera device background 3A statistics
update, as if this frame is never captured. This mode can be used in the scenario
where the application doesn't want a 3A manual control capture to affect
the subsequent auto 3A capture results.
</details>
<tag id="BC" />
</entry>
<entry name="sceneMode" type="byte" visibility="public" enum="true"
hwlevel="legacy">
<enum>
<value id="0">DISABLED
<notes>
Indicates that no scene modes are set for a given capture request.
</notes>
</value>
<value>FACE_PRIORITY
<notes>If face detection support exists, use face
detection data for auto-focus, auto-white balance, and
auto-exposure routines.
If face detection statistics are disabled
(i.e. android.statistics.faceDetectMode is set to OFF),
this should still operate correctly (but will not return
face detection statistics to the framework).
Unlike the other scene modes, android.control.aeMode,
android.control.awbMode, and android.control.afMode
remain active when FACE_PRIORITY is set.
</notes>
</value>
<value optional="true">ACTION
<notes>
Optimized for photos of quickly moving objects.
Similar to SPORTS.
</notes>
</value>
<value optional="true">PORTRAIT
<notes>
Optimized for still photos of people.
</notes>
</value>
<value optional="true">LANDSCAPE
<notes>
Optimized for photos of distant macroscopic objects.
</notes>
</value>
<value optional="true">NIGHT
<notes>
Optimized for low-light settings.
</notes>
</value>
<value optional="true">NIGHT_PORTRAIT
<notes>
Optimized for still photos of people in low-light
settings.
</notes>
</value>
<value optional="true">THEATRE
<notes>
Optimized for dim, indoor settings where flash must
remain off.
</notes>
</value>
<value optional="true">BEACH
<notes>
Optimized for bright, outdoor beach settings.
</notes>
</value>
<value optional="true">SNOW
<notes>
Optimized for bright, outdoor settings containing snow.
</notes>
</value>
<value optional="true">SUNSET
<notes>
Optimized for scenes of the setting sun.
</notes>
</value>
<value optional="true">STEADYPHOTO
<notes>
Optimized to avoid blurry photos due to small amounts of
device motion (for example: due to hand shake).
</notes>
</value>
<value optional="true">FIREWORKS
<notes>
Optimized for nighttime photos of fireworks.
</notes>
</value>
<value optional="true">SPORTS
<notes>
Optimized for photos of quickly moving people.
Similar to ACTION.
</notes>
</value>
<value optional="true">PARTY
<notes>
Optimized for dim, indoor settings with multiple moving
people.
</notes>
</value>
<value optional="true">CANDLELIGHT
<notes>
Optimized for dim settings where the main light source
is a candle.
</notes>
</value>
<value optional="true">BARCODE
<notes>
Optimized for accurately capturing a photo of barcode
for use by camera applications that wish to read the
barcode value.
</notes>
</value>
<value deprecated="true" optional="true" ndk_hidden="true">HIGH_SPEED_VIDEO
<notes>
This is deprecated, please use {@link
android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}
and {@link
android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList}
for high speed video recording.
Optimized for high speed video recording (frame rate >=60fps) use case.
The supported high speed video sizes and fps ranges are specified in
android.control.availableHighSpeedVideoConfigurations. To get desired
output frame rates, the application is only allowed to select video size
and fps range combinations listed in this static metadata. The fps range
can be control via android.control.aeTargetFpsRange.
In this mode, the camera device will override aeMode, awbMode, and afMode to
ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
controls will be overridden to be FAST. Therefore, no manual control of capture
and post-processing parameters is possible. All other controls operate the
same as when android.control.mode == AUTO. This means that all other
android.control.* fields continue to work, such as
* android.control.aeTargetFpsRange
* android.control.aeExposureCompensation
* android.control.aeLock
* android.control.awbLock
* android.control.effectMode
* android.control.aeRegions
* android.control.afRegions
* android.control.awbRegions
* android.control.afTrigger
* android.control.aePrecaptureTrigger
Outside of android.control.*, the following controls will work:
* android.flash.mode (automatic flash for still capture will not work since aeMode is ON)
* android.lens.opticalStabilizationMode (if it is supported)
* android.scaler.cropRegion
* android.statistics.faceDetectMode
For high speed recording use case, the actual maximum supported frame rate may
be lower than what camera can output, depending on the destination Surfaces for
the image data. For example, if the destination surface is from video encoder,
the application need check if the video encoder is capable of supporting the
high frame rate for a given video size, or it will end up with lower recording
frame rate. If the destination surface is from preview window, the preview frame
rate will be bounded by the screen refresh rate.
The camera device will only support up to 2 output high speed streams
(processed non-stalling format defined in android.request.maxNumOutputStreams)
in this mode. This control will be effective only if all of below conditions are true:
* The application created no more than maxNumHighSpeedStreams processed non-stalling
format output streams, where maxNumHighSpeedStreams is calculated as
min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).
* The stream sizes are selected from the sizes reported by
android.control.availableHighSpeedVideoConfigurations.
* No processed non-stalling or raw streams are configured.
When above conditions are NOT satistied, the controls of this mode and
android.control.aeTargetFpsRange will be ignored by the camera device,
the camera device will fall back to android.control.mode `==` AUTO,
and the returned capture result metadata will give the fps range choosen
by the camera device.
Switching into or out of this mode may trigger some camera ISP/sensor
reconfigurations, which may introduce extra latency. It is recommended that
the application avoids unnecessary scene mode switch as much as possible.
</notes>
</value>
<value optional="true">HDR
<notes>
Turn on a device-specific high dynamic range (HDR) mode.
In this scene mode, the camera device captures images
that keep a larger range of scene illumination levels
visible in the final image. For example, when taking a
picture of a object in front of a bright window, both
the object and the scene through the window may be
visible when using HDR mode, while in normal AUTO mode,
one or the other may be poorly exposed. As a tradeoff,
HDR mode generally takes much longer to capture a single
image, has no user control, and may have other artifacts
depending on the HDR method used.
Therefore, HDR captures operate at a much slower rate
than regular captures.
In this mode, on LIMITED or FULL devices, when a request
is made with a android.control.captureIntent of
STILL_CAPTURE, the camera device will capture an image
using a high dynamic range capture technique. On LEGACY
devices, captures that target a JPEG-format output will
be captured with HDR, and the capture intent is not
relevant.
The HDR capture may involve the device capturing a burst
of images internally and combining them into one, or it
may involve the device using specialized high dynamic
range capture hardware. In all cases, a single image is
produced in response to a capture request submitted
while in HDR mode.
Since substantial post-processing is generally needed to
produce an HDR image, only YUV, PRIVATE, and JPEG
outputs are supported for LIMITED/FULL device HDR
captures, and only JPEG outputs are supported for LEGACY
HDR captures. Using a RAW output for HDR capture is not
supported.
Some devices may also support always-on HDR, which
applies HDR processing at full frame rate. For these
devices, intents other than STILL_CAPTURE will also
produce an HDR output with no frame rate impact compared
to normal operation, though the quality may be lower
than for STILL_CAPTURE intents.
If SCENE_MODE_HDR is used with unsupported output types
or capture intents, the images captured will be as if
the SCENE_MODE was not enabled at all.
</notes>
</value>
<value optional="true" hidden="true">FACE_PRIORITY_LOW_LIGHT
<notes>Same as FACE_PRIORITY scene mode, except that the camera
device will choose higher sensitivity values (android.sensor.sensitivity)
under low light conditions.
The camera device may be tuned to expose the images in a reduced
sensitivity range to produce the best quality images. For example,
if the android.sensor.info.sensitivityRange gives range of [100, 1600],
the camera device auto-exposure routine tuning process may limit the actual
exposure sensitivity range to [100, 1200] to ensure that the noise level isn't
exessive in order to preserve the image quality. Under this situation, the image under
low light may be under-exposed when the sensor max exposure time (bounded by the
android.control.aeTargetFpsRange when android.control.aeMode is one of the
ON_* modes) and effective max sensitivity are reached. This scene mode allows the
camera device auto-exposure routine to increase the sensitivity up to the max
sensitivity specified by android.sensor.info.sensitivityRange when the scene is too
dark and the max exposure time is reached. The captured images may be noisier
compared with the images captured in normal FACE_PRIORITY mode; therefore, it is
recommended that the application only use this scene mode when it is capable of
reducing the noise level of the captured images.
Unlike the other scene modes, android.control.aeMode,
android.control.awbMode, and android.control.afMode
remain active when FACE_PRIORITY_LOW_LIGHT is set.
</notes>
</value>
<value optional="true" hidden="true" id="100">DEVICE_CUSTOM_START
<notes>
Scene mode values within the range of
`[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]` are reserved for device specific
customized scene modes.
</notes>
</value>
<value optional="true" hidden="true" id="127">DEVICE_CUSTOM_END
<notes>
Scene mode values within the range of
`[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]` are reserved for device specific
customized scene modes.
</notes>
</value>
</enum>
<description>
Control for which scene mode is currently active.
</description>
<range>android.control.availableSceneModes</range>
<details>
Scene modes are custom camera modes optimized for a certain set of conditions and
capture settings.
This is the mode that that is active when
`android.control.mode == USE_SCENE_MODE`. Aside from FACE_PRIORITY, these modes will
disable android.control.aeMode, android.control.awbMode, and android.control.afMode
while in use.
The interpretation and implementation of these scene modes is left
to the implementor of the camera device. Their behavior will not be
consistent across all devices, and any given device may only implement
a subset of these modes.
</details>
<hal_details>
HAL implementations that include scene modes are expected to provide
the per-scene settings to use for android.control.aeMode,
android.control.awbMode, and android.control.afMode in
android.control.sceneModeOverrides.
For HIGH_SPEED_VIDEO mode, if it is included in android.control.availableSceneModes, the
HAL must list supported video size and fps range in
android.control.availableHighSpeedVideoConfigurations. For a given size, e.g. 1280x720,
if the HAL has two different sensor configurations for normal streaming mode and high
speed streaming, when this scene mode is set/reset in a sequence of capture requests, the
HAL may have to switch between different sensor modes. This mode is deprecated in legacy
HAL3.3, to support high speed video recording, please implement
android.control.availableHighSpeedVideoConfigurations and CONSTRAINED_HIGH_SPEED_VIDEO
capbility defined in android.request.availableCapabilities.
</hal_details>
<tag id="BC" />
</entry>
<entry name="videoStabilizationMode" type="byte" visibility="public"
enum="true" hwlevel="legacy">
<enum>
<value>OFF
<notes>
Video stabilization is disabled.
</notes></value>
<value>ON
<notes>
Video stabilization is enabled.
</notes></value>
</enum>
<description>Whether video stabilization is
active.</description>
<details>
Video stabilization automatically warps images from
the camera in order to stabilize motion between consecutive frames.
If enabled, video stabilization can modify the
android.scaler.cropRegion to keep the video stream stabilized.
Switching between different video stabilization modes may take several
frames to initialize, the camera device will report the current mode
in capture result metadata. For example, When "ON" mode is requested,
the video stabilization modes in the first several capture results may
still be "OFF", and it will become "ON" when the initialization is
done.
In addition, not all recording sizes or frame rates may be supported for
stabilization by a device that reports stabilization support. It is guaranteed
that an output targeting a MediaRecorder or MediaCodec will be stabilized if
the recording resolution is less than or equal to 1920 x 1080 (width less than
or equal to 1920, height less than or equal to 1080), and the recording
frame rate is less than or equal to 30fps. At other sizes, the CaptureResult
android.control.videoStabilizationMode field will return
OFF if the recording output is not stabilized, or if there are no output
Surface types that can be stabilized.
If a camera device supports both this mode and OIS
(android.lens.opticalStabilizationMode), turning both modes on may
produce undesirable interaction, so it is recommended not to enable
both at the same time.
</details>
<tag id="BC" />
</entry>
</controls>
<static>
<entry name="aeAvailableAntibandingModes" type="byte" visibility="public"
type_notes="list of enums" container="array" typedef="enumList"
hwlevel="legacy">
<array>
<size>n</size>
</array>
<description>
List of auto-exposure antibanding modes for android.control.aeAntibandingMode that are
supported by this camera device.
</description>
<range>Any value listed in android.control.aeAntibandingMode</range>
<details>
Not all of the auto-exposure anti-banding modes may be
supported by a given camera device. This field lists the
valid anti-banding modes that the application may request
for this camera device with the
android.control.aeAntibandingMode control.
</details>
<tag id="BC" />
</entry>
<entry name="aeAvailableModes" type="byte" visibility="public"
type_notes="list of enums" container="array" typedef="enumList"
hwlevel="legacy">
<array>
<size>n</size>
</array>
<description>
List of auto-exposure modes for android.control.aeMode that are supported by this camera
device.
</description>
<range>Any value listed in android.control.aeMode</range>
<details>
Not all the auto-exposure modes may be supported by a
given camera device, especially if no flash unit is
available. This entry lists the valid modes for
android.control.aeMode for this camera device.
All camera devices support ON, and all camera devices with flash
units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.
FULL mode camera devices always support OFF mode,
which enables application control of camera exposure time,
sensitivity, and frame duration.
LEGACY mode camera devices never support OFF mode.
LIMITED mode devices support OFF if they support the MANUAL_SENSOR
capability.
</details>
<tag id="BC" />
</entry>
<entry name="aeAvailableTargetFpsRanges" type="int32" visibility="public"
type_notes="list of pairs of frame rates"
container="array" typedef="rangeInt"
hwlevel="legacy">
<array>
<size>2</size>
<size>n</size>
</array>
<description>List of frame rate ranges for android.control.aeTargetFpsRange supported by
this camera device.</description>
<units>Frames per second (FPS)</units>
<details>
For devices at the LEGACY level or above:
* For constant-framerate recording, for each normal
{@link android.media.CamcorderProfile CamcorderProfile}, that is, a
{@link android.media.CamcorderProfile CamcorderProfile} that has
{@link android.media.CamcorderProfile#quality quality} in
the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW},
{@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is
supported by the device and has
{@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} `x`, this list will
always include (`x`,`x`).
* Also, a camera device must either not support any
{@link android.media.CamcorderProfile CamcorderProfile},
or support at least one
normal {@link android.media.CamcorderProfile CamcorderProfile} that has
{@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} `x` &gt;= 24.
For devices at the LIMITED level or above:
* For YUV_420_888 burst capture use case, this list will always include (`min`, `max`)
and (`max`, `max`) where `min` &lt;= 15 and `max` = the maximum output frame rate of the
maximum YUV_420_888 output size.
</details>
<tag id="BC" />
</entry>
<entry name="aeCompensationRange" type="int32" visibility="public"
container="array" typedef="rangeInt"
hwlevel="legacy">
<array>
<size>2</size>
</array>
<description>Maximum and minimum exposure compensation values for
android.control.aeExposureCompensation, in counts of android.control.aeCompensationStep,
that are supported by this camera device.</description>
<range>
Range [0,0] indicates that exposure compensation is not supported.
For LIMITED and FULL devices, range must follow below requirements if exposure
compensation is supported (`range != [0, 0]`):
`Min.exposure compensation * android.control.aeCompensationStep &lt;= -2 EV`
`Max.exposure compensation * android.control.aeCompensationStep &gt;= 2 EV`
LEGACY devices may support a smaller range than this.
</range>
<tag id="BC" />
</entry>
<entry name="aeCompensationStep" type="rational" visibility="public"
hwlevel="legacy">
<description>Smallest step by which the exposure compensation
can be changed.</description>
<units>Exposure Value (EV)</units>
<details>
This is the unit for android.control.aeExposureCompensation. For example, if this key has
a value of `1/2`, then a setting of `-2` for android.control.aeExposureCompensation means
that the target EV offset for the auto-exposure routine is -1 EV.
One unit of EV compensation changes the brightness of the captured image by a factor
of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.
</details>
<hal_details>
This must be less than or equal to 1/2.
</hal_details>
<tag id="BC" />
</entry>
<entry name="afAvailableModes" type="byte" visibility="public"
type_notes="List of enums" container="array" typedef="enumList"
hwlevel="legacy">
<array>
<size>n</size>
</array>
<description>
List of auto-focus (AF) modes for android.control.afMode that are
supported by this camera device.
</description>
<range>Any value listed in android.control.afMode</range>
<details>
Not all the auto-focus modes may be supported by a
given camera device. This entry lists the valid modes for
android.control.afMode for this camera device.
All LIMITED and FULL mode camera devices will support OFF mode, and all
camera devices with adjustable focuser units
(`android.lens.info.minimumFocusDistance &gt; 0`) will support AUTO mode.
LEGACY devices will support OFF mode only if they support
focusing to infinity (by also setting android.lens.focusDistance to
`0.0f`).
</details>
<tag id="BC" />
</entry>
<entry name="availableEffects" type="byte" visibility="public"
type_notes="List of enums (android.control.effectMode)." container="array"
typedef="enumList" hwlevel="legacy">
<array>
<size>n</size>
</array>
<description>
List of color effects for android.control.effectMode that are supported by this camera
device.
</description>
<range>Any value listed in android.control.effectMode</range>
<details>
This list contains the color effect modes that can be applied to
images produced by the camera device.
Implementations are not expected to be consistent across all devices.
If no color effect modes are available for a device, this will only list
OFF.
A color effect will only be applied if
android.control.mode != OFF. OFF is always included in this list.
This control has no effect on the operation of other control routines such
as auto-exposure, white balance, or focus.
</details>
<tag id="BC" />
</entry>
<entry name="availableSceneModes" type="byte" visibility="public"
type_notes="List of enums (android.control.sceneMode)."
container="array" typedef="enumList" hwlevel="legacy">
<array>
<size>n</size>
</array>
<description>
List of scene modes for android.control.sceneMode that are supported by this camera
device.
</description>
<range>Any value listed in android.control.sceneMode</range>
<details>
This list contains scene modes that can be set for the camera device.
Only scene modes that have been fully implemented for the
camera device may be included here. Implementations are not expected
to be consistent across all devices.
If no scene modes are supported by the camera device, this
will be set to DISABLED. Otherwise DISABLED will not be listed.
FACE_PRIORITY is always listed if face detection is
supported (i.e.`android.statistics.info.maxFaceCount &gt;
0`).
</details>
<tag id="BC" />
</entry>
<entry name="availableVideoStabilizationModes" type="byte"
visibility="public" type_notes="List of enums." container="array"
typedef="enumList" hwlevel="legacy">
<array>
<size>n</size>
</array>
<description>
List of video stabilization modes for android.control.videoStabilizationMode
that are supported by this camera device.
</description>
<range>Any value listed in android.control.videoStabilizationMode</range>
<details>
OFF will always be listed.
</details>
<tag id="BC" />
</entry>
<entry name="awbAvailableModes" type="byte" visibility="public"
type_notes="List of enums"
container="array" typedef="enumList" hwlevel="legacy">
<array>
<size>n</size>
</array>
<description>
List of auto-white-balance modes for android.control.awbMode that are supported by this
camera device.
</description>
<range>Any value listed in android.control.awbMode</range>
<details>
Not all the auto-white-balance modes may be supported by a
given camera device. This entry lists the valid modes for
android.control.awbMode for this camera device.
All camera devices will support ON mode.
Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
mode, which enables application control of white balance, by using
android.colorCorrection.transform and android.colorCorrection.gains
(android.colorCorrection.mode must be set to TRANSFORM_MATRIX). This includes all FULL
mode camera devices.
</details>
<tag id="BC" />
</entry>
<entry name="maxRegions" type="int32" visibility="ndk_public"
container="array" hwlevel="legacy">
<array>
<size>3</size>
</array>
<description>
List of the maximum number of regions that can be used for metering in
auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
this corresponds to the the maximum number of elements in
android.control.aeRegions, android.control.awbRegions,
and android.control.afRegions.
</description>
<range>
Value must be &amp;gt;= 0 for each element. For full-capability devices
this value must be &amp;gt;= 1 for AE and AF. The order of the elements is:
`(AE, AWB, AF)`.</range>
<tag id="BC" />
</entry>
<entry name="maxRegionsAe" type="int32" visibility="java_public"
synthetic="true" hwlevel="legacy">
<description>
The maximum number of metering regions that can be used by the auto-exposure (AE)
routine.
</description>
<range>Value will be &amp;gt;= 0. For FULL-capability devices, this
value will be &amp;gt;= 1.
</range>
<details>
This corresponds to the the maximum allowed number of elements in
android.control.aeRegions.
</details>
<hal_details>This entry is private to the framework. Fill in
maxRegions to have this entry be automatically populated.
</hal_details>
</entry>
<entry name="maxRegionsAwb" type="int32" visibility="java_public"
synthetic="true" hwlevel="legacy">
<description>
The maximum number of metering regions that can be used by the auto-white balance (AWB)
routine.
</description>
<range>Value will be &amp;gt;= 0.
</range>
<details>
This corresponds to the the maximum allowed number of elements in
android.control.awbRegions.
</details>
<hal_details>This entry is private to the framework. Fill in
maxRegions to have this entry be automatically populated.
</hal_details>
</entry>
<entry name="maxRegionsAf" type="int32" visibility="java_public"
synthetic="true" hwlevel="legacy">
<description>
The maximum number of metering regions that can be used by the auto-focus (AF) routine.
</description>
<range>Value will be &amp;gt;= 0. For FULL-capability devices, this
value will be &amp;gt;= 1.
</range>
<details>
This corresponds to the the maximum allowed number of elements in
android.control.afRegions.
</details>
<hal_details>This entry is private to the framework. Fill in
maxRegions to have this entry be automatically populated.
</hal_details>
</entry>
<entry name="sceneModeOverrides" type="byte" visibility="system"
container="array" hwlevel="limited">
<array>
<size>3</size>
<size>length(availableSceneModes)</size>
</array>
<description>
Ordered list of auto-exposure, auto-white balance, and auto-focus
settings to use with each available scene mode.
</description>
<range>
For each available scene mode, the list must contain three
entries containing the android.control.aeMode,
android.control.awbMode, and android.control.afMode values used
by the camera device. The entry order is `(aeMode, awbMode, afMode)`
where aeMode has the lowest index position.
</range>
<details>
When a scene mode is enabled, the camera device is expected
to override android.control.aeMode, android.control.awbMode,
and android.control.afMode with its preferred settings for
that scene mode.
The order of this list matches that of availableSceneModes,
with 3 entries for each mode. The overrides listed
for FACE_PRIORITY and FACE_PRIORITY_LOW_LIGHT (if supported) are ignored,
since for that mode the application-set android.control.aeMode,
android.control.awbMode, and android.control.afMode values are
used instead, matching the behavior when android.control.mode
is set to AUTO. It is recommended that the FACE_PRIORITY and
FACE_PRIORITY_LOW_LIGHT (if supported) overrides should be set to 0.
For example, if availableSceneModes contains
`(FACE_PRIORITY, ACTION, NIGHT)`, then the camera framework
expects sceneModeOverrides to have 9 entries formatted like:
`(0, 0, 0, ON_AUTO_FLASH, AUTO, CONTINUOUS_PICTURE,
ON_AUTO_FLASH, INCANDESCENT, AUTO)`.
</details>
<hal_details>
To maintain backward compatibility, this list will be made available
in the static metadata of the camera service. The camera service will
use these values to set android.control.aeMode,
android.control.awbMode, and android.control.afMode when using a scene
mode other than FACE_PRIORITY and FACE_PRIORITY_LOW_LIGHT (if supported).
</hal_details>
<tag id="BC" />
</entry>
</static>
<dynamic>
<entry name="aePrecaptureId" type="int32" visibility="system" deprecated="true">
<description>The ID sent with the latest
CAMERA2_TRIGGER_PRECAPTURE_METERING call</description>
<deprecation_description>
Removed in camera HAL v3
</deprecation_description>
<details>Must be 0 if no
CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet
by HAL. Always updated even if AE algorithm ignores the
trigger</details>
</entry>
<clone entry="android.control.aeAntibandingMode" kind="controls">
</clone>
<clone entry="android.control.aeExposureCompensation" kind="controls">
</clone>
<clone entry="android.control.aeLock" kind="controls">
</clone>
<clone entry="android.control.aeMode" kind="controls">
</clone>
<clone entry="android.control.aeRegions" kind="controls">
</clone>
<clone entry="android.control.aeTargetFpsRange" kind="controls">
</clone>
<clone entry="android.control.aePrecaptureTrigger" kind="controls">
</clone>
<entry name="aeState" type="byte" visibility="public" enum="true"
hwlevel="limited">
<enum>
<value>INACTIVE
<notes>AE is off or recently reset.
When a camera device is opened, it starts in
this state. This is a transient state, the camera device may skip reporting
this state in capture result.</notes></value>
<value>SEARCHING
<notes>AE doesn't yet have a good set of control values
for the current scene.
This is a transient state, the camera device may skip
reporting this state in capture result.</notes></value>
<value>CONVERGED
<notes>AE has a good set of control values for the
current scene.</notes></value>
<value>LOCKED
<notes>AE has been locked.</notes></value>
<value>FLASH_REQUIRED
<notes>AE has a good set of control values, but flash
needs to be fired for good quality still
capture.</notes></value>
<value>PRECAPTURE
<notes>AE has been asked to do a precapture sequence
and is currently executing it.
Precapture can be triggered through setting
android.control.aePrecaptureTrigger to START. Currently
active and completed (if it causes camera device internal AE lock) precapture
metering sequence can be canceled through setting
android.control.aePrecaptureTrigger to CANCEL.
Once PRECAPTURE completes, AE will transition to CONVERGED
or FLASH_REQUIRED as appropriate. This is a transient
state, the camera device may skip reporting this state in
capture result.</notes></value>
</enum>
<description>Current state of the auto-exposure (AE) algorithm.</description>
<details>Switching between or enabling AE modes (android.control.aeMode) always
resets the AE state to INACTIVE. Similarly, switching between android.control.mode,
or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all
the algorithm states to INACTIVE.
The camera device can do several state transitions between two results, if it is
allowed by the state transition table. For example: INACTIVE may never actually be
seen in a result.
The state in the result is the state for this image (in sync with this image): if
AE state becomes CONVERGED, then the image data associated with this result should
be good to use.
Below are state transition tables for different AE modes.
State | Transition Cause | New State | Notes
:------------:|:----------------:|:---------:|:-----------------------:
INACTIVE | | INACTIVE | Camera device auto exposure algorithm is disabled
When android.control.aeMode is AE_MODE_ON*:
State | Transition Cause | New State | Notes
:-------------:|:--------------------------------------------:|:--------------:|:-----------------:
INACTIVE | Camera device initiates AE scan | SEARCHING | Values changing
INACTIVE | android.control.aeLock is ON | LOCKED | Values locked
SEARCHING | Camera device finishes AE scan | CONVERGED | Good values, not changing
SEARCHING | Camera device finishes AE scan | FLASH_REQUIRED | Converged but too dark w/o flash
SEARCHING | android.control.aeLock is ON | LOCKED | Values locked
CONVERGED | Camera device initiates AE scan | SEARCHING | Values changing
CONVERGED | android.control.aeLock is ON | LOCKED | Values locked
FLASH_REQUIRED | Camera device initiates AE scan | SEARCHING | Values changing
FLASH_REQUIRED | android.control.aeLock is ON | LOCKED | Values locked
LOCKED | android.control.aeLock is OFF | SEARCHING | Values not good after unlock
LOCKED | android.control.aeLock is OFF | CONVERGED | Values good after unlock
LOCKED | android.control.aeLock is OFF | FLASH_REQUIRED | Exposure good, but too dark
PRECAPTURE | Sequence done. android.control.aeLock is OFF | CONVERGED | Ready for high-quality capture
PRECAPTURE | Sequence done. android.control.aeLock is ON | LOCKED | Ready for high-quality capture
LOCKED | aeLock is ON and aePrecaptureTrigger is START | LOCKED | Precapture trigger is ignored when AE is already locked
LOCKED | aeLock is ON and aePrecaptureTrigger is CANCEL| LOCKED | Precapture trigger is ignored when AE is already locked
Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is START | PRECAPTURE | Start AE precapture metering sequence
Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is CANCEL| INACTIVE | Currently active precapture metering sequence is canceled
If the camera device supports AE external flash mode (ON_EXTERNAL_FLASH is included in
android.control.aeAvailableModes), android.control.aeState must be FLASH_REQUIRED after
the camera device finishes AE scan and it's too dark without flash.
For the above table, the camera device may skip reporting any state changes that happen
without application intervention (i.e. mode switch, trigger, locking). Any state that
can be skipped in that manner is called a transient state.
For example, for above AE modes (AE_MODE_ON*), in addition to the state transitions
listed in above table, it is also legal for the camera device to skip one or more
transient states between two results. See below table for examples:
State | Transition Cause | New State | Notes
:-------------:|:-----------------------------------------------------------:|:--------------:|:-----------------:
INACTIVE | Camera device finished AE scan | CONVERGED | Values are already good, transient states are skipped by camera device.
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.
Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is START, sequence done | CONVERGED | Converged after a precapture sequence, transient states are skipped by camera device.
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.
Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is CANCEL, converged | CONVERGED | Converged after a precapture sequenceis canceled, transient states are skipped by camera device.
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.
FLASH_REQUIRED | Camera device finished AE scan | CONVERGED | Converged after a new scan, transient states are skipped by camera device.
</details>
</entry>
<clone entry="android.control.afMode" kind="controls">
</clone>
<clone entry="android.control.afRegions" kind="controls">
</clone>
<clone entry="android.control.afTrigger" kind="controls">
</clone>
<entry name="afState" type="byte" visibility="public" enum="true"
hwlevel="legacy">
<enum>
<value>INACTIVE
<notes>AF is off or has not yet tried to scan/been asked
to scan.
When a camera device is opened, it starts in this
state. This is a transient state, the camera device may
skip reporting this state in capture
result.</notes></value>
<value>PASSIVE_SCAN
<notes>AF is currently performing an AF scan initiated the
camera device in a continuous autofocus mode.
Only used by CONTINUOUS_* AF modes. This is a transient
state, the camera device may skip reporting this state in
capture result.</notes></value>
<value>PASSIVE_FOCUSED
<notes>AF currently believes it is in focus, but may
restart scanning at any time.
Only used by CONTINUOUS_* AF modes. This is a transient
state, the camera device may skip reporting this state in
capture result.</notes></value>
<value>ACTIVE_SCAN
<notes>AF is performing an AF scan because it was
triggered by AF trigger.
Only used by AUTO or MACRO AF modes. This is a transient
state, the camera device may skip reporting this state in
capture result.</notes></value>
<value>FOCUSED_LOCKED
<notes>AF believes it is focused correctly and has locked
focus.
This state is reached only after an explicit START AF trigger has been
sent (android.control.afTrigger), when good focus has been obtained.
The lens will remain stationary until the AF mode (android.control.afMode) is changed or
a new AF trigger is sent to the camera device (android.control.afTrigger).
</notes></value>
<value>NOT_FOCUSED_LOCKED
<notes>AF has failed to focus successfully and has locked
focus.
This state is reached only after an explicit START AF trigger has been
sent (android.control.afTrigger), when good focus cannot be obtained.
The lens will remain stationary until the AF mode (android.control.afMode) is changed or
a new AF trigger is sent to the camera device (android.control.afTrigger).
</notes></value>
<value>PASSIVE_UNFOCUSED
<notes>AF finished a passive scan without finding focus,
and may restart scanning at any time.
Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
device may skip reporting this state in capture result.
LEGACY camera devices do not support this state. When a passive
scan has finished, it will always go to PASSIVE_FOCUSED.
</notes></value>
</enum>
<description>Current state of auto-focus (AF) algorithm.</description>
<details>
Switching between or enabling AF modes (android.control.afMode) always
resets the AF state to INACTIVE. Similarly, switching between android.control.mode,
or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all
the algorithm states to INACTIVE.
The camera device can do several state transitions between two results, if it is
allowed by the state transition table. For example: INACTIVE may never actually be
seen in a result.
The state in the result is the state for this image (in sync with this image): if
AF state becomes FOCUSED, then the image data associated with this result should
be sharp.
Below are state transition tables for different AF modes.
When android.control.afMode is AF_MODE_OFF or AF_MODE_EDOF:
State | Transition Cause | New State | Notes
:------------:|:----------------:|:---------:|:-----------:
INACTIVE | | INACTIVE | Never changes
When android.control.afMode is AF_MODE_AUTO or AF_MODE_MACRO:
State | Transition Cause | New State | Notes
:-----------------:|:----------------:|:------------------:|:--------------:
INACTIVE | AF_TRIGGER | ACTIVE_SCAN | Start AF sweep, Lens now moving
ACTIVE_SCAN | AF sweep done | FOCUSED_LOCKED | Focused, Lens now locked
ACTIVE_SCAN | AF sweep done | NOT_FOCUSED_LOCKED | Not focused, Lens now locked
ACTIVE_SCAN | AF_CANCEL | INACTIVE | Cancel/reset AF, Lens now locked
FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF
FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving
NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF
NOT_FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving
Any state | Mode change | INACTIVE |
For the above table, the camera device may skip reporting any state changes that happen
without application intervention (i.e. mode switch, trigger, locking). Any state that
can be skipped in that manner is called a transient state.
For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
state transitions listed in above table, it is also legal for the camera device to skip
one or more transient states between two results. See below table for examples:
State | Transition Cause | New State | Notes
:-----------------:|:----------------:|:------------------:|:--------------:
INACTIVE | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked.
INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked.
FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked.
NOT_FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is good after a scan, lens is not locked.
When android.control.afMode is AF_MODE_CONTINUOUS_VIDEO:
State | Transition Cause | New State | Notes
:-----------------:|:-----------------------------------:|:------------------:|:--------------:
INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
PASSIVE_SCAN | Camera device completes current scan| PASSIVE_FOCUSED | End AF scan, Lens now locked
PASSIVE_SCAN | Camera device fails current scan | PASSIVE_UNFOCUSED | End AF scan, Lens now locked
PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, if focus is good. Lens now locked
PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate transition, if focus is bad. Lens now locked
PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked
PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
PASSIVE_UNFOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, lens now locked
PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked
FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect
FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan
NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect
NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan
When android.control.afMode is AF_MODE_CONTINUOUS_PICTURE:
State | Transition Cause | New State | Notes
:-----------------:|:------------------------------------:|:------------------:|:--------------:
INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
PASSIVE_SCAN | Camera device completes current scan | PASSIVE_FOCUSED | End AF scan, Lens now locked
PASSIVE_SCAN | Camera device fails current scan | PASSIVE_UNFOCUSED | End AF scan, Lens now locked
PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Eventual transition once the focus is good. Lens now locked
PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Eventual transition if cannot find focus. Lens now locked
PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked
PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
PASSIVE_UNFOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate trans. Lens now locked
PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked
FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect
FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan
NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect
NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan
When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
(AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
camera device. When a trigger is included in a mode switch request, the trigger
will be evaluated in the context of the new mode in the request.
See below table for examples:
State | Transition Cause | New State | Notes
:-----------:|:--------------------------------------:|:----------------------------------------:|:--------------:
any state | CAF-->AUTO mode switch | INACTIVE | Mode switch without trigger, initial state must be INACTIVE
any state | CAF-->AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE | Mode switch with trigger, INACTIVE is skipped
any state | AUTO-->CAF mode switch | passively reachable states from INACTIVE | Mode switch without trigger, passive transient state is skipped
</details>
</entry>
<entry name="afTriggerId" type="int32" visibility="system" deprecated="true">
<description>The ID sent with the latest
CAMERA2_TRIGGER_AUTOFOCUS call</description>
<deprecation_description>
Removed in camera HAL v3
</deprecation_description>
<details>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger
received yet by HAL. Always updated even if AF algorithm
ignores the trigger</details>
</entry>
<clone entry="android.control.awbLock" kind="controls">
</clone>
<clone entry="android.control.awbMode" kind="controls">
</clone>
<clone entry="android.control.awbRegions" kind="controls">
</clone>
<clone entry="android.control.captureIntent" kind="controls">
</clone>
<entry name="awbState" type="byte" visibility="public" enum="true"
hwlevel="limited">
<enum>
<value>INACTIVE
<notes>AWB is not in auto mode, or has not yet started metering.
When a camera device is opened, it starts in this
state. This is a transient state, the camera device may
skip reporting this state in capture
result.</notes></value>
<value>SEARCHING
<notes>AWB doesn't yet have a good set of control
values for the current scene.
This is a transient state, the camera device
may skip reporting this state in capture result.</notes></value>
<value>CONVERGED
<notes>AWB has a good set of control values for the
current scene.</notes></value>
<value>LOCKED
<notes>AWB has been locked.
</notes></value>
</enum>
<description>Current state of auto-white balance (AWB) algorithm.</description>
<details>Switching between or enabling AWB modes (android.control.awbMode) always
resets the AWB state to INACTIVE. Similarly, switching between android.control.mode,
or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all
the algorithm states to INACTIVE.
The camera device can do several state transitions between two results, if it is
allowed by the state transition table. So INACTIVE may never actually be seen in
a result.
The state in the result is the state for this image (in sync with this image): if
AWB state becomes CONVERGED, then the image data associated with this result should
be good to use.
Below are state transition tables for different AWB modes.
When `android.control.awbMode != AWB_MODE_AUTO`:
State | Transition Cause | New State | Notes
:------------:|:----------------:|:---------:|:-----------------------:
INACTIVE | |INACTIVE |Camera device auto white balance algorithm is disabled
When android.control.awbMode is AWB_MODE_AUTO:
State | Transition Cause | New State | Notes
:-------------:|:--------------------------------:|:-------------:|:-----------------:
INACTIVE | Camera device initiates AWB scan | SEARCHING | Values changing
INACTIVE | android.control.awbLock is ON | LOCKED | Values locked
SEARCHING | Camera device finishes AWB scan | CONVERGED | Good values, not changing
SEARCHING | android.control.awbLock is ON | LOCKED | Values locked
CONVERGED | Camera device initiates AWB scan | SEARCHING | Values changing
CONVERGED | android.control.awbLock is ON | LOCKED | Values locked
LOCKED | android.control.awbLock is OFF | SEARCHING | Values not good after unlock
For the above table, the camera device may skip reporting any state changes that happen
without application intervention (i.e. mode switch, trigger, locking). Any state that
can be skipped in that manner is called a transient state.
For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
listed in above table, it is also legal for the camera device to skip one or more
transient states between two results. See below table for examples:
State | Transition Cause | New State | Notes
:-------------:|:--------------------------------:|:-------------:|:-----------------:
INACTIVE | Camera device finished AWB scan | CONVERGED | Values are already good, transient states are skipped by camera device.
LOCKED | android.control.awbLock is OFF | CONVERGED | Values good after unlock, transient states are skipped by camera device.
</details>
</entry>
<clone entry="android.control.effectMode" kind="controls">
</clone>
<clone entry="android.control.mode" kind="controls">
</clone>
<clone entry="android.control.sceneMode" kind="controls">
</clone>
<clone entry="android.control.videoStabilizationMode" kind="controls">
</clone>
</dynamic>
<static>
<entry name="availableHighSpeedVideoConfigurations" type="int32" visibility="hidden"
container="array" typedef="highSpeedVideoConfiguration" hwlevel="limited">
<array>
<size>5</size>
<size>n</size>
</array>
<description>
List of available high speed video size, fps range and max batch size configurations
supported by the camera device, in the format of (width, height, fps_min, fps_max, batch_size_max).
</description>
<range>
For each configuration, the fps_max &amp;gt;= 120fps.
</range>
<details>
When CONSTRAINED_HIGH_SPEED_VIDEO is supported in android.request.availableCapabilities,
this metadata will list the supported high speed video size, fps range and max batch size
configurations. All the sizes listed in this configuration will be a subset of the sizes
reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes}
for processed non-stalling formats.
For the high speed video use case, the application must
select the video size and fps range from this metadata to configure the recording and
preview streams and setup the recording requests. For example, if the application intends
to do high speed recording, it can select the maximum size reported by this metadata to
configure output streams. Once the size is selected, application can filter this metadata
by selected size and get the supported fps ranges, and use these fps ranges to setup the
recording requests. Note that for the use case of multiple output streams, application
must select one unique size from this metadata to use (e.g., preview and recording streams
must have the same size). Otherwise, the high speed capture session creation will fail.
The min and max fps will be multiple times of 30fps.
High speed video streaming extends significant performance pressue to camera hardware,
to achieve efficient high speed streaming, the camera device may have to aggregate
multiple frames together and send to camera device for processing where the request
controls are same for all the frames in this batch. Max batch size indicates
the max possible number of frames the camera device will group together for this high
speed stream configuration. This max batch size will be used to generate a high speed
recording request list by
{@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList}.
The max batch size for each configuration will satisfy below conditions:
* Each max batch size will be a divisor of its corresponding fps_max / 30. For example,
if max_fps is 300, max batch size will only be 1, 2, 5, or 10.
* The camera device may choose smaller internal batch size for each configuration, but
the actual batch size will be a divisor of max batch size. For example, if the max batch
size is 8, the actual batch size used by camera device will only be 1, 2, 4, or 8.
* The max batch size in each configuration entry must be no larger than 32.
The camera device doesn't have to support batch mode to achieve high speed video recording,
in such case, batch_size_max will be reported as 1 in each configuration entry.
This fps ranges in this configuration list can only be used to create requests
that are submitted to a high speed camera capture session created by
{@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}.
The fps ranges reported in this metadata must not be used to setup capture requests for
normal capture session, or it will cause request error.
</details>
<hal_details>
All the sizes listed in this configuration will be a subset of the sizes reported by
android.scaler.availableStreamConfigurations for processed non-stalling output formats.
Note that for all high speed video configurations, HAL must be able to support a minimum
of two streams, though the application might choose to configure just one stream.
The HAL may support multiple sensor modes for high speed outputs, for example, 120fps
sensor mode and 120fps recording, 240fps sensor mode for 240fps recording. The application
usually starts preview first, then starts recording. To avoid sensor mode switch caused
stutter when starting recording as much as possible, the application may want to ensure
the same sensor mode is used for preview and recording. Therefore, The HAL must advertise
the variable fps range [30, fps_max] for each fixed fps range in this configuration list.
For example, if the HAL advertises [120, 120] and [240, 240], the HAL must also advertise
[30, 120] and [30, 240] for each configuration. In doing so, if the application intends to
do 120fps recording, it can select [30, 120] to start preview, and [120, 120] to start
recording. For these variable fps ranges, it's up to the HAL to decide the actual fps
values that are suitable for smooth preview streaming. If the HAL sees different max_fps
values that fall into different sensor modes in a sequence of requests, the HAL must
switch the sensor mode as quick as possible to minimize the mode switch caused stutter.
</hal_details>
<tag id="V1" />
</entry>
<entry name="aeLockAvailable" type="byte" visibility="public" enum="true"
typedef="boolean" hwlevel="legacy">
<enum>
<value>FALSE</value>
<value>TRUE</value>
</enum>
<description>Whether the camera device supports android.control.aeLock</description>
<details>
Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always
list `true`. This includes FULL devices.
</details>
<tag id="BC"/>
</entry>
<entry name="awbLockAvailable" type="byte" visibility="public" enum="true"
typedef="boolean" hwlevel="legacy">
<enum>
<value>FALSE</value>
<value>TRUE</value>
</enum>
<description>Whether the camera device supports android.control.awbLock</description>
<details>
Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will
always list `true`. This includes FULL devices.
</details>
<tag id="BC"/>
</entry>
<entry name="availableModes" type="byte" visibility="public"
type_notes="List of enums (android.control.mode)." container="array"
typedef="enumList" hwlevel="legacy">
<array>
<size>n</size>
</array>
<description>
List of control modes for android.control.mode that are supported by this camera
device.
</description>
<range>Any value listed in android.control.mode</range>
<details>
This list contains control modes that can be set for the camera device.
LEGACY mode devices will always support AUTO mode. LIMITED and FULL
devices will always support OFF, AUTO modes.
</details>
</entry>
<entry name="postRawSensitivityBoostRange" type="int32" visibility="public"
type_notes="Range of supported post RAW sensitivitiy boosts"
container="array" typedef="rangeInt">
<array>
<size>2</size>
</array>
<description>Range of boosts for android.control.postRawSensitivityBoost supported
by this camera device.
</description>
<units>ISO arithmetic units, the same as android.sensor.sensitivity</units>
<details>
Devices support post RAW sensitivity boost will advertise
android.control.postRawSensitivityBoost key for controling
post RAW sensitivity boost.
This key will be `null` for devices that do not support any RAW format
outputs. For devices that do support RAW format outputs, this key will always
present, and if a device does not support post RAW sensitivity boost, it will
list `(100, 100)` in this key.
</details>
<hal_details>
This key is added in legacy HAL3.4. For legacy HAL3.3 or earlier devices, camera
framework will generate this key as `(100, 100)` if device supports any of RAW output
formats. All legacy HAL3.4 and above devices should list this key if device supports
any of RAW output formats.
</hal_details>
</entry>
</static>
<controls>
<entry name="postRawSensitivityBoost" type="int32" visibility="public">
<description>The amount of additional sensitivity boost applied to output images
after RAW sensor data is captured.
</description>
<units>ISO arithmetic units, the same as android.sensor.sensitivity</units>
<range>android.control.postRawSensitivityBoostRange</range>
<details>
Some camera devices support additional digital sensitivity boosting in the
camera processing pipeline after sensor RAW image is captured.
Such a boost will be applied to YUV/JPEG format output images but will not
have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE.
This key will be `null` for devices that do not support any RAW format
outputs. For devices that do support RAW format outputs, this key will always
present, and if a device does not support post RAW sensitivity boost, it will
list `100` in this key.
If the camera device cannot apply the exact boost requested, it will reduce the
boost to the nearest supported value.
The final boost value used will be available in the output capture result.
For devices that support post RAW sensitivity boost, the YUV/JPEG output images
of such device will have the total sensitivity of
`android.sensor.sensitivity * android.control.postRawSensitivityBoost / 100`
The sensitivity of RAW format images will always be `android.sensor.sensitivity`
This control is only effective if android.control.aeMode or android.control.mode is set to
OFF; otherwise the auto-exposure algorithm will override this value.
</details>
</entry>
</controls>
<dynamic>
<clone entry="android.control.postRawSensitivityBoost" kind="controls">
</clone>
</dynamic>
<controls>
<entry name="enableZsl" type="byte" visibility="public" enum="true" typedef="boolean">
<enum>
<value>FALSE
<notes>Requests with android.control.captureIntent == STILL_CAPTURE must be captured
after previous requests.</notes></value>
<value>TRUE
<notes>Requests with android.control.captureIntent == STILL_CAPTURE may or may not be
captured before previous requests.</notes></value>
</enum>
<description>Allow camera device to enable zero-shutter-lag mode for requests with
android.control.captureIntent == STILL_CAPTURE.
</description>
<details>
If enableZsl is `true`, the camera device may enable zero-shutter-lag mode for requests with
STILL_CAPTURE capture intent. The camera device may use images captured in the past to
produce output images for a zero-shutter-lag request. The result metadata including the
android.sensor.timestamp reflects the source frames used to produce output images.
Therefore, the contents of the output images and the result metadata may be out of order
compared to previous regular requests. enableZsl does not affect requests with other
capture intents.
For example, when requests are submitted in the following order:
Request A: enableZsl is ON, android.control.captureIntent is PREVIEW
Request B: enableZsl is ON, android.control.captureIntent is STILL_CAPTURE
The output images for request B may have contents captured before the output images for
request A, and the result metadata for request B may be older than the result metadata for
request A.
Note that when enableZsl is `true`, it is not guaranteed to get output images captured in
the past for requests with STILL_CAPTURE capture intent.
For applications targeting SDK versions O and newer, the value of enableZsl in
TEMPLATE_STILL_CAPTURE template may be `true`. The value in other templates is always
`false` if present.
For applications targeting SDK versions older than O, the value of enableZsl in all
capture templates is always `false` if present.
For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.
</details>
<hal_details>
It is valid for HAL to produce regular output images for requests with STILL_CAPTURE
capture intent.
</hal_details>
</entry>
</controls>
<dynamic>
<clone entry="android.control.enableZsl" kind="controls">
</clone>
<entry name="afSceneChange" type="byte" visibility="public" enum="true" hal_version="3.3">
<enum>
<value>NOT_DETECTED
<notes>Scene change is not detected within the AF region(s).</notes></value>
<value>DETECTED
<notes>Scene change is detected within the AF region(s).</notes></value>
</enum>
<description>Whether a significant scene change is detected within the currently-set AF
region(s).</description>
<details>When the camera focus routine detects a change in the scene it is looking at,
such as a large shift in camera viewpoint, significant motion in the scene, or a
significant illumination change, this value will be set to DETECTED for a single capture
result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar
to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.
This key will be available if the camera device advertises this key via {@link
android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys|ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}.
</details>
</entry>
</dynamic>
</section>
<section name="demosaic">
<controls>
<entry name="mode" type="byte" enum="true">
<enum>
<value>FAST
<notes>Minimal or no slowdown of frame rate compared to
Bayer RAW output.</notes></value>
<value>HIGH_QUALITY
<notes>Improved processing quality but the frame rate might be slowed down
relative to raw output.</notes></value>
</enum>
<description>Controls the quality of the demosaicing
processing.</description>
<tag id="FUTURE" />
</entry>
</controls>
</section>
<section name="edge">
<controls>
<entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full">
<enum>
<value>OFF
<notes>No edge enhancement is applied.</notes></value>
<value>FAST
<notes>Apply edge enhancement at a quality level that does not slow down frame rate
relative to sensor output. It may be the same as OFF if edge enhancement will
slow down frame rate relative to sensor.</notes></value>
<value>HIGH_QUALITY
<notes>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate.
</notes></value>
<value optional="true">ZERO_SHUTTER_LAG <notes>Edge enhancement is applied at different
levels for different output streams, based on resolution. Streams at maximum recording
resolution (see {@link
android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession})
or below have edge enhancement applied, while higher-resolution streams have no edge
enhancement applied. The level of edge enhancement for low-resolution streams is tuned
so that frame rate is not impacted, and the quality is equal to or better than FAST
(since it is only applied to lower-resolution outputs, quality may improve from FAST).
This mode is intended to be used by applications operating in a zero-shutter-lag mode
with YUV or PRIVATE reprocessing, where the application continuously captures
high-resolution intermediate buffers into a circular buffer, from which a final image is
produced via reprocessing when a user takes a picture. For such a use case, the
high-resolution buffers must not have edge enhancement applied to maximize efficiency of
preview and to avoid double-applying enhancement when reprocessed, while low-resolution
buffers (used for recording or preview, generally) need edge enhancement applied for
reasonable preview quality.
This mode is guaranteed to be supported by devices that support either the
YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
(android.request.availableCapabilities lists either of those capabilities) and it will
be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.
</notes></value>
</enum>
<description>Operation mode for edge
enhancement.</description>
<range>android.edge.availableEdgeModes</range>
<details>Edge enhancement improves sharpness and details in the captured image. OFF means
no enhancement will be applied by the camera device.
FAST/HIGH_QUALITY both mean camera device determined enhancement
will be applied. HIGH_QUALITY mode indicates that the
camera device will use the highest-quality enhancement algorithms,
even if it slows down capture rate. FAST means the camera device will
not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if
edge enhancement will slow down capture rate. Every output stream will have a similar
amount of enhancement applied.
ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular
buffer of high-resolution images during preview and reprocess image(s) from that buffer
into a final capture when triggered by the user. In this mode, the camera device applies
edge enhancement to low-resolution streams (below maximum recording resolution) to
maximize preview quality, but does not apply edge enhancement to high-resolution streams,
since those will be reprocessed later if necessary.
For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera
device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively.
The camera device may adjust its internal edge enhancement parameters for best
image quality based on the android.reprocess.effectiveExposureFactor, if it is set.
</details>
<hal_details>
For YUV_REPROCESSING The HAL can use android.reprocess.effectiveExposureFactor to
adjust the internal edge enhancement reduction parameters appropriately to get the best
quality images.
</hal_details>
<tag id="V1" />
<tag id="REPROC" />
</entry>
<entry name="strength" type="byte">
<description>Control the amount of edge enhancement
applied to the images</description>
<units>1-10; 10 is maximum sharpening</units>
<tag id="FUTURE" />
</entry>
</controls>
<static>
<entry name="availableEdgeModes" type="byte" visibility="public"
type_notes="list of enums" container="array" typedef="enumList"
hwlevel="full">
<array>
<size>n</size>
</array>
<description>
List of edge enhancement modes for android.edge.mode that are supported by this camera
device.
</description>
<range>Any value listed in android.edge.mode</range>
<details>
Full-capability camera devices must always support OFF; camera devices that support
YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will
list FAST.
</details>
<hal_details>
HAL must support both FAST and HIGH_QUALITY if edge enhancement control is available
on the camera device, but the underlying implementation can be the same for both modes.
That is, if the highest quality implementation on the camera device does not