blob: 15dec4315a639e95edb2b542ec5973bc76e3405c [file] [log] [blame]
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2012 The Android Open Source Project
3
4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 http://www.apache.org/licenses/LICENSE-2.0
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15-->
16<metadata xmlns="http://schemas.android.com/service/camera/metadata/"
17xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
18xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata_properties.xsd">
19
20 <tags>
Igor Murashkin77b63ca2012-11-09 16:15:02 -080021 <tag id="BC">
Igor Murashkin6ad61d42012-11-21 09:44:05 -080022 Needed for backwards compatibility with old Java API
Igor Murashkin77b63ca2012-11-09 16:15:02 -080023 </tag>
24 <tag id="V1">
Igor Murashkin6ad61d42012-11-21 09:44:05 -080025 New features for first camera 2 release (API1)
Igor Murashkin77b63ca2012-11-09 16:15:02 -080026 </tag>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -070027 <tag id="RAW">
28 Needed for useful RAW image processing and DNG file support
Igor Murashkin77b63ca2012-11-09 16:15:02 -080029 </tag>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -070030 <tag id="HAL2">
Alex Rayef40ad62013-10-01 17:52:33 -070031 Entry is only used by camera device HAL 2.x
32 </tag>
33 <tag id="FULL">
34 Entry is required for full hardware level devices, and optional for other hardware levels
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -070035 </tag>
Zhijun He66e62a42014-05-23 11:02:34 -070036 <tag id="FUTURE">
37 Entry is under-specified and is not required for now. This is for book-keeping purpose,
38 do not implement or use it, it may be revised for future.
39 </tag>
Igor Murashkin77b63ca2012-11-09 16:15:02 -080040 </tags>
Igor Murashkinb8dc8812013-07-17 16:29:34 -070041
42 <types>
Igor Murashkinb0f18b42014-05-30 10:51:40 -070043 <typedef name="pairFloatFloat">
44 <language name="java">android.util.Pair&lt;Float,Float&gt;</language>
45 </typedef>
Ruben Brunk804a0522014-07-09 11:28:16 -070046 <typedef name="pairDoubleDouble">
47 <language name="java">android.util.Pair&lt;Double,Double&gt;</language>
48 </typedef>
Igor Murashkinb8dc8812013-07-17 16:29:34 -070049 <typedef name="rectangle">
50 <language name="java">android.graphics.Rect</language>
51 </typedef>
52 <typedef name="size">
Igor Murashkinefff0de2014-05-14 17:30:49 -070053 <language name="java">android.util.Size</language>
Igor Murashkinb8dc8812013-07-17 16:29:34 -070054 </typedef>
55 <typedef name="string">
56 <language name="java">String</language>
57 </typedef>
58 <typedef name="boolean">
59 <language name="java">boolean</language>
60 </typedef>
Eino-Ville Talvalad4e240a2013-08-08 12:56:37 -070061 <typedef name="imageFormat">
62 <language name="java">int</language>
63 </typedef>
Igor Murashkin6c936c12014-05-13 14:51:49 -070064 <typedef name="streamConfigurationMap">
65 <language name="java">android.hardware.camera2.params.StreamConfigurationMap</language>
66 </typedef>
67 <typedef name="streamConfiguration">
68 <language name="java">android.hardware.camera2.params.StreamConfiguration</language>
69 </typedef>
70 <typedef name="streamConfigurationDuration">
71 <language name="java">android.hardware.camera2.params.StreamConfigurationDuration</language>
72 </typedef>
Igor Murashkinefff0de2014-05-14 17:30:49 -070073 <typedef name="face">
74 <language name="java">android.hardware.camera2.params.Face</language>
75 </typedef>
Yin-Chia Yeh739effc2014-05-16 15:13:13 -070076 <typedef name="meteringRectangle">
77 <language name="java">android.hardware.camera2.params.MeteringRectangle</language>
78 </typedef>
Igor Murashkin35a108f2014-05-27 10:51:25 -070079 <typedef name="rangeFloat">
80 <language name="java">android.util.Range&lt;Float&gt;</language>
81 </typedef>
82 <typedef name="rangeInt">
83 <language name="java">android.util.Range&lt;Integer&gt;</language>
84 </typedef>
Ruben Brunk9c766ad2014-05-27 18:52:49 -070085 <typedef name="rangeLong">
86 <language name="java">android.util.Range&lt;Long&gt;</language>
87 </typedef>
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -070088 <typedef name="colorSpaceTransform">
89 <language name="java">android.hardware.camera2.params.ColorSpaceTransform</language>
90 </typedef>
91 <typedef name="rggbChannelVector">
92 <language name="java">android.hardware.camera2.params.RggbChannelVector</language>
93 </typedef>
Ruben Brunkcc09de12014-06-05 13:20:47 -070094 <typedef name="blackLevelPattern">
95 <language name="java">android.hardware.camera2.params.BlackLevelPattern</language>
96 </typedef>
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -070097 <typedef name="enumList">
98 <language name="java">int</language>
99 </typedef>
Yin-Chia Yeh0a5f2692014-05-27 09:48:07 -0700100 <typedef name="sizeF">
101 <language name="java">android.util.SizeF</language>
102 </typedef>
103 <typedef name="point">
104 <language name="java">android.graphics.Point</language>
105 </typedef>
106 <typedef name="tonemapCurve">
107 <language name="java">android.hardware.camera2.params.TonemapCurve</language>
108 </typedef>
Ruben Brunk9c766ad2014-05-27 18:52:49 -0700109 <typedef name="lensShadingMap">
110 <language name="java">android.hardware.camera2.params.LensShadingMap</language>
111 </typedef>
112 <typedef name="location">
113 <language name="java">android.location.Location</language>
114 </typedef>
Yin-Chia Yeh35bdd4b2014-07-15 10:42:05 -0700115 <typedef name="highSpeedVideoConfiguration">
116 <language name="java">android.hardware.camera2.params.HighSpeedVideoConfiguration</language>
117 </typedef>
Igor Murashkinb8dc8812013-07-17 16:29:34 -0700118 </types>
119
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800120 <namespace name="android">
121 <section name="colorCorrection">
122 <controls>
Igor Murashkinca256272014-10-02 15:27:09 -0700123 <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800124 <enum>
125 <value>TRANSFORM_MATRIX
Igor Murashkin6ad61d42012-11-21 09:44:05 -0800126 <notes>Use the android.colorCorrection.transform matrix
Igor Murashkin43817ad2014-01-10 15:58:35 -0800127 and android.colorCorrection.gains to do color conversion.
128
129 All advanced white balance adjustments (not specified
130 by our white balance pipeline) must be disabled.
131
132 If AWB is enabled with `android.control.awbMode != OFF`, then
133 TRANSFORM_MATRIX is ignored. The camera device will override
134 this value to either FAST or HIGH_QUALITY.
135 </notes>
Igor Murashkin6ad61d42012-11-21 09:44:05 -0800136 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800137 <value>FAST
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700138 <notes>Color correction processing must not slow down
139 capture rate relative to sensor raw output.
Igor Murashkin43817ad2014-01-10 15:58:35 -0800140
141 Advanced white balance adjustments above and beyond
142 the specified white balance pipeline may be applied.
143
144 If AWB is enabled with `android.control.awbMode != OFF`, then
145 the camera device uses the last frame's AWB values
146 (or defaults if AWB has never been run).
147 </notes>
Igor Murashkin6ad61d42012-11-21 09:44:05 -0800148 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800149 <value>HIGH_QUALITY
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700150 <notes>Color correction processing operates at improved
151 quality but reduced capture rate (relative to sensor raw
152 output).
Igor Murashkin43817ad2014-01-10 15:58:35 -0800153
154 Advanced white balance adjustments above and beyond
155 the specified white balance pipeline may be applied.
156
157 If AWB is enabled with `android.control.awbMode != OFF`, then
158 the camera device uses the last frame's AWB values
159 (or defaults if AWB has never been run).
160 </notes>
Igor Murashkin6ad61d42012-11-21 09:44:05 -0800161 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800162 </enum>
Igor Murashkin656aa5a2013-08-13 14:23:39 -0700163
Igor Murashkin43817ad2014-01-10 15:58:35 -0800164 <description>
165 The mode control selects how the image data is converted from the
166 sensor's native color into linear sRGB color.
167 </description>
168 <details>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700169 When auto-white balance (AWB) is enabled with android.control.awbMode, this
Igor Murashkin43817ad2014-01-10 15:58:35 -0800170 control is overridden by the AWB routine. When AWB is disabled, the
171 application controls how the color mapping is performed.
172
173 We define the expected processing pipeline below. For consistency
174 across devices, this is always the case with TRANSFORM_MATRIX.
175
176 When either FULL or HIGH_QUALITY is used, the camera device may
177 do additional processing but android.colorCorrection.gains and
178 android.colorCorrection.transform will still be provided by the
179 camera device (in the results) and be roughly correct.
180
181 Switching to TRANSFORM_MATRIX and using the data provided from
182 FAST or HIGH_QUALITY will yield a picture with the same white point
183 as what was produced by the camera device in the earlier frame.
184
185 The expected processing pipeline is as follows:
186
187 ![White balance processing pipeline](android.colorCorrection.mode/processing_pipeline.png)
188
189 The white balance is encoded by two values, a 4-channel white-balance
190 gain vector (applied in the Bayer domain), and a 3x3 color transform
191 matrix (applied after demosaic).
192
193 The 4-channel white-balance gains are defined as:
194
195 android.colorCorrection.gains = [ R G_even G_odd B ]
196
197 where `G_even` is the gain for green pixels on even rows of the
198 output, and `G_odd` is the gain for green pixels on the odd rows.
199 These may be identical for a given camera device implementation; if
200 the camera device does not support a separate gain for even/odd green
201 channels, it will use the `G_even` value, and write `G_odd` equal to
202 `G_even` in the output result metadata.
203
204 The matrices for color transforms are defined as a 9-entry vector:
205
206 android.colorCorrection.transform = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
207
208 which define a transform from input sensor colors, `P_in = [ r g b ]`,
209 to output linear sRGB, `P_out = [ r' g' b' ]`,
210
211 with colors as follows:
212
213 r' = I0r + I1g + I2b
214 g' = I3r + I4g + I5b
215 b' = I6r + I7g + I8b
216
217 Both the input and output value ranges must match. Overflow/underflow
218 values are clipped to fit within the range.
219 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800220 </entry>
Zhijun He69fc0ea2013-07-17 09:42:58 -0700221 <entry name="transform" type="rational" visibility="public"
222 type_notes="3x3 rational matrix in row-major order"
Igor Murashkinca256272014-10-02 15:27:09 -0700223 container="array" typedef="colorSpaceTransform" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800224 <array>
Igor Murashkin6ad61d42012-11-21 09:44:05 -0800225 <size>3</size>
226 <size>3</size>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800227 </array>
Zhijun He69fc0ea2013-07-17 09:42:58 -0700228 <description>A color transform matrix to use to transform
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700229 from sensor RGB color space to output linear sRGB color space.
Zhijun He69fc0ea2013-07-17 09:42:58 -0700230 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700231 <units>Unitless scale factors</units>
Zhijun He44d0b3d2014-02-04 16:42:46 -0800232 <details>This matrix is either set by the camera device when the request
Zhijun He69fc0ea2013-07-17 09:42:58 -0700233 android.colorCorrection.mode is not TRANSFORM_MATRIX, or
234 directly by the application in the request when the
Igor Murashkin656aa5a2013-08-13 14:23:39 -0700235 android.colorCorrection.mode is TRANSFORM_MATRIX.
236
Zhijun He44d0b3d2014-02-04 16:42:46 -0800237 In the latter case, the camera device may round the matrix to account
238 for precision issues; the final rounded matrix should be reported back
239 in this matrix result metadata. The transform should keep the magnitude
240 of the output color values within `[0, 1.0]` (assuming input color
241 values is within the normalized range `[0, 1.0]`), or clipping may occur.
242 </details>
Zhijun He69fc0ea2013-07-17 09:42:58 -0700243 </entry>
244 <entry name="gains" type="float" visibility="public"
245 type_notes="A 1D array of floats for 4 color channel gains"
Igor Murashkinca256272014-10-02 15:27:09 -0700246 container="array" typedef="rggbChannelVector" hwlevel="full">
Zhijun He69fc0ea2013-07-17 09:42:58 -0700247 <array>
248 <size>4</size>
249 </array>
Igor Murashkin43817ad2014-01-10 15:58:35 -0800250 <description>Gains applying to Bayer raw color channels for
Zhijun He25b8ac52014-02-24 09:49:37 -0800251 white-balance.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700252 <units>Unitless gain factors</units>
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -0700253 <details>
254 These per-channel gains are either set by the camera device
255 when the request android.colorCorrection.mode is not
256 TRANSFORM_MATRIX, or directly by the application in the
257 request when the android.colorCorrection.mode is
258 TRANSFORM_MATRIX.
259
260 The gains in the result metadata are the gains actually
261 applied by the camera device to the current frame.
262 </details>
263 <hal_details>
264 The 4-channel white-balance gains are defined in
Igor Murashkin43817ad2014-01-10 15:58:35 -0800265 the order of `[R G_even G_odd B]`, where `G_even` is the gain
266 for green pixels on even rows of the output, and `G_odd`
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -0700267 is the gain for green pixels on the odd rows.
Zhijun He69fc0ea2013-07-17 09:42:58 -0700268
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -0700269 If a HAL does not support a separate gain for even/odd green
270 channels, it must use the `G_even` value, and write
271 `G_odd` equal to `G_even` in the output result metadata.
272 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800273 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -0700274 <entry name="aberrationMode" type="byte" visibility="public" enum="true" hwlevel="legacy">
Zhijun He450e01c2014-07-01 18:27:42 -0700275 <enum>
276 <value>OFF
277 <notes>
278 No aberration correction is applied.
279 </notes>
280 </value>
281 <value>FAST
282 <notes>
283 Aberration correction will not slow down capture rate
284 relative to sensor raw output.
285 </notes>
286 </value>
287 <value>HIGH_QUALITY
288 <notes>
289 Aberration correction operates at improved quality but reduced
290 capture rate (relative to sensor raw output).
291 </notes>
292 </value>
293 </enum>
294 <description>
295 Mode of operation for the chromatic aberration correction algorithm.
296 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700297 <range>android.colorCorrection.availableAberrationModes</range>
Zhijun He450e01c2014-07-01 18:27:42 -0700298 <details>
Zhijun He450e01c2014-07-01 18:27:42 -0700299 Chromatic (color) aberration is caused by the fact that different wavelengths of light
300 can not focus on the same point after exiting from the lens. This metadata defines
301 the high level control of chromatic aberration correction algorithm, which aims to
302 minimize the chromatic artifacts that may occur along the object boundaries in an
303 image.
304
305 FAST/HIGH_QUALITY both mean that camera device determined aberration
306 correction will be applied. HIGH_QUALITY mode indicates that the camera device will
307 use the highest-quality aberration correction algorithms, even if it slows down
308 capture rate. FAST means the camera device will not slow down capture rate when
309 applying aberration correction.
Igor Murashkinca256272014-10-02 15:27:09 -0700310
311 LEGACY devices will always be in FAST mode.
Zhijun He450e01c2014-07-01 18:27:42 -0700312 </details>
313 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800314 </controls>
315 <dynamic>
Zhijun He602d3702014-05-02 17:38:15 -0700316 <clone entry="android.colorCorrection.mode" kind="controls">
317 </clone>
Zhijun He69fc0ea2013-07-17 09:42:58 -0700318 <clone entry="android.colorCorrection.transform" kind="controls">
319 </clone>
320 <clone entry="android.colorCorrection.gains" kind="controls">
321 </clone>
Zhijun He33776412014-08-18 10:55:33 -0700322 <clone entry="android.colorCorrection.aberrationMode" kind="controls">
Zhijun He450e01c2014-07-01 18:27:42 -0700323 </clone>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800324 </dynamic>
Zhijun He450e01c2014-07-01 18:27:42 -0700325 <static>
Zhijun He33776412014-08-18 10:55:33 -0700326 <entry name="availableAberrationModes" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -0700327 type_notes="list of enums" container="array" typedef="enumList" hwlevel="legacy">
Zhijun He450e01c2014-07-01 18:27:42 -0700328 <array>
329 <size>n</size>
330 </array>
331 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700332 List of aberration correction modes for android.colorCorrection.aberrationMode that are
333 supported by this camera device.
Zhijun He450e01c2014-07-01 18:27:42 -0700334 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700335 <range>Any value listed in android.colorCorrection.aberrationMode</range>
Zhijun He450e01c2014-07-01 18:27:42 -0700336 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700337 This key lists the valid modes for android.colorCorrection.aberrationMode. If no
338 aberration correction modes are available for a device, this list will solely include
Zhijun He450e01c2014-07-01 18:27:42 -0700339 OFF mode.
340
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700341 For FULL capability device (android.info.supportedHardwareLevel `==` FULL), OFF is
342 always included.
Igor Murashkinca256272014-10-02 15:27:09 -0700343
344 LEGACY devices will always only support FAST mode.
Zhijun He450e01c2014-07-01 18:27:42 -0700345 </details>
346 <tag id="V1" />
347 </entry>
348 </static>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800349 </section>
350 <section name="control">
351 <controls>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -0700352 <entry name="aeAntibandingMode" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -0700353 enum="true" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800354 <enum>
Eino-Ville Talvala19ce2c12013-12-30 12:03:45 -0800355 <value>OFF
356 <notes>
357 The camera device will not adjust exposure duration to
358 avoid banding problems.
359 </notes>
360 </value>
361 <value>50HZ
362 <notes>
363 The camera device will adjust exposure duration to
364 avoid banding problems with 50Hz illumination sources.
365 </notes>
366 </value>
367 <value>60HZ
368 <notes>
369 The camera device will adjust exposure duration to
370 avoid banding problems with 60Hz illumination
371 sources.
372 </notes>
373 </value>
374 <value>AUTO
375 <notes>
376 The camera device will automatically adapt its
377 antibanding routine to the current illumination
378 conditions. This is the default.
379 </notes>
380 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800381 </enum>
Eino-Ville Talvala19ce2c12013-12-30 12:03:45 -0800382 <description>
383 The desired setting for the camera device's auto-exposure
384 algorithm's antibanding compensation.
385 </description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800386 <range>
Eino-Ville Talvala19ce2c12013-12-30 12:03:45 -0800387 android.control.aeAvailableAntibandingModes
388 </range>
389 <details>
390 Some kinds of lighting fixtures, such as some fluorescent
391 lights, flicker at the rate of the power supply frequency
392 (60Hz or 50Hz, depending on country). While this is
393 typically not noticeable to a person, it can be visible to
394 a camera device. If a camera sets its exposure time to the
395 wrong value, the flicker may become visible in the
396 viewfinder as flicker or in a final captured image, as a
397 set of variable-brightness bands across the image.
398
399 Therefore, the auto-exposure routines of camera devices
400 include antibanding routines that ensure that the chosen
401 exposure value will not cause such banding. The choice of
402 exposure time depends on the rate of flicker, which the
403 camera device can detect automatically, or the expected
404 rate can be selected by the application using this
405 control.
406
407 A given camera device may not support all of the possible
408 options for the antibanding mode. The
409 android.control.aeAvailableAntibandingModes key contains
410 the available modes for a given camera device.
411
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700412 The default mode is AUTO, which is supported by all
Eino-Ville Talvala19ce2c12013-12-30 12:03:45 -0800413 camera devices.
414
415 If manual exposure control is enabled (by setting
416 android.control.aeMode or android.control.mode to OFF),
417 then this setting has no effect, and the application must
418 ensure it selects exposure times that do not cause banding
419 issues. The android.statistics.sceneFlicker key can assist
420 the application in this.
421 </details>
422 <hal_details>
423 For all capture request templates, this field must be set
424 to AUTO. AUTO is the only mode that must supported;
425 OFF, 50HZ, 60HZ are all optional.
426
427 If manual exposure control is enabled (by setting
428 android.control.aeMode or android.control.mode to OFF),
429 then the exposure values provided by the application must not be
430 adjusted for antibanding.
431 </hal_details>
432 <tag id="BC" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800433 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -0700434 <entry name="aeExposureCompensation" type="int32" visibility="public" hwlevel="legacy">
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700435 <description>Adjustment to auto-exposure (AE) target image
436 brightness.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700437 <units>Compensation steps</units>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700438 <range>android.control.aeCompensationRange</range>
439 <details>
440 The adjustment is measured as a count of steps, with the
441 step size defined by android.control.aeCompensationStep and the
442 allowed range by android.control.aeCompensationRange.
443
444 For example, if the exposure value (EV) step is 0.333, '6'
445 will mean an exposure compensation of +2 EV; -3 will mean an
446 exposure compensation of -1 EV. One EV represents a doubling
447 of image brightness. Note that this control will only be
448 effective if android.control.aeMode `!=` OFF. This control
449 will take effect even when android.control.aeLock `== true`.
Yin-Chia Yeh7754e6a2014-05-05 14:26:03 -0700450
451 In the event of exposure compensation value being changed, camera device
452 may take several frames to reach the newly requested exposure target.
453 During that time, android.control.aeState field will be in the SEARCHING
454 state. Once the new exposure target is reached, android.control.aeState will
455 change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or
456 FLASH_REQUIRED (if the scene is too dark for still capture).
457 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800458 <tag id="BC" />
459 </entry>
Igor Murashkinb8dc8812013-07-17 16:29:34 -0700460 <entry name="aeLock" type="byte" visibility="public" enum="true"
Igor Murashkinca256272014-10-02 15:27:09 -0700461 typedef="boolean" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800462 <enum>
Eino-Ville Talvala76548fe2013-01-11 13:57:19 -0800463 <value>OFF
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700464 <notes>Auto-exposure lock is disabled; the AE algorithm
Eino-Ville Talvala76548fe2013-01-11 13:57:19 -0800465 is free to update its parameters.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800466 <value>ON
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700467 <notes>Auto-exposure lock is enabled; the AE algorithm
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800468 must not update the exposure and sensitivity parameters
Yin-Chia Yeh7754e6a2014-05-05 14:26:03 -0700469 while the lock is active.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700470
Yin-Chia Yeh7754e6a2014-05-05 14:26:03 -0700471 android.control.aeExposureCompensation setting changes
472 will still take effect while auto-exposure is locked.
Igor Murashkinca256272014-10-02 15:27:09 -0700473
474 Some rare LEGACY devices may not support
475 this, in which case the value will always be overridden to OFF.
Yin-Chia Yeh7754e6a2014-05-05 14:26:03 -0700476 </notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800477 </enum>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700478 <description>Whether auto-exposure (AE) is currently locked to its latest
Zhijun He44d0b3d2014-02-04 16:42:46 -0800479 calculated values.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700480 <details>
481 When set to `true` (ON), the AE algorithm is locked to its latest parameters,
482 and will not change exposure settings until the lock is set to `false` (OFF).
483
484 Note that even when AE is locked, the flash may be fired if
485 the android.control.aeMode is ON_AUTO_FLASH /
486 ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.
Zhijun He44d0b3d2014-02-04 16:42:46 -0800487
Yin-Chia Yeh7754e6a2014-05-05 14:26:03 -0700488 When android.control.aeExposureCompensation is changed, even if the AE lock
489 is ON, the camera device will still adjust its exposure value.
490
Zhijun He44d0b3d2014-02-04 16:42:46 -0800491 If AE precapture is triggered (see android.control.aePrecaptureTrigger)
492 when AE is already locked, the camera device will not change the exposure time
493 (android.sensor.exposureTime) and sensitivity (android.sensor.sensitivity)
494 parameters. The flash may be fired if the android.control.aeMode
495 is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
496 android.control.aeMode is ON_ALWAYS_FLASH, the scene may become overexposed.
497
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700498 Since the camera device has a pipeline of in-flight requests, the settings that
499 get locked do not necessarily correspond to the settings that were present in the
500 latest capture result received from the camera device, since additional captures
501 and AE updates may have occurred even before the result was sent out. If an
502 application is switching between automatic and manual control and wishes to eliminate
503 any flicker during the switch, the following procedure is recommended:
504
505 1. Starting in auto-AE mode:
506 2. Lock AE
507 3. Wait for the first result to be output that has the AE locked
508 4. Copy exposure settings from that result into a request, set the request to manual AE
509 5. Submit the capture request, proceed to run manual AE as desired.
510
Zhijun He44d0b3d2014-02-04 16:42:46 -0800511 See android.control.aeState for AE lock related state transition details.
512 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800513 <tag id="BC" />
514 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -0700515 <entry name="aeMode" type="byte" visibility="public" enum="true" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800516 <enum>
517 <value>OFF
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800518 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700519 The camera device's autoexposure routine is disabled.
520
521 The application-selected android.sensor.exposureTime,
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800522 android.sensor.sensitivity and
523 android.sensor.frameDuration are used by the camera
524 device, along with android.flash.* fields, if there's
525 a flash unit for this camera device.
Igor Murashkinca256272014-10-02 15:27:09 -0700526
527 LEGACY devices do not support the OFF mode and will
528 override attempts to use this value to ON.
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800529 </notes>
Igor Murashkin6ad61d42012-11-21 09:44:05 -0800530 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800531 <value>ON
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800532 <notes>
533 The camera device's autoexposure routine is active,
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700534 with no flash control.
535
536 The application's values for
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800537 android.sensor.exposureTime,
538 android.sensor.sensitivity, and
539 android.sensor.frameDuration are ignored. The
540 application has control over the various
541 android.flash.* fields.
542 </notes>
Igor Murashkin6ad61d42012-11-21 09:44:05 -0800543 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800544 <value>ON_AUTO_FLASH
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800545 <notes>
546 Like ON, except that the camera device also controls
547 the camera's flash unit, firing it in low-light
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700548 conditions.
549
550 The flash may be fired during a precapture sequence
551 (triggered by android.control.aePrecaptureTrigger) and
552 may be fired for captures for which the
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800553 android.control.captureIntent field is set to
554 STILL_CAPTURE
555 </notes>
556 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800557 <value>ON_ALWAYS_FLASH
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800558 <notes>
559 Like ON, except that the camera device also controls
560 the camera's flash unit, always firing it for still
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700561 captures.
562
563 The flash may be fired during a precapture sequence
564 (triggered by android.control.aePrecaptureTrigger) and
565 will always be fired for captures for which the
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800566 android.control.captureIntent field is set to
567 STILL_CAPTURE
568 </notes>
569 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800570 <value>ON_AUTO_FLASH_REDEYE
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800571 <notes>
572 Like ON_AUTO_FLASH, but with automatic red eye
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700573 reduction.
574
575 If deemed necessary by the camera device, a red eye
576 reduction flash will fire during the precapture
577 sequence.
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800578 </notes>
579 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800580 </enum>
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800581 <description>The desired mode for the camera device's
582 auto-exposure routine.</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800583 <range>android.control.aeAvailableModes</range>
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800584 <details>
585 This control is only effective if android.control.mode is
586 AUTO.
Zhijun Hef5529232013-12-13 17:48:53 -0800587
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800588 When set to any of the ON modes, the camera device's
589 auto-exposure routine is enabled, overriding the
590 application's selected exposure time, sensor sensitivity,
591 and frame duration (android.sensor.exposureTime,
592 android.sensor.sensitivity, and
593 android.sensor.frameDuration). If one of the FLASH modes
594 is selected, the camera device's flash unit controls are
595 also overridden.
Zhijun Hef5529232013-12-13 17:48:53 -0800596
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -0800597 The FLASH modes are only available if the camera device
598 has a flash unit (android.flash.info.available is `true`).
599
600 If flash TORCH mode is desired, this field must be set to
601 ON or OFF, and android.flash.mode set to TORCH.
602
603 When set to any of the ON modes, the values chosen by the
604 camera device auto-exposure routine for the overridden
605 fields for a given capture will be available in its
606 CaptureResult.
607 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800608 <tag id="BC" />
609 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -0700610 <entry name="aeRegions" type="int32" visibility="public"
Yin-Chia Yeh8554ed52014-09-04 09:33:34 -0700611 optional="true" container="array" typedef="meteringRectangle">
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800612 <array>
Igor Murashkin617da162012-11-29 13:35:15 -0800613 <size>5</size>
614 <size>area_count</size>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800615 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700616 <description>List of metering areas to use for auto-exposure adjustment.</description>
617 <units>Pixel coordinates within android.sensor.info.activeArraySize</units>
618 <range>Coordinates must be between `[(0,0), (width, height))` of
619 android.sensor.info.activeArraySize</range>
Yin-Chia Yeh739effc2014-05-16 15:13:13 -0700620 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700621 Not available if android.control.maxRegionsAe is 0.
Yin-Chia Yeh8554ed52014-09-04 09:33:34 -0700622 Otherwise will always be present.
623
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700624 The maximum number of regions supported by the device is determined by the value
625 of android.control.maxRegionsAe.
626
Yin-Chia Yeh739effc2014-05-16 15:13:13 -0700627 The coordinate system is based on the active pixel array,
628 with (0,0) being the top-left pixel in the active pixel array, and
629 (android.sensor.info.activeArraySize.width - 1,
630 android.sensor.info.activeArraySize.height - 1) being the
Yin-Chia Yehdc182572014-05-14 14:05:20 -0700631 bottom-right pixel in the active pixel array.
632
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700633 The weight must be within `[0, 1000]`, and represents a weight
Yin-Chia Yehdc182572014-05-14 14:05:20 -0700634 for every pixel in the area. This means that a large metering area
635 with the same weight as a smaller area will have more effect in
636 the metering result. Metering areas can partially overlap and the
637 camera device will add the weights in the overlap region.
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700638
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700639 The weights are relative to weights of other exposure metering regions, so if only one
640 region is used, all non-zero weights will have the same effect. A region with 0
641 weight is ignored.
642
643 If all regions have 0 weight, then no specific metering area needs to be used by the
644 camera device.
645
646 If the metering region is outside the used android.scaler.cropRegion returned in
647 capture result metadata, the camera device will ignore the sections outside the crop
648 region and output only the intersection rectangle as the metering region in the result
649 metadata. If the region is entirely outside the crop region, it will be ignored and
650 not reported in the result metadata.
Yin-Chia Yeh739effc2014-05-16 15:13:13 -0700651 </details>
652 <hal_details>
653 The HAL level representation of MeteringRectangle[] is a
654 int[5 * area_count].
655 Every five elements represent a metering region of
656 (xmin, ymin, xmax, ymax, weight).
657 The rectangle is defined to be inclusive on xmin and ymin, but
658 exclusive on xmax and ymax.
659 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800660 <tag id="BC" />
661 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -0700662 <entry name="aeTargetFpsRange" type="int32" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -0700663 container="array" typedef="rangeInt" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800664 <array>
665 <size>2</size>
666 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700667 <description>Range over which the auto-exposure routine can
668 adjust the capture frame rate to maintain good
669 exposure.</description>
670 <units>Frames per second (FPS)</units>
671 <range>Any of the entries in android.control.aeAvailableTargetFpsRanges</range>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700672 <details>Only constrains auto-exposure (AE) algorithm, not
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700673 manual control of android.sensor.exposureTime and
674 android.sensor.frameDuration.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800675 <tag id="BC" />
676 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -0700677 <entry name="aePrecaptureTrigger" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -0700678 enum="true" hwlevel="limited">
Eino-Ville Talvala3b4383a2013-03-18 09:42:48 -0700679 <enum>
680 <value>IDLE
681 <notes>The trigger is idle.</notes>
682 </value>
683 <value>START
Zhijun He92e698d2014-01-13 16:24:31 -0800684 <notes>The precapture metering sequence will be started
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700685 by the camera device.
686
687 The exact effect of the precapture trigger depends on
688 the current AE mode and state.</notes>
Eino-Ville Talvala3b4383a2013-03-18 09:42:48 -0700689 </value>
690 </enum>
Zhijun He92e698d2014-01-13 16:24:31 -0800691 <description>Whether the camera device will trigger a precapture
692 metering sequence when it processes this request.</description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800693 <details>This entry is normally set to IDLE, or is not
Eino-Ville Talvala3b4383a2013-03-18 09:42:48 -0700694 included at all in the request settings. When included and
Zhijun He92e698d2014-01-13 16:24:31 -0800695 set to START, the camera device will trigger the autoexposure
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700696 precapture metering sequence.
697
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700698 The precapture sequence should triggered before starting a
699 high-quality still capture for final metering decisions to
700 be made, and for firing pre-capture flash pulses to estimate
701 scene brightness and required final capture flash power, when
702 the flash is enabled.
703
704 Normally, this entry should be set to START for only a
705 single request, and the application should wait until the
706 sequence completes before starting a new one.
707
708 The exact effect of auto-exposure (AE) precapture trigger
709 depends on the current AE mode and state; see
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700710 android.control.aeState for AE precapture state transition
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700711 details.
712
713 On LEGACY-level devices, the precapture trigger is not supported;
714 capturing a high-resolution JPEG image will automatically trigger a
715 precapture sequence before the high-resolution capture, including
716 potentially firing a pre-capture flash.
717 </details>
Eino-Ville Talvala3b4383a2013-03-18 09:42:48 -0700718 <tag id="BC" />
719 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -0700720 <entry name="afMode" type="byte" visibility="public" enum="true"
721 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800722 <enum>
723 <value>OFF
Zhijun Hef5529232013-12-13 17:48:53 -0800724 <notes>The auto-focus routine does not control the lens;
Zhijun He69fc0ea2013-07-17 09:42:58 -0700725 android.lens.focusDistance is controlled by the
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700726 application.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800727 <value>AUTO
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700728 <notes>Basic automatic focus mode.
729
730 In this mode, the lens does not move unless
731 the autofocus trigger action is called. When that trigger
732 is activated, AF will transition to ACTIVE_SCAN, then to
733 the outcome of the scan (FOCUSED or NOT_FOCUSED).
734
735 Always supported if lens is not fixed focus.
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700736
Zhijun Hef5529232013-12-13 17:48:53 -0800737 Use android.lens.info.minimumFocusDistance to determine if lens
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700738 is fixed-focus.
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700739
Zhijun Hef5529232013-12-13 17:48:53 -0800740 Triggering AF_CANCEL resets the lens position to default,
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700741 and sets the AF state to INACTIVE.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800742 <value>MACRO
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700743 <notes>Close-up focusing mode.
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700744
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700745 In this mode, the lens does not move unless the
746 autofocus trigger action is called. When that trigger is
747 activated, AF will transition to ACTIVE_SCAN, then to
748 the outcome of the scan (FOCUSED or NOT_FOCUSED). This
749 mode is optimized for focusing on objects very close to
750 the camera.
751
752 When that trigger is activated, AF will transition to
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700753 ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700754 NOT_FOCUSED). Triggering cancel AF resets the lens
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700755 position to default, and sets the AF state to
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800756 INACTIVE.</notes></value>
757 <value>CONTINUOUS_VIDEO
758 <notes>In this mode, the AF algorithm modifies the lens
759 position continually to attempt to provide a
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700760 constantly-in-focus image stream.
761
762 The focusing behavior should be suitable for good quality
763 video recording; typically this means slower focus
764 movement and no overshoots. When the AF trigger is not
765 involved, the AF algorithm should start in INACTIVE state,
766 and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED
767 states as appropriate. When the AF trigger is activated,
768 the algorithm should immediately transition into
769 AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
770 lens position until a cancel AF trigger is received.
771
772 Once cancel is received, the algorithm should transition
773 back to INACTIVE and resume passive scan. Note that this
774 behavior is not identical to CONTINUOUS_PICTURE, since an
775 ongoing PASSIVE_SCAN must immediately be
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800776 canceled.</notes></value>
777 <value>CONTINUOUS_PICTURE
778 <notes>In this mode, the AF algorithm modifies the lens
779 position continually to attempt to provide a
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700780 constantly-in-focus image stream.
781
782 The focusing behavior should be suitable for still image
783 capture; typically this means focusing as fast as
784 possible. When the AF trigger is not involved, the AF
785 algorithm should start in INACTIVE state, and then
786 transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as
787 appropriate as it attempts to maintain focus. When the AF
788 trigger is activated, the algorithm should finish its
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800789 PASSIVE_SCAN if active, and then transition into
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700790 AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the
791 lens position until a cancel AF trigger is received.
792
793 When the AF cancel trigger is activated, the algorithm
794 should transition back to INACTIVE and then act as if it
795 has just been started.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800796 <value>EDOF
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700797 <notes>Extended depth of field (digital focus) mode.
798
799 The camera device will produce images with an extended
800 depth of field automatically; no special focusing
801 operations need to be done before taking a picture.
802
803 AF triggers are ignored, and the AF state will always be
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800804 INACTIVE.</notes></value>
805 </enum>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700806 <description>Whether auto-focus (AF) is currently enabled, and what
807 mode it is set to.</description>
Zhijun He7787f7f2014-01-14 16:30:31 -0800808 <range>android.control.afAvailableModes</range>
Zhijun He25b8ac52014-02-24 09:49:37 -0800809 <details>Only effective if android.control.mode = AUTO and the lens is not fixed focus
810 (i.e. `android.lens.info.minimumFocusDistance &gt; 0`).
Zhijun Hef5529232013-12-13 17:48:53 -0800811
Zhijun Hef163fa92014-01-14 09:59:04 -0800812 If the lens is controlled by the camera device auto-focus algorithm,
813 the camera device will report the current AF status in android.control.afState
814 in result metadata.</details>
Zhijun Hea19ede82014-05-27 15:06:42 -0700815 <hal_details>
816 When afMode is AUTO or MACRO, the lens must not move until an AF trigger is sent in a
817 request (android.control.afTrigger `==` START). After an AF trigger, the afState will end
818 up with either FOCUSED_LOCKED or NOT_FOCUSED_LOCKED state (see
819 android.control.afState for detailed state transitions), which indicates that the lens is
820 locked and will not move. If camera movement (e.g. tilting camera) causes the lens to move
821 after the lens is locked, the HAL must compensate this movement appropriately such that
822 the same focal plane remains in focus.
823
824 When afMode is one of the continuous auto focus modes, the HAL is free to start a AF
825 scan whenever it's not locked. When the lens is locked after an AF trigger
826 (see android.control.afState for detailed state transitions), the HAL should maintain the
827 same lock behavior as above.
828
829 When afMode is OFF, the application controls focus manually. The accuracy of the
830 focus distance control depends on the android.lens.info.focusDistanceCalibration.
831 However, the lens must not move regardless of the camera movement for any focus distance
832 manual control.
833
834 To put this in concrete terms, if the camera has lens elements which may move based on
835 camera orientation or motion (e.g. due to gravity), then the HAL must drive the lens to
836 remain in a fixed position invariant to the camera's orientation or motion, for example,
837 by using accelerometer measurements in the lens control logic. This is a typical issue
838 that will arise on camera modules with open-loop VCMs.
839 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800840 <tag id="BC" />
841 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -0700842 <entry name="afRegions" type="int32" visibility="public"
Yin-Chia Yeh8554ed52014-09-04 09:33:34 -0700843 optional="true" container="array" typedef="meteringRectangle">
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800844 <array>
Igor Murashkin617da162012-11-29 13:35:15 -0800845 <size>5</size>
846 <size>area_count</size>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800847 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700848 <description>List of metering areas to use for auto-focus.</description>
849 <units>Pixel coordinates within android.sensor.info.activeArraySize</units>
850 <range>Coordinates must be between `[(0,0), (width, height))` of
851 android.sensor.info.activeArraySize</range>
Yin-Chia Yeh739effc2014-05-16 15:13:13 -0700852 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700853 Not available if android.control.maxRegionsAf is 0.
Yin-Chia Yeh8554ed52014-09-04 09:33:34 -0700854 Otherwise will always be present.
855
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700856 The maximum number of focus areas supported by the device is determined by the value
857 of android.control.maxRegionsAf.
858
Yin-Chia Yeh739effc2014-05-16 15:13:13 -0700859 The coordinate system is based on the active pixel array,
860 with (0,0) being the top-left pixel in the active pixel array, and
861 (android.sensor.info.activeArraySize.width - 1,
862 android.sensor.info.activeArraySize.height - 1) being the
Yin-Chia Yehdc182572014-05-14 14:05:20 -0700863 bottom-right pixel in the active pixel array.
864
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700865 The weight must be within `[0, 1000]`, and represents a weight
Yin-Chia Yehdc182572014-05-14 14:05:20 -0700866 for every pixel in the area. This means that a large metering area
867 with the same weight as a smaller area will have more effect in
868 the metering result. Metering areas can partially overlap and the
869 camera device will add the weights in the overlap region.
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700870
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700871 The weights are relative to weights of other metering regions, so if only one region
872 is used, all non-zero weights will have the same effect. A region with 0 weight is
873 ignored.
874
875 If all regions have 0 weight, then no specific metering area needs to be used by the
876 camera device.
877
878 If the metering region is outside the used android.scaler.cropRegion returned in
879 capture result metadata, the camera device will ignore the sections outside the crop
880 region and output only the intersection rectangle as the metering region in the result
881 metadata. If the region is entirely outside the crop region, it will be ignored and
882 not reported in the result metadata.
Yin-Chia Yeh739effc2014-05-16 15:13:13 -0700883 </details>
884 <hal_details>
885 The HAL level representation of MeteringRectangle[] is a
886 int[5 * area_count].
887 Every five elements represent a metering region of
888 (xmin, ymin, xmax, ymax, weight).
889 The rectangle is defined to be inclusive on xmin and ymin, but
890 exclusive on xmax and ymax.
891 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800892 <tag id="BC" />
893 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -0700894 <entry name="afTrigger" type="byte" visibility="public" enum="true"
895 hwlevel="legacy">
Eino-Ville Talvala3b4383a2013-03-18 09:42:48 -0700896 <enum>
897 <value>IDLE
898 <notes>The trigger is idle.</notes>
899 </value>
900 <value>START
Zhijun He92e698d2014-01-13 16:24:31 -0800901 <notes>Autofocus will trigger now.</notes>
Eino-Ville Talvala3b4383a2013-03-18 09:42:48 -0700902 </value>
903 <value>CANCEL
Zhijun He92e698d2014-01-13 16:24:31 -0800904 <notes>Autofocus will return to its initial
905 state, and cancel any currently active trigger.</notes>
Eino-Ville Talvala3b4383a2013-03-18 09:42:48 -0700906 </value>
907 </enum>
Zhijun He92e698d2014-01-13 16:24:31 -0800908 <description>
909 Whether the camera device will trigger autofocus for this request.
910 </description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -0800911 <details>This entry is normally set to IDLE, or is not
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -0700912 included at all in the request settings.
913
Zhijun He92e698d2014-01-13 16:24:31 -0800914 When included and set to START, the camera device will trigger the
915 autofocus algorithm. If autofocus is disabled, this trigger has no effect.
916
917 When set to CANCEL, the camera device will cancel any active trigger,
918 and return to its initial AF state.
919
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700920 Generally, applications should set this entry to START or CANCEL for only a
921 single capture, and then return it to IDLE (or not set at all). Specifying
922 START for multiple captures in a row means restarting the AF operation over
923 and over again.
924
925 See android.control.afState for what the trigger means for each AF mode.
Zhijun He92e698d2014-01-13 16:24:31 -0800926 </details>
Eino-Ville Talvala3b4383a2013-03-18 09:42:48 -0700927 <tag id="BC" />
928 </entry>
Igor Murashkinb8dc8812013-07-17 16:29:34 -0700929 <entry name="awbLock" type="byte" visibility="public" enum="true"
Igor Murashkinca256272014-10-02 15:27:09 -0700930 typedef="boolean" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800931 <enum>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800932 <value>OFF
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700933 <notes>Auto-white balance lock is disabled; the AWB
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800934 algorithm is free to update its parameters if in AUTO
935 mode.</notes></value>
Eino-Ville Talvala76548fe2013-01-11 13:57:19 -0800936 <value>ON
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700937 <notes>Auto-white balance lock is enabled; the AWB
938 algorithm will not update its parameters while the lock
Zhijun He4412faa2014-02-06 00:28:22 -0800939 is active.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800940 </enum>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -0700941 <description>Whether auto-white balance (AWB) is currently locked to its
Zhijun He4412faa2014-02-06 00:28:22 -0800942 latest calculated values.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -0700943 <details>
944 When set to `true` (ON), the AWB algorithm is locked to its latest parameters,
945 and will not change color balance settings until the lock is set to `false` (OFF).
946
947 Since the camera device has a pipeline of in-flight requests, the settings that
948 get locked do not necessarily correspond to the settings that were present in the
949 latest capture result received from the camera device, since additional captures
950 and AWB updates may have occurred even before the result was sent out. If an
951 application is switching between automatic and manual control and wishes to eliminate
952 any flicker during the switch, the following procedure is recommended:
953
954 1. Starting in auto-AWB mode:
955 2. Lock AWB
956 3. Wait for the first result to be output that has the AWB locked
957 4. Copy AWB settings from that result into a request, set the request to manual AWB
958 5. Submit the capture request, proceed to run manual AWB as desired.
959
960 Note that AWB lock is only meaningful when
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700961 android.control.awbMode is in the AUTO mode; in other modes,
Igor Murashkinca256272014-10-02 15:27:09 -0700962 AWB is already fixed to a specific setting.
963
964 Some LEGACY devices may not support ON; the value is then overridden to OFF.
965 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800966 <tag id="BC" />
967 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -0700968 <entry name="awbMode" type="byte" visibility="public" enum="true"
969 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -0800970 <enum>
Zhijun He7787f7f2014-01-14 16:30:31 -0800971 <value>OFF
972 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700973 The camera device's auto-white balance routine is disabled.
974
975 The application-selected color transform matrix
Zhijun He7787f7f2014-01-14 16:30:31 -0800976 (android.colorCorrection.transform) and gains
977 (android.colorCorrection.gains) are used by the camera
978 device for manual white balance control.
979 </notes>
980 </value>
981 <value>AUTO
982 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700983 The camera device's auto-white balance routine is active.
984
985 The application's values for android.colorCorrection.transform
Zhijun He7787f7f2014-01-14 16:30:31 -0800986 and android.colorCorrection.gains are ignored.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700987 For devices that support the MANUAL_POST_PROCESSING capability, the
988 values used by the camera device for the transform and gains
989 will be available in the capture result for this request.
Zhijun He7787f7f2014-01-14 16:30:31 -0800990 </notes>
991 </value>
992 <value>INCANDESCENT
993 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700994 The camera device's auto-white balance routine is disabled;
Zhijun He7787f7f2014-01-14 16:30:31 -0800995 the camera device uses incandescent light as the assumed scene
Eino-Ville Talvalab4329162014-06-09 14:23:02 -0700996 illumination for white balance.
997
998 While the exact white balance transforms are up to the
999 camera device, they will approximately match the CIE
1000 standard illuminant A.
1001
1002 The application's values for android.colorCorrection.transform
1003 and android.colorCorrection.gains are ignored.
1004 For devices that support the MANUAL_POST_PROCESSING capability, the
1005 values used by the camera device for the transform and gains
1006 will be available in the capture result for this request.
Zhijun He7787f7f2014-01-14 16:30:31 -08001007 </notes>
1008 </value>
1009 <value>FLUORESCENT
1010 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001011 The camera device's auto-white balance routine is disabled;
Zhijun He7787f7f2014-01-14 16:30:31 -08001012 the camera device uses fluorescent light as the assumed scene
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001013 illumination for white balance.
1014
1015 While the exact white balance transforms are up to the
1016 camera device, they will approximately match the CIE
1017 standard illuminant F2.
1018
1019 The application's values for android.colorCorrection.transform
1020 and android.colorCorrection.gains are ignored.
1021 For devices that support the MANUAL_POST_PROCESSING capability, the
1022 values used by the camera device for the transform and gains
1023 will be available in the capture result for this request.
Zhijun He7787f7f2014-01-14 16:30:31 -08001024 </notes>
1025 </value>
1026 <value>WARM_FLUORESCENT
1027 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001028 The camera device's auto-white balance routine is disabled;
Zhijun He7787f7f2014-01-14 16:30:31 -08001029 the camera device uses warm fluorescent light as the assumed scene
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001030 illumination for white balance.
1031
1032 While the exact white balance transforms are up to the
1033 camera device, they will approximately match the CIE
1034 standard illuminant F4.
1035
1036 The application's values for android.colorCorrection.transform
1037 and android.colorCorrection.gains are ignored.
1038 For devices that support the MANUAL_POST_PROCESSING capability, the
1039 values used by the camera device for the transform and gains
1040 will be available in the capture result for this request.
Zhijun He7787f7f2014-01-14 16:30:31 -08001041 </notes>
1042 </value>
1043 <value>DAYLIGHT
1044 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001045 The camera device's auto-white balance routine is disabled;
Zhijun He7787f7f2014-01-14 16:30:31 -08001046 the camera device uses daylight light as the assumed scene
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001047 illumination for white balance.
1048
1049 While the exact white balance transforms are up to the
1050 camera device, they will approximately match the CIE
1051 standard illuminant D65.
1052
1053 The application's values for android.colorCorrection.transform
1054 and android.colorCorrection.gains are ignored.
1055 For devices that support the MANUAL_POST_PROCESSING capability, the
1056 values used by the camera device for the transform and gains
1057 will be available in the capture result for this request.
Zhijun He7787f7f2014-01-14 16:30:31 -08001058 </notes>
1059 </value>
1060 <value>CLOUDY_DAYLIGHT
1061 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001062 The camera device's auto-white balance routine is disabled;
Zhijun He7787f7f2014-01-14 16:30:31 -08001063 the camera device uses cloudy daylight light as the assumed scene
1064 illumination for white balance.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001065
1066 The application's values for android.colorCorrection.transform
1067 and android.colorCorrection.gains are ignored.
1068 For devices that support the MANUAL_POST_PROCESSING capability, the
1069 values used by the camera device for the transform and gains
1070 will be available in the capture result for this request.
Zhijun He7787f7f2014-01-14 16:30:31 -08001071 </notes>
1072 </value>
1073 <value>TWILIGHT
1074 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001075 The camera device's auto-white balance routine is disabled;
Zhijun He7787f7f2014-01-14 16:30:31 -08001076 the camera device uses twilight light as the assumed scene
1077 illumination for white balance.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001078
1079 The application's values for android.colorCorrection.transform
1080 and android.colorCorrection.gains are ignored.
1081 For devices that support the MANUAL_POST_PROCESSING capability, the
1082 values used by the camera device for the transform and gains
1083 will be available in the capture result for this request.
Zhijun He7787f7f2014-01-14 16:30:31 -08001084 </notes>
1085 </value>
1086 <value>SHADE
1087 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001088 The camera device's auto-white balance routine is disabled;
Zhijun He7787f7f2014-01-14 16:30:31 -08001089 the camera device uses shade light as the assumed scene
1090 illumination for white balance.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001091
1092 The application's values for android.colorCorrection.transform
1093 and android.colorCorrection.gains are ignored.
1094 For devices that support the MANUAL_POST_PROCESSING capability, the
1095 values used by the camera device for the transform and gains
1096 will be available in the capture result for this request.
Zhijun He7787f7f2014-01-14 16:30:31 -08001097 </notes>
1098 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001099 </enum>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07001100 <description>Whether auto-white balance (AWB) is currently setting the color
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001101 transform fields, and what its illumination target
Zhijun He25b8ac52014-02-24 09:49:37 -08001102 is.</description>
Zhijun He7787f7f2014-01-14 16:30:31 -08001103 <range>android.control.awbAvailableModes</range>
1104 <details>
1105 This control is only effective if android.control.mode is AUTO.
Zhijun Hef5529232013-12-13 17:48:53 -08001106
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001107 When set to the ON mode, the camera device's auto-white balance
Zhijun He7787f7f2014-01-14 16:30:31 -08001108 routine is enabled, overriding the application's selected
1109 android.colorCorrection.transform, android.colorCorrection.gains and
1110 android.colorCorrection.mode.
1111
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001112 When set to the OFF mode, the camera device's auto-white balance
Zhijun He25b8ac52014-02-24 09:49:37 -08001113 routine is disabled. The application manually controls the white
Zhijun He7787f7f2014-01-14 16:30:31 -08001114 balance by android.colorCorrection.transform, android.colorCorrection.gains
1115 and android.colorCorrection.mode.
1116
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001117 When set to any other modes, the camera device's auto-white
1118 balance routine is disabled. The camera device uses each
1119 particular illumination target for white balance
1120 adjustment. The application's values for
1121 android.colorCorrection.transform,
1122 android.colorCorrection.gains and
1123 android.colorCorrection.mode are ignored.
Zhijun He7787f7f2014-01-14 16:30:31 -08001124 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001125 <tag id="BC" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001126 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07001127 <entry name="awbRegions" type="int32" visibility="public"
Yin-Chia Yeh8554ed52014-09-04 09:33:34 -07001128 optional="true" container="array" typedef="meteringRectangle">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001129 <array>
Igor Murashkin617da162012-11-29 13:35:15 -08001130 <size>5</size>
1131 <size>area_count</size>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001132 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001133 <description>List of metering areas to use for auto-white-balance illuminant
Ruben Brunk76e4c7d2014-01-31 11:05:30 -08001134 estimation.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001135 <units>Pixel coordinates within android.sensor.info.activeArraySize</units>
1136 <range>Coordinates must be between `[(0,0), (width, height))` of
1137 android.sensor.info.activeArraySize</range>
Yin-Chia Yeh739effc2014-05-16 15:13:13 -07001138 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001139 Not available if android.control.maxRegionsAwb is 0.
Yin-Chia Yeh8554ed52014-09-04 09:33:34 -07001140 Otherwise will always be present.
1141
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001142 The maximum number of regions supported by the device is determined by the value
1143 of android.control.maxRegionsAwb.
1144
Yin-Chia Yeh739effc2014-05-16 15:13:13 -07001145 The coordinate system is based on the active pixel array,
1146 with (0,0) being the top-left pixel in the active pixel array, and
1147 (android.sensor.info.activeArraySize.width - 1,
1148 android.sensor.info.activeArraySize.height - 1) being the
Yin-Chia Yehdc182572014-05-14 14:05:20 -07001149 bottom-right pixel in the active pixel array.
1150
1151 The weight must range from 0 to 1000, and represents a weight
1152 for every pixel in the area. This means that a large metering area
1153 with the same weight as a smaller area will have more effect in
1154 the metering result. Metering areas can partially overlap and the
1155 camera device will add the weights in the overlap region.
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -07001156
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001157 The weights are relative to weights of other white balance metering regions, so if
1158 only one region is used, all non-zero weights will have the same effect. A region with
1159 0 weight is ignored.
1160
1161 If all regions have 0 weight, then no specific metering area needs to be used by the
1162 camera device.
1163
1164 If the metering region is outside the used android.scaler.cropRegion returned in
1165 capture result metadata, the camera device will ignore the sections outside the crop
1166 region and output only the intersection rectangle as the metering region in the result
1167 metadata. If the region is entirely outside the crop region, it will be ignored and
1168 not reported in the result metadata.
Ruben Brunk76e4c7d2014-01-31 11:05:30 -08001169 </details>
Yin-Chia Yeh739effc2014-05-16 15:13:13 -07001170 <hal_details>
1171 The HAL level representation of MeteringRectangle[] is a
1172 int[5 * area_count].
1173 Every five elements represent a metering region of
1174 (xmin, ymin, xmax, ymax, weight).
1175 The rectangle is defined to be inclusive on xmin and ymin, but
1176 exclusive on xmax and ymax.
1177 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001178 <tag id="BC" />
1179 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07001180 <entry name="captureIntent" type="byte" visibility="public" enum="true"
1181 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001182 <enum>
Igor Murashkine6b66462012-11-26 15:26:38 -08001183 <value>CUSTOM
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001184 <notes>The goal of this request doesn't fall into the other
1185 categories. The camera device will default to preview-like
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001186 behavior.</notes></value>
Igor Murashkine6b66462012-11-26 15:26:38 -08001187 <value>PREVIEW
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001188 <notes>This request is for a preview-like use case.
1189
1190 The precapture trigger may be used to start off a metering
1191 w/flash sequence.
1192 </notes></value>
Igor Murashkine6b66462012-11-26 15:26:38 -08001193 <value>STILL_CAPTURE
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001194 <notes>This request is for a still capture-type
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001195 use case.
1196
1197 If the flash unit is under automatic control, it may fire as needed.
1198 </notes></value>
Igor Murashkine6b66462012-11-26 15:26:38 -08001199 <value>VIDEO_RECORD
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001200 <notes>This request is for a video recording
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001201 use case.</notes></value>
Igor Murashkine6b66462012-11-26 15:26:38 -08001202 <value>VIDEO_SNAPSHOT
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001203 <notes>This request is for a video snapshot (still
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001204 image while recording video) use case.
1205
1206 The camera device should take the highest-quality image
1207 possible (given the other settings) without disrupting the
1208 frame rate of video recording. </notes></value>
Igor Murashkine6b66462012-11-26 15:26:38 -08001209 <value>ZERO_SHUTTER_LAG
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001210 <notes>This request is for a ZSL usecase; the
1211 application will stream full-resolution images and
1212 reprocess one or several later for a final
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001213 capture.
1214 </notes></value>
Zhijun Hee713fa62014-04-09 10:55:50 -07001215 <value>MANUAL
1216 <notes>This request is for manual capture use case where
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001217 the applications want to directly control the capture parameters.
1218
1219 For example, the application may wish to manually control
1220 android.sensor.exposureTime, android.sensor.sensitivity, etc.
Zhijun Hee713fa62014-04-09 10:55:50 -07001221 </notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001222 </enum>
Zhijun Heea27bc32014-01-15 13:47:59 -08001223 <description>Information to the camera device 3A (auto-exposure,
1224 auto-focus, auto-white balance) routines about the purpose
1225 of this capture, to help the camera device to decide optimal 3A
1226 strategy.</description>
Zhijun Hee713fa62014-04-09 10:55:50 -07001227 <details>This control (except for MANUAL) is only effective if
1228 `android.control.mode != OFF` and any 3A routine is active.
1229
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001230 ZERO_SHUTTER_LAG will be supported if android.request.availableCapabilities
1231 contains ZSL. MANUAL will be supported if android.request.availableCapabilities
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001232 contains MANUAL_SENSOR. Other intent values are always supported.
1233 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001234 <tag id="BC" />
1235 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07001236 <entry name="effectMode" type="byte" visibility="public" enum="true"
1237 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001238 <enum>
Ruben Brunkb28b35f2014-01-14 17:17:19 -08001239 <value>OFF
1240 <notes>
1241 No color effect will be applied.
1242 </notes>
1243 </value>
1244 <value optional="true">MONO
1245 <notes>
1246 A "monocolor" effect where the image is mapped into
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001247 a single color.
1248
1249 This will typically be grayscale.
Ruben Brunkb28b35f2014-01-14 17:17:19 -08001250 </notes>
1251 </value>
1252 <value optional="true">NEGATIVE
1253 <notes>
1254 A "photo-negative" effect where the image's colors
1255 are inverted.
1256 </notes>
1257 </value>
1258 <value optional="true">SOLARIZE
1259 <notes>
1260 A "solarisation" effect (Sabattier effect) where the
1261 image is wholly or partially reversed in
1262 tone.
1263 </notes>
1264 </value>
1265 <value optional="true">SEPIA
1266 <notes>
1267 A "sepia" effect where the image is mapped into warm
1268 gray, red, and brown tones.
1269 </notes>
1270 </value>
1271 <value optional="true">POSTERIZE
1272 <notes>
1273 A "posterization" effect where the image uses
1274 discrete regions of tone rather than a continuous
1275 gradient of tones.
1276 </notes>
1277 </value>
1278 <value optional="true">WHITEBOARD
1279 <notes>
1280 A "whiteboard" effect where the image is typically displayed
1281 as regions of white, with black or grey details.
1282 </notes>
1283 </value>
1284 <value optional="true">BLACKBOARD
1285 <notes>
1286 A "blackboard" effect where the image is typically displayed
1287 as regions of black, with white or grey details.
1288 </notes>
1289 </value>
1290 <value optional="true">AQUA
1291 <notes>
1292 An "aqua" effect where a blue hue is added to the image.
1293 </notes>
1294 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001295 </enum>
Ruben Brunkb28b35f2014-01-14 17:17:19 -08001296 <description>A special color effect to apply.</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001297 <range>android.control.availableEffects</range>
Ruben Brunkb28b35f2014-01-14 17:17:19 -08001298 <details>
1299 When this mode is set, a color effect will be applied
1300 to images produced by the camera device. The interpretation
1301 and implementation of these color effects is left to the
1302 implementor of the camera device, and should not be
1303 depended on to be consistent (or present) across all
1304 devices.
Ruben Brunkb28b35f2014-01-14 17:17:19 -08001305 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001306 <tag id="BC" />
1307 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07001308 <entry name="mode" type="byte" visibility="public" enum="true"
1309 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001310 <enum>
1311 <value>OFF
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001312 <notes>Full application control of pipeline.
1313
1314 All control by the device's metering and focusing (3A)
1315 routines is disabled, and no other settings in
1316 android.control.* have any effect, except that
1317 android.control.captureIntent may be used by the camera
1318 device to select post-processing values for processing
1319 blocks that do not allow for manual control, or are not
1320 exposed by the camera API.
1321
1322 However, the camera device's 3A routines may continue to
1323 collect statistics and update their internal state so that
1324 when control is switched to AUTO mode, good control values
1325 can be immediately applied.
1326 </notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001327 <value>AUTO
1328 <notes>Use settings for each individual 3A routine.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001329
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001330 Manual control of capture parameters is disabled. All
1331 controls in android.control.* besides sceneMode take
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001332 effect.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001333 <value>USE_SCENE_MODE
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001334 <notes>Use a specific scene mode.
1335
1336 Enabling this disables control.aeMode, control.awbMode and
1337 control.afMode controls; the camera device will ignore
1338 those settings while USE_SCENE_MODE is active (except for
1339 FACE_PRIORITY scene mode). Other control entries are still
1340 active. This setting can only be used if scene mode is
1341 supported (i.e. android.control.availableSceneModes
1342 contain some modes other than DISABLED).</notes></value>
Zhijun He4412faa2014-02-06 00:28:22 -08001343 <value>OFF_KEEP_STATE
1344 <notes>Same as OFF mode, except that this capture will not be
1345 used by camera device background auto-exposure, auto-white balance and
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001346 auto-focus algorithms (3A) to update their statistics.
1347
1348 Specifically, the 3A routines are locked to the last
1349 values set from a request with AUTO, OFF, or
1350 USE_SCENE_MODE, and any statistics or state updates
1351 collected from manual captures with OFF_KEEP_STATE will be
1352 discarded by the camera device.
1353 </notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001354 </enum>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001355 <description>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control
Zhijun He25b8ac52014-02-24 09:49:37 -08001356 routines.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001357 <details>
1358 This is a top-level 3A control switch. When set to OFF, all 3A control
Zhijun Hef90eeaf2014-01-16 12:13:35 -08001359 by the camera device is disabled. The application must set the fields for
Zhijun Hef5529232013-12-13 17:48:53 -08001360 capture parameters itself.
1361
1362 When set to AUTO, the individual algorithm controls in
1363 android.control.* are in effect, such as android.control.afMode.
1364
1365 When set to USE_SCENE_MODE, the individual controls in
Zhijun Hef90eeaf2014-01-16 12:13:35 -08001366 android.control.* are mostly disabled, and the camera device implements
Zhijun Hef5529232013-12-13 17:48:53 -08001367 one of the scene mode settings (such as ACTION, SUNSET, or PARTY)
Zhijun Hef90eeaf2014-01-16 12:13:35 -08001368 as it wishes. The camera device scene mode 3A settings are provided by
Zhijun He4412faa2014-02-06 00:28:22 -08001369 android.control.sceneModeOverrides.
1370
1371 When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
1372 is that this frame will not be used by camera device background 3A statistics
1373 update, as if this frame is never captured. This mode can be used in the scenario
1374 where the application doesn't want a 3A manual control capture to affect
1375 the subsequent auto 3A capture results.
Igor Murashkinca256272014-10-02 15:27:09 -07001376
1377 LEGACY mode devices will only support AUTO and USE_SCENE_MODE modes.
1378 LIMITED mode devices will only support OFF and OFF_KEEP_STATE if they
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001379 support the MANUAL_SENSOR and MANUAL_POST_PROCSESING capabilities.
1380 FULL mode devices will always support OFF and OFF_KEEP_STATE.
Zhijun He4412faa2014-02-06 00:28:22 -08001381 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001382 <tag id="BC" />
1383 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07001384 <entry name="sceneMode" type="byte" visibility="public" enum="true"
1385 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001386 <enum>
Ruben Brunk9e28ea72014-01-14 18:55:29 -08001387 <value id="0">DISABLED
1388 <notes>
1389 Indicates that no scene modes are set for a given capture request.
1390 </notes>
1391 </value>
Igor Murashkine6b66462012-11-26 15:26:38 -08001392 <value>FACE_PRIORITY
Ruben Brunk9e28ea72014-01-14 18:55:29 -08001393 <notes>If face detection support exists, use face
1394 detection data for auto-focus, auto-white balance, and
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001395 auto-exposure routines.
1396
1397 If face detection statistics are disabled
1398 (i.e. android.statistics.faceDetectMode is set to OFF),
Ruben Brunk9e28ea72014-01-14 18:55:29 -08001399 this should still operate correctly (but will not return
1400 face detection statistics to the framework).
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -07001401
Ruben Brunk9e28ea72014-01-14 18:55:29 -08001402 Unlike the other scene modes, android.control.aeMode,
1403 android.control.awbMode, and android.control.afMode
1404 remain active when FACE_PRIORITY is set.
1405 </notes>
1406 </value>
1407 <value optional="true">ACTION
1408 <notes>
1409 Optimized for photos of quickly moving objects.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001410
Ruben Brunk9e28ea72014-01-14 18:55:29 -08001411 Similar to SPORTS.
1412 </notes>
1413 </value>
1414 <value optional="true">PORTRAIT
1415 <notes>
1416 Optimized for still photos of people.
1417 </notes>
1418 </value>
1419 <value optional="true">LANDSCAPE
1420 <notes>
1421 Optimized for photos of distant macroscopic objects.
1422 </notes>
1423 </value>
1424 <value optional="true">NIGHT
1425 <notes>
1426 Optimized for low-light settings.
1427 </notes>
1428 </value>
1429 <value optional="true">NIGHT_PORTRAIT
1430 <notes>
1431 Optimized for still photos of people in low-light
1432 settings.
1433 </notes>
1434 </value>
1435 <value optional="true">THEATRE
1436 <notes>
1437 Optimized for dim, indoor settings where flash must
1438 remain off.
1439 </notes>
1440 </value>
1441 <value optional="true">BEACH
1442 <notes>
1443 Optimized for bright, outdoor beach settings.
1444 </notes>
1445 </value>
1446 <value optional="true">SNOW
1447 <notes>
1448 Optimized for bright, outdoor settings containing snow.
1449 </notes>
1450 </value>
1451 <value optional="true">SUNSET
1452 <notes>
1453 Optimized for scenes of the setting sun.
1454 </notes>
1455 </value>
1456 <value optional="true">STEADYPHOTO
1457 <notes>
1458 Optimized to avoid blurry photos due to small amounts of
1459 device motion (for example: due to hand shake).
1460 </notes>
1461 </value>
1462 <value optional="true">FIREWORKS
1463 <notes>
1464 Optimized for nighttime photos of fireworks.
1465 </notes>
1466 </value>
1467 <value optional="true">SPORTS
1468 <notes>
1469 Optimized for photos of quickly moving people.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001470
Ruben Brunk9e28ea72014-01-14 18:55:29 -08001471 Similar to ACTION.
1472 </notes>
1473 </value>
1474 <value optional="true">PARTY
1475 <notes>
1476 Optimized for dim, indoor settings with multiple moving
1477 people.
1478 </notes>
1479 </value>
1480 <value optional="true">CANDLELIGHT
1481 <notes>
1482 Optimized for dim settings where the main light source
1483 is a flame.
1484 </notes>
1485 </value>
1486 <value optional="true">BARCODE
1487 <notes>
1488 Optimized for accurately capturing a photo of barcode
1489 for use by camera applications that wish to read the
1490 barcode value.
1491 </notes>
1492 </value>
Zhijun He17f2d2c2014-06-10 18:21:34 -07001493 <value optional="true">HIGH_SPEED_VIDEO
1494 <notes>
1495 Optimized for high speed video recording (frame rate >=60fps) use case.
1496
1497 The supported high speed video sizes and fps ranges are specified in
1498 android.control.availableHighSpeedVideoConfigurations. To get desired
1499 output frame rates, the application is only allowed to select video size
1500 and fps range combinations listed in this static metadata. The fps range
1501 can be control via android.control.aeTargetFpsRange.
1502
1503 In this mode, the camera device will override aeMode, awbMode, and afMode to
1504 ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode
1505 controls will be overridden to be FAST. Therefore, no manual control of capture
1506 and post-processing parameters is possible. All other controls operate the
1507 same as when android.control.mode == AUTO. This means that all other
1508 android.control.* fields continue to work, such as
1509
1510 * android.control.aeTargetFpsRange
1511 * android.control.aeExposureCompensation
1512 * android.control.aeLock
1513 * android.control.awbLock
1514 * android.control.effectMode
1515 * android.control.aeRegions
1516 * android.control.afRegions
1517 * android.control.awbRegions
1518 * android.control.afTrigger
1519 * android.control.aePrecaptureTrigger
1520
1521 Outside of android.control.*, the following controls will work:
1522
1523 * android.flash.mode (automatic flash for still capture will not work since aeMode is ON)
1524 * android.lens.opticalStabilizationMode (if it is supported)
1525 * android.scaler.cropRegion
1526 * android.statistics.faceDetectMode
1527
1528 For high speed recording use case, the actual maximum supported frame rate may
1529 be lower than what camera can output, depending on the destination Surfaces for
1530 the image data. For example, if the destination surface is from video encoder,
1531 the application need check if the video encoder is capable of supporting the
1532 high frame rate for a given video size, or it will end up with lower recording
1533 frame rate. If the destination surface is from preview window, the preview frame
1534 rate will be bounded by the screen refresh rate.
1535
1536 The camera device will only support up to 2 output high speed streams
1537 (processed non-stalling format defined in android.request.maxNumOutputStreams)
1538 in this mode. This control will be effective only if all of below conditions are true:
1539
1540 * The application created no more than maxNumHighSpeedStreams processed non-stalling
1541 format output streams, where maxNumHighSpeedStreams is calculated as
1542 min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]).
1543 * The stream sizes are selected from the sizes reported by
1544 android.control.availableHighSpeedVideoConfigurations.
1545 * No processed non-stalling or raw streams are configured.
1546
1547 When above conditions are NOT satistied, the controls of this mode and
1548 android.control.aeTargetFpsRange will be ignored by the camera device,
1549 the camera device will fall back to android.control.mode `==` AUTO,
1550 and the returned capture result metadata will give the fps range choosen
1551 by the camera device.
1552
1553 Switching into or out of this mode may trigger some camera ISP/sensor
1554 reconfigurations, which may introduce extra latency. It is recommended that
1555 the application avoids unnecessary scene mode switch as much as possible.
1556 </notes>
1557 </value>
Ruben Brunk17b1dd52014-08-28 17:16:38 -07001558 <value optional="true" hidden="true">HDR
1559 <notes>
1560 Turn on custom high dynamic range (HDR) mode.
Igor Murashkinca256272014-10-02 15:27:09 -07001561
1562 This is intended for LEGACY mode devices only;
1563 HAL3+ camera devices should not implement this mode.
Ruben Brunk17b1dd52014-08-28 17:16:38 -07001564 </notes>
1565 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001566 </enum>
Ruben Brunk9e28ea72014-01-14 18:55:29 -08001567 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001568 Control for which scene mode is currently active.
Ruben Brunk9e28ea72014-01-14 18:55:29 -08001569 </description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001570 <range>android.control.availableSceneModes</range>
Ruben Brunk9e28ea72014-01-14 18:55:29 -08001571 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001572 Scene modes are custom camera modes optimized for a certain set of conditions and
1573 capture settings.
1574
Ruben Brunk9e28ea72014-01-14 18:55:29 -08001575 This is the mode that that is active when
1576 `android.control.mode == USE_SCENE_MODE`. Aside from FACE_PRIORITY,
1577 these modes will disable android.control.aeMode,
1578 android.control.awbMode, and android.control.afMode while in use.
1579
1580 The interpretation and implementation of these scene modes is left
1581 to the implementor of the camera device. Their behavior will not be
1582 consistent across all devices, and any given device may only implement
1583 a subset of these modes.
1584 </details>
1585 <hal_details>
1586 HAL implementations that include scene modes are expected to provide
1587 the per-scene settings to use for android.control.aeMode,
1588 android.control.awbMode, and android.control.afMode in
1589 android.control.sceneModeOverrides.
Zhijun He17f2d2c2014-06-10 18:21:34 -07001590
1591 For HIGH_SPEED_VIDEO mode, if it is included in android.control.availableSceneModes,
1592 the HAL must list supported video size and fps range in
1593 android.control.availableHighSpeedVideoConfigurations. For a given size, e.g.
1594 1280x720, if the HAL has two different sensor configurations for normal streaming
1595 mode and high speed streaming, when this scene mode is set/reset in a sequence of capture
1596 requests, the HAL may have to switch between different sensor modes.
Ruben Brunk9e28ea72014-01-14 18:55:29 -08001597 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001598 <tag id="BC" />
1599 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07001600 <entry name="videoStabilizationMode" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07001601 enum="true" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001602 <enum>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001603 <value>OFF
1604 <notes>
1605 Video stabilization is disabled.
1606 </notes></value>
1607 <value>ON
1608 <notes>
1609 Video stabilization is enabled.
1610 </notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001611 </enum>
1612 <description>Whether video stabilization is
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07001613 active.</description>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001614 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001615 Video stabilization automatically translates and scales images from
1616 the camera in order to stabilize motion between consecutive frames.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07001617
1618 If enabled, video stabilization can modify the
Zhijun He91449c82014-06-12 10:43:32 -07001619 android.scaler.cropRegion to keep the video stream stabilized.
1620
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001621 Switching between different video stabilization modes may take several
1622 frames to initialize, the camera device will report the current mode
1623 in capture result metadata. For example, When "ON" mode is requested,
1624 the video stabilization modes in the first several capture results may
1625 still be "OFF", and it will become "ON" when the initialization is
1626 done.
Zhijun He91449c82014-06-12 10:43:32 -07001627
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001628 If a camera device supports both this mode and OIS
1629 (android.lens.opticalStabilizationMode), turning both modes on may
1630 produce undesirable interaction, so it is recommended not to enable
1631 both at the same time.
Zhijun He91449c82014-06-12 10:43:32 -07001632 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001633 <tag id="BC" />
1634 </entry>
1635 </controls>
1636 <static>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07001637 <entry name="aeAvailableAntibandingModes" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07001638 type_notes="list of enums" container="array" typedef="enumList"
1639 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001640 <array>
1641 <size>n</size>
1642 </array>
Eino-Ville Talvala19ce2c12013-12-30 12:03:45 -08001643 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001644 List of auto-exposure antibanding modes for android.control.aeAntibandingMode that are
Eino-Ville Talvala19ce2c12013-12-30 12:03:45 -08001645 supported by this camera device.
1646 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001647 <range>Any value listed in android.control.aeAntibandingMode</range>
Eino-Ville Talvala19ce2c12013-12-30 12:03:45 -08001648 <details>
1649 Not all of the auto-exposure anti-banding modes may be
1650 supported by a given camera device. This field lists the
1651 valid anti-banding modes that the application may request
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001652 for this camera device with the
1653 android.control.aeAntibandingMode control. This list
1654 always includes AUTO.
Eino-Ville Talvala19ce2c12013-12-30 12:03:45 -08001655 </details>
Zhijun He5fb671c2014-05-21 17:51:05 -07001656 <tag id="BC" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001657 </entry>
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -08001658 <entry name="aeAvailableModes" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07001659 type_notes="list of enums" container="array" typedef="enumList"
1660 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001661 <array>
1662 <size>n</size>
1663 </array>
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -08001664 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001665 List of auto-exposure modes for android.control.aeMode that are supported by this camera
1666 device.
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -08001667 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001668 <range>Any value listed in android.control.aeMode</range>
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -08001669 <details>
1670 Not all the auto-exposure modes may be supported by a
1671 given camera device, especially if no flash unit is
1672 available. This entry lists the valid modes for
1673 android.control.aeMode for this camera device.
1674
Igor Murashkinca256272014-10-02 15:27:09 -07001675 All camera devices support ON, and all camera devices with flash
1676 units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -08001677
Ruben Brunk49e4f912014-03-04 14:09:44 -08001678 FULL mode camera devices always support OFF mode,
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -08001679 which enables application control of camera exposure time,
1680 sensitivity, and frame duration.
Igor Murashkinca256272014-10-02 15:27:09 -07001681
1682 LEGACY mode camera devices never support OFF mode.
1683 LIMITED mode devices support OFF if they support the MANUAL_SENSOR
1684 capability.
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -08001685 </details>
1686 <tag id="BC" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001687 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07001688 <entry name="aeAvailableTargetFpsRanges" type="int32" visibility="public"
1689 type_notes="list of pairs of frame rates"
Igor Murashkinca256272014-10-02 15:27:09 -07001690 container="array" typedef="rangeInt"
1691 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001692 <array>
1693 <size>2</size>
1694 <size>n</size>
1695 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001696 <description>List of frame rate ranges for android.control.aeTargetFpsRange supported by
1697 this camera device.</description>
1698 <units>Frames per second (FPS)</units>
1699 <details>
1700 For devices at the LIMITED level or above, this list will include at least (30, 30) for
1701 constant-framerate recording.
1702 </details>
Zhijun He5fb671c2014-05-21 17:51:05 -07001703 <tag id="BC" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001704 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07001705 <entry name="aeCompensationRange" type="int32" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07001706 container="array" typedef="rangeInt"
1707 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001708 <array>
1709 <size>2</size>
1710 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001711 <description>Maximum and minimum exposure compensation values for
1712 android.control.aeExposureCompensation, in counts of android.control.aeCompensationStep,
1713 that are supported by this camera device.</description>
1714 <range>
1715 `Min.exposure compensation * android.control.aeCompensationStep &lt;= -2 EV`
1716
1717 `Max.exposure compensation * android.control.aeCompensationStep &gt;= 2 EV`
1718 </range>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001719 <tag id="BC" />
1720 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07001721 <entry name="aeCompensationStep" type="rational" visibility="public"
1722 hwlevel="legacy">
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001723 <description>Smallest step by which the exposure compensation
1724 can be changed.</description>
1725 <units>Exposure Value (EV)</units>
1726 <details>
1727 This is the unit for android.control.aeExposureCompensation. For example, if this key has
1728 a value of `1/2`, then a setting of `-2` for android.control.aeExposureCompensation means
1729 that the target EV offset for the auto-exposure routine is -1 EV.
1730
1731 One unit of EV compensation changes the brightness of the captured image by a factor
1732 of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.
1733 </details>
1734 <hal_details>
1735 This must be less than or equal to 1/2.
1736 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001737 <tag id="BC" />
1738 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07001739 <entry name="afAvailableModes" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07001740 type_notes="List of enums" container="array" typedef="enumList"
1741 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001742 <array>
1743 <size>n</size>
1744 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001745 <description>
1746 List of auto-focus (AF) modes for android.control.afMode that are
1747 supported by this camera device.
1748 </description>
1749 <range>Any value listed in android.control.afMode</range>
Zhijun Hef163fa92014-01-14 09:59:04 -08001750 <details>
1751 Not all the auto-focus modes may be supported by a
1752 given camera device. This entry lists the valid modes for
1753 android.control.afMode for this camera device.
1754
Ruben Brunka5bcb402014-09-22 16:11:06 -07001755 All LIMITED and FULL mode camera devices will support OFF mode, and all
1756 camera devices with adjustable focuser units
1757 (`android.lens.info.minimumFocusDistance &gt; 0`) will support AUTO mode.
Igor Murashkinca256272014-10-02 15:27:09 -07001758
1759 LEGACY devices will support OFF mode only if they support
1760 focusing to infinity (by also setting android.lens.focusDistance to
1761 `0.0f`).
Zhijun Hef163fa92014-01-14 09:59:04 -08001762 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001763 <tag id="BC" />
1764 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07001765 <entry name="availableEffects" type="byte" visibility="public"
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -07001766 type_notes="List of enums (android.control.effectMode)." container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07001767 typedef="enumList" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001768 <array>
1769 <size>n</size>
1770 </array>
Ruben Brunkb28b35f2014-01-14 17:17:19 -08001771 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001772 List of color effects for android.control.effectMode that are supported by this camera
1773 device.
Ruben Brunkb28b35f2014-01-14 17:17:19 -08001774 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001775 <range>Any value listed in android.control.effectMode</range>
Ruben Brunkb28b35f2014-01-14 17:17:19 -08001776 <details>
1777 This list contains the color effect modes that can be applied to
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001778 images produced by the camera device.
Ruben Brunkb28b35f2014-01-14 17:17:19 -08001779 Implementations are not expected to be consistent across all devices.
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001780 If no color effect modes are available for a device, this will only list
1781 OFF.
Ruben Brunkb28b35f2014-01-14 17:17:19 -08001782
1783 A color effect will only be applied if
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001784 android.control.mode != OFF. OFF is always included in this list.
1785
1786 This control has no effect on the operation of other control routines such
1787 as auto-exposure, white balance, or focus.
Ruben Brunkb28b35f2014-01-14 17:17:19 -08001788 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001789 <tag id="BC" />
1790 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07001791 <entry name="availableSceneModes" type="byte" visibility="public"
Ruben Brunkbf870fc2014-01-14 17:46:58 -08001792 type_notes="List of enums (android.control.sceneMode)."
Igor Murashkinca256272014-10-02 15:27:09 -07001793 container="array" typedef="enumList" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001794 <array>
1795 <size>n</size>
1796 </array>
Ruben Brunkbf870fc2014-01-14 17:46:58 -08001797 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001798 List of scene modes for android.control.sceneMode that are supported by this camera
1799 device.
Ruben Brunkbf870fc2014-01-14 17:46:58 -08001800 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001801 <range>Any value listed in android.control.sceneMode</range>
Ruben Brunkbf870fc2014-01-14 17:46:58 -08001802 <details>
1803 This list contains scene modes that can be set for the camera device.
1804 Only scene modes that have been fully implemented for the
1805 camera device may be included here. Implementations are not expected
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001806 to be consistent across all devices.
1807
1808 If no scene modes are supported by the camera device, this
1809 will be set to DISABLED. Otherwise DISABLED will not be listed.
1810
1811 FACE_PRIORITY is always listed if face detection is
1812 supported (i.e.`android.statistics.info.maxFaceCount &gt;
1813 0`).
Ruben Brunkbf870fc2014-01-14 17:46:58 -08001814 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001815 <tag id="BC" />
1816 </entry>
1817 <entry name="availableVideoStabilizationModes" type="byte"
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -07001818 visibility="public" type_notes="List of enums." container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07001819 typedef="enumList" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001820 <array>
1821 <size>n</size>
1822 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001823 <description>
1824 List of video stabilization modes for android.control.videoStabilizationMode
1825 that are supported by this camera device.
1826 </description>
1827 <range>Any value listed in android.control.videoStabilizationMode</range>
1828 <details>
1829 OFF will always be listed.
1830 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001831 <tag id="BC" />
1832 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07001833 <entry name="awbAvailableModes" type="byte" visibility="public"
Zhijun He7787f7f2014-01-14 16:30:31 -08001834 type_notes="List of enums"
Igor Murashkinca256272014-10-02 15:27:09 -07001835 container="array" typedef="enumList" hwlevel="legacy">
Alex Raya4251d92013-04-30 16:43:44 -07001836 <array>
1837 <size>n</size>
1838 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001839 <description>
1840 List of auto-white-balance modes for android.control.awbMode that are supported by this
1841 camera device.
1842 </description>
1843 <range>Any value listed in android.control.awbMode</range>
Zhijun He7787f7f2014-01-14 16:30:31 -08001844 <details>
1845 Not all the auto-white-balance modes may be supported by a
1846 given camera device. This entry lists the valid modes for
1847 android.control.awbMode for this camera device.
1848
1849 All camera devices will support ON mode.
1850
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001851 Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF
1852 mode, which enables application control of white balance, by using
Zhijun He7787f7f2014-01-14 16:30:31 -08001853 android.colorCorrection.transform and android.colorCorrection.gains
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001854 (android.colorCorrection.mode must be set to TRANSFORM_MATRIX). This includes all FULL
1855 mode camera devices.
Zhijun He7787f7f2014-01-14 16:30:31 -08001856 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001857 <tag id="BC" />
1858 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07001859 <entry name="maxRegions" type="int32" visibility="hidden"
1860 container="array" hwlevel="legacy">
Ruben Brunk120eea42014-01-15 15:55:08 -08001861 <array>
1862 <size>3</size>
1863 </array>
1864 <description>
1865 List of the maximum number of regions that can be used for metering in
1866 auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF);
1867 this corresponds to the the maximum number of elements in
1868 android.control.aeRegions, android.control.awbRegions,
1869 and android.control.afRegions.
1870 </description>
1871 <range>
1872 Value must be &amp;gt;= 0 for each element. For full-capability devices
1873 this value must be &amp;gt;= 1 for AE and AF. The order of the elements is:
1874 `(AE, AWB, AF)`.</range>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001875 <tag id="BC" />
1876 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07001877 <entry name="maxRegionsAe" type="int32" visibility="public"
1878 synthetic="true" hwlevel="legacy">
Igor Murashkin35a108f2014-05-27 10:51:25 -07001879 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001880 The maximum number of metering regions that can be used by the auto-exposure (AE)
1881 routine.
Igor Murashkin35a108f2014-05-27 10:51:25 -07001882 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001883 <range>Value will be &amp;gt;= 0. For FULL-capability devices, this
Igor Murashkin35a108f2014-05-27 10:51:25 -07001884 value will be &amp;gt;= 1.
1885 </range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001886 <details>
1887 This corresponds to the the maximum allowed number of elements in
1888 android.control.aeRegions.
1889 </details>
Igor Murashkin35a108f2014-05-27 10:51:25 -07001890 <hal_details>This entry is private to the framework. Fill in
1891 maxRegions to have this entry be automatically populated.
1892 </hal_details>
1893 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07001894 <entry name="maxRegionsAwb" type="int32" visibility="public"
1895 synthetic="true" hwlevel="legacy">
Igor Murashkin35a108f2014-05-27 10:51:25 -07001896 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001897 The maximum number of metering regions that can be used by the auto-white balance (AWB)
1898 routine.
Igor Murashkin35a108f2014-05-27 10:51:25 -07001899 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001900 <range>Value will be &amp;gt;= 0.
Igor Murashkin35a108f2014-05-27 10:51:25 -07001901 </range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001902 <details>
1903 This corresponds to the the maximum allowed number of elements in
1904 android.control.awbRegions.
1905 </details>
Igor Murashkin35a108f2014-05-27 10:51:25 -07001906 <hal_details>This entry is private to the framework. Fill in
1907 maxRegions to have this entry be automatically populated.
1908 </hal_details>
1909 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07001910 <entry name="maxRegionsAf" type="int32" visibility="public"
1911 synthetic="true" hwlevel="legacy">
Igor Murashkin35a108f2014-05-27 10:51:25 -07001912 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001913 The maximum number of metering regions that can be used by the auto-focus (AF) routine.
Igor Murashkin35a108f2014-05-27 10:51:25 -07001914 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001915 <range>Value will be &amp;gt;= 0. For FULL-capability devices, this
Igor Murashkin35a108f2014-05-27 10:51:25 -07001916 value will be &amp;gt;= 1.
1917 </range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07001918 <details>
1919 This corresponds to the the maximum allowed number of elements in
1920 android.control.afRegions.
1921 </details>
Igor Murashkin35a108f2014-05-27 10:51:25 -07001922 <hal_details>This entry is private to the framework. Fill in
1923 maxRegions to have this entry be automatically populated.
1924 </hal_details>
1925 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07001926 <entry name="sceneModeOverrides" type="byte" visibility="system"
Igor Murashkinca256272014-10-02 15:27:09 -07001927 container="array" hwlevel="limited">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001928 <array>
1929 <size>3</size>
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -07001930 <size>length(availableSceneModes)</size>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001931 </array>
Ruben Brunkcf77fe92014-01-14 19:31:21 -08001932 <description>
1933 Ordered list of auto-exposure, auto-white balance, and auto-focus
1934 settings to use with each available scene mode.
1935 </description>
1936 <range>
1937 For each available scene mode, the list must contain three
1938 entries containing the android.control.aeMode,
1939 android.control.awbMode, and android.control.afMode values used
1940 by the camera device. The entry order is `(aeMode, awbMode, afMode)`
1941 where aeMode has the lowest index position.
1942 </range>
1943 <details>
1944 When a scene mode is enabled, the camera device is expected
1945 to override android.control.aeMode, android.control.awbMode,
1946 and android.control.afMode with its preferred settings for
1947 that scene mode.
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -07001948
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -07001949 The order of this list matches that of availableSceneModes,
Ruben Brunkcf77fe92014-01-14 19:31:21 -08001950 with 3 entries for each mode. The overrides listed
1951 for FACE_PRIORITY are ignored, since for that
1952 mode the application-set android.control.aeMode,
1953 android.control.awbMode, and android.control.afMode values are
1954 used instead, matching the behavior when android.control.mode
1955 is set to AUTO. It is recommended that the FACE_PRIORITY
1956 overrides should be set to 0.
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -07001957
Ruben Brunkcf77fe92014-01-14 19:31:21 -08001958 For example, if availableSceneModes contains
1959 `(FACE_PRIORITY, ACTION, NIGHT)`, then the camera framework
1960 expects sceneModeOverrides to have 9 entries formatted like:
1961 `(0, 0, 0, ON_AUTO_FLASH, AUTO, CONTINUOUS_PICTURE,
1962 ON_AUTO_FLASH, INCANDESCENT, AUTO)`.
1963 </details>
1964 <hal_details>
1965 To maintain backward compatibility, this list will be made available
1966 in the static metadata of the camera service. The camera service will
1967 use these values to set android.control.aeMode,
1968 android.control.awbMode, and android.control.afMode when using a scene
1969 mode other than FACE_PRIORITY.
1970 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001971 <tag id="BC" />
1972 </entry>
1973 </static>
1974 <dynamic>
Igor Murashkin6c936c12014-05-13 14:51:49 -07001975 <entry name="aePrecaptureId" type="int32" visibility="system" deprecated="true">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001976 <description>The ID sent with the latest
1977 CAMERA2_TRIGGER_PRECAPTURE_METERING call</description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08001978 <details>Must be 0 if no
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001979 CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet
1980 by HAL. Always updated even if AE algorithm ignores the
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08001981 trigger</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001982 </entry>
Zhijun He602d3702014-05-02 17:38:15 -07001983 <clone entry="android.control.aeAntibandingMode" kind="controls">
1984 </clone>
1985 <clone entry="android.control.aeExposureCompensation" kind="controls">
1986 </clone>
1987 <clone entry="android.control.aeLock" kind="controls">
1988 </clone>
Eino-Ville Talvala9fa0d902014-01-08 16:16:53 -08001989 <clone entry="android.control.aeMode" kind="controls">
1990 </clone>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001991 <clone entry="android.control.aeRegions" kind="controls">
1992 </clone>
Zhijun He602d3702014-05-02 17:38:15 -07001993 <clone entry="android.control.aeTargetFpsRange" kind="controls">
1994 </clone>
1995 <clone entry="android.control.aePrecaptureTrigger" kind="controls">
1996 </clone>
Igor Murashkinca256272014-10-02 15:27:09 -07001997 <entry name="aeState" type="byte" visibility="public" enum="true"
1998 hwlevel="limited">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08001999 <enum>
2000 <value>INACTIVE
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002001 <notes>AE is off or recently reset.
2002
2003 When a camera device is opened, it starts in
Zhijun He3fc95122014-02-11 17:18:29 -08002004 this state. This is a transient state, the camera device may skip reporting
2005 this state in capture result.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002006 <value>SEARCHING
2007 <notes>AE doesn't yet have a good set of control values
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002008 for the current scene.
2009
2010 This is a transient state, the camera device may skip
Zhijun He3fc95122014-02-11 17:18:29 -08002011 reporting this state in capture result.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002012 <value>CONVERGED
2013 <notes>AE has a good set of control values for the
Zhijun He92e698d2014-01-13 16:24:31 -08002014 current scene.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002015 <value>LOCKED
Zhijun He92e698d2014-01-13 16:24:31 -08002016 <notes>AE has been locked.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002017 <value>FLASH_REQUIRED
2018 <notes>AE has a good set of control values, but flash
2019 needs to be fired for good quality still
Zhijun He92e698d2014-01-13 16:24:31 -08002020 capture.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002021 <value>PRECAPTURE
2022 <notes>AE has been asked to do a precapture sequence
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002023 and is currently executing it.
2024
2025 Precapture can be triggered through setting
2026 android.control.aePrecaptureTrigger to START.
2027
2028 Once PRECAPTURE completes, AE will transition to CONVERGED
2029 or FLASH_REQUIRED as appropriate. This is a transient
2030 state, the camera device may skip reporting this state in
2031 capture result.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002032 </enum>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002033 <description>Current state of the auto-exposure (AE) algorithm.</description>
Zhijun He92e698d2014-01-13 16:24:31 -08002034 <details>Switching between or enabling AE modes (android.control.aeMode) always
2035 resets the AE state to INACTIVE. Similarly, switching between android.control.mode,
2036 or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all
2037 the algorithm states to INACTIVE.
2038
2039 The camera device can do several state transitions between two results, if it is
2040 allowed by the state transition table. For example: INACTIVE may never actually be
2041 seen in a result.
2042
2043 The state in the result is the state for this image (in sync with this image): if
2044 AE state becomes CONVERGED, then the image data associated with this result should
2045 be good to use.
2046
2047 Below are state transition tables for different AE modes.
2048
2049 State | Transition Cause | New State | Notes
2050 :------------:|:----------------:|:---------:|:-----------------------:
2051 INACTIVE | | INACTIVE | Camera device auto exposure algorithm is disabled
2052
2053 When android.control.aeMode is AE_MODE_ON_*:
2054
2055 State | Transition Cause | New State | Notes
2056 :-------------:|:--------------------------------------------:|:--------------:|:-----------------:
2057 INACTIVE | Camera device initiates AE scan | SEARCHING | Values changing
2058 INACTIVE | android.control.aeLock is ON | LOCKED | Values locked
2059 SEARCHING | Camera device finishes AE scan | CONVERGED | Good values, not changing
2060 SEARCHING | Camera device finishes AE scan | FLASH_REQUIRED | Converged but too dark w/o flash
2061 SEARCHING | android.control.aeLock is ON | LOCKED | Values locked
2062 CONVERGED | Camera device initiates AE scan | SEARCHING | Values changing
2063 CONVERGED | android.control.aeLock is ON | LOCKED | Values locked
2064 FLASH_REQUIRED | Camera device initiates AE scan | SEARCHING | Values changing
2065 FLASH_REQUIRED | android.control.aeLock is ON | LOCKED | Values locked
2066 LOCKED | android.control.aeLock is OFF | SEARCHING | Values not good after unlock
2067 LOCKED | android.control.aeLock is OFF | CONVERGED | Values good after unlock
2068 LOCKED | android.control.aeLock is OFF | FLASH_REQUIRED | Exposure good, but too dark
2069 PRECAPTURE | Sequence done. android.control.aeLock is OFF | CONVERGED | Ready for high-quality capture
2070 PRECAPTURE | Sequence done. android.control.aeLock is ON | LOCKED | Ready for high-quality capture
2071 Any state | android.control.aePrecaptureTrigger is START | PRECAPTURE | Start AE precapture metering sequence
Zhijun He3fc95122014-02-11 17:18:29 -08002072
2073 For the above table, the camera device may skip reporting any state changes that happen
2074 without application intervention (i.e. mode switch, trigger, locking). Any state that
2075 can be skipped in that manner is called a transient state.
2076
2077 For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions
2078 listed in above table, it is also legal for the camera device to skip one or more
2079 transient states between two results. See below table for examples:
2080
2081 State | Transition Cause | New State | Notes
2082 :-------------:|:-----------------------------------------------------------:|:--------------:|:-----------------:
2083 INACTIVE | Camera device finished AE scan | CONVERGED | Values are already good, transient states are skipped by camera device.
2084 Any state | 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.
2085 Any state | android.control.aePrecaptureTrigger is START, sequence done | CONVERGED | Converged after a precapture sequence, transient states are skipped by camera device.
2086 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.
2087 FLASH_REQUIRED | Camera device finished AE scan | CONVERGED | Converged after a new scan, transient states are skipped by camera device.
Zhijun He92e698d2014-01-13 16:24:31 -08002088 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002089 </entry>
2090 <clone entry="android.control.afMode" kind="controls">
2091 </clone>
2092 <clone entry="android.control.afRegions" kind="controls">
2093 </clone>
Zhijun He602d3702014-05-02 17:38:15 -07002094 <clone entry="android.control.afTrigger" kind="controls">
2095 </clone>
Igor Murashkinca256272014-10-02 15:27:09 -07002096 <entry name="afState" type="byte" visibility="public" enum="true"
2097 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002098 <enum>
2099 <value>INACTIVE
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002100 <notes>AF is off or has not yet tried to scan/been asked
2101 to scan.
2102
2103 When a camera device is opened, it starts in this
2104 state. This is a transient state, the camera device may
2105 skip reporting this state in capture
2106 result.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002107 <value>PASSIVE_SCAN
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002108 <notes>AF is currently performing an AF scan initiated the
2109 camera device in a continuous autofocus mode.
2110
2111 Only used by CONTINUOUS_* AF modes. This is a transient
2112 state, the camera device may skip reporting this state in
2113 capture result.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002114 <value>PASSIVE_FOCUSED
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002115 <notes>AF currently believes it is in focus, but may
2116 restart scanning at any time.
2117
2118 Only used by CONTINUOUS_* AF modes. This is a transient
2119 state, the camera device may skip reporting this state in
2120 capture result.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002121 <value>ACTIVE_SCAN
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002122 <notes>AF is performing an AF scan because it was
2123 triggered by AF trigger.
2124
2125 Only used by AUTO or MACRO AF modes. This is a transient
2126 state, the camera device may skip reporting this state in
2127 capture result.</notes></value>
Igor Murashkine6b66462012-11-26 15:26:38 -08002128 <value>FOCUSED_LOCKED
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002129 <notes>AF believes it is focused correctly and has locked
2130 focus.
2131
2132 This state is reached only after an explicit START AF trigger has been
2133 sent (android.control.afTrigger), when good focus has been obtained.
2134
2135 The lens will remain stationary until the AF mode (android.control.afMode) is changed or
2136 a new AF trigger is sent to the camera device (android.control.afTrigger).
2137 </notes></value>
Igor Murashkine6b66462012-11-26 15:26:38 -08002138 <value>NOT_FOCUSED_LOCKED
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002139 <notes>AF has failed to focus successfully and has locked
2140 focus.
2141
2142 This state is reached only after an explicit START AF trigger has been
2143 sent (android.control.afTrigger), when good focus cannot be obtained.
2144
2145 The lens will remain stationary until the AF mode (android.control.afMode) is changed or
2146 a new AF trigger is sent to the camera device (android.control.afTrigger).
2147 </notes></value>
Eino-Ville Talvala492ba7c2013-09-20 17:24:00 -07002148 <value>PASSIVE_UNFOCUSED
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002149 <notes>AF finished a passive scan without finding focus,
2150 and may restart scanning at any time.
2151
2152 Only used by CONTINUOUS_* AF modes. This is a transient state, the camera
Igor Murashkinca256272014-10-02 15:27:09 -07002153 device may skip reporting this state in capture result.
2154
2155 LEGACY camera devices do not support this state. When a passive
2156 scan has finished, it will always go to PASSIVE_FOCUSED.
2157 </notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002158 </enum>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07002159 <description>Current state of auto-focus (AF) algorithm.</description>
Zhijun He92e698d2014-01-13 16:24:31 -08002160 <details>
2161 Switching between or enabling AF modes (android.control.afMode) always
2162 resets the AF state to INACTIVE. Similarly, switching between android.control.mode,
2163 or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all
2164 the algorithm states to INACTIVE.
2165
2166 The camera device can do several state transitions between two results, if it is
2167 allowed by the state transition table. For example: INACTIVE may never actually be
2168 seen in a result.
2169
2170 The state in the result is the state for this image (in sync with this image): if
2171 AF state becomes FOCUSED, then the image data associated with this result should
2172 be sharp.
2173
2174 Below are state transition tables for different AF modes.
2175
2176 When android.control.afMode is AF_MODE_OFF or AF_MODE_EDOF:
2177
2178 State | Transition Cause | New State | Notes
2179 :------------:|:----------------:|:---------:|:-----------:
2180 INACTIVE | | INACTIVE | Never changes
2181
2182 When android.control.afMode is AF_MODE_AUTO or AF_MODE_MACRO:
2183
2184 State | Transition Cause | New State | Notes
2185 :-----------------:|:----------------:|:------------------:|:--------------:
2186 INACTIVE | AF_TRIGGER | ACTIVE_SCAN | Start AF sweep, Lens now moving
2187 ACTIVE_SCAN | AF sweep done | FOCUSED_LOCKED | Focused, Lens now locked
2188 ACTIVE_SCAN | AF sweep done | NOT_FOCUSED_LOCKED | Not focused, Lens now locked
2189 ACTIVE_SCAN | AF_CANCEL | INACTIVE | Cancel/reset AF, Lens now locked
2190 FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF
2191 FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving
2192 NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF
2193 NOT_FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving
2194 Any state | Mode change | INACTIVE |
2195
Zhijun He3fc95122014-02-11 17:18:29 -08002196 For the above table, the camera device may skip reporting any state changes that happen
2197 without application intervention (i.e. mode switch, trigger, locking). Any state that
2198 can be skipped in that manner is called a transient state.
2199
2200 For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
2201 state transitions listed in above table, it is also legal for the camera device to skip
2202 one or more transient states between two results. See below table for examples:
2203
2204 State | Transition Cause | New State | Notes
2205 :-----------------:|:----------------:|:------------------:|:--------------:
2206 INACTIVE | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked.
2207 INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked.
2208 FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked.
2209 NOT_FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is good after a scan, lens is not locked.
2210
2211
Zhijun He92e698d2014-01-13 16:24:31 -08002212 When android.control.afMode is AF_MODE_CONTINUOUS_VIDEO:
2213
2214 State | Transition Cause | New State | Notes
2215 :-----------------:|:-----------------------------------:|:------------------:|:--------------:
2216 INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
2217 INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
2218 PASSIVE_SCAN | Camera device completes current scan| PASSIVE_FOCUSED | End AF scan, Lens now locked
2219 PASSIVE_SCAN | Camera device fails current scan | PASSIVE_UNFOCUSED | End AF scan, Lens now locked
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002220 PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, if focus is good. Lens now locked
2221 PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate transition, if focus is bad. Lens now locked
Zhijun He92e698d2014-01-13 16:24:31 -08002222 PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked
2223 PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
2224 PASSIVE_UNFOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002225 PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, lens now locked
2226 PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked
Zhijun He92e698d2014-01-13 16:24:31 -08002227 FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect
2228 FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan
2229 NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect
2230 NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan
2231
2232 When android.control.afMode is AF_MODE_CONTINUOUS_PICTURE:
2233
2234 State | Transition Cause | New State | Notes
2235 :-----------------:|:------------------------------------:|:------------------:|:--------------:
2236 INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
2237 INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked
2238 PASSIVE_SCAN | Camera device completes current scan | PASSIVE_FOCUSED | End AF scan, Lens now locked
2239 PASSIVE_SCAN | Camera device fails current scan | PASSIVE_UNFOCUSED | End AF scan, Lens now locked
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002240 PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Eventual transition once the focus is good. Lens now locked
2241 PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Eventual transition if cannot find focus. Lens now locked
Zhijun He92e698d2014-01-13 16:24:31 -08002242 PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked
2243 PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
2244 PASSIVE_UNFOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving
2245 PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate trans. Lens now locked
2246 PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked
2247 FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect
2248 FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan
2249 NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect
2250 NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan
Zhijun He3fc95122014-02-11 17:18:29 -08002251
2252 When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
2253 (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
2254 camera device. When a trigger is included in a mode switch request, the trigger
2255 will be evaluated in the context of the new mode in the request.
2256 See below table for examples:
2257
2258 State | Transition Cause | New State | Notes
2259 :-----------:|:--------------------------------------:|:----------------------------------------:|:--------------:
2260 any state | CAF-->AUTO mode switch | INACTIVE | Mode switch without trigger, initial state must be INACTIVE
2261 any state | CAF-->AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE | Mode switch with trigger, INACTIVE is skipped
2262 any state | AUTO-->CAF mode switch | passively reachable states from INACTIVE | Mode switch without trigger, passive transient state is skipped
Zhijun He92e698d2014-01-13 16:24:31 -08002263 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002264 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07002265 <entry name="afTriggerId" type="int32" visibility="system" deprecated="true">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002266 <description>The ID sent with the latest
2267 CAMERA2_TRIGGER_AUTOFOCUS call</description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08002268 <details>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002269 received yet by HAL. Always updated even if AF algorithm
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08002270 ignores the trigger</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002271 </entry>
Zhijun He602d3702014-05-02 17:38:15 -07002272 <clone entry="android.control.awbLock" kind="controls">
2273 </clone>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002274 <clone entry="android.control.awbMode" kind="controls">
2275 </clone>
2276 <clone entry="android.control.awbRegions" kind="controls">
2277 </clone>
Zhijun He602d3702014-05-02 17:38:15 -07002278 <clone entry="android.control.captureIntent" kind="controls">
2279 </clone>
Igor Murashkinca256272014-10-02 15:27:09 -07002280 <entry name="awbState" type="byte" visibility="public" enum="true"
2281 hwlevel="limited">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002282 <enum>
2283 <value>INACTIVE
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002284 <notes>AWB is not in auto mode, or has not yet started metering.
2285
2286 When a camera device is opened, it starts in this
2287 state. This is a transient state, the camera device may
2288 skip reporting this state in capture
2289 result.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002290 <value>SEARCHING
2291 <notes>AWB doesn't yet have a good set of control
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002292 values for the current scene.
2293
2294 This is a transient state, the camera device
Zhijun He3fc95122014-02-11 17:18:29 -08002295 may skip reporting this state in capture result.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002296 <value>CONVERGED
2297 <notes>AWB has a good set of control values for the
Zhijun He92e698d2014-01-13 16:24:31 -08002298 current scene.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002299 <value>LOCKED
Zhijun He92e698d2014-01-13 16:24:31 -08002300 <notes>AWB has been locked.
2301 </notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002302 </enum>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07002303 <description>Current state of auto-white balance (AWB) algorithm.</description>
Zhijun He92e698d2014-01-13 16:24:31 -08002304 <details>Switching between or enabling AWB modes (android.control.awbMode) always
2305 resets the AWB state to INACTIVE. Similarly, switching between android.control.mode,
2306 or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all
2307 the algorithm states to INACTIVE.
2308
2309 The camera device can do several state transitions between two results, if it is
2310 allowed by the state transition table. So INACTIVE may never actually be seen in
2311 a result.
2312
2313 The state in the result is the state for this image (in sync with this image): if
2314 AWB state becomes CONVERGED, then the image data associated with this result should
2315 be good to use.
2316
2317 Below are state transition tables for different AWB modes.
2318
2319 When `android.control.awbMode != AWB_MODE_AUTO`:
2320
2321 State | Transition Cause | New State | Notes
2322 :------------:|:----------------:|:---------:|:-----------------------:
2323 INACTIVE | |INACTIVE |Camera device auto white balance algorithm is disabled
2324
2325 When android.control.awbMode is AWB_MODE_AUTO:
2326
2327 State | Transition Cause | New State | Notes
2328 :-------------:|:--------------------------------:|:-------------:|:-----------------:
2329 INACTIVE | Camera device initiates AWB scan | SEARCHING | Values changing
2330 INACTIVE | android.control.awbLock is ON | LOCKED | Values locked
2331 SEARCHING | Camera device finishes AWB scan | CONVERGED | Good values, not changing
2332 SEARCHING | android.control.awbLock is ON | LOCKED | Values locked
2333 CONVERGED | Camera device initiates AWB scan | SEARCHING | Values changing
2334 CONVERGED | android.control.awbLock is ON | LOCKED | Values locked
2335 LOCKED | android.control.awbLock is OFF | SEARCHING | Values not good after unlock
Zhijun He3fc95122014-02-11 17:18:29 -08002336
2337 For the above table, the camera device may skip reporting any state changes that happen
2338 without application intervention (i.e. mode switch, trigger, locking). Any state that
2339 can be skipped in that manner is called a transient state.
2340
2341 For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
2342 listed in above table, it is also legal for the camera device to skip one or more
2343 transient states between two results. See below table for examples:
2344
2345 State | Transition Cause | New State | Notes
2346 :-------------:|:--------------------------------:|:-------------:|:-----------------:
2347 INACTIVE | Camera device finished AWB scan | CONVERGED | Values are already good, transient states are skipped by camera device.
2348 LOCKED | android.control.awbLock is OFF | CONVERGED | Values good after unlock, transient states are skipped by camera device.
Zhijun He92e698d2014-01-13 16:24:31 -08002349 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002350 </entry>
Zhijun He602d3702014-05-02 17:38:15 -07002351 <clone entry="android.control.effectMode" kind="controls">
2352 </clone>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002353 <clone entry="android.control.mode" kind="controls">
2354 </clone>
Zhijun He602d3702014-05-02 17:38:15 -07002355 <clone entry="android.control.sceneMode" kind="controls">
2356 </clone>
2357 <clone entry="android.control.videoStabilizationMode" kind="controls">
2358 </clone>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002359 </dynamic>
Zhijun He17f2d2c2014-06-10 18:21:34 -07002360 <static>
2361 <entry name="availableHighSpeedVideoConfigurations" type="int32" visibility="hidden"
Igor Murashkinca256272014-10-02 15:27:09 -07002362 container="array" typedef="highSpeedVideoConfiguration" hwlevel="limited">
Zhijun He17f2d2c2014-06-10 18:21:34 -07002363 <array>
2364 <size>4</size>
2365 <size>n</size>
2366 </array>
2367 <description>
2368 List of available high speed video size and fps range configurations
2369 supported by the camera device, in the format of (width, height, fps_min, fps_max).
2370 </description>
2371 <range>
2372 For each configuration, the fps_max &amp;gt;= 60fps.
2373 </range>
2374 <details>
2375 When HIGH_SPEED_VIDEO is supported in android.control.availableSceneModes,
2376 this metadata will list the supported high speed video size and fps range
2377 configurations. All the sizes listed in this configuration will be a subset
2378 of the sizes reported by StreamConfigurationMap#getOutputSizes for processed
2379 non-stalling formats.
2380
2381 For the high speed video use case, where the application will set
2382 android.control.sceneMode to HIGH_SPEED_VIDEO in capture requests, the application must
2383 select the video size and fps range from this metadata to configure the recording and
2384 preview streams and setup the recording requests. For example, if the application intends
2385 to do high speed recording, it can select the maximum size reported by this metadata to
2386 configure output streams. Once the size is selected, application can filter this metadata
2387 by selected size and get the supported fps ranges, and use these fps ranges to setup the
Yin-Chia Yeh35bdd4b2014-07-15 10:42:05 -07002388 recording requests. Note that for the use case of multiple output streams, application
2389 must select one unique size from this metadata to use. Otherwise a request error might
2390 occur.
Zhijun He17f2d2c2014-06-10 18:21:34 -07002391
2392 For normal video recording use case, where some application will NOT set
2393 android.control.sceneMode to HIGH_SPEED_VIDEO in capture requests, the fps ranges
2394 reported in this metadata must not be used to setup capture requests, or it will cause
2395 request error.
2396 </details>
2397 <hal_details>
2398 All the sizes listed in this configuration will be a subset of the sizes reported by
2399 android.scaler.availableStreamConfigurations for processed non-stalling output formats.
Yin-Chia Yeh35bdd4b2014-07-15 10:42:05 -07002400 Note that for all high speed video configurations, HAL must be able to support a minimum
2401 of two streams, though the application might choose to configure just one stream.
Zhijun He17f2d2c2014-06-10 18:21:34 -07002402
2403 Since the HIGH_SPEED_VIDEO mode may be turned on for preview view only case, the preview
2404 fps is bounded by device refresh rate (e.g. 60fps). For a given resolution, it is
2405 recommended that this list includes some fps ranges (e.g. [30, 60]) that is suitable
2406 for preview only streaming case.
2407 </hal_details>
2408 <tag id="V1" />
2409 </entry>
2410 </static>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002411 </section>
2412 <section name="demosaic">
2413 <controls>
Igor Murashkinb556bc42012-12-04 16:07:21 -08002414 <entry name="mode" type="byte" enum="true">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002415 <enum>
2416 <value>FAST
2417 <notes>Minimal or no slowdown of frame rate compared to
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002418 Bayer RAW output.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002419 <value>HIGH_QUALITY
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002420 <notes>Improved processing quality but the frame rate is slowed down
2421 relative to raw output.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002422 </enum>
2423 <description>Controls the quality of the demosaicing
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002424 processing.</description>
Zhijun He66e62a42014-05-23 11:02:34 -07002425 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002426 </entry>
2427 </controls>
2428 </section>
2429 <section name="edge">
2430 <controls>
Igor Murashkinca256272014-10-02 15:27:09 -07002431 <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002432 <enum>
2433 <value>OFF
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002434 <notes>No edge enhancement is applied.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002435 <value>FAST
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002436 <notes>Apply edge enhancement at a quality level that does not slow down frame rate relative to sensor
Zhijun Heb1c5bab2013-12-16 15:08:14 -08002437 output</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002438 <value>HIGH_QUALITY
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002439 <notes>Apply high-quality edge enhancement, at a cost of reducing output frame rate.
2440 </notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002441 </enum>
2442 <description>Operation mode for edge
Zhijun He25b8ac52014-02-24 09:49:37 -08002443 enhancement.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002444 <range>android.edge.availableEdgeModes</range>
2445 <details>Edge enhancement improves sharpness and details in the captured image. OFF means
2446 no enhancement will be applied by the camera device.
Ruben Brunkd14f7162014-03-04 15:01:25 -08002447
Zhijun Hef90eeaf2014-01-16 12:13:35 -08002448 FAST/HIGH_QUALITY both mean camera device determined enhancement
Zhijun Heb1c5bab2013-12-16 15:08:14 -08002449 will be applied. HIGH_QUALITY mode indicates that the
Zhijun Hef90eeaf2014-01-16 12:13:35 -08002450 camera device will use the highest-quality enhancement algorithms,
2451 even if it slows down capture rate. FAST means the camera device will
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08002452 not slow down capture rate when applying edge enhancement.</details>
Ruben Brunkd14f7162014-03-04 15:01:25 -08002453 <tag id="V1" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002454 </entry>
2455 <entry name="strength" type="byte">
2456 <description>Control the amount of edge enhancement
2457 applied to the images</description>
2458 <units>1-10; 10 is maximum sharpening</units>
Zhijun He66e62a42014-05-23 11:02:34 -07002459 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002460 </entry>
2461 </controls>
Ruben Brunkd14f7162014-03-04 15:01:25 -08002462 <static>
2463 <entry name="availableEdgeModes" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07002464 type_notes="list of enums" container="array" typedef="enumList"
2465 hwlevel="full">
Ruben Brunkd14f7162014-03-04 15:01:25 -08002466 <array>
2467 <size>n</size>
2468 </array>
2469 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002470 List of edge enhancement modes for android.edge.mode that are supported by this camera
2471 device.
Ruben Brunkd14f7162014-03-04 15:01:25 -08002472 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002473 <range>Any value listed in android.edge.mode</range>
Ruben Brunkd14f7162014-03-04 15:01:25 -08002474 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002475 Full-capability camera devices must always support OFF; all devices will list FAST.
Ruben Brunkd14f7162014-03-04 15:01:25 -08002476 </details>
2477 <tag id="V1" />
2478 </entry>
2479 </static>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002480 <dynamic>
Ruben Brunkd14f7162014-03-04 15:01:25 -08002481 <clone entry="android.edge.mode" kind="controls">
2482 <tag id="V1" />
2483 </clone>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002484 </dynamic>
2485 </section>
2486 <section name="flash">
2487 <controls>
2488 <entry name="firingPower" type="byte">
2489 <description>Power for flash firing/torch</description>
2490 <units>10 is max power; 0 is no flash. Linear</units>
2491 <range>0 - 10</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08002492 <details>Power for snapshot may use a different scale than
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002493 for torch mode. Only one entry for torch mode will be
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08002494 used</details>
Zhijun He66e62a42014-05-23 11:02:34 -07002495 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002496 </entry>
2497 <entry name="firingTime" type="int64">
2498 <description>Firing time of flash relative to start of
2499 exposure</description>
2500 <units>nanoseconds</units>
2501 <range>0-(exposure time-flash duration)</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08002502 <details>Clamped to (0, exposure time - flash
2503 duration).</details>
Zhijun He66e62a42014-05-23 11:02:34 -07002504 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002505 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07002506 <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002507 <enum>
2508 <value>OFF
Zhijun Heea27bc32014-01-15 13:47:59 -08002509 <notes>
2510 Do not fire the flash for this capture.
2511 </notes>
2512 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002513 <value>SINGLE
Zhijun Heea27bc32014-01-15 13:47:59 -08002514 <notes>
2515 If the flash is available and charged, fire flash
Zhijun He66e62a42014-05-23 11:02:34 -07002516 for this capture.
Zhijun Heea27bc32014-01-15 13:47:59 -08002517 </notes>
2518 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002519 <value>TORCH
Zhijun Heea27bc32014-01-15 13:47:59 -08002520 <notes>
2521 Transition flash to continuously on.
2522 </notes>
2523 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002524 </enum>
Zhijun Heea27bc32014-01-15 13:47:59 -08002525 <description>The desired mode for for the camera device's flash control.</description>
2526 <details>
2527 This control is only effective when flash unit is available
Zhijun Hebdc94c42014-01-21 18:28:30 -08002528 (`android.flash.info.available == true`).
Zhijun Heea27bc32014-01-15 13:47:59 -08002529
2530 When this control is used, the android.control.aeMode must be set to ON or OFF.
2531 Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
2532 ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.
2533
2534 When set to OFF, the camera device will not fire flash for this capture.
2535
2536 When set to SINGLE, the camera device will fire flash regardless of the camera
2537 device's auto-exposure routine's result. When used in still capture case, this
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07002538 control should be used along with auto-exposure (AE) precapture metering sequence
Zhijun Heea27bc32014-01-15 13:47:59 -08002539 (android.control.aePrecaptureTrigger), otherwise, the image may be incorrectly exposed.
2540
2541 When set to TORCH, the flash will be on continuously. This mode can be used
2542 for use cases such as preview, auto-focus assist, still capture, or video recording.
Zhijun He5169ce12014-01-24 16:48:25 -08002543
2544 The flash status will be reported by android.flash.state in the capture result metadata.
Zhijun Heea27bc32014-01-15 13:47:59 -08002545 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002546 <tag id="BC" />
2547 </entry>
2548 </controls>
2549 <static>
2550 <namespace name="info">
Igor Murashkinca256272014-10-02 15:27:09 -07002551 <entry name="available" type="byte" visibility="public" enum="true"
2552 typedef="boolean" hwlevel="legacy">
Zhijun He5169ce12014-01-24 16:48:25 -08002553 <enum>
2554 <value>FALSE</value>
2555 <value>TRUE</value>
2556 </enum>
2557 <description>Whether this camera device has a
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002558 flash unit.</description>
2559 <details>
2560 Will be `false` if no flash is available.
2561
2562 If there is no flash unit, none of the flash controls do
2563 anything.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002564 <tag id="BC" />
2565 </entry>
2566 <entry name="chargeDuration" type="int64">
2567 <description>Time taken before flash can fire
2568 again</description>
2569 <units>nanoseconds</units>
2570 <range>0-1e9</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08002571 <details>1 second too long/too short for recharge? Should
2572 this be power-dependent?</details>
Zhijun He66e62a42014-05-23 11:02:34 -07002573 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002574 </entry>
2575 </namespace>
2576 <entry name="colorTemperature" type="byte">
2577 <description>The x,y whitepoint of the
2578 flash</description>
2579 <units>pair of floats</units>
2580 <range>0-1 for both</range>
Zhijun He66e62a42014-05-23 11:02:34 -07002581 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002582 </entry>
2583 <entry name="maxEnergy" type="byte">
2584 <description>Max energy output of the flash for a full
2585 power single flash</description>
2586 <units>lumen-seconds</units>
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08002587 <range>&amp;gt;= 0</range>
Zhijun He66e62a42014-05-23 11:02:34 -07002588 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002589 </entry>
2590 </static>
2591 <dynamic>
2592 <clone entry="android.flash.firingPower" kind="controls">
2593 </clone>
2594 <clone entry="android.flash.firingTime" kind="controls">
2595 </clone>
2596 <clone entry="android.flash.mode" kind="controls"></clone>
Igor Murashkinca256272014-10-02 15:27:09 -07002597 <entry name="state" type="byte" visibility="public" enum="true"
2598 hwlevel="limited">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002599 <enum>
2600 <value>UNAVAILABLE
Zhijun Hee74a31c2014-03-25 11:33:29 -07002601 <notes>No flash on camera.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002602 <value>CHARGING
Zhijun Hee74a31c2014-03-25 11:33:29 -07002603 <notes>Flash is charging and cannot be fired.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002604 <value>READY
Zhijun Hee74a31c2014-03-25 11:33:29 -07002605 <notes>Flash is ready to fire.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002606 <value>FIRED
Zhijun Hee74a31c2014-03-25 11:33:29 -07002607 <notes>Flash fired for this capture.</notes></value>
2608 <value>PARTIAL
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002609 <notes>Flash partially illuminated this frame.
2610
2611 This is usually due to the next or previous frame having
2612 the flash fire, and the flash spilling into this capture
Zhijun Hee74a31c2014-03-25 11:33:29 -07002613 due to hardware limitations.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002614 </enum>
2615 <description>Current state of the flash
Zhijun He5169ce12014-01-24 16:48:25 -08002616 unit.</description>
2617 <details>
2618 When the camera device doesn't have flash unit
2619 (i.e. `android.flash.info.available == false`), this state will always be UNAVAILABLE.
2620 Other states indicate the current flash status.
Igor Murashkinca256272014-10-02 15:27:09 -07002621
2622 In certain conditions, this will be available on LEGACY devices:
2623
2624 * Flash-less cameras always return UNAVAILABLE.
2625 * Using android.control.aeMode `==` ON_ALWAYS_FLASH
2626 will always return FIRED.
2627 * Using android.flash.mode `==` TORCH
2628 will always return FIRED.
2629
2630 In all other conditions the state will not be available on
2631 LEGACY devices (i.e. it will be `null`).
Zhijun He5169ce12014-01-24 16:48:25 -08002632 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002633 </entry>
2634 </dynamic>
2635 </section>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002636 <section name="hotPixel">
2637 <controls>
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002638 <entry name="mode" type="byte" visibility="public" enum="true">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002639 <enum>
2640 <value>OFF
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002641 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002642 No hot pixel correction is applied.
2643
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002644 The frame rate must not be reduced relative to sensor raw output
2645 for this option.
2646
Ruben Brunk49e4f912014-03-04 14:09:44 -08002647 The hotpixel map may be returned in android.statistics.hotPixelMap.
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002648 </notes>
2649 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002650 <value>FAST
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002651 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002652 Hot pixel correction is applied, without reducing frame
2653 rate relative to sensor raw output.
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002654
Ruben Brunk49e4f912014-03-04 14:09:44 -08002655 The hotpixel map may be returned in android.statistics.hotPixelMap.
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002656 </notes>
2657 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002658 <value>HIGH_QUALITY
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002659 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002660 High-quality hot pixel correction is applied, at a cost
2661 of reducing frame rate relative to sensor raw output.
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002662
Ruben Brunk49e4f912014-03-04 14:09:44 -08002663 The hotpixel map may be returned in android.statistics.hotPixelMap.
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002664 </notes>
2665 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002666 </enum>
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002667 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002668 Operational mode for hot pixel correction.
Ruben Brunk49e4f912014-03-04 14:09:44 -08002669 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002670 <range>android.hotPixel.availableHotPixelModes</range>
Ruben Brunk49e4f912014-03-04 14:09:44 -08002671 <details>
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002672 Hotpixel correction interpolates out, or otherwise removes, pixels
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002673 that do not accurately measure the incoming light (i.e. pixels that
2674 are stuck at an arbitrary value or are oversensitive).
Ruben Brunk49e4f912014-03-04 14:09:44 -08002675 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002676 <tag id="V1" />
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07002677 <tag id="RAW" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002678 </entry>
2679 </controls>
Ruben Brunk49e4f912014-03-04 14:09:44 -08002680 <static>
2681 <entry name="availableHotPixelModes" type="byte" visibility="public"
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -07002682 type_notes="list of enums" container="array" typedef="enumList">
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002683 <array>
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002684 <size>n</size>
2685 </array>
2686 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002687 List of hot pixel correction modes for android.hotPixel.mode that are supported by this
Ruben Brunk49e4f912014-03-04 14:09:44 -08002688 camera device.
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002689 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002690 <range>Any value listed in android.hotPixel.mode</range>
Ruben Brunk49e4f912014-03-04 14:09:44 -08002691 <details>
Ruben Brunk49e4f912014-03-04 14:09:44 -08002692 FULL mode camera devices will always support FAST.
2693 </details>
2694 <hal_details>
2695 To avoid performance issues, there will be significantly fewer hot
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002696 pixels than actual pixels on the camera sensor.
2697 </hal_details>
Ruben Brunk49e4f912014-03-04 14:09:44 -08002698 <tag id="V1" />
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07002699 <tag id="RAW" />
Ruben Brunkcd05eed2014-01-31 12:38:46 -08002700 </entry>
Ruben Brunk49e4f912014-03-04 14:09:44 -08002701 </static>
2702 <dynamic>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002703 <clone entry="android.hotPixel.mode" kind="controls">
2704 <tag id="V1" />
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07002705 <tag id="RAW" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002706 </clone>
2707 </dynamic>
2708 </section>
2709 <section name="jpeg">
2710 <controls>
Ruben Brunk9c766ad2014-05-27 18:52:49 -07002711 <entry name="gpsLocation" type="byte" visibility="public" synthetic="true"
Igor Murashkinca256272014-10-02 15:27:09 -07002712 typedef="location" hwlevel="legacy">
Ruben Brunk9c766ad2014-05-27 18:52:49 -07002713 <description>
2714 A location object to use when generating image GPS metadata.
2715 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002716 <details>
2717 Setting a location object in a request will include the GPS coordinates of the location
2718 into any JPEG images captured based on the request. These coordinates can then be
2719 viewed by anyone who receives the JPEG image.
2720 </details>
Ruben Brunk9c766ad2014-05-27 18:52:49 -07002721 </entry>
2722 <entry name="gpsCoordinates" type="double" visibility="hidden"
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002723 type_notes="latitude, longitude, altitude. First two in degrees, the third in meters"
Igor Murashkinca256272014-10-02 15:27:09 -07002724 container="array" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002725 <array>
2726 <size>3</size>
2727 </array>
2728 <description>GPS coordinates to include in output JPEG
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002729 EXIF.</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002730 <range>(-180 - 180], [-90,90], [-inf, inf]</range>
2731 <tag id="BC" />
2732 </entry>
Ruben Brunk9c766ad2014-05-27 18:52:49 -07002733 <entry name="gpsProcessingMethod" type="byte" visibility="hidden"
Igor Murashkinca256272014-10-02 15:27:09 -07002734 typedef="string" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002735 <description>32 characters describing GPS algorithm to
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002736 include in EXIF.</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002737 <units>UTF-8 null-terminated string</units>
2738 <tag id="BC" />
2739 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07002740 <entry name="gpsTimestamp" type="int64" visibility="hidden" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002741 <description>Time GPS fix was made to include in
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002742 EXIF.</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002743 <units>UTC in seconds since January 1, 1970</units>
2744 <tag id="BC" />
2745 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07002746 <entry name="orientation" type="int32" visibility="public" hwlevel="legacy">
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002747 <description>The orientation for a JPEG image.</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002748 <units>Degrees in multiples of 90</units>
2749 <range>0, 90, 180, 270</range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002750 <details>
2751 The clockwise rotation angle in degrees, relative to the orientation
2752 to the camera, that the JPEG picture needs to be rotated by, to be viewed
2753 upright.
2754
2755 Camera devices may either encode this value into the JPEG EXIF header, or
2756 rotate the image data to match this orientation.
2757
2758 Note that this orientation is relative to the orientation of the camera sensor, given
2759 by android.sensor.orientation.
2760
2761 To translate from the device orientation given by the Android sensor APIs, the following
2762 sample code may be used:
2763
2764 private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
2765 if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
2766 int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION);
2767
2768 // Round device orientation to a multiple of 90
2769 deviceOrientation = (deviceOrientation + 45) / 90 * 90;
2770
2771 // Reverse device orientation for front-facing cameras
2772 boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT;
2773 if (facingFront) deviceOrientation = -deviceOrientation;
2774
2775 // Calculate desired JPEG orientation relative to camera orientation to make
2776 // the image upright relative to the device orientation
2777 int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360;
2778
2779 return jpegOrientation;
2780 }
2781 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002782 <tag id="BC" />
2783 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07002784 <entry name="quality" type="byte" visibility="public" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002785 <description>Compression quality of the final JPEG
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07002786 image.</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002787 <range>1-100; larger is higher quality</range>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002788 <details>85-95 is typical usage range.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002789 <tag id="BC" />
2790 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07002791 <entry name="thumbnailQuality" type="byte" visibility="public" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002792 <description>Compression quality of JPEG
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07002793 thumbnail.</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002794 <range>1-100; larger is higher quality</range>
2795 <tag id="BC" />
2796 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07002797 <entry name="thumbnailSize" type="int32" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07002798 container="array" typedef="size" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002799 <array>
2800 <size>2</size>
2801 </array>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07002802 <description>Resolution of embedded JPEG thumbnail.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002803 <range>android.jpeg.availableThumbnailSizes</range>
Zhijun Hef90eeaf2014-01-16 12:13:35 -08002804 <details>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
2805 but the captured JPEG will still be a valid image.
Zhijun He52e09552013-12-11 17:03:24 -08002806
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002807 For best results, when issuing a request for a JPEG image, the thumbnail size selected
2808 should have the same aspect ratio as the main JPEG output.
Zhijun He5fb671c2014-05-21 17:51:05 -07002809
2810 If the thumbnail image aspect ratio differs from the JPEG primary image aspect
2811 ratio, the camera device creates the thumbnail by cropping it from the primary image.
2812 For example, if the primary image has 4:3 aspect ratio, the thumbnail image has
2813 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to
2814 generate the thumbnail image. The thumbnail image will always have a smaller Field
2815 Of View (FOV) than the primary image when aspect ratios differ.
2816 </details>
2817 <hal_details>
2818 The HAL must not squeeze or stretch the downscaled primary image to generate thumbnail.
2819 The cropping must be done on the primary jpeg image rather than the sensor active array.
2820 The stream cropping rule specified by "S5. Cropping" in camera3.h doesn't apply to the
2821 thumbnail image cropping.
2822 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002823 <tag id="BC" />
2824 </entry>
2825 </controls>
2826 <static>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07002827 <entry name="availableThumbnailSizes" type="int32" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07002828 container="array" typedef="size" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002829 <array>
2830 <size>2</size>
2831 <size>n</size>
2832 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002833 <description>List of JPEG thumbnail sizes for android.jpeg.thumbnailSize supported by this
2834 camera device.</description>
2835 <details>
2836 This list will include at least one non-zero resolution, plus `(0,0)` for indicating no
2837 thumbnail should be generated.
2838
2839 Below condiditions will be satisfied for this size list:
Zhijun He52e09552013-12-11 17:03:24 -08002840
Zhijun Hef90eeaf2014-01-16 12:13:35 -08002841 * The sizes will be sorted by increasing pixel area (width x height).
2842 If several resolutions have the same area, they will be sorted by increasing width.
2843 * The aspect ratio of the largest thumbnail size will be same as the
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08002844 aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations.
Zhijun He52e09552013-12-11 17:03:24 -08002845 The largest size is defined as the size that has the largest pixel area
2846 in a given size list.
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08002847 * Each output JPEG size in android.scaler.availableStreamConfigurations will have at least
Zhijun He52e09552013-12-11 17:03:24 -08002848 one corresponding size that has the same aspect ratio in availableThumbnailSizes,
2849 and vice versa.
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002850 * All non-`(0, 0)` sizes will have non-zero widths and heights.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002851 <tag id="BC" />
2852 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07002853 <entry name="maxSize" type="int32" visibility="system">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002854 <description>Maximum size in bytes for the compressed
2855 JPEG buffer</description>
2856 <range>Must be large enough to fit any JPEG produced by
2857 the camera</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08002858 <details>This is used for sizing the gralloc buffers for
2859 JPEG</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002860 </entry>
2861 </static>
2862 <dynamic>
Ruben Brunk9c766ad2014-05-27 18:52:49 -07002863 <clone entry="android.jpeg.gpsLocation" kind="controls">
2864 </clone>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002865 <clone entry="android.jpeg.gpsCoordinates" kind="controls">
2866 </clone>
2867 <clone entry="android.jpeg.gpsProcessingMethod"
2868 kind="controls"></clone>
2869 <clone entry="android.jpeg.gpsTimestamp" kind="controls">
2870 </clone>
2871 <clone entry="android.jpeg.orientation" kind="controls">
2872 </clone>
2873 <clone entry="android.jpeg.quality" kind="controls">
2874 </clone>
2875 <entry name="size" type="int32">
2876 <description>The size of the compressed JPEG image, in
2877 bytes</description>
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08002878 <range>&amp;gt;= 0</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08002879 <details>If no JPEG output is produced for the request,
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -07002880 this must be 0.
2881
2882 Otherwise, this describes the real size of the compressed
2883 JPEG image placed in the output stream. More specifically,
2884 if android.jpeg.maxSize = 1000000, and a specific capture
2885 has android.jpeg.size = 500000, then the output buffer from
2886 the JPEG stream will be 1000000 bytes, of which the first
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08002887 500000 make up the real data.</details>
Zhijun He66e62a42014-05-23 11:02:34 -07002888 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002889 </entry>
2890 <clone entry="android.jpeg.thumbnailQuality"
2891 kind="controls"></clone>
2892 <clone entry="android.jpeg.thumbnailSize" kind="controls">
2893 </clone>
2894 </dynamic>
2895 </section>
2896 <section name="lens">
2897 <controls>
Igor Murashkinca256272014-10-02 15:27:09 -07002898 <entry name="aperture" type="float" visibility="public" hwlevel="full">
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002899 <description>The desired lens aperture size, as a ratio of lens focal length to the
2900 effective aperture diameter.</description>
2901 <units>The f-number (f/N)</units>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002902 <range>android.lens.info.availableApertures</range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002903 <details>Setting this value is only supported on the camera devices that have a variable
2904 aperture lens.
Zhijun He1b58d382014-01-10 10:22:53 -08002905
2906 When this is supported and android.control.aeMode is OFF,
2907 this can be set along with android.sensor.exposureTime,
2908 android.sensor.sensitivity, and android.sensor.frameDuration
2909 to achieve manual exposure control.
2910
2911 The requested aperture value may take several frames to reach the
2912 requested value; the camera device will report the current (intermediate)
2913 aperture size in capture result metadata while the aperture is changing.
Zhijun He5169ce12014-01-24 16:48:25 -08002914 While the aperture is still changing, android.lens.state will be set to MOVING.
Zhijun He1b58d382014-01-10 10:22:53 -08002915
2916 When this is supported and android.control.aeMode is one of
2917 the ON modes, this will be overridden by the camera device
2918 auto-exposure algorithm, the overridden values are then provided
2919 back to the user in the corresponding result.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002920 <tag id="V1" />
2921 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07002922 <entry name="filterDensity" type="float" visibility="public" hwlevel="full">
Ruben Brunk83eb3032014-01-15 16:12:07 -08002923 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002924 The desired setting for the lens neutral density filter(s).
Ruben Brunk83eb3032014-01-15 16:12:07 -08002925 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002926 <units>Exposure Value (EV)</units>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002927 <range>android.lens.info.availableFilterDensities</range>
Ruben Brunk83eb3032014-01-15 16:12:07 -08002928 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002929 This control will not be supported on most camera devices.
Ruben Brunk83eb3032014-01-15 16:12:07 -08002930
2931 Lens filters are typically used to lower the amount of light the
2932 sensor is exposed to (measured in steps of EV). As used here, an EV
2933 step is the standard logarithmic representation, which are
2934 non-negative, and inversely proportional to the amount of light
2935 hitting the sensor. For example, setting this to 0 would result
2936 in no reduction of the incoming light, and setting this to 2 would
2937 mean that the filter is set to reduce incoming light by two stops
2938 (allowing 1/4 of the prior amount of light to the sensor).
Zhijun He5169ce12014-01-24 16:48:25 -08002939
2940 It may take several frames before the lens filter density changes
2941 to the requested value. While the filter density is still changing,
2942 android.lens.state will be set to MOVING.
Ruben Brunk83eb3032014-01-15 16:12:07 -08002943 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002944 <tag id="V1" />
2945 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07002946 <entry name="focalLength" type="float" visibility="public" hwlevel="legacy">
Ruben Brunkac9bbb92014-01-15 18:39:35 -08002947 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002948 The desired lens focal length; used for optical zoom.
Ruben Brunkac9bbb92014-01-15 18:39:35 -08002949 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002950 <units>Millimeters</units>
Ruben Brunkac9bbb92014-01-15 18:39:35 -08002951 <range>android.lens.info.availableFocalLengths</range>
2952 <details>
2953 This setting controls the physical focal length of the camera
2954 device's lens. Changing the focal length changes the field of
2955 view of the camera device, and is usually used for optical zoom.
2956
2957 Like android.lens.focusDistance and android.lens.aperture, this
2958 setting won't be applied instantaneously, and it may take several
Zhijun He5169ce12014-01-24 16:48:25 -08002959 frames before the lens can change to the requested focal length.
Ruben Brunkac9bbb92014-01-15 18:39:35 -08002960 While the focal length is still changing, android.lens.state will
2961 be set to MOVING.
2962
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002963 Optical zoom will not be supported on most devices.
Ruben Brunkac9bbb92014-01-15 18:39:35 -08002964 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002965 <tag id="V1" />
2966 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07002967 <entry name="focusDistance" type="float" visibility="public" hwlevel="full">
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002968 <description>Desired distance to plane of sharpest focus,
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07002969 measured from frontmost surface of the lens.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002970 <units>See android.lens.info.focusDistanceCalibration for details</units>
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08002971 <range>&amp;gt;= 0</range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07002972 <details>
2973 This control can be used for setting manual focus, on devices that support
2974 the MANUAL_SENSOR capability and have a variable-focus lens (see
2975 android.lens.info.minimumFocusDistance).
2976
2977 A value of `0.0f` means infinity focus. The value set will be clamped to
2978 `[0.0f, android.lens.info.minimumFocusDistance]`.
Zhijun He5169ce12014-01-24 16:48:25 -08002979
2980 Like android.lens.focalLength, this setting won't be applied
2981 instantaneously, and it may take several frames before the lens
2982 can move to the requested focus distance. While the lens is still moving,
2983 android.lens.state will be set to MOVING.
Igor Murashkinca256272014-10-02 15:27:09 -07002984
2985 LEGACY devices support at most setting this to `0.0f`
2986 for infinity focus.
Zhijun He5169ce12014-01-24 16:48:25 -08002987 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002988 <tag id="BC" />
2989 <tag id="V1" />
2990 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07002991 <entry name="opticalStabilizationMode" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07002992 enum="true" hwlevel="limited">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08002993 <enum>
Ruben Brunk218639c2014-01-15 18:09:41 -08002994 <value>OFF
2995 <notes>Optical stabilization is unavailable.</notes>
2996 </value>
2997 <value optional="true">ON
2998 <notes>Optical stabilization is enabled.</notes>
2999 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003000 </enum>
Ruben Brunk218639c2014-01-15 18:09:41 -08003001 <description>
3002 Sets whether the camera device uses optical image stabilization (OIS)
3003 when capturing images.
3004 </description>
3005 <range>android.lens.info.availableOpticalStabilization</range>
3006 <details>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003007 OIS is used to compensate for motion blur due to small
3008 movements of the camera during capture. Unlike digital image
3009 stabilization (android.control.videoStabilizationMode), OIS
3010 makes use of mechanical elements to stabilize the camera
3011 sensor, and thus allows for longer exposure times before
3012 camera shake becomes apparent.
Ruben Brunk218639c2014-01-15 18:09:41 -08003013
Zhijun He91449c82014-06-12 10:43:32 -07003014 Switching between different optical stabilization modes may take several
3015 frames to initialize, the camera device will report the current mode in
3016 capture result metadata. For example, When "ON" mode is requested, the
3017 optical stabilization modes in the first several capture results may still
3018 be "OFF", and it will become "ON" when the initialization is done.
3019
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003020 If a camera device supports both OIS and digital image stabilization
3021 (android.control.videoStabilizationMode), turning both modes on may produce undesirable
3022 interaction, so it is recommended not to enable both at the same time.
Zhijun He91449c82014-06-12 10:43:32 -07003023
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003024 Not all devices will support OIS; see
3025 android.lens.info.availableOpticalStabilization for
3026 available controls.
Ruben Brunk218639c2014-01-15 18:09:41 -08003027 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003028 <tag id="V1" />
3029 </entry>
3030 </controls>
3031 <static>
3032 <namespace name="info">
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07003033 <entry name="availableApertures" type="float" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07003034 container="array" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003035 <array>
3036 <size>n</size>
3037 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003038 <description>List of aperture size values for android.lens.aperture that are
3039 supported by this camera device.</description>
3040 <units>The aperture f-number</units>
3041 <details>If the camera device doesn't support a variable lens aperture,
3042 this list will contain only one value, which is the fixed aperture size.
Zhijun He1b58d382014-01-10 10:22:53 -08003043
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003044 If the camera device supports a variable aperture, the aperture values
Zhijun He1b58d382014-01-10 10:22:53 -08003045 in this list will be sorted in ascending order.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003046 <tag id="V1" />
3047 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07003048 <entry name="availableFilterDensities" type="float" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07003049 container="array" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003050 <array>
3051 <size>n</size>
3052 </array>
Ruben Brunk83eb3032014-01-15 16:12:07 -08003053 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003054 List of neutral density filter values for
3055 android.lens.filterDensity that are supported by this camera device.
Ruben Brunk83eb3032014-01-15 16:12:07 -08003056 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003057 <units>Exposure value (EV)</units>
Ruben Brunk83eb3032014-01-15 16:12:07 -08003058 <range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003059 Values are &amp;gt;= 0
Ruben Brunk83eb3032014-01-15 16:12:07 -08003060 </range>
3061 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003062 If a neutral density filter is not supported by this camera device,
3063 this list will contain only 0. Otherwise, this list will include every
3064 filter density supported by the camera device, in ascending order.
Ruben Brunk83eb3032014-01-15 16:12:07 -08003065 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003066 <tag id="V1" />
3067 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07003068 <entry name="availableFocalLengths" type="float" visibility="public"
Ruben Brunkac9bbb92014-01-15 18:39:35 -08003069 type_notes="The list of available focal lengths"
Igor Murashkinca256272014-10-02 15:27:09 -07003070 container="array" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003071 <array>
3072 <size>n</size>
3073 </array>
Ruben Brunkac9bbb92014-01-15 18:39:35 -08003074 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003075 List of focal lengths for android.lens.focalLength that are supported by this camera
3076 device.
Ruben Brunkac9bbb92014-01-15 18:39:35 -08003077 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003078 <units>Millimeters</units>
Ruben Brunkac9bbb92014-01-15 18:39:35 -08003079 <range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003080 Values are &amp;gt; 0
Ruben Brunkac9bbb92014-01-15 18:39:35 -08003081 </range>
3082 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003083 If optical zoom is not supported, this list will only contain
3084 a single value corresponding to the fixed focal length of the
3085 device. Otherwise, this list will include every focal length supported
3086 by the camera device, in ascending order.
Ruben Brunkac9bbb92014-01-15 18:39:35 -08003087 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003088 <tag id="BC" />
3089 <tag id="V1" />
3090 </entry>
3091 <entry name="availableOpticalStabilization" type="byte"
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -07003092 visibility="public" type_notes="list of enums" container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07003093 typedef="enumList" hwlevel="limited">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003094 <array>
3095 <size>n</size>
3096 </array>
Ruben Brunk218639c2014-01-15 18:09:41 -08003097 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003098 List of optical image stabilization (OIS) modes for
3099 android.lens.opticalStabilizationMode that are supported by this camera device.
Ruben Brunk218639c2014-01-15 18:09:41 -08003100 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003101 <range>Any value listed in android.lens.opticalStabilizationMode</range>
Ruben Brunk218639c2014-01-15 18:09:41 -08003102 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003103 If OIS is not supported by a given camera device, this list will
Ruben Brunk218639c2014-01-15 18:09:41 -08003104 contain only OFF.
3105 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003106 <tag id="V1" />
3107 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07003108 <entry name="hyperfocalDistance" type="float" visibility="public" optional="true"
3109 hwlevel="limited">
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003110 <description>Hyperfocal distance for this lens.</description>
3111 <units>See android.lens.info.focusDistanceCalibration for details</units>
3112 <range>If lens is fixed focus, &amp;gt;= 0. If lens has focuser unit, the value is
3113 within `(0.0f, android.lens.info.minimumFocusDistance]`</range>
Zhijun He27afb782014-04-29 19:23:08 -07003114 <details>
Zhijun Hef92c76a2014-02-06 01:40:35 -08003115 If the lens is not fixed focus, the camera device will report this
3116 field when android.lens.info.focusDistanceCalibration is APPROXIMATE or CALIBRATED.
3117 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003118 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07003119 <entry name="minimumFocusDistance" type="float" visibility="public" optional="true"
3120 hwlevel="limited">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003121 <description>Shortest distance from frontmost surface
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003122 of the lens that can be brought into sharp focus.</description>
3123 <units>See android.lens.info.focusDistanceCalibration for details</units>
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08003124 <range>&amp;gt;= 0</range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003125 <details>If the lens is fixed-focus, this will be
Zhijun Hef92c76a2014-02-06 01:40:35 -08003126 0.</details>
Igor Murashkin7b721082014-06-19 15:45:58 -07003127 <hal_details>Mandatory for FULL devices; LIMITED devices
3128 must always set this value to 0 for fixed-focus; and may omit
3129 the minimum focus distance otherwise.
3130
3131 This field is also mandatory for all devices advertising
3132 the MANUAL_SENSOR capability.</hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003133 <tag id="V1" />
3134 </entry>
Ruben Brunk9c766ad2014-05-27 18:52:49 -07003135 <entry name="shadingMapSize" type="int32" visibility="hidden"
Zhijun He25b8ac52014-02-24 09:49:37 -08003136 type_notes="width and height (N, M) of lens shading map provided by the camera device."
Igor Murashkinca256272014-10-02 15:27:09 -07003137 container="array" typedef="size" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003138 <array>
3139 <size>2</size>
3140 </array>
Igor Murashkin1dd4ecb2013-12-11 13:31:00 -08003141 <description>Dimensions of lens shading map.</description>
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08003142 <range>Both values &amp;gt;= 1</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003143 <details>
Igor Murashkin1dd4ecb2013-12-11 13:31:00 -08003144 The map should be on the order of 30-40 rows and columns, and
3145 must be smaller than 64x64.
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003146 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003147 <tag id="V1" />
3148 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07003149 <entry name="focusDistanceCalibration" type="byte" visibility="public"
3150 enum="true" hwlevel="limited">
Zhijun Hef92c76a2014-02-06 01:40:35 -08003151 <enum>
3152 <value>UNCALIBRATED
3153 <notes>
3154 The lens focus distance is not accurate, and the units used for
3155 android.lens.focusDistance do not correspond to any physical units.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003156
Zhijun Hef92c76a2014-02-06 01:40:35 -08003157 Setting the lens to the same focus distance on separate occasions may
3158 result in a different real focus distance, depending on factors such
3159 as the orientation of the device, the age of the focusing mechanism,
3160 and the device temperature. The focus distance value will still be
3161 in the range of `[0, android.lens.info.minimumFocusDistance]`, where 0
3162 represents the farthest focus.
3163 </notes>
3164 </value>
3165 <value>APPROXIMATE
3166 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003167 The lens focus distance is measured in diopters.
3168
3169 However, setting the lens to the same focus distance
3170 on separate occasions may result in a different real
3171 focus distance, depending on factors such as the
3172 orientation of the device, the age of the focusing
3173 mechanism, and the device temperature.
Zhijun Hef92c76a2014-02-06 01:40:35 -08003174 </notes>
3175 </value>
3176 <value>CALIBRATED
3177 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003178 The lens focus distance is measured in diopters, and
3179 is calibrated.
3180
3181 The lens mechanism is calibrated so that setting the
3182 same focus distance is repeatable on multiple
3183 occasions with good accuracy, and the focus distance
3184 corresponds to the real physical distance to the plane
3185 of best focus.
Zhijun Hef92c76a2014-02-06 01:40:35 -08003186 </notes>
3187 </value>
3188 </enum>
3189 <description>The lens focus distance calibration quality.</description>
3190 <details>
3191 The lens focus distance calibration quality determines the reliability of
3192 focus related metadata entries, i.e. android.lens.focusDistance,
3193 android.lens.focusRange, android.lens.info.hyperfocalDistance, and
3194 android.lens.info.minimumFocusDistance.
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003195
3196 APPROXIMATE and CALIBRATED devices report the focus metadata in
3197 units of diopters (1/meter), so `0.0f` represents focusing at infinity,
3198 and increasing positive numbers represent focusing closer and closer
3199 to the camera device. The focus distance control also uses diopters
3200 on these devices.
3201
3202 UNCALIBRATED devices do not use units that are directly comparable
3203 to any real physical measurement, but `0.0f` still represents farthest
3204 focus, and android.lens.info.minimumFocusDistance represents the
3205 nearest focus the device can achieve.
Zhijun Hef92c76a2014-02-06 01:40:35 -08003206 </details>
Yin-Chia Yeh52f65842014-08-18 10:44:21 -07003207 <hal_details>
3208 For devices advertise APPROXIMATE quality or higher, diopters 0 (infinity
3209 focus) must work. When autofocus is disabled (android.control.afMode == OFF)
3210 and the lens focus distance is set to 0 diopters
3211 (android.lens.focusDistance == 0), the lens will move to focus at infinity
3212 and is stably focused at infinity even if the device tilts. It may take the
3213 lens some time to move; during the move the lens state should be MOVING and
3214 the output diopter value should be changing toward 0.
3215 </hal_details>
Zhijun Hef92c76a2014-02-06 01:40:35 -08003216 <tag id="V1" />
3217 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003218 </namespace>
Igor Murashkinca256272014-10-02 15:27:09 -07003219 <entry name="facing" type="byte" visibility="public" enum="true" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003220 <enum>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003221 <value>FRONT
3222 <notes>
3223 The camera device faces the same direction as the device's screen.
3224 </notes></value>
3225 <value>BACK
3226 <notes>
3227 The camera device faces the opposite direction as the device's screen.
3228 </notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003229 </enum>
3230 <description>Direction the camera faces relative to
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003231 device screen.</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003232 </entry>
3233 <entry name="opticalAxisAngle" type="float"
3234 type_notes="degrees. First defines the angle of separation between the perpendicular to the screen and the camera optical axis. The second then defines the clockwise rotation of the optical axis from native device up."
3235 container="array">
3236 <array>
3237 <size>2</size>
3238 </array>
3239 <description>Relative angle of camera optical axis to the
3240 perpendicular axis from the display</description>
3241 <range>[0-90) for first angle, [0-360) for second</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003242 <details>Examples:
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -07003243
3244 (0,0) means that the camera optical axis
3245 is perpendicular to the display surface;
3246
3247 (45,0) means that the camera points 45 degrees up when
3248 device is held upright;
3249
3250 (45,90) means the camera points 45 degrees to the right when
3251 the device is held upright.
3252
3253 Use FACING field to determine perpendicular outgoing
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003254 direction</details>
Zhijun He66e62a42014-05-23 11:02:34 -07003255 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003256 </entry>
3257 <entry name="position" type="float" container="array">
3258 <array>
3259 <size>3, location in mm, in the sensor coordinate
3260 system</size>
3261 </array>
3262 <description>Coordinates of camera optical axis on
3263 device</description>
Zhijun He66e62a42014-05-23 11:02:34 -07003264 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003265 </entry>
3266 </static>
3267 <dynamic>
3268 <clone entry="android.lens.aperture" kind="controls">
3269 <tag id="V1" />
3270 </clone>
3271 <clone entry="android.lens.filterDensity" kind="controls">
3272 <tag id="V1" />
3273 </clone>
3274 <clone entry="android.lens.focalLength" kind="controls">
3275 <tag id="BC" />
3276 </clone>
3277 <clone entry="android.lens.focusDistance" kind="controls">
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003278 <details>Should be zero for fixed-focus cameras</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003279 <tag id="BC" />
3280 </clone>
Zhijun He50451ad2013-09-26 10:27:47 -07003281 <entry name="focusRange" type="float" visibility="public"
3282 type_notes="Range of scene distances that are in focus"
Igor Murashkinca256272014-10-02 15:27:09 -07003283 container="array" typedef="pairFloatFloat" hwlevel="limited">
Zhijun He50451ad2013-09-26 10:27:47 -07003284 <array>
3285 <size>2</size>
3286 </array>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003287 <description>The range of scene distances that are in
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07003288 sharp focus (depth of field).</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003289 <units>A pair of focus distances in diopters: (near,
3290 far); see android.lens.info.focusDistanceCalibration for details.</units>
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08003291 <range>&amp;gt;=0</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003292 <details>If variable focus not supported, can still report
3293 fixed depth of field range</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003294 <tag id="BC" />
3295 </entry>
3296 <clone entry="android.lens.opticalStabilizationMode"
3297 kind="controls">
3298 <tag id="V1" />
3299 </clone>
Igor Murashkinca256272014-10-02 15:27:09 -07003300 <entry name="state" type="byte" visibility="public" enum="true" hwlevel="limited">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003301 <enum>
Zhijun He5169ce12014-01-24 16:48:25 -08003302 <value>STATIONARY
3303 <notes>
Eino-Ville Talvala7fabc1e2014-02-10 12:39:35 -08003304 The lens parameters (android.lens.focalLength, android.lens.focusDistance,
Zhijun He5169ce12014-01-24 16:48:25 -08003305 android.lens.filterDensity and android.lens.aperture) are not changing.
3306 </notes>
3307 </value>
3308 <value>MOVING
3309 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003310 One or several of the lens parameters
3311 (android.lens.focalLength, android.lens.focusDistance,
3312 android.lens.filterDensity or android.lens.aperture) is
3313 currently changing.
Zhijun He5169ce12014-01-24 16:48:25 -08003314 </notes>
3315 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003316 </enum>
Zhijun He5169ce12014-01-24 16:48:25 -08003317 <description>Current lens status.</description>
3318 <details>
3319 For lens parameters android.lens.focalLength, android.lens.focusDistance,
3320 android.lens.filterDensity and android.lens.aperture, when changes are requested,
3321 they may take several frames to reach the requested values. This state indicates
3322 the current status of the lens parameters.
3323
3324 When the state is STATIONARY, the lens parameters are not changing. This could be
3325 either because the parameters are all fixed, or because the lens has had enough
3326 time to reach the most recently-requested values.
3327 If all these lens parameters are not changable for a camera device, as listed below:
3328
3329 * Fixed focus (`android.lens.info.minimumFocusDistance == 0`), which means
3330 android.lens.focusDistance parameter will always be 0.
3331 * Fixed focal length (android.lens.info.availableFocalLengths contains single value),
3332 which means the optical zoom is not supported.
3333 * No ND filter (android.lens.info.availableFilterDensities contains only 0).
3334 * Fixed aperture (android.lens.info.availableApertures contains single value).
3335
3336 Then this state will always be STATIONARY.
3337
3338 When the state is MOVING, it indicates that at least one of the lens parameters
3339 is changing.
3340 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003341 <tag id="V1" />
3342 </entry>
3343 </dynamic>
3344 </section>
3345 <section name="noiseReduction">
3346 <controls>
Igor Murashkinca256272014-10-02 15:27:09 -07003347 <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003348 <enum>
3349 <value>OFF
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003350 <notes>No noise reduction is applied.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003351 <value>FAST
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003352 <notes>Noise reduction is applied without reducing frame rate relative to sensor
3353 output.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003354 <value>HIGH_QUALITY
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003355 <notes>High-quality noise reduction is applied, at the cost of reducing frame rate
3356 relative to sensor output.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003357 </enum>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003358 <description>Mode of operation for the noise reduction algorithm.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003359 <range>android.noiseReduction.availableNoiseReductionModes</range>
3360 <details>The noise reduction algorithm attempts to improve image quality by removing
3361 excessive noise added by the capture process, especially in dark conditions.
3362 OFF means no noise reduction will be applied by the camera device.
Ruben Brunkd14f7162014-03-04 15:01:25 -08003363
Zhijun Hef90eeaf2014-01-16 12:13:35 -08003364 FAST/HIGH_QUALITY both mean camera device determined noise filtering
3365 will be applied. HIGH_QUALITY mode indicates that the camera device
3366 will use the highest-quality noise filtering algorithms,
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003367 even if it slows down capture rate. FAST means the camera device will not
Igor Murashkinca256272014-10-02 15:27:09 -07003368 slow down capture rate when applying noise filtering.
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003369 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003370 <tag id="V1" />
3371 </entry>
3372 <entry name="strength" type="byte">
3373 <description>Control the amount of noise reduction
3374 applied to the images</description>
3375 <units>1-10; 10 is max noise reduction</units>
3376 <range>1 - 10</range>
Zhijun He66e62a42014-05-23 11:02:34 -07003377 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003378 </entry>
3379 </controls>
Ruben Brunkd14f7162014-03-04 15:01:25 -08003380 <static>
3381 <entry name="availableNoiseReductionModes" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07003382 type_notes="list of enums" container="array" typedef="enumList" hwlevel="limited">
Ruben Brunkd14f7162014-03-04 15:01:25 -08003383 <array>
3384 <size>n</size>
3385 </array>
3386 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003387 List of noise reduction modes for android.noiseReduction.mode that are supported
3388 by this camera device.
Ruben Brunkd14f7162014-03-04 15:01:25 -08003389 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003390 <range>Any value listed in android.noiseReduction.mode</range>
Ruben Brunkd14f7162014-03-04 15:01:25 -08003391 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003392 Full-capability camera devices will always support OFF and FAST.
Igor Murashkinca256272014-10-02 15:27:09 -07003393
3394 Legacy-capability camera devices will only support FAST mode.
Ruben Brunkd14f7162014-03-04 15:01:25 -08003395 </details>
3396 <tag id="V1" />
3397 </entry>
3398 </static>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003399 <dynamic>
3400 <clone entry="android.noiseReduction.mode" kind="controls">
Ruben Brunkd14f7162014-03-04 15:01:25 -08003401 <tag id="V1" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003402 </clone>
3403 </dynamic>
3404 </section>
3405 <section name="quirks">
3406 <static>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003407 <entry name="meteringCropRegion" type="byte" visibility="system" deprecated="true" optional="true">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003408 <description>If set to 1, the camera service does not
3409 scale 'normalized' coordinates with respect to the crop
3410 region. This applies to metering input (a{e,f,wb}Region
3411 and output (face rectangles).</description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003412 <details>Normalized coordinates refer to those in the
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003413 (-1000,1000) range mentioned in the
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -07003414 android.hardware.Camera API.
3415
3416 HAL implementations should instead always use and emit
3417 sensor array-relative coordinates for all region data. Does
3418 not need to be listed in static metadata. Support will be
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003419 removed in future versions of camera service.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003420 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003421 <entry name="triggerAfWithAuto" type="byte" visibility="system" deprecated="true" optional="true">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003422 <description>If set to 1, then the camera service always
3423 switches to FOCUS_MODE_AUTO before issuing a AF
3424 trigger.</description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003425 <details>HAL implementations should implement AF trigger
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003426 modes for AUTO, MACRO, CONTINUOUS_FOCUS, and
3427 CONTINUOUS_PICTURE modes instead of using this flag. Does
3428 not need to be listed in static metadata. Support will be
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003429 removed in future versions of camera service</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003430 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003431 <entry name="useZslFormat" type="byte" visibility="system" deprecated="true" optional="true">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003432 <description>If set to 1, the camera service uses
3433 CAMERA2_PIXEL_FORMAT_ZSL instead of
3434 HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED for the zero
3435 shutter lag stream</description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003436 <details>HAL implementations should use gralloc usage flags
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003437 to determine that a stream will be used for
3438 zero-shutter-lag, instead of relying on an explicit
3439 format setting. Does not need to be listed in static
3440 metadata. Support will be removed in future versions of
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003441 camera service.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003442 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003443 <entry name="usePartialResult" type="byte" visibility="hidden" deprecated="true" optional="true">
Igor Murashkin7761a222014-01-27 16:06:38 -08003444 <description>
3445 If set to 1, the HAL will always split result
Eino-Ville Talvala82ce3312013-10-09 18:21:30 -07003446 metadata for a single capture into multiple buffers,
3447 returned using multiple process_capture_result calls.
3448 </description>
Igor Murashkin7761a222014-01-27 16:06:38 -08003449 <details>
3450 Does not need to be listed in static
Eino-Ville Talvala82ce3312013-10-09 18:21:30 -07003451 metadata. Support for partial results will be reworked in
3452 future versions of camera service. This quirk will stop
3453 working at that point; DO NOT USE without careful
3454 consideration of future support.
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003455 </details>
Igor Murashkin7761a222014-01-27 16:06:38 -08003456 <hal_details>
3457 Refer to `camera3_capture_result::partial_result`
3458 for information on how to implement partial results.
3459 </hal_details>
Eino-Ville Talvala82ce3312013-10-09 18:21:30 -07003460 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003461 </static>
Eino-Ville Talvala82ce3312013-10-09 18:21:30 -07003462 <dynamic>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003463 <entry name="partialResult" type="byte" visibility="hidden" deprecated="true" optional="true" enum="true" typedef="boolean">
Eino-Ville Talvala82ce3312013-10-09 18:21:30 -07003464 <enum>
3465 <value>FINAL
3466 <notes>The last or only metadata result buffer
3467 for this capture.</notes>
3468 </value>
3469 <value>PARTIAL
3470 <notes>A partial buffer of result metadata for this
3471 capture. More result buffers for this capture will be sent
Zhijun He25b8ac52014-02-24 09:49:37 -08003472 by the camera device, the last of which will be marked
Eino-Ville Talvala82ce3312013-10-09 18:21:30 -07003473 FINAL.</notes>
3474 </value>
3475 </enum>
Igor Murashkin7761a222014-01-27 16:06:38 -08003476 <description>
3477 Whether a result given to the framework is the
Eino-Ville Talvala82ce3312013-10-09 18:21:30 -07003478 final one for the capture, or only a partial that contains a
3479 subset of the full set of dynamic metadata
3480 values.</description>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003481 <range>Optional. Default value is FINAL.</range>
Igor Murashkin7761a222014-01-27 16:06:38 -08003482 <details>
3483 The entries in the result metadata buffers for a
Eino-Ville Talvala82ce3312013-10-09 18:21:30 -07003484 single capture may not overlap, except for this entry. The
3485 FINAL buffers must retain FIFO ordering relative to the
3486 requests that generate them, so the FINAL buffer for frame 3 must
3487 always be sent to the framework after the FINAL buffer for frame 2, and
3488 before the FINAL buffer for frame 4. PARTIAL buffers may be returned
3489 in any order relative to other frames, but all PARTIAL buffers for a given
3490 capture must arrive before the FINAL buffer for that capture. This entry may
Zhijun He25b8ac52014-02-24 09:49:37 -08003491 only be used by the camera device if quirks.usePartialResult is set to 1.
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003492 </details>
Igor Murashkin7761a222014-01-27 16:06:38 -08003493 <hal_details>
3494 Refer to `camera3_capture_result::partial_result`
3495 for information on how to implement partial results.
3496 </hal_details>
Eino-Ville Talvala82ce3312013-10-09 18:21:30 -07003497 </entry>
3498 </dynamic>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003499 </section>
3500 <section name="request">
3501 <controls>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003502 <entry name="frameCount" type="int32" visibility="system" deprecated="true">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003503 <description>A frame counter set by the framework. Must
Igor Murashkin28548d22013-09-10 15:26:20 -07003504 be maintained unchanged in output frame. This value monotonically
3505 increases with every new result (that is, each new result has a unique
3506 frameCount value).
3507 </description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003508 <units>incrementing integer</units>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003509 <range>Any int.</range>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003510 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07003511 <entry name="id" type="int32" visibility="hidden">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003512 <description>An application-specified ID for the current
3513 request. Must be maintained unchanged in output
3514 frame</description>
3515 <units>arbitrary integer assigned by application</units>
3516 <range>Any int</range>
3517 <tag id="V1" />
3518 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003519 <entry name="inputStreams" type="int32" visibility="system" deprecated="true"
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07003520 container="array">
3521 <array>
3522 <size>n</size>
3523 </array>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003524 <description>List which camera reprocess stream is used
3525 for the source of reprocessing data.</description>
3526 <units>List of camera reprocess stream IDs</units>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003527 <range>
Zhijun Hefb4701f2014-02-04 11:32:24 -08003528 Typically, only one entry allowed, must be a valid reprocess stream ID.
Eino-Ville Talvala7fabc1e2014-02-10 12:39:35 -08003529 </range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003530 <details>Only meaningful when android.request.type ==
3531 REPROCESS. Ignored otherwise</details>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07003532 <tag id="HAL2" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003533 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07003534 <entry name="metadataMode" type="byte" visibility="system"
3535 enum="true">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003536 <enum>
3537 <value>NONE
3538 <notes>No metadata should be produced on output, except
3539 for application-bound buffer data. If no
3540 application-bound streams exist, no frame should be
3541 placed in the output frame queue. If such streams
3542 exist, a frame should be placed on the output queue
3543 with null metadata but with the necessary output buffer
3544 information. Timestamp information should still be
3545 included with any output stream buffers</notes></value>
3546 <value>FULL
3547 <notes>All metadata should be produced. Statistics will
3548 only be produced if they are separately
3549 enabled</notes></value>
3550 </enum>
3551 <description>How much metadata to produce on
3552 output</description>
Zhijun He66e62a42014-05-23 11:02:34 -07003553 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003554 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003555 <entry name="outputStreams" type="int32" visibility="system" deprecated="true"
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07003556 container="array">
3557 <array>
3558 <size>n</size>
3559 </array>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003560 <description>Lists which camera output streams image data
3561 from this capture must be sent to</description>
3562 <units>List of camera stream IDs</units>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003563 <range>List must only include streams that have been
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003564 created</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003565 <details>If no output streams are listed, then the image
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003566 data should simply be discarded. The image data must
3567 still be captured for metadata and statistics production,
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003568 and the lens and flash must operate as requested.</details>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07003569 <tag id="HAL2" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003570 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003571 <entry name="type" type="byte" visibility="system" deprecated="true" enum="true">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003572 <enum>
3573 <value>CAPTURE
3574 <notes>Capture a new image from the imaging hardware,
3575 and process it according to the
3576 settings</notes></value>
3577 <value>REPROCESS
3578 <notes>Process previously captured data; the
Eino-Ville Talvala7fabc1e2014-02-10 12:39:35 -08003579 android.request.inputStreams parameter determines the
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003580 source reprocessing stream. TODO: Mark dynamic metadata
3581 needed for reprocessing with [RP]</notes></value>
3582 </enum>
3583 <description>The type of the request; either CAPTURE or
Eino-Ville Talvala7fabc1e2014-02-10 12:39:35 -08003584 REPROCESS. For HAL3, this tag is redundant.
3585 </description>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07003586 <tag id="HAL2" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003587 </entry>
3588 </controls>
3589 <static>
Igor Murashkin35a108f2014-05-27 10:51:25 -07003590 <entry name="maxNumOutputStreams" type="int32" visibility="hidden"
Igor Murashkinca256272014-10-02 15:27:09 -07003591 container="array" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003592 <array>
3593 <size>3</size>
3594 </array>
Zhijun He12744b22014-01-22 15:58:57 -08003595 <description>The maximum numbers of different types of output streams
3596 that can be configured and used simultaneously by a camera device.
3597 </description>
3598 <range>
Zhijun He3e6b6182014-04-24 11:17:25 -07003599 For processed (and stalling) format streams, &amp;gt;= 1.
Zhijun He12744b22014-01-22 15:58:57 -08003600
Zhijun He3e6b6182014-04-24 11:17:25 -07003601 For Raw format (either stalling or non-stalling) streams, &amp;gt;= 0.
Zhijun He12744b22014-01-22 15:58:57 -08003602
Zhijun He3e6b6182014-04-24 11:17:25 -07003603 For processed (but not stalling) format streams, &amp;gt;= 3
Zhijun He2e76d002014-02-12 13:37:03 -08003604 for FULL mode devices (`android.info.supportedHardwareLevel == FULL`);
3605 &amp;gt;= 2 for LIMITED mode devices (`android.info.supportedHardwareLevel == LIMITED`).
Zhijun He12744b22014-01-22 15:58:57 -08003606 </range>
3607 <details>
3608 This is a 3 element tuple that contains the max number of output simultaneous
Zhijun He3e6b6182014-04-24 11:17:25 -07003609 streams for raw sensor, processed (but not stalling), and processed (and stalling)
3610 formats respectively. For example, assuming that JPEG is typically a processed and
3611 stalling stream, if max raw sensor format output stream number is 1, max YUV streams
Zhijun He12744b22014-01-22 15:58:57 -08003612 number is 3, and max JPEG stream number is 2, then this tuple should be `(1, 3, 2)`.
3613
3614 This lists the upper bound of the number of output streams supported by
3615 the camera device. Using more streams simultaneously may require more hardware and
Igor Murashkin35a108f2014-05-27 10:51:25 -07003616 CPU resources that will consume more power. The image format for an output stream can
Zhijun He3e6b6182014-04-24 11:17:25 -07003617 be any supported format provided by android.scaler.availableStreamConfigurations.
3618 The formats defined in android.scaler.availableStreamConfigurations can be catergorized
3619 into the 3 stream types as below:
Zhijun He12744b22014-01-22 15:58:57 -08003620
Zhijun He3e6b6182014-04-24 11:17:25 -07003621 * Processed (but stalling): any non-RAW format with a stallDurations &amp;gt; 0.
3622 Typically JPEG format (ImageFormat#JPEG).
Zhijun Hef51d4702014-07-01 04:43:52 -07003623 * Raw formats: ImageFormat#RAW_SENSOR, ImageFormat#RAW10 and ImageFormat#RAW_OPAQUE.
Zhijun He3e6b6182014-04-24 11:17:25 -07003624 * Processed (but not-stalling): any non-RAW format without a stall duration.
3625 Typically ImageFormat#YUV_420_888, ImageFormat#NV21, ImageFormat#YV12.
Zhijun He12744b22014-01-22 15:58:57 -08003626 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003627 <tag id="BC" />
3628 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07003629 <entry name="maxNumOutputRaw" type="int32" visibility="public" synthetic="true" hwlevel="legacy">
Igor Murashkin35a108f2014-05-27 10:51:25 -07003630 <description>The maximum numbers of different types of output streams
3631 that can be configured and used simultaneously by a camera device
3632 for any `RAW` formats.
3633 </description>
3634 <range>
3635 &amp;gt;= 0
3636 </range>
3637 <details>
3638 This value contains the max number of output simultaneous
3639 streams from the raw sensor.
3640
3641 This lists the upper bound of the number of output streams supported by
3642 the camera device. Using more streams simultaneously may require more hardware and
3643 CPU resources that will consume more power. The image format for this kind of an output stream can
3644 be any `RAW` and supported format provided by android.scaler.streamConfigurationMap.
3645
3646 In particular, a `RAW` format is typically one of:
3647
3648 * ImageFormat#RAW_SENSOR
Zhijun Hef51d4702014-07-01 04:43:52 -07003649 * ImageFormat#RAW10
Igor Murashkin35a108f2014-05-27 10:51:25 -07003650 * Opaque `RAW`
Igor Murashkinca256272014-10-02 15:27:09 -07003651
3652 LEGACY mode devices (android.info.supportedHardwareLevel `==` LEGACY)
3653 never support raw streams.
Igor Murashkin35a108f2014-05-27 10:51:25 -07003654 </details>
3655 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07003656 <entry name="maxNumOutputProc" type="int32" visibility="public" synthetic="true" hwlevel="legacy">
Igor Murashkin35a108f2014-05-27 10:51:25 -07003657 <description>The maximum numbers of different types of output streams
3658 that can be configured and used simultaneously by a camera device
3659 for any processed (but not-stalling) formats.
3660 </description>
3661 <range>
3662 &amp;gt;= 3
3663 for FULL mode devices (`android.info.supportedHardwareLevel == FULL`);
3664 &amp;gt;= 2 for LIMITED mode devices (`android.info.supportedHardwareLevel == LIMITED`).
3665 </range>
3666 <details>
3667 This value contains the max number of output simultaneous
3668 streams for any processed (but not-stalling) formats.
3669
3670 This lists the upper bound of the number of output streams supported by
3671 the camera device. Using more streams simultaneously may require more hardware and
3672 CPU resources that will consume more power. The image format for this kind of an output stream can
3673 be any non-`RAW` and supported format provided by android.scaler.streamConfigurationMap.
3674
3675 Processed (but not-stalling) is defined as any non-RAW format without a stall duration.
3676 Typically:
3677
3678 * ImageFormat#YUV_420_888
3679 * ImageFormat#NV21
3680 * ImageFormat#YV12
3681 * Implementation-defined formats, i.e. StreamConfiguration#isOutputSupportedFor(Class)
3682
3683 For full guarantees, query StreamConfigurationMap#getOutputStallDuration with
3684 a processed format -- it will return 0 for a non-stalling stream.
Igor Murashkinca256272014-10-02 15:27:09 -07003685
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003686 LEGACY devices will support at least 2 processing/non-stalling streams.
Igor Murashkin35a108f2014-05-27 10:51:25 -07003687 </details>
3688 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07003689 <entry name="maxNumOutputProcStalling" type="int32" visibility="public" synthetic="true" hwlevel="legacy">
Igor Murashkin35a108f2014-05-27 10:51:25 -07003690 <description>The maximum numbers of different types of output streams
3691 that can be configured and used simultaneously by a camera device
3692 for any processed (and stalling) formats.
3693 </description>
3694 <range>
3695 &amp;gt;= 1
3696 </range>
3697 <details>
3698 This value contains the max number of output simultaneous
3699 streams for any processed (but not-stalling) formats.
3700
3701 This lists the upper bound of the number of output streams supported by
3702 the camera device. Using more streams simultaneously may require more hardware and
3703 CPU resources that will consume more power. The image format for this kind of an output stream can
3704 be any non-`RAW` and supported format provided by android.scaler.streamConfigurationMap.
3705
3706 A processed and stalling format is defined as any non-RAW format with a stallDurations &amp;gt; 0.
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003707 Typically only the `JPEG` format (ImageFormat#JPEG) is a stalling format.
Igor Murashkin35a108f2014-05-27 10:51:25 -07003708
3709 For full guarantees, query StreamConfigurationMap#getOutputStallDuration with
3710 a processed format -- it will return a non-0 value for a stalling stream.
Igor Murashkinca256272014-10-02 15:27:09 -07003711
3712 LEGACY devices will support up to 1 processing/stalling stream.
Igor Murashkin35a108f2014-05-27 10:51:25 -07003713 </details>
3714 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07003715 <entry name="maxNumReprocessStreams" type="int32" visibility="system"
Igor Murashkin6c936c12014-05-13 14:51:49 -07003716 deprecated="true" container="array">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003717 <array>
3718 <size>1</size>
3719 </array>
3720 <description>How many reprocessing streams of any type
Zhijun He12744b22014-01-22 15:58:57 -08003721 can be allocated at the same time.</description>
3722 <range>&amp;gt;= 0</range>
3723 <details>
Igor Murashkin6c936c12014-05-13 14:51:49 -07003724 Only used by HAL2.x.
Zhijun He12744b22014-01-22 15:58:57 -08003725
3726 When set to 0, it means no reprocess stream is supported.
3727 </details>
3728 <tag id="HAL2" />
3729 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07003730 <entry name="maxNumInputStreams" type="int32" visibility="hidden" hwlevel="full">
Zhijun He12744b22014-01-22 15:58:57 -08003731 <description>
3732 The maximum numbers of any type of input streams
3733 that can be configured and used simultaneously by a camera device.
3734 </description>
3735 <range>
Zhijun Hedf726fa2014-06-25 08:35:53 -07003736 0 or 1.
Zhijun He12744b22014-01-22 15:58:57 -08003737 </range>
3738 <details>When set to 0, it means no input stream is supported.
3739
Eino-Ville Talvala7fabc1e2014-02-10 12:39:35 -08003740 The image format for a input stream can be any supported
3741 format provided by
3742 android.scaler.availableInputOutputFormatsMap. When using an
3743 input stream, there must be at least one output stream
3744 configured to to receive the reprocessed images.
Zhijun He12744b22014-01-22 15:58:57 -08003745
3746 For example, for Zero Shutter Lag (ZSL) still capture use case, the input
3747 stream image format will be RAW_OPAQUE, the associated output stream image format
3748 should be JPEG.
3749 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003750 </entry>
3751 </static>
3752 <dynamic>
Igor Murashkin757ec242014-07-25 16:55:18 -07003753 <entry name="frameCount" type="int32" visibility="hidden" deprecated="true">
Igor Murashkin28548d22013-09-10 15:26:20 -07003754 <description>A frame counter set by the framework. This value monotonically
3755 increases with every new result (that is, each new result has a unique
3756 frameCount value).</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003757 <units>count of frames</units>
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08003758 <range>&amp;gt; 0</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08003759 <details>Reset on release()</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003760 </entry>
3761 <clone entry="android.request.id" kind="controls"></clone>
3762 <clone entry="android.request.metadataMode"
3763 kind="controls"></clone>
3764 <clone entry="android.request.outputStreams"
3765 kind="controls"></clone>
Igor Murashkinca256272014-10-02 15:27:09 -07003766 <entry name="pipelineDepth" type="byte" visibility="public" hwlevel="legacy">
Igor Murashkina46e02f2014-01-09 17:43:38 -08003767 <description>Specifies the number of pipeline stages the frame went
3768 through from when it was exposed to when the final completed result
3769 was available to the framework.</description>
3770 <range>&amp;lt;= android.request.pipelineMaxDepth</range>
3771 <details>Depending on what settings are used in the request, and
3772 what streams are configured, the data may undergo less processing,
3773 and some pipeline stages skipped.
3774
3775 See android.request.pipelineMaxDepth for more details.
3776 </details>
3777 <hal_details>
3778 This value must always represent the accurate count of how many
3779 pipeline stages were actually used.
3780 </hal_details>
3781 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08003782 </dynamic>
Igor Murashkina46e02f2014-01-09 17:43:38 -08003783 <static>
Igor Murashkinca256272014-10-02 15:27:09 -07003784 <entry name="pipelineMaxDepth" type="byte" visibility="public" hwlevel="legacy">
Igor Murashkina46e02f2014-01-09 17:43:38 -08003785 <description>Specifies the number of maximum pipeline stages a frame
3786 has to go through from when it's exposed to when it's available
3787 to the framework.</description>
3788 <details>A typical minimum value for this is 2 (one stage to expose,
3789 one stage to readout) from the sensor. The ISP then usually adds
3790 its own stages to do custom HW processing. Further stages may be
3791 added by SW processing.
3792
3793 Depending on what settings are used (e.g. YUV, JPEG) and what
3794 processing is enabled (e.g. face detection), the actual pipeline
3795 depth (specified by android.request.pipelineDepth) may be less than
3796 the max pipeline depth.
3797
3798 A pipeline depth of X stages is equivalent to a pipeline latency of
3799 X frame intervals.
3800
3801 This value will be 8 or less.
3802 </details>
3803 <hal_details>
3804 This value should be 4 or less.
3805 </hal_details>
3806 </entry>
Zhijun He452ed112014-07-17 17:42:56 -07003807 <entry name="partialResultCount" type="int32" visibility="public" optional="true">
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003808 <description>Defines how many sub-components
Igor Murashkin2e291102014-01-10 14:18:30 -08003809 a result will be composed of.
3810 </description>
3811 <range>&amp;gt;= 1</range>
3812 <details>In order to combat the pipeline latency, partial results
3813 may be delivered to the application layer from the camera device as
3814 soon as they are available.
3815
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003816 Optional; defaults to 1. A value of 1 means that partial
3817 results are not supported, and only the final TotalCaptureResult will
3818 be produced by the camera device.
Igor Murashkin2e291102014-01-10 14:18:30 -08003819
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07003820 A typical use case for this might be: after requesting an
3821 auto-focus (AF) lock the new AF state might be available 50%
3822 of the way through the pipeline. The camera device could
3823 then immediately dispatch this state via a partial result to
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003824 the application, and the rest of the metadata via later
3825 partial results.
Igor Murashkin2e291102014-01-10 14:18:30 -08003826 </details>
3827 </entry>
Igor Murashkin57d570d2014-02-06 15:35:37 -08003828 <entry name="availableCapabilities" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07003829 enum="true" container="array" hwlevel="legacy">
Zhijun Hec593aee2014-05-29 13:31:49 -07003830 <array>
3831 <size>n</size>
3832 </array>
Igor Murashkin57d570d2014-02-06 15:35:37 -08003833 <enum>
Eino-Ville Talvala3310f822014-07-09 09:34:05 -07003834 <value>BACKWARD_COMPATIBLE
Igor Murashkin57d570d2014-02-06 15:35:37 -08003835 <notes>The minimal set of capabilities that every camera
3836 device (regardless of android.info.supportedHardwareLevel)
Eino-Ville Talvala3310f822014-07-09 09:34:05 -07003837 supports.
Igor Murashkin57d570d2014-02-06 15:35:37 -08003838
Eino-Ville Talvala3310f822014-07-09 09:34:05 -07003839 This capability is listed by all devices, and
3840 indicates that the camera device has a feature set
3841 that's comparable to the baseline requirements for the
3842 older android.hardware.Camera API.
Igor Murashkin57d570d2014-02-06 15:35:37 -08003843 </notes>
3844 </value>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003845 <value optional="true">MANUAL_SENSOR
Igor Murashkin57d570d2014-02-06 15:35:37 -08003846 <notes>
3847 The camera device can be manually controlled (3A algorithms such
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003848 as auto-exposure, and auto-focus can be bypassed).
Zhijun He5fb671c2014-05-21 17:51:05 -07003849 The camera device supports basic manual control of the sensor image
3850 acquisition related stages. This means the following controls are
3851 guaranteed to be supported:
Igor Murashkin57d570d2014-02-06 15:35:37 -08003852
Zhijun He5fb671c2014-05-21 17:51:05 -07003853 * Manual frame duration control
3854 * android.sensor.frameDuration
3855 * android.sensor.info.maxFrameDuration
Igor Murashkin57d570d2014-02-06 15:35:37 -08003856 * Manual exposure control
3857 * android.sensor.exposureTime
3858 * android.sensor.info.exposureTimeRange
3859 * Manual sensitivity control
3860 * android.sensor.sensitivity
3861 * android.sensor.info.sensitivityRange
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003862 * Manual lens control (if the lens is adjustable)
Igor Murashkin57d570d2014-02-06 15:35:37 -08003863 * android.lens.*
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003864 * Manual flash control (if a flash unit is present)
Igor Murashkin57d570d2014-02-06 15:35:37 -08003865 * android.flash.*
3866 * Manual black level locking
3867 * android.blackLevel.lock
3868
3869 If any of the above 3A algorithms are enabled, then the camera
3870 device will accurately report the values applied by 3A in the
3871 result.
Zhijun He5fb671c2014-05-21 17:51:05 -07003872
3873 A given camera device may also support additional manual sensor controls,
3874 but this capability only covers the above list of controls.
Ruben Brunk6285c4d2014-06-18 17:13:19 -07003875
3876 If this is supported, android.scaler.streamConfigurationMap will
3877 additionally return a min frame duration that is greater than
3878 zero for each supported size-format combination.
Igor Murashkin57d570d2014-02-06 15:35:37 -08003879 </notes>
3880 </value>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003881 <value optional="true">MANUAL_POST_PROCESSING
Igor Murashkin57d570d2014-02-06 15:35:37 -08003882 <notes>
Zhijun He5fb671c2014-05-21 17:51:05 -07003883 The camera device post-processing stages can be manually controlled.
3884 The camera device supports basic manual control of the image post-processing
3885 stages. This means the following controls are guaranteed to be supported:
Igor Murashkin57d570d2014-02-06 15:35:37 -08003886
3887 * Manual tonemap control
Yin-Chia Yeh0a5f2692014-05-27 09:48:07 -07003888 * android.tonemap.curve
Igor Murashkin57d570d2014-02-06 15:35:37 -08003889 * android.tonemap.mode
3890 * android.tonemap.maxCurvePoints
3891 * Manual white balance control
3892 * android.colorCorrection.transform
3893 * android.colorCorrection.gains
Zhijun Hedf726fa2014-06-25 08:35:53 -07003894 * Manual lens shading map control
3895 * android.shading.mode
3896 * android.statistics.lensShadingMapMode
Igor Murashkin57d570d2014-02-06 15:35:37 -08003897 * android.statistics.lensShadingMap
3898 * android.lens.info.shadingMapSize
Zhijun He450e01c2014-07-01 18:27:42 -07003899 * Manual aberration correction control (if aberration correction is supported)
Zhijun He33776412014-08-18 10:55:33 -07003900 * android.colorCorrection.aberrationMode
3901 * android.colorCorrection.availableAberrationModes
Igor Murashkin57d570d2014-02-06 15:35:37 -08003902
3903 If auto white balance is enabled, then the camera device
3904 will accurately report the values applied by AWB in the result.
3905
Zhijun He5fb671c2014-05-21 17:51:05 -07003906 A given camera device may also support additional post-processing
3907 controls, but this capability only covers the above list of controls.
Igor Murashkin57d570d2014-02-06 15:35:37 -08003908 </notes>
3909 </value>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07003910 <value optional="true">RAW
Eino-Ville Talvala3310f822014-07-09 09:34:05 -07003911 <notes>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07003912 The camera device supports outputting RAW buffers and
3913 metadata for interpreting them.
3914
3915 Devices supporting the RAW capability allow both for
3916 saving DNG files, and for direct application processing of
3917 raw sensor images.
Eino-Ville Talvala3310f822014-07-09 09:34:05 -07003918
3919 * RAW_SENSOR is supported as an output format.
3920 * The maximum available resolution for RAW_SENSOR streams
3921 will match either the value in
3922 android.sensor.info.pixelArraySize or
3923 android.sensor.info.activeArraySize.
3924 * All DNG-related optional metadata entries are provided
3925 by the camera device.
3926 </notes>
3927 </value>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07003928 <value optional="true" hidden="true">ZSL
Igor Murashkin57d570d2014-02-06 15:35:37 -08003929 <notes>
3930 The camera device supports the Zero Shutter Lag use case.
3931
3932 * At least one input stream can be used.
3933 * RAW_OPAQUE is supported as an output/input format
3934 * Using RAW_OPAQUE does not cause a frame rate drop
3935 relative to the sensor's maximum capture rate (at that
3936 resolution).
3937 * RAW_OPAQUE will be reprocessable into both YUV_420_888
3938 and JPEG formats.
3939 * The maximum available resolution for RAW_OPAQUE streams
3940 (both input/output) will match the maximum available
3941 resolution of JPEG streams.
3942 </notes>
3943 </value>
Ruben Brunka43690a2014-11-11 11:47:03 -08003944 <value optional="true">READ_SENSOR_SETTINGS
3945 <notes>
3946 The camera device supports accurately reporting the sensor settings for many of
3947 the sensor controls while the built-in 3A algorithm is running. This allows
3948 reporting of sensor settings even when these settings cannot be manually changed.
3949
3950 The values reported for the following controls are guaranteed to be available
3951 in the CaptureResult, including when 3A is enabled:
3952
3953 * Exposure control
3954 * android.sensor.exposureTime
3955 * Sensitivity control
3956 * android.sensor.sensitivity
3957 * Lens controls (if the lens is adjustable)
3958 * android.lens.focusDistance
3959 * android.lens.aperture
3960
3961 This capability is a subset of the MANUAL_SENSOR control capability, and will
3962 always be included if the MANUAL_SENSOR capability is available.
3963 </notes>
3964 </value>
Igor Murashkin57d570d2014-02-06 15:35:37 -08003965 </enum>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003966 <description>List of capabilities that this camera device
Igor Murashkin57d570d2014-02-06 15:35:37 -08003967 advertises as fully supporting.</description>
3968 <details>
3969 A capability is a contract that the camera device makes in order
3970 to be able to satisfy one or more use cases.
3971
3972 Listing a capability guarantees that the whole set of features
3973 required to support a common use will all be available.
3974
3975 Using a subset of the functionality provided by an unsupported
3976 capability may be possible on a specific camera device implementation;
3977 to do this query each of android.request.availableRequestKeys,
3978 android.request.availableResultKeys,
3979 android.request.availableCharacteristicsKeys.
3980
Igor Murashkin57d570d2014-02-06 15:35:37 -08003981 The following capabilities are guaranteed to be available on
3982 android.info.supportedHardwareLevel `==` FULL devices:
3983
3984 * MANUAL_SENSOR
Zhijun He5a1276a2014-06-02 16:46:03 -07003985 * MANUAL_POST_PROCESSING
Igor Murashkin57d570d2014-02-06 15:35:37 -08003986
3987 Other capabilities may be available on either FULL or LIMITED
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07003988 devices, but the application should query this key to be sure.
Igor Murashkin57d570d2014-02-06 15:35:37 -08003989 </details>
3990 <hal_details>
3991 Additional constraint details per-capability will be available
3992 in the Compatibility Test Suite.
3993
Eino-Ville Talvala3310f822014-07-09 09:34:05 -07003994 Minimum baseline requirements required for the
3995 BACKWARD_COMPATIBLE capability are not explicitly listed.
Igor Murashkin57d570d2014-02-06 15:35:37 -08003996 Instead refer to "BC" tags and the camera CTS tests in the
Eino-Ville Talvala3310f822014-07-09 09:34:05 -07003997 android.hardware.camera2.cts package.
Igor Murashkin57d570d2014-02-06 15:35:37 -08003998
3999 Listed controls that can be either request or result (e.g.
4000 android.sensor.exposureTime) must be available both in the
4001 request and the result in order to be considered to be
4002 capability-compliant.
4003
4004 For example, if the HAL claims to support MANUAL control,
4005 then exposure time must be configurable via the request _and_
4006 the actual exposure applied must be available via
4007 the result.
Ruben Brunk6285c4d2014-06-18 17:13:19 -07004008
4009 If MANUAL_SENSOR is omitted, the HAL may choose to omit the
4010 android.scaler.availableMinFrameDurations static property entirely.
Igor Murashkin57d570d2014-02-06 15:35:37 -08004011 </hal_details>
4012 </entry>
4013 <entry name="availableRequestKeys" type="int32" visibility="hidden"
Igor Murashkinca256272014-10-02 15:27:09 -07004014 container="array" hwlevel="legacy">
Igor Murashkin57d570d2014-02-06 15:35:37 -08004015 <array>
4016 <size>n</size>
4017 </array>
4018 <description>A list of all keys that the camera device has available
4019 to use with CaptureRequest.</description>
4020
4021 <details>Attempting to set a key into a CaptureRequest that is not
4022 listed here will result in an invalid request and will be rejected
4023 by the camera device.
4024
4025 This field can be used to query the feature set of a camera device
4026 at a more granular level than capabilities. This is especially
4027 important for optional keys that are not listed under any capability
4028 in android.request.availableCapabilities.
Igor Murashkin57d570d2014-02-06 15:35:37 -08004029 </details>
4030 <hal_details>
4031 Vendor tags must not be listed here. Use the vendor tag metadata
4032 extensions C api instead (refer to camera3.h for more details).
4033
4034 Setting/getting vendor tags will be checked against the metadata
4035 vendor extensions API and not against this field.
4036
4037 The HAL must not consume any request tags that are not listed either
4038 here or in the vendor tag list.
4039
4040 The public camera2 API will always make the vendor tags visible
4041 via CameraCharacteristics#getAvailableCaptureRequestKeys.
4042 </hal_details>
4043 </entry>
4044 <entry name="availableResultKeys" type="int32" visibility="hidden"
Igor Murashkinca256272014-10-02 15:27:09 -07004045 container="array" hwlevel="legacy">
Igor Murashkin57d570d2014-02-06 15:35:37 -08004046 <array>
4047 <size>n</size>
4048 </array>
4049 <description>A list of all keys that the camera device has available
4050 to use with CaptureResult.</description>
4051
4052 <details>Attempting to get a key from a CaptureResult that is not
4053 listed here will always return a `null` value. Getting a key from
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004054 a CaptureResult that is listed here will generally never return a `null`
Igor Murashkin57d570d2014-02-06 15:35:37 -08004055 value.
4056
4057 The following keys may return `null` unless they are enabled:
4058
4059 * android.statistics.lensShadingMap (non-null iff android.statistics.lensShadingMapMode == ON)
4060
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004061 (Those sometimes-null keys will nevertheless be listed here
Igor Murashkin57d570d2014-02-06 15:35:37 -08004062 if they are available.)
4063
4064 This field can be used to query the feature set of a camera device
4065 at a more granular level than capabilities. This is especially
4066 important for optional keys that are not listed under any capability
4067 in android.request.availableCapabilities.
Igor Murashkin57d570d2014-02-06 15:35:37 -08004068 </details>
4069 <hal_details>
4070 Tags listed here must always have an entry in the result metadata,
4071 even if that size is 0 elements. Only array-type tags (e.g. lists,
4072 matrices, strings) are allowed to have 0 elements.
4073
4074 Vendor tags must not be listed here. Use the vendor tag metadata
4075 extensions C api instead (refer to camera3.h for more details).
4076
4077 Setting/getting vendor tags will be checked against the metadata
4078 vendor extensions API and not against this field.
4079
4080 The HAL must not produce any result tags that are not listed either
4081 here or in the vendor tag list.
4082
4083 The public camera2 API will always make the vendor tags visible
4084 via CameraCharacteristics#getAvailableCaptureResultKeys.
4085 </hal_details>
4086 </entry>
4087 <entry name="availableCharacteristicsKeys" type="int32" visibility="hidden"
Igor Murashkinca256272014-10-02 15:27:09 -07004088 container="array" hwlevel="legacy">
Igor Murashkin57d570d2014-02-06 15:35:37 -08004089 <array>
4090 <size>n</size>
4091 </array>
4092 <description>A list of all keys that the camera device has available
4093 to use with CameraCharacteristics.</description>
4094 <details>This entry follows the same rules as
4095 android.request.availableResultKeys (except that it applies for
4096 CameraCharacteristics instead of CaptureResult). See above for more
4097 details.
Igor Murashkin57d570d2014-02-06 15:35:37 -08004098 </details>
4099 <hal_details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004100 Keys listed here must always have an entry in the static info metadata,
Igor Murashkin57d570d2014-02-06 15:35:37 -08004101 even if that size is 0 elements. Only array-type tags (e.g. lists,
4102 matrices, strings) are allowed to have 0 elements.
4103
4104 Vendor tags must not be listed here. Use the vendor tag metadata
4105 extensions C api instead (refer to camera3.h for more details).
4106
4107 Setting/getting vendor tags will be checked against the metadata
4108 vendor extensions API and not against this field.
4109
4110 The HAL must not have any tags in its static info that are not listed
4111 either here or in the vendor tag list.
4112
4113 The public camera2 API will always make the vendor tags visible
4114 via CameraCharacteristics#getKeys.
4115 </hal_details>
4116 </entry>
Igor Murashkina46e02f2014-01-09 17:43:38 -08004117 </static>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004118 </section>
4119 <section name="scaler">
4120 <controls>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07004121 <entry name="cropRegion" type="int32" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07004122 container="array" typedef="rectangle" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004123 <array>
Eino-Ville Talvalae04ec6e2013-04-16 15:35:18 -07004124 <size>4</size>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004125 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004126 <description>The desired region of the sensor to read out for this capture.</description>
4127 <units>Pixel coordinates relative to
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07004128 android.sensor.info.activeArraySize</units>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08004129 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004130 This control can be used to implement digital zoom.
4131
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07004132 The crop region coordinate system is based off
4133 android.sensor.info.activeArraySize, with `(0, 0)` being the
4134 top-left corner of the sensor active array.
4135
4136 Output streams use this rectangle to produce their output,
4137 cropping to a smaller region if necessary to maintain the
4138 stream's aspect ratio, then scaling the sensor input to
4139 match the output's configured resolution.
4140
4141 The crop region is applied after the RAW to other color
4142 space (e.g. YUV) conversion. Since raw streams
4143 (e.g. RAW16) don't have the conversion stage, they are not
4144 croppable. The crop region will be ignored by raw streams.
Zhijun He507458b2014-05-21 11:11:10 -07004145
4146 For non-raw streams, any additional per-stream cropping will
4147 be done to maximize the final pixel area of the stream.
Eino-Ville Talvalae04ec6e2013-04-16 15:35:18 -07004148
4149 For example, if the crop region is set to a 4:3 aspect
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07004150 ratio, then 4:3 streams will use the exact crop
4151 region. 16:9 streams will further crop vertically
Eino-Ville Talvalae04ec6e2013-04-16 15:35:18 -07004152 (letterbox).
4153
4154 Conversely, if the crop region is set to a 16:9, then 4:3
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07004155 outputs will crop horizontally (pillarbox), and 16:9
4156 streams will match exactly. These additional crops will
Eino-Ville Talvalae04ec6e2013-04-16 15:35:18 -07004157 be centered within the crop region.
4158
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07004159 The width and height of the crop region cannot
4160 be set to be smaller than
4161 `floor( activeArraySize.width / android.scaler.availableMaxDigitalZoom )` and
4162 `floor( activeArraySize.height / android.scaler.availableMaxDigitalZoom )`, respectively.
4163
4164 The camera device may adjust the crop region to account
4165 for rounding and other hardware requirements; the final
4166 crop region used will be included in the output capture
4167 result.
4168 </details>
4169 <hal_details>
Eino-Ville Talvalae04ec6e2013-04-16 15:35:18 -07004170 The output streams must maintain square pixels at all
4171 times, no matter what the relative aspect ratios of the
4172 crop region and the stream are. Negative values for
4173 corner are allowed for raw output if full pixel array is
4174 larger than active pixel array. Width and height may be
4175 rounded to nearest larger supportable width, especially
4176 for raw output, where only a few fixed scales may be
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07004177 possible.
4178
4179 HAL2.x uses only (x, y, width)
4180 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004181 <tag id="BC" />
4182 </entry>
4183 </controls>
4184 <static>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07004185 <entry name="availableFormats" type="int32"
Igor Murashkin6c936c12014-05-13 14:51:49 -07004186 visibility="hidden" deprecated="true" enum="true"
Eino-Ville Talvalad4e240a2013-08-08 12:56:37 -07004187 container="array" typedef="imageFormat">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004188 <array>
4189 <size>n</size>
4190 </array>
Igor Murashkin96bd0192012-11-19 16:49:37 -08004191 <enum>
Ruben Brunk8f48c182014-02-04 18:27:20 -08004192 <value optional="true" id="0x20">RAW16
4193 <notes>
4194 RAW16 is a standard, cross-platform format for raw image
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07004195 buffers with 16-bit pixels.
4196
4197 Buffers of this format are typically expected to have a
4198 Bayer Color Filter Array (CFA) layout, which is given in
4199 android.sensor.info.colorFilterArrangement. Sensors with
4200 CFAs that are not representable by a format in
4201 android.sensor.info.colorFilterArrangement should not
4202 use this format.
Ruben Brunk8f48c182014-02-04 18:27:20 -08004203
4204 Buffers of this format will also follow the constraints given for
4205 RAW_OPAQUE buffers, but with relaxed performance constraints.
4206
Eino-Ville Talvala7fabc1e2014-02-10 12:39:35 -08004207 See android.scaler.availableInputOutputFormatsMap for
4208 the full set of performance guarantees.
Ruben Brunk8f48c182014-02-04 18:27:20 -08004209 </notes>
4210 </value>
4211 <value optional="true" id="0x24">RAW_OPAQUE
4212 <notes>
4213 RAW_OPAQUE is a format for raw image buffers coming from an
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07004214 image sensor.
4215
4216 The actual structure of buffers of this format is
Ruben Brunk8f48c182014-02-04 18:27:20 -08004217 platform-specific, but must follow several constraints:
4218
4219 1. No image post-processing operations may have been applied to
4220 buffers of this type. These buffers contain raw image data coming
4221 directly from the image sensor.
4222 1. If a buffer of this format is passed to the camera device for
4223 reprocessing, the resulting images will be identical to the images
4224 produced if the buffer had come directly from the sensor and was
4225 processed with the same settings.
4226
4227 The intended use for this format is to allow access to the native
4228 raw format buffers coming directly from the camera sensor without
4229 any additional conversions or decrease in framerate.
4230
Eino-Ville Talvala7fabc1e2014-02-10 12:39:35 -08004231 See android.scaler.availableInputOutputFormatsMap for the full set of
Ruben Brunk8f48c182014-02-04 18:27:20 -08004232 performance guarantees.
4233 </notes>
Igor Murashkin96bd0192012-11-19 16:49:37 -08004234 </value>
Zhijun Heb8317e22014-01-16 09:47:07 -08004235 <value optional="true" id="0x32315659">YV12
Ruben Brunk8f48c182014-02-04 18:27:20 -08004236 <notes>YCrCb 4:2:0 Planar</notes>
Igor Murashkin96bd0192012-11-19 16:49:37 -08004237 </value>
Zhijun Heb8317e22014-01-16 09:47:07 -08004238 <value optional="true" id="0x11">YCrCb_420_SP
Ruben Brunk8f48c182014-02-04 18:27:20 -08004239 <notes>NV21</notes>
Igor Murashkin96bd0192012-11-19 16:49:37 -08004240 </value>
Zhijun Hec2eebff2013-05-16 17:49:35 -07004241 <value id="0x22">IMPLEMENTATION_DEFINED
Ruben Brunk8f48c182014-02-04 18:27:20 -08004242 <notes>System internal format, not application-accessible</notes>
Zhijun Hec2eebff2013-05-16 17:49:35 -07004243 </value>
Zhijun Hec2eebff2013-05-16 17:49:35 -07004244 <value id="0x23">YCbCr_420_888
Ruben Brunk8f48c182014-02-04 18:27:20 -08004245 <notes>Flexible YUV420 Format</notes>
Zhijun Hec2eebff2013-05-16 17:49:35 -07004246 </value>
Zhijun Hec2eebff2013-05-16 17:49:35 -07004247 <value id="0x21">BLOB
Ruben Brunk8f48c182014-02-04 18:27:20 -08004248 <notes>JPEG format</notes>
Igor Murashkin96bd0192012-11-19 16:49:37 -08004249 </value>
4250 </enum>
Zhijun Heb8317e22014-01-16 09:47:07 -08004251 <description>The list of image formats that are supported by this
Igor Murashkin7f15ddd2014-02-04 18:02:27 -08004252 camera device for output streams.</description>
Zhijun Heb8317e22014-01-16 09:47:07 -08004253 <details>
4254 All camera devices will support JPEG and YUV_420_888 formats.
4255
4256 When set to YUV_420_888, application can access the YUV420 data directly.
4257 </details>
4258 <hal_details>
4259 These format values are from HAL_PIXEL_FORMAT_* in
4260 system/core/include/system/graphics.h.
4261
4262 When IMPLEMENTATION_DEFINED is used, the platform
4263 gralloc module will select a format based on the usage flags provided
4264 by the camera HAL device and the other endpoint of the stream. It is
4265 usually used by preview and recording streams, where the application doesn't
4266 need access the image data.
4267
4268 YCbCr_420_888 format must be supported by the HAL. When an image stream
4269 needs CPU/application direct access, this format will be used.
4270
4271 The BLOB format must be supported by the HAL. This is used for the JPEG stream.
4272
Ruben Brunk8f48c182014-02-04 18:27:20 -08004273 A RAW_OPAQUE buffer should contain only pixel data. It is strongly
4274 recommended that any information used by the camera device when
4275 processing images is fully expressed by the result metadata
4276 for that image buffer.
Zhijun Heb8317e22014-01-16 09:47:07 -08004277 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004278 <tag id="BC" />
4279 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004280 <entry name="availableJpegMinDurations" type="int64" visibility="hidden" deprecated="true"
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004281 container="array">
4282 <array>
4283 <size>n</size>
4284 </array>
4285 <description>The minimum frame duration that is supported
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004286 for each resolution in android.scaler.availableJpegSizes.
4287 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004288 <units>Nanoseconds</units>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004289 <range>TODO: Remove property.</range>
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004290 <details>
4291 This corresponds to the minimum steady-state frame duration when only
4292 that JPEG stream is active and captured in a burst, with all
4293 processing (typically in android.*.mode) set to FAST.
4294
4295 When multiple streams are configured, the minimum
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08004296 frame duration will be &amp;gt;= max(individual stream min
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08004297 durations)</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004298 <tag id="BC" />
4299 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004300 <entry name="availableJpegSizes" type="int32" visibility="hidden"
4301 deprecated="true" container="array" typedef="size">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004302 <array>
4303 <size>n</size>
4304 <size>2</size>
4305 </array>
Zhijun Heb8317e22014-01-16 09:47:07 -08004306 <description>The JPEG resolutions that are supported by this camera device.</description>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004307 <range>TODO: Remove property.</range>
Zhijun Heb8317e22014-01-16 09:47:07 -08004308 <details>
4309 The resolutions are listed as `(width, height)` pairs. All camera devices will support
4310 sensor maximum resolution (defined by android.sensor.info.activeArraySize).
4311 </details>
4312 <hal_details>
4313 The HAL must include sensor maximum resolution
4314 (defined by android.sensor.info.activeArraySize),
4315 and should include half/quarter of sensor maximum resolution.
4316 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004317 <tag id="BC" />
4318 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07004319 <entry name="availableMaxDigitalZoom" type="float" visibility="public"
4320 hwlevel="legacy">
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07004321 <description>The maximum ratio between both active area width
4322 and crop region width, and active area height and
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004323 crop region height, for android.scaler.cropRegion.
4324 </description>
4325 <units>Zoom scale factor</units>
4326 <range>&amp;gt;=1</range>
4327 <details>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07004328 This represents the maximum amount of zooming possible by
4329 the camera device, or equivalently, the minimum cropping
4330 window size.
4331
4332 Crop regions that have a width or height that is smaller
4333 than this ratio allows will be rounded up to the minimum
4334 allowed size by the camera device.
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004335 </details>
Igor Murashkinf11a4df2013-05-07 10:00:46 -07004336 <tag id="BC" />
Igor Murashkine6b66462012-11-26 15:26:38 -08004337 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004338 <entry name="availableProcessedMinDurations" type="int64" visibility="hidden" deprecated="true"
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004339 container="array">
4340 <array>
4341 <size>n</size>
4342 </array>
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004343 <description>For each available processed output size (defined in
4344 android.scaler.availableProcessedSizes), this property lists the
4345 minimum supportable frame duration for that size.
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004346 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004347 <units>Nanoseconds</units>
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004348 <details>
4349 This should correspond to the frame duration when only that processed
4350 stream is active, with all processing (typically in android.*.mode)
4351 set to FAST.
4352
4353 When multiple streams are configured, the minimum frame duration will
4354 be &amp;gt;= max(individual stream min durations).
4355 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004356 <tag id="BC" />
4357 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004358 <entry name="availableProcessedSizes" type="int32" visibility="hidden"
4359 deprecated="true" container="array" typedef="size">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004360 <array>
4361 <size>n</size>
4362 <size>2</size>
4363 </array>
4364 <description>The resolutions available for use with
4365 processed output streams, such as YV12, NV12, and
4366 platform opaque YUV/RGB streams to the GPU or video
Zhijun Heb8317e22014-01-16 09:47:07 -08004367 encoders.</description>
4368 <details>
4369 The resolutions are listed as `(width, height)` pairs.
4370
4371 For a given use case, the actual maximum supported resolution
4372 may be lower than what is listed here, depending on the destination
4373 Surface for the image data. For example, for recording video,
4374 the video encoder chosen may have a maximum size limit (e.g. 1080p)
4375 smaller than what the camera (e.g. maximum resolution is 3264x2448)
4376 can provide.
4377
4378 Please reference the documentation for the image data destination to
4379 check if it limits the maximum size for image data.
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08004380 </details>
Zhijun Heb8317e22014-01-16 09:47:07 -08004381 <hal_details>
4382 For FULL capability devices (`android.info.supportedHardwareLevel == FULL`),
4383 the HAL must include all JPEG sizes listed in android.scaler.availableJpegSizes
4384 and each below resolution if it is smaller than or equal to the sensor
4385 maximum resolution (if they are not listed in JPEG sizes already):
4386
4387 * 240p (320 x 240)
4388 * 480p (640 x 480)
4389 * 720p (1280 x 720)
4390 * 1080p (1920 x 1080)
4391
4392 For LIMITED capability devices (`android.info.supportedHardwareLevel == LIMITED`),
4393 the HAL only has to list up to the maximum video size supported by the devices.
4394 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004395 <tag id="BC" />
4396 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004397 <entry name="availableRawMinDurations" type="int64" deprecated="true"
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004398 container="array">
4399 <array>
4400 <size>n</size>
4401 </array>
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004402 <description>
Zhijun Hebdc94c42014-01-21 18:28:30 -08004403 For each available raw output size (defined in
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004404 android.scaler.availableRawSizes), this property lists the minimum
4405 supportable frame duration for that size.
4406 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004407 <units>Nanoseconds</units>
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004408 <details>
4409 Should correspond to the frame duration when only the raw stream is
4410 active.
4411
4412 When multiple streams are configured, the minimum
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08004413 frame duration will be &amp;gt;= max(individual stream min
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08004414 durations)</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004415 <tag id="BC" />
4416 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004417 <entry name="availableRawSizes" type="int32" deprecated="true"
Igor Murashkinb8dc8812013-07-17 16:29:34 -07004418 container="array" typedef="size">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004419 <array>
4420 <size>n</size>
4421 <size>2</size>
4422 </array>
4423 <description>The resolutions available for use with raw
4424 sensor output streams, listed as width,
4425 height</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004426 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004427 </static>
4428 <dynamic>
4429 <clone entry="android.scaler.cropRegion" kind="controls">
4430 </clone>
4431 </dynamic>
Igor Murashkin7f15ddd2014-02-04 18:02:27 -08004432 <static>
4433 <entry name="availableInputOutputFormatsMap" type="int32"
Igor Murashkin6c936c12014-05-13 14:51:49 -07004434 visibility="hidden"
Igor Murashkinca256272014-10-02 15:27:09 -07004435 container="array" typedef="imageFormat"
4436 hwlevel="full">
Igor Murashkin7f15ddd2014-02-04 18:02:27 -08004437 <array>
4438 <size>n</size>
4439 </array>
4440 <description>The mapping of image formats that are supported by this
4441 camera device for input streams, to their corresponding output formats.
4442 </description>
Igor Murashkin7f15ddd2014-02-04 18:02:27 -08004443 <details>
4444 All camera devices with at least 1
Eino-Ville Talvala7fabc1e2014-02-10 12:39:35 -08004445 android.request.maxNumInputStreams will have at least one
Igor Murashkin7f15ddd2014-02-04 18:02:27 -08004446 available input format.
4447
4448 The camera device will support the following map of formats,
4449 if its dependent capability is supported:
4450
4451 Input Format | Output Format | Capability
4452 :---------------|:-----------------|:----------
4453 RAW_OPAQUE | JPEG | ZSL
4454 RAW_OPAQUE | YUV_420_888 | ZSL
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07004455 RAW_OPAQUE | RAW16 | RAW
4456 RAW16 | YUV_420_888 | RAW
4457 RAW16 | JPEG | RAW
Igor Murashkin7f15ddd2014-02-04 18:02:27 -08004458
4459 For ZSL-capable camera devices, using the RAW_OPAQUE format
4460 as either input or output will never hurt maximum frame rate (i.e.
Igor Murashkin6c936c12014-05-13 14:51:49 -07004461 StreamConfigurationMap#getOutputStallDuration(int,Size)
4462 for a `format =` RAW_OPAQUE is always 0).
Igor Murashkin7f15ddd2014-02-04 18:02:27 -08004463
4464 Attempting to configure an input stream with output streams not
4465 listed as available in this map is not valid.
4466
Igor Murashkin6c936c12014-05-13 14:51:49 -07004467 TODO: typedef to ReprocessFormatMap
Igor Murashkin7f15ddd2014-02-04 18:02:27 -08004468 </details>
4469 <hal_details>
Zhijun He3e6b6182014-04-24 11:17:25 -07004470 For the formats, see `system/core/include/system/graphics.h` for a definition
4471 of the image format enumerations.
4472
Igor Murashkin7f15ddd2014-02-04 18:02:27 -08004473 This value is encoded as a variable-size array-of-arrays.
4474 The inner array always contains `[format, length, ...]` where
4475 `...` has `length` elements. An inner array is followed by another
4476 inner array if the total metadata entry size hasn't yet been exceeded.
4477
4478 A code sample to read/write this encoding (with a device that
4479 supports reprocessing RAW_OPAQUE to RAW16, YUV_420_888, and JPEG,
4480 and reprocessing RAW16 to YUV_420_888 and JPEG):
4481
4482 // reading
4483 int32_t* contents = &amp;entry.i32[0];
4484 for (size_t i = 0; i &lt; entry.count; ) {
4485 int32_t format = contents[i++];
4486 int32_t length = contents[i++];
4487 int32_t output_formats[length];
4488 memcpy(&amp;output_formats[0], &amp;contents[i],
4489 length * sizeof(int32_t));
4490 i += length;
4491 }
4492
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07004493 // writing (static example, RAW+ZSL)
Igor Murashkin7f15ddd2014-02-04 18:02:27 -08004494 int32_t[] contents = {
4495 RAW_OPAQUE, 3, RAW16, YUV_420_888, BLOB,
4496 RAW16, 2, YUV_420_888, BLOB,
4497 };
4498 update_camera_metadata_entry(metadata, index, &amp;contents[0],
4499 sizeof(contents)/sizeof(contents[0]), &amp;updated_entry);
4500
4501 If the HAL claims to support any of the capabilities listed in the
4502 above details, then it must also support all the input-output
4503 combinations listed for that capability. It can optionally support
4504 additional formats if it so chooses.
4505
4506 Refer to android.scaler.availableFormats for the enum values
4507 which correspond to HAL_PIXEL_FORMAT_* in
4508 system/core/include/system/graphics.h.
4509 </hal_details>
4510 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004511 <entry name="availableStreamConfigurations" type="int32" visibility="hidden"
4512 enum="true" container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07004513 typedef="streamConfiguration" hwlevel="legacy">
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004514 <array>
4515 <size>n</size>
4516 <size>4</size>
4517 </array>
4518 <enum>
4519 <value>OUTPUT</value>
4520 <value>INPUT</value>
4521 </enum>
4522 <description>The available stream configurations that this
4523 camera device supports
4524 (i.e. format, width, height, output/input stream).
4525 </description>
4526 <details>
4527 The configurations are listed as `(format, width, height, input?)`
4528 tuples.
4529
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004530 For a given use case, the actual maximum supported resolution
4531 may be lower than what is listed here, depending on the destination
4532 Surface for the image data. For example, for recording video,
4533 the video encoder chosen may have a maximum size limit (e.g. 1080p)
4534 smaller than what the camera (e.g. maximum resolution is 3264x2448)
4535 can provide.
4536
4537 Please reference the documentation for the image data destination to
4538 check if it limits the maximum size for image data.
4539
4540 Not all output formats may be supported in a configuration with
4541 an input stream of a particular format. For more details, see
4542 android.scaler.availableInputOutputFormatsMap.
4543
4544 The following table describes the minimum required output stream
4545 configurations based on the hardware level
4546 (android.info.supportedHardwareLevel):
4547
4548 Format | Size | Hardware Level | Notes
4549 :-------------:|:--------------------------------------------:|:--------------:|:--------------:
4550 JPEG | android.sensor.info.activeArraySize | Any |
4551 JPEG | 1920x1080 (1080p) | Any | if 1080p &lt;= activeArraySize
4552 JPEG | 1280x720 (720) | Any | if 720p &lt;= activeArraySize
4553 JPEG | 640x480 (480p) | Any | if 480p &lt;= activeArraySize
4554 JPEG | 320x240 (240p) | Any | if 240p &lt;= activeArraySize
4555 YUV_420_888 | all output sizes available for JPEG | FULL |
4556 YUV_420_888 | all output sizes available for JPEG, up to the maximum video size | LIMITED |
4557 IMPLEMENTATION_DEFINED | same as YUV_420_888 | Any |
4558
4559 Refer to android.request.availableCapabilities for additional
4560 mandatory stream configurations on a per-capability basis.
4561 </details>
4562 <hal_details>
4563 It is recommended (but not mandatory) to also include half/quarter
4564 of sensor maximum resolution for JPEG formats (regardless of hardware
4565 level).
4566
4567 (The following is a rewording of the above required table):
4568
Zhijun He5a1276a2014-06-02 16:46:03 -07004569 For JPEG format, the sizes may be restricted by below conditions:
4570
4571 * The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones
4572 (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution
4573 (defined by android.sensor.info.activeArraySize) has an aspect ratio other than these,
4574 it does not have to be included in the supported JPEG sizes.
4575 * Some hardware JPEG encoders may have pixel boundary alignment requirements, such as
4576 the dimensions being a multiple of 16.
4577
4578 Therefore, the maximum JPEG size may be smaller than sensor maximum resolution.
4579 However, the largest JPEG size must be as close as possible to the sensor maximum
4580 resolution given above constraints. It is required that after aspect ratio adjustments,
4581 additional size reduction due to other issues must be less than 3% in area. For example,
4582 if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect
4583 ratio 4:3, the JPEG encoder alignment requirement is 16, the maximum JPEG size will be
4584 3264x2448.
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004585
4586 For FULL capability devices (`android.info.supportedHardwareLevel == FULL`),
4587 the HAL must include all YUV_420_888 sizes that have JPEG sizes listed
4588 here as output streams.
4589
4590 It must also include each below resolution if it is smaller than or
4591 equal to the sensor maximum resolution (for both YUV_420_888 and JPEG
4592 formats), as output streams:
4593
4594 * 240p (320 x 240)
4595 * 480p (640 x 480)
4596 * 720p (1280 x 720)
4597 * 1080p (1920 x 1080)
4598
4599 For LIMITED capability devices
4600 (`android.info.supportedHardwareLevel == LIMITED`),
4601 the HAL only has to list up to the maximum video size
4602 supported by the device.
4603
4604 Regardless of hardware level, every output resolution available for
4605 YUV_420_888 must also be available for IMPLEMENTATION_DEFINED.
4606
4607 This supercedes the following fields, which are now deprecated:
4608
4609 * availableFormats
4610 * available[Processed,Raw,Jpeg]Sizes
4611 </hal_details>
4612 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004613 <entry name="availableMinFrameDurations" type="int64" visibility="hidden"
4614 container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07004615 typedef="streamConfigurationDuration" hwlevel="legacy">
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004616 <array>
4617 <size>4</size>
4618 <size>n</size>
4619 </array>
4620 <description>This lists the minimum frame duration for each
4621 format/size combination.
4622 </description>
4623 <units>(format, width, height, ns) x n</units>
4624 <details>
4625 This should correspond to the frame duration when only that
4626 stream is active, with all processing (typically in android.*.mode)
4627 set to either OFF or FAST.
4628
4629 When multiple streams are used in a request, the minimum frame
4630 duration will be max(individual stream min durations).
4631
4632 The minimum frame duration of a stream (of a particular format, size)
4633 is the same regardless of whether the stream is input or output.
4634
4635 See android.sensor.frameDuration and
4636 android.scaler.availableStallDurations for more details about
4637 calculating the max frame rate.
Igor Murashkin6c936c12014-05-13 14:51:49 -07004638
4639 (Keep in sync with
4640 StreamConfigurationMap#getOutputMinFrameDuration)
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004641 </details>
Zhijun He5fb671c2014-05-21 17:51:05 -07004642 <tag id="V1" />
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004643 </entry>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004644 <entry name="availableStallDurations" type="int64" visibility="hidden"
Igor Murashkinca256272014-10-02 15:27:09 -07004645 container="array" typedef="streamConfigurationDuration" hwlevel="legacy">
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004646 <array>
4647 <size>4</size>
4648 <size>n</size>
4649 </array>
4650 <description>This lists the maximum stall duration for each
4651 format/size combination.
4652 </description>
4653 <units>(format, width, height, ns) x n</units>
4654 <details>
4655 A stall duration is how much extra time would get added
4656 to the normal minimum frame duration for a repeating request
4657 that has streams with non-zero stall.
4658
4659 For example, consider JPEG captures which have the following
4660 characteristics:
4661
4662 * JPEG streams act like processed YUV streams in requests for which
4663 they are not included; in requests in which they are directly
4664 referenced, they act as JPEG streams. This is because supporting a
4665 JPEG stream requires the underlying YUV data to always be ready for
4666 use by a JPEG encoder, but the encoder will only be used (and impact
4667 frame duration) on requests that actually reference a JPEG stream.
4668 * The JPEG processor can run concurrently to the rest of the camera
4669 pipeline, but cannot process more than 1 capture at a time.
4670
4671 In other words, using a repeating YUV request would result
4672 in a steady frame rate (let's say it's 30 FPS). If a single
4673 JPEG request is submitted periodically, the frame rate will stay
4674 at 30 FPS (as long as we wait for the previous JPEG to return each
4675 time). If we try to submit a repeating YUV + JPEG request, then
4676 the frame rate will drop from 30 FPS.
4677
4678 In general, submitting a new request with a non-0 stall time
4679 stream will _not_ cause a frame rate drop unless there are still
4680 outstanding buffers for that stream from previous requests.
4681
4682 Submitting a repeating request with streams (call this `S`)
4683 is the same as setting the minimum frame duration from
4684 the normal minimum frame duration corresponding to `S`, added with
4685 the maximum stall duration for `S`.
4686
4687 If interleaving requests with and without a stall duration,
4688 a request will stall by the maximum of the remaining times
4689 for each can-stall stream with outstanding buffers.
4690
4691 This means that a stalling request will not have an exposure start
4692 until the stall has completed.
4693
4694 This should correspond to the stall duration when only that stream is
4695 active, with all processing (typically in android.*.mode) set to FAST
4696 or OFF. Setting any of the processing modes to HIGH_QUALITY
4697 effectively results in an indeterminate stall duration for all
4698 streams in a request (the regular stall calculation rules are
4699 ignored).
4700
4701 The following formats may always have a stall duration:
4702
Zhijun Hef51d4702014-07-01 04:43:52 -07004703 * ImageFormat#JPEG
4704 * ImageFormat#RAW_SENSOR
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004705
4706 The following formats will never have a stall duration:
4707
Zhijun Hef51d4702014-07-01 04:43:52 -07004708 * ImageFormat#YUV_420_888
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004709
4710 All other formats may or may not have an allowed stall duration on
4711 a per-capability basis; refer to android.request.availableCapabilities
4712 for more details.
4713
4714 See android.sensor.frameDuration for more information about
4715 calculating the max frame rate (absent stalls).
Igor Murashkin6c936c12014-05-13 14:51:49 -07004716
4717 (Keep up to date with
4718 StreamConfigurationMap#getOutputStallDuration(int, Size) )
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004719 </details>
4720 <hal_details>
4721 If possible, it is recommended that all non-JPEG formats
Zhijun Hef51d4702014-07-01 04:43:52 -07004722 (such as RAW16) should not have a stall duration. RAW10, RAW_OPAQUE and
4723 IMPLEMENTATION_DEFINED must not have stall durations.
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004724 </hal_details>
Zhijun He5fb671c2014-05-21 17:51:05 -07004725 <tag id="V1" />
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004726 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07004727 <entry name="streamConfigurationMap" type="int32" visibility="public"
4728 synthetic="true" typedef="streamConfigurationMap"
4729 hwlevel="legacy">
Igor Murashkin6c936c12014-05-13 14:51:49 -07004730 <description>The available stream configurations that this
4731 camera device supports; also includes the minimum frame durations
4732 and the stall durations for each format/size combination.
4733 </description>
4734 <details>
4735 All camera devices will support sensor maximum resolution (defined by
4736 android.sensor.info.activeArraySize) for the JPEG format.
4737
4738 For a given use case, the actual maximum supported resolution
4739 may be lower than what is listed here, depending on the destination
4740 Surface for the image data. For example, for recording video,
4741 the video encoder chosen may have a maximum size limit (e.g. 1080p)
4742 smaller than what the camera (e.g. maximum resolution is 3264x2448)
4743 can provide.
4744
4745 Please reference the documentation for the image data destination to
4746 check if it limits the maximum size for image data.
4747
Igor Murashkin6c936c12014-05-13 14:51:49 -07004748 The following table describes the minimum required output stream
4749 configurations based on the hardware level
4750 (android.info.supportedHardwareLevel):
4751
4752 Format | Size | Hardware Level | Notes
4753 :-------------:|:--------------------------------------------:|:--------------:|:--------------:
4754 JPEG | android.sensor.info.activeArraySize | Any |
4755 JPEG | 1920x1080 (1080p) | Any | if 1080p &lt;= activeArraySize
4756 JPEG | 1280x720 (720) | Any | if 720p &lt;= activeArraySize
4757 JPEG | 640x480 (480p) | Any | if 480p &lt;= activeArraySize
4758 JPEG | 320x240 (240p) | Any | if 240p &lt;= activeArraySize
4759 YUV_420_888 | all output sizes available for JPEG | FULL |
4760 YUV_420_888 | all output sizes available for JPEG, up to the maximum video size | LIMITED |
4761 IMPLEMENTATION_DEFINED | same as YUV_420_888 | Any |
4762
4763 Refer to android.request.availableCapabilities for additional
4764 mandatory stream configurations on a per-capability basis.
4765 </details>
4766 <hal_details>
4767 Do not set this property directly
4768 (it is synthetic and will not be available at the HAL layer);
4769 set the android.scaler.availableStreamConfigurations instead.
4770
Igor Murashkinefff0de2014-05-14 17:30:49 -07004771 Not all output formats may be supported in a configuration with
4772 an input stream of a particular format. For more details, see
4773 android.scaler.availableInputOutputFormatsMap.
4774
Igor Murashkin6c936c12014-05-13 14:51:49 -07004775 It is recommended (but not mandatory) to also include half/quarter
4776 of sensor maximum resolution for JPEG formats (regardless of hardware
4777 level).
4778
4779 (The following is a rewording of the above required table):
4780
4781 The HAL must include sensor maximum resolution (defined by
4782 android.sensor.info.activeArraySize).
4783
4784 For FULL capability devices (`android.info.supportedHardwareLevel == FULL`),
4785 the HAL must include all YUV_420_888 sizes that have JPEG sizes listed
4786 here as output streams.
4787
4788 It must also include each below resolution if it is smaller than or
4789 equal to the sensor maximum resolution (for both YUV_420_888 and JPEG
4790 formats), as output streams:
4791
4792 * 240p (320 x 240)
4793 * 480p (640 x 480)
4794 * 720p (1280 x 720)
4795 * 1080p (1920 x 1080)
4796
4797 For LIMITED capability devices
4798 (`android.info.supportedHardwareLevel == LIMITED`),
4799 the HAL only has to list up to the maximum video size
4800 supported by the device.
4801
4802 Regardless of hardware level, every output resolution available for
4803 YUV_420_888 must also be available for IMPLEMENTATION_DEFINED.
4804
4805 This supercedes the following fields, which are now deprecated:
4806
4807 * availableFormats
4808 * available[Processed,Raw,Jpeg]Sizes
4809 </hal_details>
4810 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07004811 <entry name="croppingType" type="byte" visibility="public" enum="true"
4812 hwlevel="legacy">
Zhijun Hed0f25ca2014-05-21 15:29:07 -07004813 <enum>
4814 <value>CENTER_ONLY
4815 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07004816 The camera device only supports centered crop regions.
Zhijun Hed0f25ca2014-05-21 15:29:07 -07004817 </notes>
4818 </value>
4819 <value>FREEFORM
4820 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07004821 The camera device supports arbitrarily chosen crop regions.
Zhijun Hed0f25ca2014-05-21 15:29:07 -07004822 </notes>
4823 </value>
4824 </enum>
4825 <description>The crop type that this camera device supports.</description>
4826 <details>
4827 When passing a non-centered crop region (android.scaler.cropRegion) to a camera
4828 device that only supports CENTER_ONLY cropping, the camera device will move the
4829 crop region to the center of the sensor active array (android.sensor.info.activeArraySize)
4830 and keep the crop region width and height unchanged. The camera device will return the
4831 final used crop region in metadata result android.scaler.cropRegion.
4832
4833 Camera devices that support FREEFORM cropping will support any crop region that
4834 is inside of the active array. The camera device will apply the same crop region and
4835 return the final used crop region in capture result metadata android.scaler.cropRegion.
4836
4837 FULL capability devices (android.info.supportedHardwareLevel `==` FULL) will support
Igor Murashkinca256272014-10-02 15:27:09 -07004838 FREEFORM cropping. LEGACY capability devices will only support CENTER_ONLY cropping.
Zhijun Hed0f25ca2014-05-21 15:29:07 -07004839 </details>
4840 </entry>
Igor Murashkin7f15ddd2014-02-04 18:02:27 -08004841 </static>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004842 </section>
4843 <section name="sensor">
4844 <controls>
Igor Murashkinca256272014-10-02 15:27:09 -07004845 <entry name="exposureTime" type="int64" visibility="public" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004846 <description>Duration each pixel is exposed to
Zhijun He7a8aea62014-03-18 13:37:23 -07004847 light.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004848 <units>Nanoseconds</units>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004849 <range>android.sensor.info.exposureTimeRange</range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004850 <details>If the sensor can't expose this exact duration, it will shorten the
Zhijun He7a8aea62014-03-18 13:37:23 -07004851 duration exposed to the nearest possible value (rather than expose longer).
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004852 The final exposure time used will be available in the output capture result.
4853
4854 This control is only effective if android.control.aeMode or android.control.mode is set to
4855 OFF; otherwise the auto-exposure algorithm will override this value.
Zhijun He7a8aea62014-03-18 13:37:23 -07004856 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004857 <tag id="V1" />
4858 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07004859 <entry name="frameDuration" type="int64" visibility="public" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004860 <description>Duration from start of frame exposure to
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004861 start of next frame exposure.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004862 <units>Nanoseconds</units>
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004863 <range>See android.sensor.info.maxFrameDuration,
Igor Murashkin6c936c12014-05-13 14:51:49 -07004864 android.scaler.streamConfigurationMap. The duration
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004865 is capped to `max(duration, exposureTime + overhead)`.</range>
4866 <details>
4867 The maximum frame rate that can be supported by a camera subsystem is
4868 a function of many factors:
4869
4870 * Requested resolutions of output image streams
4871 * Availability of binning / skipping modes on the imager
4872 * The bandwidth of the imager interface
4873 * The bandwidth of the various ISP processing blocks
4874
4875 Since these factors can vary greatly between different ISPs and
4876 sensors, the camera abstraction tries to represent the bandwidth
4877 restrictions with as simple a model as possible.
4878
4879 The model presented has the following characteristics:
4880
4881 * The image sensor is always configured to output the smallest
4882 resolution possible given the application's requested output stream
4883 sizes. The smallest resolution is defined as being at least as large
4884 as the largest requested output stream size; the camera pipeline must
4885 never digitally upsample sensor data when the crop region covers the
4886 whole sensor. In general, this means that if only small output stream
4887 resolutions are configured, the sensor can provide a higher frame
4888 rate.
4889 * Since any request may use any or all the currently configured
4890 output streams, the sensor and ISP must be configured to support
4891 scaling a single capture to all the streams at the same time. This
4892 means the camera pipeline must be ready to produce the largest
4893 requested output size without any delay. Therefore, the overall
4894 frame rate of a given configured stream set is governed only by the
4895 largest requested stream resolution.
4896 * Using more than one output stream in a request does not affect the
4897 frame duration.
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004898 * Certain format-streams may need to do additional background processing
4899 before data is consumed/produced by that stream. These processors
4900 can run concurrently to the rest of the camera pipeline, but
4901 cannot process more than 1 capture at a time.
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004902
4903 The necessary information for the application, given the model above,
Igor Murashkin6c936c12014-05-13 14:51:49 -07004904 is provided via the android.scaler.streamConfigurationMap field
4905 using StreamConfigurationMap#getOutputMinFrameDuration(int, Size).
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004906 These are used to determine the maximum frame rate / minimum frame
4907 duration that is possible for a given stream configuration.
4908
4909 Specifically, the application can use the following rules to
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004910 determine the minimum frame duration it can request from the camera
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004911 device:
4912
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004913 1. Let the set of currently configured input/output streams
4914 be called `S`.
4915 1. Find the minimum frame durations for each stream in `S`, by
Igor Murashkin6c936c12014-05-13 14:51:49 -07004916 looking it up in android.scaler.streamConfigurationMap using
4917 StreamConfigurationMap#getOutputMinFrameDuration(int, Size) (with
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004918 its respective size/format). Let this set of frame durations be called
4919 `F`.
4920 1. For any given request `R`, the minimum frame duration allowed
4921 for `R` is the maximum out of all values in `F`. Let the streams
4922 used in `R` be called `S_r`.
4923
4924 If none of the streams in `S_r` have a stall time (listed in
Igor Murashkin6c936c12014-05-13 14:51:49 -07004925 StreamConfigurationMap#getOutputStallDuration(int,Size) using its
4926 respective size/format), then the frame duration in
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08004927 `F` determines the steady state frame rate that the application will
4928 get if it uses `R` as a repeating request. Let this special kind
4929 of request be called `Rsimple`.
4930
4931 A repeating request `Rsimple` can be _occasionally_ interleaved
4932 by a single capture of a new request `Rstall` (which has at least
4933 one in-use stream with a non-0 stall time) and if `Rstall` has the
4934 same minimum frame duration this will not cause a frame rate loss
4935 if all buffers from the previous `Rstall` have already been
4936 delivered.
4937
4938 For more details about stalling, see
Igor Murashkin6c936c12014-05-13 14:51:49 -07004939 StreamConfigurationMap#getOutputStallDuration(int,Size).
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004940
4941 This control is only effective if android.control.aeMode or android.control.mode is set to
4942 OFF; otherwise the auto-exposure algorithm will override this value.
Igor Murashkin10f4e0f2014-01-13 17:22:58 -08004943 </details>
Igor Murashkin6c936c12014-05-13 14:51:49 -07004944 <hal_details>
4945 For more details about stalling, see
4946 android.scaler.availableStallDurations.
4947 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004948 <tag id="V1" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004949 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07004950 <entry name="sensitivity" type="int32" visibility="public" hwlevel="full">
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07004951 <description>The amount of gain applied to sensor data
4952 before processing.</description>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004953 <units>ISO arithmetic units</units>
4954 <range>android.sensor.info.sensitivityRange</range>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07004955 <details>
4956 The sensitivity is the standard ISO sensitivity value,
4957 as defined in ISO 12232:2006.
4958
4959 The sensitivity must be within android.sensor.info.sensitivityRange, and
4960 if if it less than android.sensor.maxAnalogSensitivity, the camera device
4961 is guaranteed to use only analog amplification for applying the gain.
4962
4963 If the camera device cannot apply the exact sensitivity
4964 requested, it will reduce the gain to the nearest supported
4965 value. The final sensitivity used will be available in the
4966 output capture result.
4967 </details>
4968 <hal_details>ISO 12232:2006 REI method is acceptable.</hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004969 <tag id="V1" />
4970 </entry>
4971 </controls>
4972 <static>
4973 <namespace name="info">
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07004974 <entry name="activeArraySize" type="int32" visibility="public"
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004975 type_notes="Four ints defining the active pixel rectangle"
Igor Murashkinb8dc8812013-07-17 16:29:34 -07004976 container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07004977 typedef="rectangle"
4978 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08004979 <array>
4980 <size>4</size>
4981 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004982 <description>The area of the image sensor which corresponds to
Zhijun Hebdc94c42014-01-21 18:28:30 -08004983 active pixels.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004984 <units>Pixel coordinates on the image sensor</units>
4985 <range>
Zhijun Hebdc94c42014-01-21 18:28:30 -08004986 </range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07004987 <details>
4988 This is the region of the sensor that actually receives light from the scene.
4989 Therefore, the size of this region determines the maximum field of view and the maximum
4990 number of pixels that an image from this sensor can contain.
4991
4992 The rectangle is defined in terms of the full pixel array; (0,0) is the top-left of the
4993 full pixel array, and the size of the full pixel array is given by
4994 android.sensor.info.pixelArraySize.
4995
4996 Most other keys listing pixel coordinates have their coordinate systems based on the
4997 active array, with `(0, 0)` being the top-left of the active array rectangle.
4998
4999 The active array may be smaller than the full pixel array, since the full array may
5000 include black calibration pixels or other inactive regions.
5001 </details>
5002 <hal_details>
5003 This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be
5004 &amp;gt;= `(0,0)`.
5005 The `(width, height)` must be &amp;lt;= `android.sensor.info.pixelArraySize`.
5006 </hal_details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005007 <tag id="RAW" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005008 </entry>
Zhijun He69fc0ea2013-07-17 09:42:58 -07005009 <entry name="sensitivityRange" type="int32" visibility="public"
5010 type_notes="Range of supported sensitivities"
Igor Murashkinca256272014-10-02 15:27:09 -07005011 container="array" typedef="rangeInt"
5012 hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005013 <array>
Zhijun He69fc0ea2013-07-17 09:42:58 -07005014 <size>2</size>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005015 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005016 <description>Range of sensitivities for android.sensor.sensitivity supported by this
5017 camera device.</description>
Eino-Ville Talvalad77b2342014-09-25 10:27:48 -07005018 <range>Min &lt;= 100, Max &amp;gt;= 800</range>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005019 <details>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005020 The values are the standard ISO sensitivity values,
5021 as defined in ISO 12232:2006.
5022 </details>
5023
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005024 <tag id="BC" />
5025 <tag id="V1" />
5026 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07005027 <entry name="colorFilterArrangement" type="byte" visibility="public" enum="true"
5028 hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005029 <enum>
5030 <value>RGGB</value>
5031 <value>GRBG</value>
5032 <value>GBRG</value>
5033 <value>BGGR</value>
5034 <value>RGB
5035 <notes>Sensor is not Bayer; output has 3 16-bit
5036 values for each pixel, instead of just 1 16-bit value
5037 per pixel.</notes></value>
5038 </enum>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07005039 <description>The arrangement of color filters on sensor;
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005040 represents the colors in the top-left 2x2 section of
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07005041 the sensor, in reading order.</description>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005042 <tag id="RAW" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005043 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07005044 <entry name="exposureTimeRange" type="int64" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07005045 type_notes="nanoseconds" container="array" typedef="rangeLong"
5046 hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005047 <array>
5048 <size>2</size>
5049 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005050 <description>The range of image exposure times for android.sensor.exposureTime supported
5051 by this camera device.
5052 </description>
5053 <units>Nanoseconds</units>
5054 <range>The minimum exposure time will be less than 100 us. For FULL
Zhijun Hedf726fa2014-06-25 08:35:53 -07005055 capability devices (android.info.supportedHardwareLevel == FULL),
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005056 the maximum exposure time will be greater than 100ms.</range>
Zhijun He7a8aea62014-03-18 13:37:23 -07005057 <hal_details>For FULL capability devices (android.info.supportedHardwareLevel == FULL),
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005058 The maximum of the range SHOULD be at least 1 second (1e9), MUST be at least
5059 100ms.
5060 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005061 <tag id="V1" />
5062 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07005063 <entry name="maxFrameDuration" type="int64" visibility="public"
5064 hwlevel="full">
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005065 <description>The maximum possible frame duration (minimum frame rate) for
5066 android.sensor.frameDuration that is supported this camera device.</description>
5067 <units>Nanoseconds</units>
Zhijun He7a8aea62014-03-18 13:37:23 -07005068 <range>For FULL capability devices
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005069 (android.info.supportedHardwareLevel == FULL), at least 100ms.
Zhijun He7a8aea62014-03-18 13:37:23 -07005070 </range>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005071 <details>Attempting to use frame durations beyond the maximum will result in the frame
5072 duration being clipped to the maximum. See that control for a full definition of frame
5073 durations.
Igor Murashkin061c6002014-01-27 16:00:26 -08005074
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005075 Refer to StreamConfigurationMap#getOutputMinFrameDuration(int,Size) for the minimum
5076 frame duration values.
Igor Murashkin061c6002014-01-27 16:00:26 -08005077 </details>
5078 <hal_details>
Zhijun He7a8aea62014-03-18 13:37:23 -07005079 For FULL capability devices (android.info.supportedHardwareLevel == FULL),
5080 The maximum of the range SHOULD be at least
5081 1 second (1e9), MUST be at least 100ms (100e6).
Igor Murashkin061c6002014-01-27 16:00:26 -08005082
Eino-Ville Talvala7fabc1e2014-02-10 12:39:35 -08005083 android.sensor.info.maxFrameDuration must be greater or
5084 equal to the android.sensor.info.exposureTimeRange max
5085 value (since exposure time overrides frame duration).
Igor Murashkinaa6bd6f2014-02-07 14:31:31 -08005086
5087 Available minimum frame durations for JPEG must be no greater
5088 than that of the YUV_420_888/IMPLEMENTATION_DEFINED
5089 minimum frame durations (for that respective size).
5090
5091 Since JPEG processing is considered offline and can take longer than
5092 a single uncompressed capture, refer to
5093 android.scaler.availableStallDurations
5094 for details about encoding this scenario.
Igor Murashkin061c6002014-01-27 16:00:26 -08005095 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005096 <tag id="V1" />
5097 </entry>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07005098 <entry name="physicalSize" type="float" visibility="public"
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005099 type_notes="width x height"
Igor Murashkinca256272014-10-02 15:27:09 -07005100 container="array" typedef="sizeF" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005101 <array>
5102 <size>2</size>
5103 </array>
5104 <description>The physical dimensions of the full pixel
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005105 array.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005106 <units>Millimeters</units>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005107 <details>This is the physical size of the sensor pixel
5108 array defined by android.sensor.info.pixelArraySize.
5109 </details>
5110 <hal_details>Needed for FOV calculation for old API</hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005111 <tag id="V1" />
5112 <tag id="BC" />
5113 </entry>
Ruben Brunkcd05eed2014-01-31 12:38:46 -08005114 <entry name="pixelArraySize" type="int32" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07005115 container="array" typedef="size" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005116 <array>
5117 <size>2</size>
5118 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005119 <description>Dimensions of the full pixel array, possibly
Zhijun Hebdc94c42014-01-21 18:28:30 -08005120 including black calibration pixels.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005121 <units>Pixels</units>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005122 <details>The pixel count of the full pixel array,
5123 which covers android.sensor.info.physicalSize area.
5124
5125 If a camera device supports raw sensor formats, either this
5126 or android.sensor.info.activeArraySize is the maximum output
5127 raw size listed in android.scaler.streamConfigurationMap.
5128 If a size corresponding to pixelArraySize is listed, the resulting
5129 raw sensor image will include black pixels.
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005130
5131 Some parts of the full pixel array may not receive light from the scene,
5132 or are otherwise inactive. The android.sensor.info.activeArraySize key
5133 defines the rectangle of active pixels that actually forms an image.
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005134 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005135 <tag id="RAW" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005136 <tag id="BC" />
5137 </entry>
Ruben Brunk92dd85b2014-02-10 19:16:56 -08005138 <entry name="whiteLevel" type="int32" visibility="public">
5139 <description>
5140 Maximum raw value output by sensor.
5141 </description>
Ruben Brunkd9d12132014-03-18 14:37:04 -07005142 <range>&amp;gt; 255 (8-bit output)</range>
Ruben Brunk92dd85b2014-02-10 19:16:56 -08005143 <details>
5144 This specifies the fully-saturated encoding level for the raw
5145 sample values from the sensor. This is typically caused by the
5146 sensor becoming highly non-linear or clipping. The minimum for
5147 each channel is specified by the offset in the
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005148 android.sensor.blackLevelPattern key.
Ruben Brunk92dd85b2014-02-10 19:16:56 -08005149
5150 The white level is typically determined either by sensor bit depth
Ruben Brunkd9d12132014-03-18 14:37:04 -07005151 (8-14 bits is expected), or by the point where the sensor response
Ruben Brunk92dd85b2014-02-10 19:16:56 -08005152 becomes too non-linear to be useful. The default value for this is
5153 maximum representable value for a 16-bit raw sample (2^16 - 1).
5154 </details>
Ruben Brunkd9d12132014-03-18 14:37:04 -07005155 <hal_details>
5156 The full bit depth of the sensor must be available in the raw data,
5157 so the value for linear sensors should not be significantly lower
5158 than maximum raw value supported, i.e. 2^(sensor bits per pixel).
5159 </hal_details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005160 <tag id="RAW" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005161 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07005162 <entry name="timestampSource" type="byte" visibility="public"
5163 enum="true" hwlevel="legacy">
Zhijun He91449c82014-06-12 10:43:32 -07005164 <enum>
Eino-Ville Talvala122906c2014-07-28 12:49:25 -07005165 <value>UNKNOWN
Zhijun He91449c82014-06-12 10:43:32 -07005166 <notes>
5167 Timestamps from android.sensor.timestamp are in nanoseconds and monotonic,
5168 but can not be compared to timestamps from other subsystems
5169 (e.g. accelerometer, gyro etc.), or other instances of the same or different
5170 camera devices in the same system. Timestamps between streams and results for
5171 a single camera instance are comparable, and the timestamps for all buffers
5172 and the result metadata generated by a single capture are identical.
5173 </notes>
5174 </value>
Eino-Ville Talvala122906c2014-07-28 12:49:25 -07005175 <value>REALTIME
Zhijun He91449c82014-06-12 10:43:32 -07005176 <notes>
5177 Timestamps from android.sensor.timestamp are in the same timebase as
5178 android.os.SystemClock#elapsedRealtimeNanos(),
5179 and they can be compared to other timestamps using that base.
5180 </notes>
5181 </value>
5182 </enum>
Eino-Ville Talvala122906c2014-07-28 12:49:25 -07005183 <description>The time base source for sensor capture start timestamps.</description>
Zhijun He91449c82014-06-12 10:43:32 -07005184 <details>
Eino-Ville Talvala122906c2014-07-28 12:49:25 -07005185 The timestamps provided for captures are always in nanoseconds and monotonic, but
5186 may not based on a time source that can be compared to other system time sources.
5187
5188 This characteristic defines the source for the timestamps, and therefore whether they
5189 can be compared against other system time sources/timestamps.
Zhijun He91449c82014-06-12 10:43:32 -07005190 </details>
5191 <tag id="V1" />
5192 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005193 </namespace>
Igor Murashkinca256272014-10-02 15:27:09 -07005194 <entry name="referenceIlluminant1" type="byte" visibility="public"
5195 enum="true">
Ruben Brunk7db06e22014-04-15 17:43:56 -07005196 <enum>
5197 <value id="1">DAYLIGHT</value>
5198 <value id="2">FLUORESCENT</value>
5199 <value id="3">TUNGSTEN
5200 <notes>Incandescent light</notes>
5201 </value>
5202 <value id="4">FLASH</value>
5203 <value id="9">FINE_WEATHER</value>
5204 <value id="10">CLOUDY_WEATHER</value>
5205 <value id="11">SHADE</value>
5206 <value id="12">DAYLIGHT_FLUORESCENT
5207 <notes>D 5700 - 7100K</notes>
5208 </value>
5209 <value id="13">DAY_WHITE_FLUORESCENT
5210 <notes>N 4600 - 5400K</notes>
5211 </value>
5212 <value id="14">COOL_WHITE_FLUORESCENT
5213 <notes>W 3900 - 4500K</notes>
5214 </value>
5215 <value id="15">WHITE_FLUORESCENT
5216 <notes>WW 3200 - 3700K</notes>
5217 </value>
5218 <value id="17">STANDARD_A</value>
5219 <value id="18">STANDARD_B</value>
5220 <value id="19">STANDARD_C</value>
5221 <value id="20">D55</value>
5222 <value id="21">D65</value>
5223 <value id="22">D75</value>
5224 <value id="23">D50</value>
5225 <value id="24">ISO_STUDIO_TUNGSTEN</value>
5226 </enum>
5227 <description>
5228 The standard reference illuminant used as the scene light source when
5229 calculating the android.sensor.colorTransform1,
5230 android.sensor.calibrationTransform1, and
5231 android.sensor.forwardMatrix1 matrices.
5232 </description>
5233 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005234 The values in this key correspond to the values defined for the
Ruben Brunk7db06e22014-04-15 17:43:56 -07005235 EXIF LightSource tag. These illuminants are standard light sources
5236 that are often used calibrating camera devices.
5237
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005238 If this key is present, then android.sensor.colorTransform1,
Ruben Brunk7db06e22014-04-15 17:43:56 -07005239 android.sensor.calibrationTransform1, and
5240 android.sensor.forwardMatrix1 will also be present.
5241
5242 Some devices may choose to provide a second set of calibration
5243 information for improved quality, including
5244 android.sensor.referenceIlluminant2 and its corresponding matrices.
5245 </details>
5246 <hal_details>
5247 The first reference illuminant (android.sensor.referenceIlluminant1)
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005248 and corresponding matrices must be present to support the RAW capability
5249 and DNG output.
Ruben Brunk7db06e22014-04-15 17:43:56 -07005250
5251 When producing raw images with a color profile that has only been
5252 calibrated against a single light source, it is valid to omit
5253 android.sensor.referenceIlluminant2 along with the
5254 android.sensor.colorTransform2, android.sensor.calibrationTransform2,
5255 and android.sensor.forwardMatrix2 matrices.
5256
5257 If only android.sensor.referenceIlluminant1 is included, it should be
5258 chosen so that it is representative of typical scene lighting. In
5259 general, D50 or DAYLIGHT will be chosen for this case.
5260
5261 If both android.sensor.referenceIlluminant1 and
5262 android.sensor.referenceIlluminant2 are included, they should be
5263 chosen to represent the typical range of scene lighting conditions.
5264 In general, low color temperature illuminant such as Standard-A will
5265 be chosen for the first reference illuminant and a higher color
5266 temperature illuminant such as D65 will be chosen for the second
5267 reference illuminant.
5268 </hal_details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005269 <tag id="RAW" />
Ruben Brunk7db06e22014-04-15 17:43:56 -07005270 </entry>
5271 <entry name="referenceIlluminant2" type="byte" visibility="public">
5272 <description>
5273 The standard reference illuminant used as the scene light source when
5274 calculating the android.sensor.colorTransform2,
5275 android.sensor.calibrationTransform2, and
5276 android.sensor.forwardMatrix2 matrices.
5277 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005278 <range>Any value listed in android.sensor.referenceIlluminant1</range>
Ruben Brunk7db06e22014-04-15 17:43:56 -07005279 <details>
5280 See android.sensor.referenceIlluminant1 for more details.
Ruben Brunk7db06e22014-04-15 17:43:56 -07005281
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005282 If this key is present, then android.sensor.colorTransform2,
Ruben Brunk7db06e22014-04-15 17:43:56 -07005283 android.sensor.calibrationTransform2, and
5284 android.sensor.forwardMatrix2 will also be present.
5285 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005286 <tag id="RAW" />
Ruben Brunk7db06e22014-04-15 17:43:56 -07005287 </entry>
5288 <entry name="calibrationTransform1" type="rational"
5289 visibility="public" optional="true"
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -07005290 type_notes="3x3 matrix in row-major-order" container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07005291 typedef="colorSpaceTransform">
Ruben Brunk7db06e22014-04-15 17:43:56 -07005292 <array>
5293 <size>3</size>
5294 <size>3</size>
5295 </array>
5296 <description>
5297 A per-device calibration transform matrix that maps from the
5298 reference sensor colorspace to the actual device sensor colorspace.
5299 </description>
5300 <details>
5301 This matrix is used to correct for per-device variations in the
5302 sensor colorspace, and is used for processing raw buffer data.
5303
5304 The matrix is expressed as a 3x3 matrix in row-major-order, and
5305 contains a per-device calibration transform that maps colors
5306 from reference sensor color space (i.e. the "golden module"
5307 colorspace) into this camera device's native sensor color
5308 space under the first reference illuminant
5309 (android.sensor.referenceIlluminant1).
5310 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005311 <tag id="RAW" />
Ruben Brunk7db06e22014-04-15 17:43:56 -07005312 </entry>
5313 <entry name="calibrationTransform2" type="rational"
5314 visibility="public" optional="true"
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -07005315 type_notes="3x3 matrix in row-major-order" container="array"
5316 typedef="colorSpaceTransform">
Ruben Brunk7db06e22014-04-15 17:43:56 -07005317 <array>
5318 <size>3</size>
5319 <size>3</size>
5320 </array>
5321 <description>
5322 A per-device calibration transform matrix that maps from the
5323 reference sensor colorspace to the actual device sensor colorspace
5324 (this is the colorspace of the raw buffer data).
5325 </description>
5326 <details>
5327 This matrix is used to correct for per-device variations in the
5328 sensor colorspace, and is used for processing raw buffer data.
5329
5330 The matrix is expressed as a 3x3 matrix in row-major-order, and
5331 contains a per-device calibration transform that maps colors
5332 from reference sensor color space (i.e. the "golden module"
5333 colorspace) into this camera device's native sensor color
5334 space under the second reference illuminant
5335 (android.sensor.referenceIlluminant2).
5336
5337 This matrix will only be present if the second reference
5338 illuminant is present.
5339 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005340 <tag id="RAW" />
Ruben Brunk7db06e22014-04-15 17:43:56 -07005341 </entry>
5342 <entry name="colorTransform1" type="rational"
5343 visibility="public" optional="true"
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -07005344 type_notes="3x3 matrix in row-major-order" container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07005345 typedef="colorSpaceTransform">
Ruben Brunk7db06e22014-04-15 17:43:56 -07005346 <array>
5347 <size>3</size>
5348 <size>3</size>
5349 </array>
5350 <description>
5351 A matrix that transforms color values from CIE XYZ color space to
5352 reference sensor color space.
5353 </description>
5354 <details>
5355 This matrix is used to convert from the standard CIE XYZ color
5356 space to the reference sensor colorspace, and is used when processing
5357 raw buffer data.
5358
5359 The matrix is expressed as a 3x3 matrix in row-major-order, and
5360 contains a color transform matrix that maps colors from the CIE
5361 XYZ color space to the reference sensor color space (i.e. the
5362 "golden module" colorspace) under the first reference illuminant
5363 (android.sensor.referenceIlluminant1).
5364
5365 The white points chosen in both the reference sensor color space
5366 and the CIE XYZ colorspace when calculating this transform will
5367 match the standard white point for the first reference illuminant
5368 (i.e. no chromatic adaptation will be applied by this transform).
5369 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005370 <tag id="RAW" />
Ruben Brunk7db06e22014-04-15 17:43:56 -07005371 </entry>
5372 <entry name="colorTransform2" type="rational"
5373 visibility="public" optional="true"
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -07005374 type_notes="3x3 matrix in row-major-order" container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07005375 typedef="colorSpaceTransform">
Ruben Brunk7db06e22014-04-15 17:43:56 -07005376 <array>
5377 <size>3</size>
5378 <size>3</size>
5379 </array>
5380 <description>
5381 A matrix that transforms color values from CIE XYZ color space to
5382 reference sensor color space.
5383 </description>
5384 <details>
5385 This matrix is used to convert from the standard CIE XYZ color
5386 space to the reference sensor colorspace, and is used when processing
5387 raw buffer data.
5388
5389 The matrix is expressed as a 3x3 matrix in row-major-order, and
5390 contains a color transform matrix that maps colors from the CIE
5391 XYZ color space to the reference sensor color space (i.e. the
5392 "golden module" colorspace) under the second reference illuminant
5393 (android.sensor.referenceIlluminant2).
5394
5395 The white points chosen in both the reference sensor color space
5396 and the CIE XYZ colorspace when calculating this transform will
5397 match the standard white point for the second reference illuminant
5398 (i.e. no chromatic adaptation will be applied by this transform).
5399
5400 This matrix will only be present if the second reference
5401 illuminant is present.
5402 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005403 <tag id="RAW" />
Ruben Brunk7db06e22014-04-15 17:43:56 -07005404 </entry>
5405 <entry name="forwardMatrix1" type="rational"
5406 visibility="public" optional="true"
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -07005407 type_notes="3x3 matrix in row-major-order" container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07005408 typedef="colorSpaceTransform">
Ruben Brunk7db06e22014-04-15 17:43:56 -07005409 <array>
5410 <size>3</size>
5411 <size>3</size>
5412 </array>
5413 <description>
5414 A matrix that transforms white balanced camera colors from the reference
5415 sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.
5416 </description>
5417 <details>
5418 This matrix is used to convert to the standard CIE XYZ colorspace, and
5419 is used when processing raw buffer data.
5420
5421 This matrix is expressed as a 3x3 matrix in row-major-order, and contains
5422 a color transform matrix that maps white balanced colors from the
5423 reference sensor color space to the CIE XYZ color space with a D50 white
5424 point.
5425
5426 Under the first reference illuminant (android.sensor.referenceIlluminant1)
5427 this matrix is chosen so that the standard white point for this reference
5428 illuminant in the reference sensor colorspace is mapped to D50 in the
5429 CIE XYZ colorspace.
5430 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005431 <tag id="RAW" />
Ruben Brunk7db06e22014-04-15 17:43:56 -07005432 </entry>
5433 <entry name="forwardMatrix2" type="rational"
5434 visibility="public" optional="true"
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -07005435 type_notes="3x3 matrix in row-major-order" container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07005436 typedef="colorSpaceTransform">
Ruben Brunk7db06e22014-04-15 17:43:56 -07005437 <array>
5438 <size>3</size>
5439 <size>3</size>
5440 </array>
5441 <description>
5442 A matrix that transforms white balanced camera colors from the reference
5443 sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.
5444 </description>
5445 <details>
5446 This matrix is used to convert to the standard CIE XYZ colorspace, and
5447 is used when processing raw buffer data.
5448
5449 This matrix is expressed as a 3x3 matrix in row-major-order, and contains
5450 a color transform matrix that maps white balanced colors from the
5451 reference sensor color space to the CIE XYZ color space with a D50 white
5452 point.
5453
5454 Under the second reference illuminant (android.sensor.referenceIlluminant2)
5455 this matrix is chosen so that the standard white point for this reference
5456 illuminant in the reference sensor colorspace is mapped to D50 in the
5457 CIE XYZ colorspace.
5458
5459 This matrix will only be present if the second reference
5460 illuminant is present.
5461 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005462 <tag id="RAW" />
Ruben Brunk7db06e22014-04-15 17:43:56 -07005463 </entry>
Zhijun He66e62a42014-05-23 11:02:34 -07005464 <entry name="baseGainFactor" type="rational"
Alex Rayef40ad62013-10-01 17:52:33 -07005465 optional="true">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005466 <description>Gain factor from electrons to raw units when
5467 ISO=100</description>
Zhijun He66e62a42014-05-23 11:02:34 -07005468 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005469 </entry>
Ruben Brunk24bdaaf2014-01-31 14:11:20 -08005470 <entry name="blackLevelPattern" type="int32" visibility="public"
Ruben Brunkcc09de12014-06-05 13:20:47 -07005471 optional="true" type_notes="2x2 raw count block" container="array"
5472 typedef="blackLevelPattern">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005473 <array>
5474 <size>4</size>
5475 </array>
Ruben Brunk24bdaaf2014-01-31 14:11:20 -08005476 <description>
5477 A fixed black level offset for each of the color filter arrangement
5478 (CFA) mosaic channels.
5479 </description>
5480 <range>&amp;gt;= 0 for each.</range>
5481 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005482 This key specifies the zero light value for each of the CFA mosaic
Ruben Brunk92dd85b2014-02-10 19:16:56 -08005483 channels in the camera sensor. The maximal value output by the
5484 sensor is represented by the value in android.sensor.info.whiteLevel.
Ruben Brunk24bdaaf2014-01-31 14:11:20 -08005485
Ruben Brunkcc09de12014-06-05 13:20:47 -07005486 The values are given in the same order as channels listed for the CFA
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005487 layout key (see android.sensor.info.colorFilterArrangement), i.e. the
Ruben Brunkcc09de12014-06-05 13:20:47 -07005488 nth value given corresponds to the black level offset for the nth
5489 color channel listed in the CFA.
5490 </details>
5491 <hal_details>
Ruben Brunk24bdaaf2014-01-31 14:11:20 -08005492 The values are given in row-column scan order, with the first value
5493 corresponding to the element of the CFA in row=0, column=0.
Ruben Brunkcc09de12014-06-05 13:20:47 -07005494 </hal_details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005495 <tag id="RAW" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005496 </entry>
Alex Rayef40ad62013-10-01 17:52:33 -07005497 <entry name="maxAnalogSensitivity" type="int32" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07005498 optional="true" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005499 <description>Maximum sensitivity that is implemented
Zhijun Hebdc94c42014-01-21 18:28:30 -08005500 purely through analog gain.</description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08005501 <details>For android.sensor.sensitivity values less than or
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005502 equal to this, all applied gain must be analog. For
Zhijun Hebdc94c42014-01-21 18:28:30 -08005503 values above this, the gain applied can be a mix of analog and
5504 digital.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005505 <tag id="V1" />
Alex Rayef40ad62013-10-01 17:52:33 -07005506 <tag id="FULL" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005507 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07005508 <entry name="orientation" type="int32" visibility="public"
5509 hwlevel="legacy">
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005510 <description>Clockwise angle through which the output image needs to be rotated to be
5511 upright on the device screen in its native orientation.
5512 </description>
5513 <units>Degrees of clockwise rotation; always a multiple of
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005514 90</units>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005515 <range>0, 90, 180, 270</range>
5516 <details>
5517 Also defines the direction of rolling shutter readout, which is from top to bottom in
5518 the sensor's coordinate system.
5519 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005520 <tag id="BC" />
5521 </entry>
Ruben Brunk2bebe312014-02-06 13:04:38 -08005522 <entry name="profileHueSatMapDimensions" type="int32"
Zhijun Hed0f482a2014-05-06 16:18:04 -07005523 visibility="system" optional="true"
Ruben Brunk2bebe312014-02-06 13:04:38 -08005524 type_notes="Number of samples for hue, saturation, and value"
5525 container="array">
5526 <array>
5527 <size>3</size>
5528 </array>
5529 <description>
5530 The number of input samples for each dimension of
5531 android.sensor.profileHueSatMap.
5532 </description>
5533 <range>
5534 Hue &amp;gt;= 1,
5535 Saturation &amp;gt;= 2,
5536 Value &amp;gt;= 1
5537 </range>
5538 <details>
5539 The number of input samples for the hue, saturation, and value
5540 dimension of android.sensor.profileHueSatMap. The order of the
5541 dimensions given is hue, saturation, value; where hue is the 0th
5542 element.
5543 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005544 <tag id="RAW" />
Ruben Brunk2bebe312014-02-06 13:04:38 -08005545 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005546 </static>
5547 <dynamic>
5548 <clone entry="android.sensor.exposureTime" kind="controls">
5549 </clone>
5550 <clone entry="android.sensor.frameDuration"
5551 kind="controls"></clone>
5552 <clone entry="android.sensor.sensitivity" kind="controls">
5553 </clone>
Igor Murashkinca256272014-10-02 15:27:09 -07005554 <entry name="timestamp" type="int64" visibility="public"
5555 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005556 <description>Time at start of exposure of first
Zhijun Hecc5cfdc2014-06-11 10:44:53 -07005557 row of the image sensor active array, in nanoseconds.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005558 <units>Nanoseconds</units>
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08005559 <range>&amp;gt; 0</range>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005560 <details>The timestamps are also included in all image
5561 buffers produced for the same capture, and will be identical
Zhijun He91449c82014-06-12 10:43:32 -07005562 on all the outputs.
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005563
Eino-Ville Talvala122906c2014-07-28 12:49:25 -07005564 When android.sensor.info.timestampSource `==` UNKNOWN,
Zhijun He91449c82014-06-12 10:43:32 -07005565 the timestamps measure time since an unspecified starting point,
5566 and are monotonically increasing. They can be compared with the
5567 timestamps for other captures from the same camera device, but are
5568 not guaranteed to be comparable to any other time source.
5569
Eino-Ville Talvala122906c2014-07-28 12:49:25 -07005570 When android.sensor.info.timestampSource `==` REALTIME,
Zhijun He91449c82014-06-12 10:43:32 -07005571 the timestamps measure time in the same timebase as
5572 android.os.SystemClock#elapsedRealtimeNanos(), and they can be
5573 compared to other timestamps from other subsystems that are using
5574 that base.
5575 </details>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005576 <hal_details>
Zhijun He91449c82014-06-12 10:43:32 -07005577 All timestamps must be in reference to the kernel's
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005578 CLOCK_BOOTTIME monotonic clock, which properly accounts for
5579 time spent asleep. This allows for synchronization with
5580 sensors that continue to operate while the system is
5581 otherwise asleep.
5582
Eino-Ville Talvala122906c2014-07-28 12:49:25 -07005583 If android.sensor.info.timestampSource `==` REALTIME,
Zhijun He91449c82014-06-12 10:43:32 -07005584 The timestamp must be synchronized with the timestamps from other
5585 sensor subsystems that are using the same timebase.
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005586 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005587 <tag id="BC" />
5588 </entry>
Zhijun He66e62a42014-05-23 11:02:34 -07005589 <entry name="temperature" type="float"
Alex Rayef40ad62013-10-01 17:52:33 -07005590 optional="true">
Igor Murashkin656aa5a2013-08-13 14:23:39 -07005591 <description>The temperature of the sensor, sampled at the time
5592 exposure began for this frame.
5593
5594 The thermal diode being queried should be inside the sensor PCB, or
5595 somewhere close to it.
5596 </description>
5597
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005598 <units>Celsius</units>
Igor Murashkin656aa5a2013-08-13 14:23:39 -07005599 <range>Optional. This value is missing if no temperature is available.</range>
Zhijun He66e62a42014-05-23 11:02:34 -07005600 <tag id="FUTURE" />
Igor Murashkin656aa5a2013-08-13 14:23:39 -07005601 </entry>
Ruben Brunk7b9e9bc2014-02-06 18:37:48 -08005602 <entry name="neutralColorPoint" type="rational" visibility="public"
5603 optional="true" container="array">
5604 <array>
5605 <size>3</size>
5606 </array>
5607 <description>
Ruben Brunk7db06e22014-04-15 17:43:56 -07005608 The estimated camera neutral color in the native sensor colorspace at
5609 the time of capture.
Ruben Brunk7b9e9bc2014-02-06 18:37:48 -08005610 </description>
5611 <details>
Ruben Brunk7db06e22014-04-15 17:43:56 -07005612 This value gives the neutral color point encoded as an RGB value in the
5613 native sensor color space. The neutral color point indicates the
5614 currently estimated white point of the scene illumination. It can be
5615 used to interpolate between the provided color transforms when
5616 processing raw sensor data.
5617
Ruben Brunk7b9e9bc2014-02-06 18:37:48 -08005618 The order of the values is R, G, B; where R is in the lowest index.
5619 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005620 <tag id="RAW" />
Ruben Brunk7b9e9bc2014-02-06 18:37:48 -08005621 </entry>
Ruben Brunk6a424ff2014-07-23 15:13:16 -07005622 <entry name="noiseProfile" type="double" visibility="public"
5623 optional="true" type_notes="Pairs of noise model coefficients"
5624 container="array" typedef="pairDoubleDouble">
5625 <array>
5626 <size>2</size>
5627 <size>CFA Channels</size>
5628 </array>
5629 <description>
5630 Noise model coefficients for each CFA mosaic channel.
5631 </description>
5632 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005633 This key contains two noise model coefficients for each CFA channel
Ruben Brunk6a424ff2014-07-23 15:13:16 -07005634 corresponding to the sensor amplification (S) and sensor readout
5635 noise (O). These are given as pairs of coefficients for each channel
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005636 in the same order as channels listed for the CFA layout key
Ruben Brunk6a424ff2014-07-23 15:13:16 -07005637 (see android.sensor.info.colorFilterArrangement). This is
5638 represented as an array of Pair&amp;lt;Double, Double&amp;gt;, where
5639 the first member of the Pair at index n is the S coefficient and the
5640 second member is the O coefficient for the nth color channel in the CFA.
5641
5642 These coefficients are used in a two parameter noise model to describe
5643 the amount of noise present in the image for each CFA channel. The
5644 noise model used here is:
5645
5646 N(x) = sqrt(Sx + O)
5647
5648 Where x represents the recorded signal of a CFA channel normalized to
5649 the range [0, 1], and S and O are the noise model coeffiecients for
5650 that channel.
5651
5652 A more detailed description of the noise model can be found in the
5653 Adobe DNG specification for the NoiseProfile tag.
5654 </details>
5655 <hal_details>
5656 For a CFA layout of RGGB, the list of coefficients would be given as
5657 an array of doubles S0,O0,S1,O1,..., where S0 and O0 are the coefficients
5658 for the red channel, S1 and O1 are the coefficients for the first green
5659 channel, etc.
5660 </hal_details>
5661 <tag id="RAW" />
5662 </entry>
Ruben Brunk2bebe312014-02-06 13:04:38 -08005663 <entry name="profileHueSatMap" type="float"
Zhijun Hed0f482a2014-05-06 16:18:04 -07005664 visibility="system" optional="true"
Ruben Brunk2bebe312014-02-06 13:04:38 -08005665 type_notes="Mapping for hue, saturation, and value"
5666 container="array">
5667 <array>
5668 <size>hue_samples</size>
5669 <size>saturation_samples</size>
5670 <size>value_samples</size>
5671 <size>3</size>
5672 </array>
5673 <description>
5674 A mapping containing a hue shift, saturation scale, and value scale
5675 for each pixel.
5676 </description>
5677 <units>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005678 The hue shift is given in degrees; saturation and value scale factors are
5679 unitless and are between 0 and 1 inclusive
Ruben Brunk2bebe312014-02-06 13:04:38 -08005680 </units>
5681 <details>
5682 hue_samples, saturation_samples, and value_samples are given in
5683 android.sensor.profileHueSatMapDimensions.
5684
5685 Each entry of this map contains three floats corresponding to the
5686 hue shift, saturation scale, and value scale, respectively; where the
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005687 hue shift has the lowest index. The map entries are stored in the key
Ruben Brunk2bebe312014-02-06 13:04:38 -08005688 in nested loop order, with the value divisions in the outer loop, the
5689 hue divisions in the middle loop, and the saturation divisions in the
5690 inner loop. All zero input saturation entries are required to have a
5691 value scale factor of 1.0.
5692 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005693 <tag id="RAW" />
Ruben Brunk2bebe312014-02-06 13:04:38 -08005694 </entry>
5695 <entry name="profileToneCurve" type="float"
Zhijun Hed0f482a2014-05-06 16:18:04 -07005696 visibility="system" optional="true"
Ruben Brunk2bebe312014-02-06 13:04:38 -08005697 type_notes="Samples defining a spline for a tone-mapping curve"
5698 container="array">
5699 <array>
5700 <size>samples</size>
5701 <size>2</size>
5702 </array>
5703 <description>
5704 A list of x,y samples defining a tone-mapping curve for gamma adjustment.
5705 </description>
5706 <range>
5707 Each sample has an input range of `[0, 1]` and an output range of
5708 `[0, 1]`. The first sample is required to be `(0, 0)`, and the last
5709 sample is required to be `(1, 1)`.
5710 </range>
5711 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005712 This key contains a default tone curve that can be applied while
Ruben Brunk2bebe312014-02-06 13:04:38 -08005713 processing the image as a starting point for user adjustments.
5714 The curve is specified as a list of value pairs in linear gamma.
5715 The curve is interpolated using a cubic spline.
5716 </details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005717 <tag id="RAW" />
Ruben Brunk2bebe312014-02-06 13:04:38 -08005718 </entry>
Ruben Brunk6a5fd112014-02-11 17:55:32 -08005719 <entry name="greenSplit" type="float" visibility="public" optional="true">
5720 <description>
5721 The worst-case divergence between Bayer green channels.
5722 </description>
5723 <range>
5724 &amp;gt;= 0
5725 </range>
5726 <details>
5727 This value is an estimate of the worst case split between the
5728 Bayer green channels in the red and blue rows in the sensor color
5729 filter array.
5730
5731 The green split is calculated as follows:
5732
Ruben Brunkd9d12132014-03-18 14:37:04 -07005733 1. A 5x5 pixel (or larger) window W within the active sensor array is
5734 chosen. The term 'pixel' here is taken to mean a group of 4 Bayer
5735 mosaic channels (R, Gr, Gb, B). The location and size of the window
5736 chosen is implementation defined, and should be chosen to provide a
5737 green split estimate that is both representative of the entire image
5738 for this camera sensor, and can be calculated quickly.
Ruben Brunk6a5fd112014-02-11 17:55:32 -08005739 1. The arithmetic mean of the green channels from the red
5740 rows (mean_Gr) within W is computed.
5741 1. The arithmetic mean of the green channels from the blue
5742 rows (mean_Gb) within W is computed.
5743 1. The maximum ratio R of the two means is computed as follows:
5744 `R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))`
5745
5746 The ratio R is the green split divergence reported for this property,
5747 which represents how much the green channels differ in the mosaic
5748 pattern. This value is typically used to determine the treatment of
5749 the green mosaic channels when demosaicing.
5750
5751 The green split value can be roughly interpreted as follows:
5752
5753 * R &amp;lt; 1.03 is a negligible split (&amp;lt;3% divergence).
5754 * 1.20 &amp;lt;= R &amp;gt;= 1.03 will require some software
5755 correction to avoid demosaic errors (3-20% divergence).
5756 * R &amp;gt; 1.20 will require strong software correction to produce
5757 a usuable image (&amp;gt;20% divergence).
5758 </details>
Ruben Brunkd9d12132014-03-18 14:37:04 -07005759 <hal_details>
5760 The green split given may be a static value based on prior
5761 characterization of the camera sensor using the green split
5762 calculation method given here over a large, representative, sample
5763 set of images. Other methods of calculation that produce equivalent
5764 results, and can be interpreted in the same manner, may be used.
5765 </hal_details>
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07005766 <tag id="RAW" />
Ruben Brunk6a5fd112014-02-11 17:55:32 -08005767 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005768 </dynamic>
Igor Murashkina46e02f2014-01-09 17:43:38 -08005769 <controls>
5770 <entry name="testPatternData" type="int32" visibility="public" optional="true" container="array">
5771 <array>
5772 <size>4</size>
5773 </array>
5774 <description>
5775 A pixel `[R, G_even, G_odd, B]` that supplies the test pattern
5776 when android.sensor.testPatternMode is SOLID_COLOR.
5777 </description>
Igor Murashkina46e02f2014-01-09 17:43:38 -08005778 <details>
5779 Each color channel is treated as an unsigned 32-bit integer.
5780 The camera device then uses the most significant X bits
5781 that correspond to how many bits are in its Bayer raw sensor
5782 output.
5783
5784 For example, a sensor with RAW10 Bayer output would use the
5785 10 most significant bits from each color channel.
5786 </details>
5787 <hal_details>
5788 </hal_details>
5789 </entry>
5790 <entry name="testPatternMode" type="int32" visibility="public" optional="true"
5791 enum="true">
5792 <enum>
5793 <value>OFF
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07005794 <notes>No test pattern mode is used, and the camera
5795 device returns captures from the image sensor.
5796
5797 This is the default if the key is not set.</notes>
Igor Murashkina46e02f2014-01-09 17:43:38 -08005798 </value>
5799 <value>SOLID_COLOR
5800 <notes>
5801 Each pixel in `[R, G_even, G_odd, B]` is replaced by its
5802 respective color channel provided in
5803 android.sensor.testPatternData.
5804
5805 For example:
5806
5807 android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
5808
5809 All green pixels are 100% green. All red/blue pixels are black.
5810
5811 android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
5812
5813 All red pixels are 100% red. Only the odd green pixels
5814 are 100% green. All blue pixels are 100% black.
5815 </notes>
5816 </value>
5817 <value>COLOR_BARS
5818 <notes>
5819 All pixel data is replaced with an 8-bar color pattern.
5820
5821 The vertical bars (left-to-right) are as follows:
5822
5823 * 100% white
5824 * yellow
5825 * cyan
5826 * green
5827 * magenta
5828 * red
5829 * blue
5830 * black
5831
5832 In general the image would look like the following:
5833
5834 W Y C G M R B K
5835 W Y C G M R B K
5836 W Y C G M R B K
5837 W Y C G M R B K
5838 W Y C G M R B K
5839 . . . . . . . .
5840 . . . . . . . .
5841 . . . . . . . .
5842
5843 (B = Blue, K = Black)
5844
5845 Each bar should take up 1/8 of the sensor pixel array width.
5846 When this is not possible, the bar size should be rounded
5847 down to the nearest integer and the pattern can repeat
5848 on the right side.
5849
5850 Each bar's height must always take up the full sensor
5851 pixel array height.
5852
5853 Each pixel in this test pattern must be set to either
5854 0% intensity or 100% intensity.
5855 </notes>
5856 </value>
5857 <value>COLOR_BARS_FADE_TO_GRAY
5858 <notes>
5859 The test pattern is similar to COLOR_BARS, except that
5860 each bar should start at its specified color at the top,
5861 and fade to gray at the bottom.
5862
5863 Furthermore each bar is further subdivided into a left and
5864 right half. The left half should have a smooth gradient,
5865 and the right half should have a quantized gradient.
5866
5867 In particular, the right half's should consist of blocks of the
5868 same color for 1/16th active sensor pixel array width.
5869
5870 The least significant bits in the quantized gradient should
5871 be copied from the most significant bits of the smooth gradient.
5872
5873 The height of each bar should always be a multiple of 128.
5874 When this is not the case, the pattern should repeat at the bottom
5875 of the image.
5876 </notes>
5877 </value>
5878 <value>PN9
5879 <notes>
5880 All pixel data is replaced by a pseudo-random sequence
5881 generated from a PN9 512-bit sequence (typically implemented
5882 in hardware with a linear feedback shift register).
5883
5884 The generator should be reset at the beginning of each frame,
5885 and thus each subsequent raw frame with this test pattern should
5886 be exactly the same as the last.
5887 </notes>
5888 </value>
5889 <value id="256">CUSTOM1
5890 <notes>The first custom test pattern. All custom patterns that are
5891 available only on this camera device are at least this numeric
5892 value.
5893
5894 All of the custom test patterns will be static
5895 (that is the raw image must not vary from frame to frame).
5896 </notes>
5897 </value>
5898 </enum>
5899 <description>When enabled, the sensor sends a test pattern instead of
5900 doing a real exposure from the camera.
5901 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005902 <range>android.sensor.availableTestPatternModes</range>
Igor Murashkina46e02f2014-01-09 17:43:38 -08005903 <details>
5904 When a test pattern is enabled, all manual sensor controls specified
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07005905 by android.sensor.* will be ignored. All other controls should
Igor Murashkina46e02f2014-01-09 17:43:38 -08005906 work as normal.
5907
5908 For example, if manual flash is enabled, flash firing should still
5909 occur (and that the test pattern remain unmodified, since the flash
5910 would not actually affect it).
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005911
5912 Defaults to OFF.
Igor Murashkina46e02f2014-01-09 17:43:38 -08005913 </details>
5914 <hal_details>
5915 All test patterns are specified in the Bayer domain.
5916
5917 The HAL may choose to substitute test patterns from the sensor
5918 with test patterns from on-device memory. In that case, it should be
5919 indistinguishable to the ISP whether the data came from the
5920 sensor interconnect bus (such as CSI2) or memory.
5921 </hal_details>
5922 </entry>
5923 </controls>
5924 <dynamic>
Zhijun He602d3702014-05-02 17:38:15 -07005925 <clone entry="android.sensor.testPatternData" kind="controls">
5926 </clone>
Igor Murashkina46e02f2014-01-09 17:43:38 -08005927 <clone entry="android.sensor.testPatternMode" kind="controls">
5928 </clone>
5929 </dynamic>
5930 <static>
Zhijun He29a973d2014-03-27 23:54:16 -07005931 <entry name="availableTestPatternModes" type="int32" visibility="public" optional="true"
5932 type_notes="list of enums" container="array">
5933 <array>
5934 <size>n</size>
5935 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005936 <description>List of sensor test pattern modes for android.sensor.testPatternMode
5937 supported by this camera device.
Igor Murashkina46e02f2014-01-09 17:43:38 -08005938 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005939 <range>Any value listed in android.sensor.testPatternMode</range>
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005940 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005941 Defaults to OFF, and always includes OFF if defined.
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07005942 </details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005943 <hal_details>
5944 All custom modes must be >= CUSTOM1.
5945 </hal_details>
Igor Murashkina46e02f2014-01-09 17:43:38 -08005946 </entry>
Igor Murashkina46e02f2014-01-09 17:43:38 -08005947 </static>
Zhijun Hecc5cfdc2014-06-11 10:44:53 -07005948 <dynamic>
Igor Murashkinca256272014-10-02 15:27:09 -07005949 <entry name="rollingShutterSkew" type="int64" visibility="public" hwlevel="limited">
Zhijun Hecc5cfdc2014-06-11 10:44:53 -07005950 <description>Duration between the start of first row exposure
5951 and the start of last row exposure.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005952 <units>Nanoseconds</units>
Zhijun Hecc5cfdc2014-06-11 10:44:53 -07005953 <range> &amp;gt;= 0 and &amp;lt;
5954 StreamConfigurationMap#getOutputMinFrameDuration(int, Size).</range>
5955 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005956 This is the exposure time skew between the first and last
5957 row exposure start times. The first row and the last row are
5958 the first and last rows inside of the
5959 android.sensor.info.activeArraySize.
Zhijun Hecc5cfdc2014-06-11 10:44:53 -07005960
5961 For typical camera sensors that use rolling shutters, this is also equivalent
5962 to the frame readout time.
5963 </details>
5964 <hal_details>
5965 The HAL must report `0` if the sensor is using global shutter, where all pixels begin
5966 exposure at the same time.
5967 </hal_details>
5968 <tag id="V1" />
5969 </entry>
5970 </dynamic>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005971 </section>
5972 <section name="shading">
5973 <controls>
Igor Murashkinca256272014-10-02 15:27:09 -07005974 <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005975 <enum>
5976 <value>OFF
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07005977 <notes>No lens shading correction is applied.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005978 <value>FAST
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07005979 <notes>Apply lens shading corrections, without slowing
5980 frame rate relative to sensor raw output</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005981 <value>HIGH_QUALITY
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07005982 <notes>Apply high-quality lens shading correction, at the
5983 cost of reduced frame rate.</notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08005984 </enum>
5985 <description>Quality of lens shading correction applied
Zhijun He2f86a212014-01-15 10:34:02 -08005986 to the image data.</description>
5987 <details>
5988 When set to OFF mode, no lens shading correction will be applied by the
5989 camera device, and an identity lens shading map data will be provided
5990 if `android.statistics.lensShadingMapMode == ON`. For example, for lens
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005991 shading map with size of `[ 4, 3 ]`,
5992 the output android.statistics.lensShadingCorrectionMap for this case will be an identity
5993 map shown below:
Zhijun He2f86a212014-01-15 10:34:02 -08005994
5995 [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07005996 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
5997 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
5998 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
5999 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0,
6000 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ]
Zhijun He2f86a212014-01-15 10:34:02 -08006001
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006002 When set to other modes, lens shading correction will be applied by the camera
6003 device. Applications can request lens shading map data by setting
6004 android.statistics.lensShadingMapMode to ON, and then the camera device will provide lens
6005 shading map data in android.statistics.lensShadingCorrectionMap; the returned shading map
6006 data will be the one applied by the camera device for this capture request.
Zhijun He46f82f02014-05-20 18:22:18 -07006007
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006008 The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore
6009 the reliability of the map data may be affected by the AE and AWB algorithms. When AE and
6010 AWB are in AUTO modes(android.control.aeMode `!=` OFF and android.control.awbMode `!=`
6011 OFF), to get best results, it is recommended that the applications wait for the AE and AWB
6012 to be converged before using the returned shading map data.
Zhijun He2f86a212014-01-15 10:34:02 -08006013 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006014 </entry>
6015 <entry name="strength" type="byte">
6016 <description>Control the amount of shading correction
6017 applied to the images</description>
6018 <units>unitless: 1-10; 10 is full shading
6019 compensation</units>
Zhijun He66e62a42014-05-23 11:02:34 -07006020 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006021 </entry>
6022 </controls>
6023 <dynamic>
6024 <clone entry="android.shading.mode" kind="controls">
6025 </clone>
6026 </dynamic>
6027 </section>
6028 <section name="statistics">
6029 <controls>
Igor Murashkinca256272014-10-02 15:27:09 -07006030 <entry name="faceDetectMode" type="byte" visibility="public" enum="true"
6031 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006032 <enum>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006033 <value>OFF
6034 <notes>Do not include face detection statistics in capture
6035 results.</notes></value>
6036 <value optional="true">SIMPLE
6037 <notes>Return face rectangle and confidence values only.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006038 </notes></value>
6039 <value optional="true">FULL
6040 <notes>Return all face
6041 metadata.
6042
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006043 In this mode, face rectangles, scores, landmarks, and face IDs are all valid.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006044 </notes></value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006045 </enum>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006046 <description>Operating mode for the face detector
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07006047 unit.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006048 <range>android.statistics.info.availableFaceDetectModes</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08006049 <details>Whether face detection is enabled, and whether it
Zhijun He69fc0ea2013-07-17 09:42:58 -07006050 should output just the basic fields or the full set of
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006051 fields.</details>
6052 <hal_details>
6053 SIMPLE mode must fill in android.statistics.faceRectangles and
6054 android.statistics.faceScores.
6055 FULL mode must also fill in android.statistics.faceIds, and
6056 android.statistics.faceLandmarks.
6057 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006058 <tag id="BC" />
6059 </entry>
Igor Murashkinb8dc8812013-07-17 16:29:34 -07006060 <entry name="histogramMode" type="byte" enum="true" typedef="boolean">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006061 <enum>
6062 <value>OFF</value>
6063 <value>ON</value>
6064 </enum>
6065 <description>Operating mode for histogram
6066 generation</description>
Zhijun He66e62a42014-05-23 11:02:34 -07006067 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006068 </entry>
Igor Murashkinb8dc8812013-07-17 16:29:34 -07006069 <entry name="sharpnessMapMode" type="byte" enum="true" typedef="boolean">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006070 <enum>
6071 <value>OFF</value>
6072 <value>ON</value>
6073 </enum>
6074 <description>Operating mode for sharpness map
6075 generation</description>
Zhijun He66e62a42014-05-23 11:02:34 -07006076 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006077 </entry>
Ruben Brunk49e4f912014-03-04 14:09:44 -08006078 <entry name="hotPixelMapMode" type="byte" visibility="public" enum="true"
6079 typedef="boolean">
6080 <enum>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006081 <value>OFF
6082 <notes>Hot pixel map production is disabled.
6083 </notes></value>
6084 <value>ON
6085 <notes>Hot pixel map production is enabled.
6086 </notes></value>
Ruben Brunk49e4f912014-03-04 14:09:44 -08006087 </enum>
6088 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006089 Operating mode for hot pixel map generation.
Ruben Brunk49e4f912014-03-04 14:09:44 -08006090 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006091 <range>android.statistics.info.availableHotPixelMapModes</range>
Ruben Brunk49e4f912014-03-04 14:09:44 -08006092 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006093 If set to `true`, a hot pixel map is returned in android.statistics.hotPixelMap.
6094 If set to `false`, no hot pixel map will be returned.
Ruben Brunk49e4f912014-03-04 14:09:44 -08006095 </details>
6096 <tag id="V1" />
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07006097 <tag id="RAW" />
Ruben Brunk49e4f912014-03-04 14:09:44 -08006098 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006099 </controls>
6100 <static>
6101 <namespace name="info">
6102 <entry name="availableFaceDetectModes" type="byte"
Zhijun He69fc0ea2013-07-17 09:42:58 -07006103 visibility="public"
6104 type_notes="List of enums from android.statistics.faceDetectMode"
Eino-Ville Talvalaaebc8c22014-05-27 10:50:30 -07006105 container="array"
Igor Murashkinca256272014-10-02 15:27:09 -07006106 typedef="enumList"
6107 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006108 <array>
6109 <size>n</size>
6110 </array>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006111 <description>List of face detection modes for android.statistics.faceDetectMode that are
6112 supported by this camera device.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006113 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006114 <range>Any value listed in android.statistics.faceDetectMode</range>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006115 <details>OFF is always supported.
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08006116 </details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006117 </entry>
6118 <entry name="histogramBucketCount" type="int32">
6119 <description>Number of histogram buckets
6120 supported</description>
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08006121 <range>&amp;gt;= 64</range>
Zhijun He66e62a42014-05-23 11:02:34 -07006122 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006123 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07006124 <entry name="maxFaceCount" type="int32" visibility="public" hwlevel="legacy">
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006125 <description>The maximum number of simultaneously detectable
6126 faces.</description>
Igor Murashkinca256272014-10-02 15:27:09 -07006127 <range>0 for cameras without available face detection; otherwise:
6128 `&gt;=4` for LIMITED or FULL hwlevel devices or
6129 `&gt;0` for LEGACY devices.</range>
Zhijun He66e62a42014-05-23 11:02:34 -07006130 <tag id="BC" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006131 </entry>
6132 <entry name="maxHistogramCount" type="int32">
6133 <description>Maximum value possible for a histogram
6134 bucket</description>
Zhijun He66e62a42014-05-23 11:02:34 -07006135 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006136 </entry>
6137 <entry name="maxSharpnessMapValue" type="int32">
6138 <description>Maximum value possible for a sharpness map
6139 region.</description>
Zhijun He66e62a42014-05-23 11:02:34 -07006140 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006141 </entry>
6142 <entry name="sharpnessMapSize" type="int32"
Igor Murashkinb8dc8812013-07-17 16:29:34 -07006143 type_notes="width x height" container="array" typedef="size">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006144 <array>
6145 <size>2</size>
6146 </array>
6147 <description>Dimensions of the sharpness
6148 map</description>
6149 <range>Must be at least 32 x 32</range>
Zhijun He66e62a42014-05-23 11:02:34 -07006150 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006151 </entry>
Ruben Brunk49e4f912014-03-04 14:09:44 -08006152 <entry name="availableHotPixelMapModes" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07006153 type_notes="list of enums" container="array" typedef="boolean">
Ruben Brunk49e4f912014-03-04 14:09:44 -08006154 <array>
6155 <size>n</size>
6156 </array>
6157 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006158 List of hot pixel map output modes for android.statistics.hotPixelMapMode that are
6159 supported by this camera device.
Ruben Brunk49e4f912014-03-04 14:09:44 -08006160 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006161 <range>Any value listed in android.statistics.hotPixelMapMode</range>
Ruben Brunk49e4f912014-03-04 14:09:44 -08006162 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006163 If no hotpixel map output is available for this camera device, this will contain only
6164 `false`.
Ruben Brunk49e4f912014-03-04 14:09:44 -08006165
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006166 ON is always supported on devices with the RAW capability.
Ruben Brunk49e4f912014-03-04 14:09:44 -08006167 </details>
6168 <tag id="V1" />
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07006169 <tag id="RAW" />
Ruben Brunk49e4f912014-03-04 14:09:44 -08006170 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006171 </namespace>
6172 </static>
6173 <dynamic>
6174 <clone entry="android.statistics.faceDetectMode"
Igor Murashkinca256272014-10-02 15:27:09 -07006175 kind="controls"></clone>
6176 <entry name="faceIds" type="int32" visibility="hidden" container="array"
6177 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006178 <array>
6179 <size>n</size>
6180 </array>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006181 <description>List of unique IDs for detected faces.</description>
6182 <details>
6183 Each detected face is given a unique ID that is valid for as long as the face is visible
6184 to the camera device. A face that leaves the field of view and later returns may be
6185 assigned a new ID.
6186
6187 Only available if android.statistics.faceDetectMode == FULL</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006188 <tag id="BC" />
6189 </entry>
Zhijun He3b4c2062013-10-07 11:23:30 -07006190 <entry name="faceLandmarks" type="int32" visibility="hidden"
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006191 type_notes="(leftEyeX, leftEyeY, rightEyeX, rightEyeY, mouthX, mouthY)"
Igor Murashkinca256272014-10-02 15:27:09 -07006192 container="array" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006193 <array>
6194 <size>n</size>
6195 <size>6</size>
6196 </array>
6197 <description>List of landmarks for detected
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006198 faces.</description>
6199 <details>
6200 The coordinate system is that of android.sensor.info.activeArraySize, with
6201 `(0, 0)` being the top-left pixel of the active array.
6202
6203 Only available if android.statistics.faceDetectMode == FULL</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006204 <tag id="BC" />
6205 </entry>
Zhijun He3b4c2062013-10-07 11:23:30 -07006206 <entry name="faceRectangles" type="int32" visibility="hidden"
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006207 type_notes="(xmin, ymin, xmax, ymax). (0,0) is top-left of active pixel area"
Igor Murashkinca256272014-10-02 15:27:09 -07006208 container="array" typedef="rectangle" hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006209 <array>
6210 <size>n</size>
6211 <size>4</size>
6212 </array>
6213 <description>List of the bounding rectangles for detected
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006214 faces.</description>
6215 <details>
6216 The coordinate system is that of android.sensor.info.activeArraySize, with
6217 `(0, 0)` being the top-left pixel of the active array.
6218
6219 Only available if android.statistics.faceDetectMode != OFF</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006220 <tag id="BC" />
6221 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07006222 <entry name="faceScores" type="byte" visibility="hidden" container="array"
6223 hwlevel="legacy">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006224 <array>
6225 <size>n</size>
6226 </array>
6227 <description>List of the face confidence scores for
6228 detected faces</description>
Zhijun He59ccb1e2013-10-02 14:06:15 -07006229 <range>1-100</range>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006230 <details>Only available if android.statistics.faceDetectMode != OFF.
6231 </details>
6232 <hal_details>
6233 The value should be meaningful (for example, setting 100 at
6234 all times is illegal).</hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006235 <tag id="BC" />
6236 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07006237 <entry name="faces" type="int32" visibility="public" synthetic="true"
6238 container="array" typedef="face" hwlevel="legacy">
Igor Murashkinefff0de2014-05-14 17:30:49 -07006239 <array>
6240 <size>n</size>
6241 </array>
6242 <description>List of the faces detected through camera face detection
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006243 in this capture.</description>
Igor Murashkinefff0de2014-05-14 17:30:49 -07006244 <details>
6245 Only available if android.statistics.faceDetectMode `!=` OFF.
6246 </details>
6247 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006248 <entry name="histogram" type="int32"
6249 type_notes="count of pixels for each color channel that fall into each histogram bucket, scaled to be between 0 and maxHistogramCount"
6250 container="array">
6251 <array>
6252 <size>n</size>
6253 <size>3</size>
6254 </array>
6255 <description>A 3-channel histogram based on the raw
6256 sensor data</description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08006257 <details>The k'th bucket (0-based) covers the input range
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006258 (with w = android.sensor.info.whiteLevel) of [ k * w/N,
6259 (k + 1) * w / N ). If only a monochrome sharpness map is
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08006260 supported, all channels should have the same data</details>
Zhijun He66e62a42014-05-23 11:02:34 -07006261 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006262 </entry>
6263 <clone entry="android.statistics.histogramMode"
6264 kind="controls"></clone>
6265 <entry name="sharpnessMap" type="int32"
6266 type_notes="estimated sharpness for each region of the input image. Normalized to be between 0 and maxSharpnessMapValue. Higher values mean sharper (better focused)"
6267 container="array">
6268 <array>
6269 <size>n</size>
6270 <size>m</size>
6271 <size>3</size>
6272 </array>
6273 <description>A 3-channel sharpness map, based on the raw
6274 sensor data</description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08006275 <details>If only a monochrome sharpness map is supported,
6276 all channels should have the same data</details>
Zhijun He66e62a42014-05-23 11:02:34 -07006277 <tag id="FUTURE" />
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006278 </entry>
6279 <clone entry="android.statistics.sharpnessMapMode"
Igor Murashkinca256272014-10-02 15:27:09 -07006280 kind="controls"></clone>
6281 <entry name="lensShadingCorrectionMap" type="byte" visibility="public"
6282 typedef="lensShadingMap" hwlevel="full">
Ruben Brunk9c766ad2014-05-27 18:52:49 -07006283 <description>The shading map is a low-resolution floating-point map
6284 that lists the coefficients used to correct for vignetting, for each
6285 Bayer color channel.</description>
6286 <range>Each gain factor is &amp;gt;= 1</range>
6287 <details>The least shaded section of the image should have a gain factor
6288 of 1; all other sections should have gains above 1.
6289
6290 When android.colorCorrection.mode = TRANSFORM_MATRIX, the map
6291 must take into account the colorCorrection settings.
6292
6293 The shading map is for the entire active pixel array, and is not
6294 affected by the crop region specified in the request. Each shading map
6295 entry is the value of the shading compensation map over a specific
6296 pixel on the sensor. Specifically, with a (N x M) resolution shading
6297 map, and an active pixel array size (W x H), shading map entry
6298 (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
6299 pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
6300 The map is assumed to be bilinearly interpolated between the sample points.
6301
6302 The channel order is [R, Geven, Godd, B], where Geven is the green
6303 channel for the even rows of a Bayer pattern, and Godd is the odd rows.
6304 The shading map is stored in a fully interleaved format.
6305
6306 The shading map should have on the order of 30-40 rows and columns,
6307 and must be smaller than 64x64.
6308
6309 As an example, given a very small map defined as:
6310
6311 width,height = [ 4, 3 ]
6312 values =
6313 [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2,
6314 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3,
6315 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0,
6316 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2,
6317 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2,
6318 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ]
6319
6320 The low-resolution scaling map images for each channel are
6321 (displayed using nearest-neighbor interpolation):
6322
6323 ![Red lens shading map](android.statistics.lensShadingMap/red_shading.png)
6324 ![Green (even rows) lens shading map](android.statistics.lensShadingMap/green_e_shading.png)
6325 ![Green (odd rows) lens shading map](android.statistics.lensShadingMap/green_o_shading.png)
6326 ![Blue lens shading map](android.statistics.lensShadingMap/blue_shading.png)
6327
6328 As a visualization only, inverting the full-color map to recover an
6329 image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:
6330
6331 ![Image of a uniform white wall (inverse shading map)](android.statistics.lensShadingMap/inv_shading.png)
6332 </details>
6333 </entry>
6334 <entry name="lensShadingMap" type="float" visibility="hidden"
Zhijun He69fc0ea2013-07-17 09:42:58 -07006335 type_notes="2D array of float gain factors per channel to correct lens shading"
Igor Murashkinca256272014-10-02 15:27:09 -07006336 container="array" hwlevel="full">
Zhijun He69fc0ea2013-07-17 09:42:58 -07006337 <array>
6338 <size>4</size>
6339 <size>n</size>
6340 <size>m</size>
6341 </array>
Igor Murashkin1dd4ecb2013-12-11 13:31:00 -08006342 <description>The shading map is a low-resolution floating-point map
6343 that lists the coefficients used to correct for vignetting, for each
6344 Bayer color channel.</description>
Igor Murashkin6cb7c2c2014-01-10 15:12:40 -08006345 <range>Each gain factor is &amp;gt;= 1</range>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08006346 <details>The least shaded section of the image should have a gain factor
Zhijun He69fc0ea2013-07-17 09:42:58 -07006347 of 1; all other sections should have gains above 1.
Igor Murashkin656aa5a2013-08-13 14:23:39 -07006348
6349 When android.colorCorrection.mode = TRANSFORM_MATRIX, the map
6350 must take into account the colorCorrection settings.
Igor Murashkin1dd4ecb2013-12-11 13:31:00 -08006351
6352 The shading map is for the entire active pixel array, and is not
6353 affected by the crop region specified in the request. Each shading map
6354 entry is the value of the shading compensation map over a specific
6355 pixel on the sensor. Specifically, with a (N x M) resolution shading
6356 map, and an active pixel array size (W x H), shading map entry
6357 (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at
6358 pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels.
6359 The map is assumed to be bilinearly interpolated between the sample points.
6360
6361 The channel order is [R, Geven, Godd, B], where Geven is the green
6362 channel for the even rows of a Bayer pattern, and Godd is the odd rows.
6363 The shading map is stored in a fully interleaved format, and its size
6364 is provided in the camera static metadata by android.lens.info.shadingMapSize.
6365
6366 The shading map should have on the order of 30-40 rows and columns,
6367 and must be smaller than 64x64.
6368
6369 As an example, given a very small map defined as:
6370
6371 android.lens.info.shadingMapSize = [ 4, 3 ]
6372 android.statistics.lensShadingMap =
6373 [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2,
6374 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3,
6375 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0,
6376 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2,
6377 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2,
6378 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ]
6379
6380 The low-resolution scaling map images for each channel are
6381 (displayed using nearest-neighbor interpolation):
6382
6383 ![Red lens shading map](android.statistics.lensShadingMap/red_shading.png)
6384 ![Green (even rows) lens shading map](android.statistics.lensShadingMap/green_e_shading.png)
6385 ![Green (odd rows) lens shading map](android.statistics.lensShadingMap/green_o_shading.png)
6386 ![Blue lens shading map](android.statistics.lensShadingMap/blue_shading.png)
6387
6388 As a visualization only, inverting the full-color map to recover an
6389 image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives:
6390
6391 ![Image of a uniform white wall (inverse shading map)](android.statistics.lensShadingMap/inv_shading.png)
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08006392 </details>
Zhijun He46f82f02014-05-20 18:22:18 -07006393 <hal_details>
6394 The lens shading map calculation may depend on exposure and white balance statistics.
6395 When AE and AWB are in AUTO modes
6396 (android.control.aeMode `!=` OFF and android.control.awbMode `!=` OFF), the HAL
6397 may have all the information it need to generate most accurate lens shading map. When
6398 AE or AWB are in manual mode
6399 (android.control.aeMode `==` OFF or android.control.awbMode `==` OFF), the shading map
6400 may be adversely impacted by manual exposure or white balance parameters. To avoid
6401 generating unreliable shading map data, the HAL may choose to lock the shading map with
6402 the latest known good map generated when the AE and AWB are in AUTO modes.
6403 </hal_details>
Zhijun He69fc0ea2013-07-17 09:42:58 -07006404 </entry>
Igor Murashkin0fe2f132014-01-13 16:59:47 -08006405 <entry name="predictedColorGains" type="float"
6406 visibility="hidden"
Igor Murashkin6c936c12014-05-13 14:51:49 -07006407 deprecated="true"
Igor Murashkin0fe2f132014-01-13 16:59:47 -08006408 optional="true"
Zhijun He69fc0ea2013-07-17 09:42:58 -07006409 type_notes="A 1D array of floats for 4 color channel gains"
6410 container="array">
6411 <array>
6412 <size>4</size>
6413 </array>
6414 <description>The best-fit color channel gains calculated
Zhijun He25b8ac52014-02-24 09:49:37 -08006415 by the camera device's statistics units for the current output frame.
Zhijun He69fc0ea2013-07-17 09:42:58 -07006416 </description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08006417 <details>
Zhijun He69fc0ea2013-07-17 09:42:58 -07006418 This may be different than the gains used for this frame,
6419 since statistics processing on data from a new frame
6420 typically completes after the transform has already been
6421 applied to that frame.
6422
6423 The 4 channel gains are defined in Bayer domain,
Igor Murashkin656aa5a2013-08-13 14:23:39 -07006424 see android.colorCorrection.gains for details.
6425
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07006426 This value should always be calculated by the auto-white balance (AWB) block,
Igor Murashkin656aa5a2013-08-13 14:23:39 -07006427 regardless of the android.control.* current values.
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08006428 </details>
Zhijun He69fc0ea2013-07-17 09:42:58 -07006429 </entry>
Igor Murashkin0fe2f132014-01-13 16:59:47 -08006430 <entry name="predictedColorTransform" type="rational"
6431 visibility="hidden"
Igor Murashkin6c936c12014-05-13 14:51:49 -07006432 deprecated="true"
Igor Murashkin0fe2f132014-01-13 16:59:47 -08006433 optional="true"
Zhijun He69fc0ea2013-07-17 09:42:58 -07006434 type_notes="3x3 rational matrix in row-major order"
6435 container="array">
6436 <array>
6437 <size>3</size>
6438 <size>3</size>
6439 </array>
6440 <description>The best-fit color transform matrix estimate
Zhijun He25b8ac52014-02-24 09:49:37 -08006441 calculated by the camera device's statistics units for the current
6442 output frame.</description>
Zhijun He25b8ac52014-02-24 09:49:37 -08006443 <details>The camera device will provide the estimate from its
Zhijun He69fc0ea2013-07-17 09:42:58 -07006444 statistics unit on the white balance transforms to use
Zhijun He25b8ac52014-02-24 09:49:37 -08006445 for the next frame. These are the values the camera device believes
Zhijun He69fc0ea2013-07-17 09:42:58 -07006446 are the best fit for the current output frame. This may
6447 be different than the transform used for this frame, since
6448 statistics processing on data from a new frame typically
6449 completes after the transform has already been applied to
6450 that frame.
6451
6452 These estimates must be provided for all frames, even if
6453 capture settings and color transforms are set by the application.
Igor Murashkin656aa5a2013-08-13 14:23:39 -07006454
Eino-Ville Talvala68dbc6f2014-06-06 14:35:41 -07006455 This value should always be calculated by the auto-white balance (AWB) block,
Igor Murashkin656aa5a2013-08-13 14:23:39 -07006456 regardless of the android.control.* current values.
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08006457 </details>
Zhijun He69fc0ea2013-07-17 09:42:58 -07006458 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07006459 <entry name="sceneFlicker" type="byte" visibility="public" enum="true"
6460 hwlevel="full">
Zhijun He69fc0ea2013-07-17 09:42:58 -07006461 <enum>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006462 <value>NONE
6463 <notes>The camera device does not detect any flickering illumination
6464 in the current scene.</notes></value>
6465 <value>50HZ
6466 <notes>The camera device detects illumination flickering at 50Hz
6467 in the current scene.</notes></value>
6468 <value>60HZ
6469 <notes>The camera device detects illumination flickering at 60Hz
6470 in the current scene.</notes></value>
Zhijun He69fc0ea2013-07-17 09:42:58 -07006471 </enum>
Zhijun Heb8512c52014-02-03 11:46:58 -08006472 <description>The camera device estimated scene illumination lighting
6473 frequency.</description>
6474 <details>
6475 Many light sources, such as most fluorescent lights, flicker at a rate
6476 that depends on the local utility power standards. This flicker must be
6477 accounted for by auto-exposure routines to avoid artifacts in captured images.
6478 The camera device uses this entry to tell the application what the scene
6479 illuminant frequency is.
6480
6481 When manual exposure control is enabled
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006482 (`android.control.aeMode == OFF` or `android.control.mode ==
6483 OFF`), the android.control.aeAntibandingMode doesn't perform
6484 antibanding, and the application can ensure it selects
6485 exposure times that do not cause banding issues by looking
6486 into this metadata field. See
6487 android.control.aeAntibandingMode for more details.
Zhijun Heb8512c52014-02-03 11:46:58 -08006488
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006489 Reports NONE if there doesn't appear to be flickering illumination.
Zhijun Heb8512c52014-02-03 11:46:58 -08006490 </details>
Zhijun He69fc0ea2013-07-17 09:42:58 -07006491 </entry>
Ruben Brunk49e4f912014-03-04 14:09:44 -08006492 <clone entry="android.statistics.hotPixelMapMode" kind="controls">
6493 </clone>
6494 <entry name="hotPixelMap" type="int32" visibility="public"
6495 type_notes="list of coordinates based on android.sensor.pixelArraySize"
Yin-Chia Yeh0a5f2692014-05-27 09:48:07 -07006496 container="array" typedef="point">
Ruben Brunk49e4f912014-03-04 14:09:44 -08006497 <array>
6498 <size>2</size>
6499 <size>n</size>
6500 </array>
6501 <description>
6502 List of `(x, y)` coordinates of hot/defective pixels on the sensor.
6503 </description>
6504 <range>
6505 n &lt;= number of pixels on the sensor.
6506 The `(x, y)` coordinates must be bounded by
6507 android.sensor.info.pixelArraySize.
6508 </range>
6509 <details>
6510 A coordinate `(x, y)` must lie between `(0, 0)`, and
6511 `(width - 1, height - 1)` (inclusive), which are the top-left and
6512 bottom-right of the pixel array, respectively. The width and
6513 height dimensions are given in android.sensor.info.pixelArraySize.
6514 This may include hot pixels that lie outside of the active array
6515 bounds given by android.sensor.info.activeArraySize.
6516 </details>
6517 <hal_details>
6518 A hotpixel map contains the coordinates of pixels on the camera
6519 sensor that do report valid values (usually due to defects in
6520 the camera sensor). This includes pixels that are stuck at certain
6521 values, or have a response that does not accuractly encode the
6522 incoming light from the scene.
6523
6524 To avoid performance issues, there should be significantly fewer hot
6525 pixels than actual pixels on the camera sensor.
6526 </hal_details>
6527 <tag id="V1" />
Eino-Ville Talvala9a7f3d82014-07-15 10:43:01 -07006528 <tag id="RAW" />
Ruben Brunk49e4f912014-03-04 14:09:44 -08006529 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006530 </dynamic>
Zhijun He69fc0ea2013-07-17 09:42:58 -07006531 <controls>
Igor Murashkinca256272014-10-02 15:27:09 -07006532 <entry name="lensShadingMapMode" type="byte" visibility="public" enum="true" hwlevel="full">
Zhijun He69fc0ea2013-07-17 09:42:58 -07006533 <enum>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006534 <value>OFF
6535 <notes>Do not include a lens shading map in the capture result.</notes></value>
6536 <value>ON
6537 <notes>Include a lens shading map in the capture result.</notes></value>
Zhijun He69fc0ea2013-07-17 09:42:58 -07006538 </enum>
Zhijun He25b8ac52014-02-24 09:49:37 -08006539 <description>Whether the camera device will output the lens
6540 shading map in output result metadata.</description>
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08006541 <details>When set to ON,
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006542 android.statistics.lensShadingMap will be provided in
Igor Murashkinca256272014-10-02 15:27:09 -07006543 the output result metadata.
6544
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006545 ON is always supported on devices with the RAW capability.
Igor Murashkinca256272014-10-02 15:27:09 -07006546 </details>
6547 <tag id="RAW" />
Zhijun He69fc0ea2013-07-17 09:42:58 -07006548 </entry>
6549 </controls>
Zhijun He602d3702014-05-02 17:38:15 -07006550 <dynamic>
6551 <clone entry="android.statistics.lensShadingMapMode" kind="controls">
6552 </clone>
6553 </dynamic>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006554 </section>
6555 <section name="tonemap">
6556 <controls>
Yin-Chia Yeh0a5f2692014-05-27 09:48:07 -07006557 <entry name="curveBlue" type="float" visibility="hidden"
Zhijun He704d1282013-08-19 15:26:33 -07006558 type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
Igor Murashkinca256272014-10-02 15:27:09 -07006559 container="array" hwlevel="full">
Zhijun He704d1282013-08-19 15:26:33 -07006560 <array>
6561 <size>n</size>
6562 <size>2</size>
6563 </array>
Igor Murashkin94e06c42014-01-13 16:51:17 -08006564 <description>Tonemapping / contrast / gamma curve for the blue
6565 channel, to use when android.tonemap.mode is
6566 CONTRAST_CURVE.</description>
Igor Murashkin94e06c42014-01-13 16:51:17 -08006567 <details>See android.tonemap.curveRed for more details.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006568 </entry>
Yin-Chia Yeh0a5f2692014-05-27 09:48:07 -07006569 <entry name="curveGreen" type="float" visibility="hidden"
Zhijun He704d1282013-08-19 15:26:33 -07006570 type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
Igor Murashkinca256272014-10-02 15:27:09 -07006571 container="array" hwlevel="full">
Zhijun He704d1282013-08-19 15:26:33 -07006572 <array>
6573 <size>n</size>
6574 <size>2</size>
6575 </array>
Igor Murashkin94e06c42014-01-13 16:51:17 -08006576 <description>Tonemapping / contrast / gamma curve for the green
6577 channel, to use when android.tonemap.mode is
6578 CONTRAST_CURVE.</description>
Igor Murashkin94e06c42014-01-13 16:51:17 -08006579 <details>See android.tonemap.curveRed for more details.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006580 </entry>
Yin-Chia Yeh0a5f2692014-05-27 09:48:07 -07006581 <entry name="curveRed" type="float" visibility="hidden"
Zhijun He704d1282013-08-19 15:26:33 -07006582 type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints."
Igor Murashkinca256272014-10-02 15:27:09 -07006583 container="array" hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006584 <array>
6585 <size>n</size>
6586 <size>2</size>
6587 </array>
Igor Murashkin94e06c42014-01-13 16:51:17 -08006588 <description>Tonemapping / contrast / gamma curve for the red
6589 channel, to use when android.tonemap.mode is
6590 CONTRAST_CURVE.</description>
6591 <range>0-1 on both input and output coordinates, normalized
6592 as a floating-point value such that 0 == black and 1 == white.
6593 </range>
6594 <details>
6595 Each channel's curve is defined by an array of control points:
Zhijun He704d1282013-08-19 15:26:33 -07006596
Igor Murashkin94e06c42014-01-13 16:51:17 -08006597 android.tonemap.curveRed =
6598 [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
Zhijun He6ebd25a2014-02-15 21:21:30 -08006599 2 &lt;= N &lt;= android.tonemap.maxCurvePoints
Zhijun He704d1282013-08-19 15:26:33 -07006600
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006601 These are sorted in order of increasing `Pin`; it is
6602 required that input values 0.0 and 1.0 are included in the list to
Igor Murashkin94e06c42014-01-13 16:51:17 -08006603 define a complete mapping. For input values between control points,
6604 the camera device must linearly interpolate between the control
6605 points.
6606
6607 Each curve can have an independent number of points, and the number
6608 of points can be less than max (that is, the request doesn't have to
6609 always provide a curve with number of points equivalent to
6610 android.tonemap.maxCurvePoints).
6611
6612 A few examples, and their corresponding graphical mappings; these
6613 only specify the red channel and the precision is limited to 4
6614 digits, for conciseness.
6615
6616 Linear mapping:
6617
6618 android.tonemap.curveRed = [ 0, 0, 1.0, 1.0 ]
6619
6620 ![Linear mapping curve](android.tonemap.curveRed/linear_tonemap.png)
6621
6622 Invert mapping:
6623
6624 android.tonemap.curveRed = [ 0, 1.0, 1.0, 0 ]
6625
6626 ![Inverting mapping curve](android.tonemap.curveRed/inverse_tonemap.png)
6627
6628 Gamma 1/2.2 mapping, with 16 control points:
6629
6630 android.tonemap.curveRed = [
6631 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
6632 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
6633 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
6634 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
6635
6636 ![Gamma = 1/2.2 tonemapping curve](android.tonemap.curveRed/gamma_tonemap.png)
6637
6638 Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:
6639
6640 android.tonemap.curveRed = [
6641 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
6642 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
6643 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
6644 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
6645
6646 ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png)
6647 </details>
6648 <hal_details>
6649 For good quality of mapping, at least 128 control points are
6650 preferred.
6651
6652 A typical use case of this would be a gamma-1/2.2 curve, with as many
6653 control points used as are available.
6654 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006655 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07006656 <entry name="curve" type="float" visibility="public" synthetic="true"
6657 typedef="tonemapCurve"
6658 hwlevel="full">
Yin-Chia Yeh0a5f2692014-05-27 09:48:07 -07006659 <description>Tonemapping / contrast / gamma curve to use when android.tonemap.mode
6660 is CONTRAST_CURVE.</description>
6661 <details>
6662 The tonemapCurve consist of three curves for each of red, green, and blue
6663 channels respectively. The following example uses the red channel as an
6664 example. The same logic applies to green and blue channel.
6665 Each channel's curve is defined by an array of control points:
6666
6667 curveRed =
6668 [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ]
6669 2 &lt;= N &lt;= android.tonemap.maxCurvePoints
6670
6671 These are sorted in order of increasing `Pin`; it is always
6672 guaranteed that input values 0.0 and 1.0 are included in the list to
6673 define a complete mapping. For input values between control points,
6674 the camera device must linearly interpolate between the control
6675 points.
6676
6677 Each curve can have an independent number of points, and the number
6678 of points can be less than max (that is, the request doesn't have to
6679 always provide a curve with number of points equivalent to
6680 android.tonemap.maxCurvePoints).
6681
6682 A few examples, and their corresponding graphical mappings; these
6683 only specify the red channel and the precision is limited to 4
6684 digits, for conciseness.
6685
6686 Linear mapping:
6687
6688 curveRed = [ (0, 0), (1.0, 1.0) ]
6689
6690 ![Linear mapping curve](android.tonemap.curveRed/linear_tonemap.png)
6691
6692 Invert mapping:
6693
6694 curveRed = [ (0, 1.0), (1.0, 0) ]
6695
6696 ![Inverting mapping curve](android.tonemap.curveRed/inverse_tonemap.png)
6697
6698 Gamma 1/2.2 mapping, with 16 control points:
6699
6700 curveRed = [
6701 (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812),
6702 (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072),
6703 (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685),
6704 (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ]
6705
6706 ![Gamma = 1/2.2 tonemapping curve](android.tonemap.curveRed/gamma_tonemap.png)
6707
6708 Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:
6709
6710 curveRed = [
6711 (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845),
6712 (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130),
6713 (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721),
6714 (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ]
6715
6716 ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png)
6717 </details>
6718 <hal_details>
6719 This entry is created by the framework from the curveRed, curveGreen and
6720 curveBlue entries.
6721 </hal_details>
6722 </entry>
Igor Murashkinca256272014-10-02 15:27:09 -07006723 <entry name="mode" type="byte" visibility="public" enum="true"
6724 hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006725 <enum>
6726 <value>CONTRAST_CURVE
Igor Murashkin94e06c42014-01-13 16:51:17 -08006727 <notes>Use the tone mapping curve specified in
Eino-Ville Talvala7fabc1e2014-02-10 12:39:35 -08006728 the android.tonemap.curve* entries.
Igor Murashkin94e06c42014-01-13 16:51:17 -08006729
6730 All color enhancement and tonemapping must be disabled, except
6731 for applying the tonemapping curve specified by
Yin-Chia Yeh0a5f2692014-05-27 09:48:07 -07006732 android.tonemap.curve.
Igor Murashkin94e06c42014-01-13 16:51:17 -08006733
6734 Must not slow down frame rate relative to raw
6735 sensor output.
6736 </notes>
6737 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006738 <value>FAST
Igor Murashkin94e06c42014-01-13 16:51:17 -08006739 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006740 Advanced gamma mapping and color enhancement may be applied, without
6741 reducing frame rate compared to raw sensor output.
Igor Murashkin94e06c42014-01-13 16:51:17 -08006742 </notes>
6743 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006744 <value>HIGH_QUALITY
Igor Murashkin94e06c42014-01-13 16:51:17 -08006745 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006746 High-quality gamma mapping and color enhancement will be applied, at
6747 the cost of reduced frame rate compared to raw sensor output.
Igor Murashkin94e06c42014-01-13 16:51:17 -08006748 </notes>
6749 </value>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006750 </enum>
Igor Murashkin94e06c42014-01-13 16:51:17 -08006751 <description>High-level global contrast/gamma/tonemapping control.
6752 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006753 <range>android.tonemap.availableToneMapModes</range>
Igor Murashkin94e06c42014-01-13 16:51:17 -08006754 <details>
6755 When switching to an application-defined contrast curve by setting
6756 android.tonemap.mode to CONTRAST_CURVE, the curve is defined
6757 per-channel with a set of `(in, out)` points that specify the
6758 mapping from input high-bit-depth pixel value to the output
6759 low-bit-depth value. Since the actual pixel ranges of both input
6760 and output may change depending on the camera pipeline, the values
6761 are specified by normalized floating-point numbers.
6762
6763 More-complex color mapping operations such as 3D color look-up
6764 tables, selective chroma enhancement, or other non-linear color
6765 transforms will be disabled when android.tonemap.mode is
6766 CONTRAST_CURVE.
6767
6768 When using either FAST or HIGH_QUALITY, the camera device will
Yin-Chia Yeh0a5f2692014-05-27 09:48:07 -07006769 emit its own tonemap curve in android.tonemap.curve.
Igor Murashkin94e06c42014-01-13 16:51:17 -08006770 These values are always available, and as close as possible to the
6771 actually used nonlinear/nonglobal transforms.
6772
Zhijun He46f82f02014-05-20 18:22:18 -07006773 If a request is sent with CONTRAST_CURVE with the camera device's
Igor Murashkin94e06c42014-01-13 16:51:17 -08006774 provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
6775 roughly the same.</details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006776 </entry>
6777 </controls>
6778 <static>
Igor Murashkinca256272014-10-02 15:27:09 -07006779 <entry name="maxCurvePoints" type="int32" visibility="public"
6780 hwlevel="full">
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006781 <description>Maximum number of supported points in the
Yin-Chia Yeh0a5f2692014-05-27 09:48:07 -07006782 tonemap curve that can be used for android.tonemap.curve.
Igor Murashkin94e06c42014-01-13 16:51:17 -08006783 </description>
Igor Murashkin94e06c42014-01-13 16:51:17 -08006784 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006785 If the actual number of points provided by the application (in android.tonemap.curve*) is
6786 less than this maximum, the camera device will resample the curve to its internal
6787 representation, using linear interpolation.
Igor Murashkin94e06c42014-01-13 16:51:17 -08006788
6789 The output curves in the result metadata may have a different number
6790 of points than the input curves, and will represent the actual
6791 hardware curves used as closely as possible when linearly interpolated.
6792 </details>
6793 <hal_details>
6794 This value must be at least 64. This should be at least 128.
6795 </hal_details>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006796 </entry>
Ruben Brunkd14f7162014-03-04 15:01:25 -08006797 <entry name="availableToneMapModes" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07006798 type_notes="list of enums" container="array" typedef="enumList" hwlevel="full">
Ruben Brunkd14f7162014-03-04 15:01:25 -08006799 <array>
6800 <size>n</size>
6801 </array>
6802 <description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006803 List of tonemapping modes for android.tonemap.mode that are supported by this camera
6804 device.
Ruben Brunkd14f7162014-03-04 15:01:25 -08006805 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006806 <range>Any value listed in android.tonemap.mode</range>
Ruben Brunkd14f7162014-03-04 15:01:25 -08006807 <details>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006808 Camera devices that support the MANUAL_POST_PROCESSING capability will always list
6809 CONTRAST_CURVE and FAST. This includes all FULL level devices.
Ruben Brunkd14f7162014-03-04 15:01:25 -08006810 </details>
6811 </entry>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006812 </static>
6813 <dynamic>
6814 <clone entry="android.tonemap.curveBlue" kind="controls">
6815 </clone>
6816 <clone entry="android.tonemap.curveGreen" kind="controls">
6817 </clone>
6818 <clone entry="android.tonemap.curveRed" kind="controls">
6819 </clone>
Yin-Chia Yeh0a5f2692014-05-27 09:48:07 -07006820 <clone entry="android.tonemap.curve" kind="controls">
6821 </clone>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08006822 <clone entry="android.tonemap.mode" kind="controls">
6823 </clone>
6824 </dynamic>
6825 </section>
Igor Murashkinc469f7d2013-04-23 14:31:02 -07006826 <section name="led">
6827 <controls>
Igor Murashkinca256272014-10-02 15:27:09 -07006828 <entry name="transmit" type="byte" visibility="hidden" optional="true"
6829 enum="true" typedef="boolean">
Igor Murashkinc469f7d2013-04-23 14:31:02 -07006830 <enum>
6831 <value>OFF</value>
6832 <value>ON</value>
6833 </enum>
6834 <description>This LED is nominally used to indicate to the user
6835 that the camera is powered on and may be streaming images back to the
6836 Application Processor. In certain rare circumstances, the OS may
6837 disable this when video is processed locally and not transmitted to
6838 any untrusted applications.
6839
6840 In particular, the LED *must* always be on when the data could be
6841 transmitted off the device. The LED *should* always be on whenever
6842 data is stored locally on the device.
6843
6844 The LED *may* be off if a trusted application is using the data that
6845 doesn't violate the above rules.
6846 </description>
6847 </entry>
6848 </controls>
6849 <dynamic>
6850 <clone entry="android.led.transmit" kind="controls"></clone>
6851 </dynamic>
6852 <static>
Igor Murashkinca256272014-10-02 15:27:09 -07006853 <entry name="availableLeds" type="byte" visibility="hidden" optional="true"
6854 enum="true"
6855 container="array">
Igor Murashkinc469f7d2013-04-23 14:31:02 -07006856 <array>
6857 <size>n</size>
6858 </array>
6859 <enum>
6860 <value>TRANSMIT
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07006861 <notes>android.led.transmit control is used.</notes>
Igor Murashkinc469f7d2013-04-23 14:31:02 -07006862 </value>
6863 </enum>
6864 <description>A list of camera LEDs that are available on this system.
6865 </description>
6866 </entry>
6867 </static>
6868 </section>
Igor Murashkin38b8cae2013-05-23 16:38:59 -07006869 <section name="info">
6870 <static>
Eino-Ville Talvalaf384f0a2013-07-12 17:02:27 -07006871 <entry name="supportedHardwareLevel" type="byte" visibility="public"
Igor Murashkinca256272014-10-02 15:27:09 -07006872 enum="true" hwlevel="legacy">
Igor Murashkin38b8cae2013-05-23 16:38:59 -07006873 <enum>
Ruben Brunk31b50c22014-07-02 00:13:46 +00006874 <value>
6875 LIMITED
6876 <notes>
6877 This camera device has only limited capabilities.
6878 </notes>
6879 </value>
6880 <value>
6881 FULL
6882 <notes>
6883 This camera device is capable of supporting advanced imaging applications.
6884 </notes>
6885 </value>
6886 <value>
6887 LEGACY
6888 <notes>
6889 This camera device is running in backward compatibility mode.
6890 </notes>
6891 </value>
Igor Murashkin38b8cae2013-05-23 16:38:59 -07006892 </enum>
6893 <description>
Igor Murashkin57d570d2014-02-06 15:35:37 -08006894 Generally classifies the overall set of the camera device functionality.
6895 </description>
Igor Murashkin57d570d2014-02-06 15:35:37 -08006896 <details>
Igor Murashkinca256272014-10-02 15:27:09 -07006897 Camera devices will come in three flavors: LEGACY, LIMITED and FULL.
Igor Murashkin57d570d2014-02-06 15:35:37 -08006898
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006899 A FULL device will support below capabilities:
Igor Murashkin57d570d2014-02-06 15:35:37 -08006900
Zhijun He5fb671c2014-05-21 17:51:05 -07006901 * 30fps at maximum resolution (== sensor resolution) is preferred, more than 20fps is required.
6902 * Per frame control (android.sync.maxLatency `==` PER_FRAME_CONTROL)
6903 * Manual sensor control (android.request.availableCapabilities contains MANUAL_SENSOR)
6904 * Manual post-processing control (android.request.availableCapabilities contains MANUAL_POST_PROCESSING)
Zhijun Hedf726fa2014-06-25 08:35:53 -07006905 * Arbitrary cropping region (android.scaler.croppingType `==` FREEFORM)
6906 * At least 3 processed (but not stalling) format output streams (android.request.maxNumOutputProc `&gt;=` 3)
6907 * The required stream configuration defined in android.scaler.availableStreamConfigurations
6908 * The required exposure time range defined in android.sensor.info.exposureTimeRange
6909 * The required maxFrameDuration defined in android.sensor.info.maxFrameDuration
Igor Murashkin57d570d2014-02-06 15:35:37 -08006910
6911 A LIMITED device may have some or none of the above characteristics.
6912 To find out more refer to android.request.availableCapabilities.
Ruben Brunk31b50c22014-07-02 00:13:46 +00006913
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006914 Some features are not part of any particular hardware level or capability and must be
6915 queried separately. These include:
6916
6917 * Calibrated timestamps (android.sensor.info.timestampSource `==` REALTIME)
6918 * Precision lens control (android.lens.info.focusDistanceCalibration `==` CALIBRATED)
6919 * Face detection (android.statistics.info.availableFaceDetectModes)
6920 * Optical or electrical image stabilization
6921 (android.lens.info.availableOpticalStabilization,
6922 android.control.availableVideoStabilizationModes)
6923
Ruben Brunk31b50c22014-07-02 00:13:46 +00006924 A LEGACY device does not support per-frame control, manual sensor control, manual
6925 post-processing, arbitrary cropping regions, and has relaxed performance constraints.
Igor Murashkinca256272014-10-02 15:27:09 -07006926
6927 Each higher level supports everything the lower level supports
6928 in this order: FULL `&gt;` LIMITED `&gt;` LEGACY.
Igor Murashkin57d570d2014-02-06 15:35:37 -08006929 </details>
6930 <hal_details>
Eino-Ville Talvalafcef4c22013-07-16 16:18:44 -07006931 The camera 3 HAL device can implement one of two possible
6932 operational modes; limited and full. Full support is
6933 expected from new higher-end devices. Limited mode has
6934 hardware requirements roughly in line with those for a
6935 camera HAL device v1 implementation, and is expected from
6936 older or inexpensive devices. Full is a strict superset of
6937 limited, and they share the same essential operational flow.
Igor Murashkin38b8cae2013-05-23 16:38:59 -07006938
6939 For full details refer to "S3. Operational Modes" in camera3.h
Igor Murashkinca256272014-10-02 15:27:09 -07006940
6941 Camera HAL3+ must not implement LEGACY mode. It is there
6942 for backwards compatibility in the `android.hardware.camera2`
6943 user-facing API only.
Igor Murashkin57d570d2014-02-06 15:35:37 -08006944 </hal_details>
Igor Murashkin38b8cae2013-05-23 16:38:59 -07006945 </entry>
6946 </static>
6947 </section>
Zhijun He69fc0ea2013-07-17 09:42:58 -07006948 <section name="blackLevel">
6949 <controls>
Igor Murashkinb8dc8812013-07-17 16:29:34 -07006950 <entry name="lock" type="byte" visibility="public" enum="true"
Igor Murashkinca256272014-10-02 15:27:09 -07006951 typedef="boolean" hwlevel="full">
Zhijun He69fc0ea2013-07-17 09:42:58 -07006952 <enum>
6953 <value>OFF</value>
6954 <value>ON</value>
6955 </enum>
6956 <description> Whether black-level compensation is locked
Eino-Ville Talvala7796cfe2013-12-26 13:16:54 -08006957 to its current values, or is free to vary.</description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006958 <details>When set to `true` (ON), the values used for black-level
Eino-Ville Talvala7796cfe2013-12-26 13:16:54 -08006959 compensation will not change until the lock is set to
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07006960 `false` (OFF).
Zhijun He69fc0ea2013-07-17 09:42:58 -07006961
6962 Since changes to certain capture parameters (such as
6963 exposure time) may require resetting of black level
Eino-Ville Talvala7796cfe2013-12-26 13:16:54 -08006964 compensation, the camera device must report whether setting
6965 the black level lock was successful in the output result
Igor Murashkin656aa5a2013-08-13 14:23:39 -07006966 metadata.
6967
Igor Murashkin8aa2a112013-12-09 12:06:17 -08006968 For example, if a sequence of requests is as follows:
6969
6970 * Request 1: Exposure = 10ms, Black level lock = OFF
6971 * Request 2: Exposure = 10ms, Black level lock = ON
6972 * Request 3: Exposure = 10ms, Black level lock = ON
6973 * Request 4: Exposure = 20ms, Black level lock = ON
6974 * Request 5: Exposure = 20ms, Black level lock = ON
6975 * Request 6: Exposure = 20ms, Black level lock = ON
6976
Eino-Ville Talvala7796cfe2013-12-26 13:16:54 -08006977 And the exposure change in Request 4 requires the camera
6978 device to reset the black level offsets, then the output
6979 result metadata is expected to be:
Igor Murashkin8aa2a112013-12-09 12:06:17 -08006980
6981 * Result 1: Exposure = 10ms, Black level lock = OFF
6982 * Result 2: Exposure = 10ms, Black level lock = ON
6983 * Result 3: Exposure = 10ms, Black level lock = ON
6984 * Result 4: Exposure = 20ms, Black level lock = OFF
6985 * Result 5: Exposure = 20ms, Black level lock = ON
6986 * Result 6: Exposure = 20ms, Black level lock = ON
6987
Eino-Ville Talvala7796cfe2013-12-26 13:16:54 -08006988 This indicates to the application that on frame 4, black
6989 levels were reset due to exposure value changes, and pixel
6990 values may not be consistent across captures.
Igor Murashkin8aa2a112013-12-09 12:06:17 -08006991
Eino-Ville Talvala7796cfe2013-12-26 13:16:54 -08006992 The camera device will maintain the lock to the extent
6993 possible, only overriding the lock to OFF when changes to
6994 other request parameters require a black level recalculation
6995 or reset.
6996 </details>
6997 <hal_details>
6998 If for some reason black level locking is no longer possible
6999 (for example, the analog gain has changed, which forces
7000 black level offsets to be recalculated), then the HAL must
7001 override this request (and it must report 'OFF' when this
7002 does happen) until the next capture for which locking is
7003 possible again.</hal_details>
Zhijun He69fc0ea2013-07-17 09:42:58 -07007004 <tag id="HAL2" />
7005 </entry>
7006 </controls>
7007 <dynamic>
7008 <clone entry="android.blackLevel.lock"
Igor Murashkin8aa2a112013-12-09 12:06:17 -08007009 kind="controls">
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08007010 <details>
Eino-Ville Talvala7796cfe2013-12-26 13:16:54 -08007011 Whether the black level offset was locked for this frame. Should be
7012 ON if android.blackLevel.lock was ON in the capture request, unless
7013 a change in other capture settings forced the camera device to
7014 perform a black level reset.
Eino-Ville Talvalaa5b73c22013-12-27 13:50:19 -08007015 </details>
Igor Murashkin8aa2a112013-12-09 12:06:17 -08007016 </clone>
Zhijun He69fc0ea2013-07-17 09:42:58 -07007017 </dynamic>
7018 </section>
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007019 <section name="sync">
7020 <dynamic>
Igor Murashkinca256272014-10-02 15:27:09 -07007021 <entry name="frameNumber" type="int64" visibility="hidden" enum="true"
7022 hwlevel="legacy">
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007023 <enum>
7024 <value id="-1">CONVERGING
7025 <notes>
7026 The current result is not yet fully synchronized to any request.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07007027
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007028 Synchronization is in progress, and reading metadata from this
7029 result may include a mix of data that have taken effect since the
7030 last synchronization time.
7031
7032 In some future result, within android.sync.maxLatency frames,
7033 this value will update to the actual frame number frame number
7034 the result is guaranteed to be synchronized to (as long as the
7035 request settings remain constant).
7036 </notes>
7037 </value>
7038 <value id="-2">UNKNOWN
7039 <notes>
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07007040 The current result's synchronization status is unknown.
7041
7042 The result may have already converged, or it may be in
7043 progress. Reading from this result may include some mix
7044 of settings from past requests.
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007045
7046 After a settings change, the new settings will eventually all
7047 take effect for the output buffers and results. However, this
7048 value will not change when that happens. Altering settings
7049 rapidly may provide outcomes using mixes of settings from recent
7050 requests.
7051
7052 This value is intended primarily for backwards compatibility with
7053 the older camera implementations (for android.hardware.Camera).
7054 </notes>
7055 </value>
7056 </enum>
7057 <description>The frame number corresponding to the last request
7058 with which the output result (metadata + buffers) has been fully
7059 synchronized.</description>
7060 <range>Either a non-negative value corresponding to a
7061 `frame_number`, or one of the two enums (CONVERGING / UNKNOWN).
7062 </range>
7063 <details>
7064 When a request is submitted to the camera device, there is usually a
7065 delay of several frames before the controls get applied. A camera
7066 device may either choose to account for this delay by implementing a
7067 pipeline and carefully submit well-timed atomic control updates, or
7068 it may start streaming control changes that span over several frame
7069 boundaries.
7070
7071 In the latter case, whenever a request's settings change relative to
7072 the previous submitted request, the full set of changes may take
7073 multiple frame durations to fully take effect. Some settings may
7074 take effect sooner (in less frame durations) than others.
7075
7076 While a set of control changes are being propagated, this value
7077 will be CONVERGING.
7078
7079 Once it is fully known that a set of control changes have been
7080 finished propagating, and the resulting updated control settings
7081 have been read back by the camera device, this value will be set
7082 to a non-negative frame number (corresponding to the request to
7083 which the results have synchronized to).
7084
7085 Older camera device implementations may not have a way to detect
7086 when all camera controls have been applied, and will always set this
7087 value to UNKNOWN.
7088
7089 FULL capability devices will always have this value set to the
7090 frame number of the request corresponding to this result.
7091
7092 _Further details_:
7093
7094 * Whenever a request differs from the last request, any future
7095 results not yet returned may have this value set to CONVERGING (this
7096 could include any in-progress captures not yet returned by the camera
7097 device, for more details see pipeline considerations below).
7098 * Submitting a series of multiple requests that differ from the
7099 previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3)
7100 moves the new synchronization frame to the last non-repeating
7101 request (using the smallest frame number from the contiguous list of
7102 repeating requests).
7103 * Submitting the same request repeatedly will not change this value
7104 to CONVERGING, if it was already a non-negative value.
7105 * When this value changes to non-negative, that means that all of the
7106 metadata controls from the request have been applied, all of the
7107 metadata controls from the camera device have been read to the
7108 updated values (into the result), and all of the graphics buffers
7109 corresponding to this result are also synchronized to the request.
7110
7111 _Pipeline considerations_:
7112
7113 Submitting a request with updated controls relative to the previously
7114 submitted requests may also invalidate the synchronization state
7115 of all the results corresponding to currently in-flight requests.
7116
7117 In other words, results for this current request and up to
7118 android.request.pipelineMaxDepth prior requests may have their
7119 android.sync.frameNumber change to CONVERGING.
7120 </details>
7121 <hal_details>
7122 Using UNKNOWN here is illegal unless android.sync.maxLatency
7123 is also UNKNOWN.
7124
7125 FULL capability devices should simply set this value to the
7126 `frame_number` of the request this result corresponds to.
7127 </hal_details>
Zhijun He5fb671c2014-05-21 17:51:05 -07007128 <tag id="V1" />
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007129 </entry>
7130 </dynamic>
7131 <static>
Igor Murashkinca256272014-10-02 15:27:09 -07007132 <entry name="maxLatency" type="int32" visibility="public" enum="true"
7133 hwlevel="legacy">
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007134 <enum>
7135 <value id="0">PER_FRAME_CONTROL
7136 <notes>
7137 Every frame has the requests immediately applied.
Eino-Ville Talvalab4329162014-06-09 14:23:02 -07007138
7139 Furthermore for all results,
Igor Murashkin757ec242014-07-25 16:55:18 -07007140 `android.sync.frameNumber == CaptureResult#getFrameNumber()`
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007141
7142 Changing controls over multiple requests one after another will
7143 produce results that have those controls applied atomically
7144 each frame.
7145
7146 All FULL capability devices will have this as their maxLatency.
7147 </notes>
7148 </value>
7149 <value id="-1">UNKNOWN
7150 <notes>
7151 Each new frame has some subset (potentially the entire set)
7152 of the past requests applied to the camera settings.
7153
7154 By submitting a series of identical requests, the camera device
7155 will eventually have the camera settings applied, but it is
7156 unknown when that exact point will be.
Igor Murashkin757ec242014-07-25 16:55:18 -07007157
7158 All LEGACY capability devices will have this as their maxLatency.
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007159 </notes>
7160 </value>
7161 </enum>
7162 <description>
7163 The maximum number of frames that can occur after a request
7164 (different than the previous) has been submitted, and before the
7165 result's state becomes synchronized (by setting
7166 android.sync.frameNumber to a non-negative value).
7167 </description>
Eino-Ville Talvala567167a2014-10-02 18:27:34 -07007168 <units>Frame counts</units>
7169 <range>A positive value, PER_FRAME_CONTROL, or UNKNOWN.</range>
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007170 <details>
7171 This defines the maximum distance (in number of metadata results),
7172 between android.sync.frameNumber and the equivalent
Igor Murashkin757ec242014-07-25 16:55:18 -07007173 frame number for that result.
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007174
7175 In other words this acts as an upper boundary for how many frames
7176 must occur before the camera device knows for a fact that the new
7177 submitted camera settings have been applied in outgoing frames.
7178
7179 For example if the distance was 2,
7180
7181 initial request = X (repeating)
7182 request1 = X
7183 request2 = Y
7184 request3 = Y
7185 request4 = Y
7186
7187 where requestN has frameNumber N, and the first of the repeating
7188 initial request's has frameNumber F (and F &lt; 1).
7189
7190 initial result = X' + { android.sync.frameNumber == F }
7191 result1 = X' + { android.sync.frameNumber == F }
7192 result2 = X' + { android.sync.frameNumber == CONVERGING }
7193 result3 = X' + { android.sync.frameNumber == CONVERGING }
7194 result4 = X' + { android.sync.frameNumber == 2 }
7195
7196 where resultN has frameNumber N.
7197
7198 Since `result4` has a `frameNumber == 4` and
7199 `android.sync.frameNumber == 2`, the distance is clearly
7200 `4 - 2 = 2`.
7201 </details>
7202 <hal_details>
7203 Use `frame_count` from camera3_request_t instead of
Igor Murashkin757ec242014-07-25 16:55:18 -07007204 android.request.frameCount or `CaptureResult#getFrameNumber()`.
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007205
7206 LIMITED devices are strongly encouraged to use a non-negative
7207 value. If UNKNOWN is used here then app developers do not have a way
7208 to know when sensor settings have been applied.
7209 </hal_details>
Zhijun He5fb671c2014-05-21 17:51:05 -07007210 <tag id="V1" />
Igor Murashkin5c1fc682014-01-16 17:51:36 -08007211 </entry>
7212 </static>
7213 </section>
Igor Murashkin77b63ca2012-11-09 16:15:02 -08007214 </namespace>
7215</metadata>