Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <!-- Copyright (C) 2012 The Android Open Source Project |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | --> |
| 16 | <metadata xmlns="http://schemas.android.com/service/camera/metadata/" |
| 17 | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 18 | xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata_properties.xsd"> |
| 19 | |
| 20 | <tags> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 21 | <tag id="BC"> |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 22 | Needed for backwards compatibility with old Java API |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 23 | </tag> |
| 24 | <tag id="V1"> |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 25 | New features for first camera 2 release (API1) |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 26 | </tag> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 27 | <tag id="RAW"> |
| 28 | Needed for useful RAW image processing and DNG file support |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 29 | </tag> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 30 | <tag id="HAL2"> |
Alex Ray | ef40ad6 | 2013-10-01 17:52:33 -0700 | [diff] [blame] | 31 | Entry is only used by camera device HAL 2.x |
| 32 | </tag> |
| 33 | <tag id="FULL"> |
| 34 | Entry is required for full hardware level devices, and optional for other hardware levels |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 35 | </tag> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 36 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 40 | </tags> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 41 | |
| 42 | <types> |
Igor Murashkin | b0f18b4 | 2014-05-30 10:51:40 -0700 | [diff] [blame] | 43 | <typedef name="pairFloatFloat"> |
| 44 | <language name="java">android.util.Pair<Float,Float></language> |
| 45 | </typedef> |
Ruben Brunk | 804a052 | 2014-07-09 11:28:16 -0700 | [diff] [blame] | 46 | <typedef name="pairDoubleDouble"> |
| 47 | <language name="java">android.util.Pair<Double,Double></language> |
| 48 | </typedef> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 49 | <typedef name="rectangle"> |
| 50 | <language name="java">android.graphics.Rect</language> |
| 51 | </typedef> |
| 52 | <typedef name="size"> |
Igor Murashkin | efff0de | 2014-05-14 17:30:49 -0700 | [diff] [blame] | 53 | <language name="java">android.util.Size</language> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 54 | </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 Talvala | d4e240a | 2013-08-08 12:56:37 -0700 | [diff] [blame] | 61 | <typedef name="imageFormat"> |
| 62 | <language name="java">int</language> |
| 63 | </typedef> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 64 | <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 Murashkin | efff0de | 2014-05-14 17:30:49 -0700 | [diff] [blame] | 73 | <typedef name="face"> |
| 74 | <language name="java">android.hardware.camera2.params.Face</language> |
| 75 | </typedef> |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 76 | <typedef name="meteringRectangle"> |
| 77 | <language name="java">android.hardware.camera2.params.MeteringRectangle</language> |
| 78 | </typedef> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 79 | <typedef name="rangeFloat"> |
| 80 | <language name="java">android.util.Range<Float></language> |
| 81 | </typedef> |
| 82 | <typedef name="rangeInt"> |
| 83 | <language name="java">android.util.Range<Integer></language> |
| 84 | </typedef> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 85 | <typedef name="rangeLong"> |
| 86 | <language name="java">android.util.Range<Long></language> |
| 87 | </typedef> |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 88 | <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 Brunk | cc09de1 | 2014-06-05 13:20:47 -0700 | [diff] [blame] | 94 | <typedef name="blackLevelPattern"> |
| 95 | <language name="java">android.hardware.camera2.params.BlackLevelPattern</language> |
| 96 | </typedef> |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 97 | <typedef name="enumList"> |
| 98 | <language name="java">int</language> |
| 99 | </typedef> |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 100 | <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 Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 109 | <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 Yeh | 35bdd4b | 2014-07-15 10:42:05 -0700 | [diff] [blame] | 115 | <typedef name="highSpeedVideoConfiguration"> |
| 116 | <language name="java">android.hardware.camera2.params.HighSpeedVideoConfiguration</language> |
| 117 | </typedef> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 118 | </types> |
| 119 | |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 120 | <namespace name="android"> |
| 121 | <section name="colorCorrection"> |
| 122 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 123 | <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 124 | <enum> |
| 125 | <value>TRANSFORM_MATRIX |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 126 | <notes>Use the android.colorCorrection.transform matrix |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 127 | 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 Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 136 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 137 | <value>FAST |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 138 | <notes>Color correction processing must not slow down |
| 139 | capture rate relative to sensor raw output. |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 140 | |
| 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 Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 148 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 149 | <value>HIGH_QUALITY |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 150 | <notes>Color correction processing operates at improved |
| 151 | quality but reduced capture rate (relative to sensor raw |
| 152 | output). |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 153 | |
| 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 Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 161 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 162 | </enum> |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 163 | |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 164 | <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 Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 169 | When auto-white balance (AWB) is enabled with android.control.awbMode, this |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 170 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 220 | </entry> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 221 | <entry name="transform" type="rational" visibility="public" |
| 222 | type_notes="3x3 rational matrix in row-major order" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 223 | container="array" typedef="colorSpaceTransform" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 224 | <array> |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 225 | <size>3</size> |
| 226 | <size>3</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 227 | </array> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 228 | <description>A color transform matrix to use to transform |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 229 | from sensor RGB color space to output linear sRGB color space. |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 230 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 231 | <units>Unitless scale factors</units> |
Zhijun He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 232 | <details>This matrix is either set by the camera device when the request |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 233 | android.colorCorrection.mode is not TRANSFORM_MATRIX, or |
| 234 | directly by the application in the request when the |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 235 | android.colorCorrection.mode is TRANSFORM_MATRIX. |
| 236 | |
Zhijun He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 237 | 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 He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 243 | </entry> |
| 244 | <entry name="gains" type="float" visibility="public" |
| 245 | type_notes="A 1D array of floats for 4 color channel gains" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 246 | container="array" typedef="rggbChannelVector" hwlevel="full"> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 247 | <array> |
| 248 | <size>4</size> |
| 249 | </array> |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 250 | <description>Gains applying to Bayer raw color channels for |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 251 | white-balance.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 252 | <units>Unitless gain factors</units> |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 253 | <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 Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 265 | 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 Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 267 | is the gain for green pixels on the odd rows. |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 268 | |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 269 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 273 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 274 | <entry name="aberrationMode" type="byte" visibility="public" enum="true" hwlevel="legacy"> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 275 | <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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 297 | <range>android.colorCorrection.availableAberrationModes</range> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 298 | <details> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 299 | 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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 310 | |
| 311 | LEGACY devices will always be in FAST mode. |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 312 | </details> |
| 313 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 314 | </controls> |
| 315 | <dynamic> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 316 | <clone entry="android.colorCorrection.mode" kind="controls"> |
| 317 | </clone> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 318 | <clone entry="android.colorCorrection.transform" kind="controls"> |
| 319 | </clone> |
| 320 | <clone entry="android.colorCorrection.gains" kind="controls"> |
| 321 | </clone> |
Zhijun He | 3377641 | 2014-08-18 10:55:33 -0700 | [diff] [blame] | 322 | <clone entry="android.colorCorrection.aberrationMode" kind="controls"> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 323 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 324 | </dynamic> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 325 | <static> |
Zhijun He | 3377641 | 2014-08-18 10:55:33 -0700 | [diff] [blame] | 326 | <entry name="availableAberrationModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 327 | type_notes="list of enums" container="array" typedef="enumList" hwlevel="legacy"> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 328 | <array> |
| 329 | <size>n</size> |
| 330 | </array> |
| 331 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 332 | List of aberration correction modes for android.colorCorrection.aberrationMode that are |
| 333 | supported by this camera device. |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 334 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 335 | <range>Any value listed in android.colorCorrection.aberrationMode</range> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 336 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 337 | 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 He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 339 | OFF mode. |
| 340 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 341 | For FULL capability device (android.info.supportedHardwareLevel `==` FULL), OFF is |
| 342 | always included. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 343 | |
| 344 | LEGACY devices will always only support FAST mode. |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 345 | </details> |
| 346 | <tag id="V1" /> |
| 347 | </entry> |
| 348 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 349 | </section> |
| 350 | <section name="control"> |
| 351 | <controls> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 352 | <entry name="aeAntibandingMode" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 353 | enum="true" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 354 | <enum> |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 355 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 381 | </enum> |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 382 | <description> |
| 383 | The desired setting for the camera device's auto-exposure |
| 384 | algorithm's antibanding compensation. |
| 385 | </description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 386 | <range> |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 387 | 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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 412 | The default mode is AUTO, which is supported by all |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 413 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 433 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 434 | <entry name="aeExposureCompensation" type="int32" visibility="public" hwlevel="legacy"> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 435 | <description>Adjustment to auto-exposure (AE) target image |
| 436 | brightness.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 437 | <units>Compensation steps</units> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 438 | <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 Yeh | 7754e6a | 2014-05-05 14:26:03 -0700 | [diff] [blame] | 450 | |
| 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 458 | <tag id="BC" /> |
| 459 | </entry> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 460 | <entry name="aeLock" type="byte" visibility="public" enum="true" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 461 | typedef="boolean" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 462 | <enum> |
Eino-Ville Talvala | 76548fe | 2013-01-11 13:57:19 -0800 | [diff] [blame] | 463 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 464 | <notes>Auto-exposure lock is disabled; the AE algorithm |
Eino-Ville Talvala | 76548fe | 2013-01-11 13:57:19 -0800 | [diff] [blame] | 465 | is free to update its parameters.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 466 | <value>ON |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 467 | <notes>Auto-exposure lock is enabled; the AE algorithm |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 468 | must not update the exposure and sensitivity parameters |
Yin-Chia Yeh | 7754e6a | 2014-05-05 14:26:03 -0700 | [diff] [blame] | 469 | while the lock is active. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 470 | |
Yin-Chia Yeh | 7754e6a | 2014-05-05 14:26:03 -0700 | [diff] [blame] | 471 | android.control.aeExposureCompensation setting changes |
| 472 | will still take effect while auto-exposure is locked. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 473 | |
| 474 | Some rare LEGACY devices may not support |
| 475 | this, in which case the value will always be overridden to OFF. |
Yin-Chia Yeh | 7754e6a | 2014-05-05 14:26:03 -0700 | [diff] [blame] | 476 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 477 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 478 | <description>Whether auto-exposure (AE) is currently locked to its latest |
Zhijun He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 479 | calculated values.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 480 | <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 He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 487 | |
Yin-Chia Yeh | 7754e6a | 2014-05-05 14:26:03 -0700 | [diff] [blame] | 488 | 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 He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 491 | 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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 498 | 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 He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 511 | See android.control.aeState for AE lock related state transition details. |
| 512 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 513 | <tag id="BC" /> |
| 514 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 515 | <entry name="aeMode" type="byte" visibility="public" enum="true" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 516 | <enum> |
| 517 | <value>OFF |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 518 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 519 | The camera device's autoexposure routine is disabled. |
| 520 | |
| 521 | The application-selected android.sensor.exposureTime, |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 522 | 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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 526 | |
| 527 | LEGACY devices do not support the OFF mode and will |
| 528 | override attempts to use this value to ON. |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 529 | </notes> |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 530 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 531 | <value>ON |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 532 | <notes> |
| 533 | The camera device's autoexposure routine is active, |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 534 | with no flash control. |
| 535 | |
| 536 | The application's values for |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 537 | 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 Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 543 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 544 | <value>ON_AUTO_FLASH |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 545 | <notes> |
| 546 | Like ON, except that the camera device also controls |
| 547 | the camera's flash unit, firing it in low-light |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 548 | 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 Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 553 | android.control.captureIntent field is set to |
| 554 | STILL_CAPTURE |
| 555 | </notes> |
| 556 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 557 | <value>ON_ALWAYS_FLASH |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 558 | <notes> |
| 559 | Like ON, except that the camera device also controls |
| 560 | the camera's flash unit, always firing it for still |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 561 | 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 Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 566 | android.control.captureIntent field is set to |
| 567 | STILL_CAPTURE |
| 568 | </notes> |
| 569 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 570 | <value>ON_AUTO_FLASH_REDEYE |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 571 | <notes> |
| 572 | Like ON_AUTO_FLASH, but with automatic red eye |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 573 | 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 Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 578 | </notes> |
| 579 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 580 | </enum> |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 581 | <description>The desired mode for the camera device's |
| 582 | auto-exposure routine.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 583 | <range>android.control.aeAvailableModes</range> |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 584 | <details> |
| 585 | This control is only effective if android.control.mode is |
| 586 | AUTO. |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 587 | |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 588 | 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 He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 596 | |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 597 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 608 | <tag id="BC" /> |
| 609 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 610 | <entry name="aeRegions" type="int32" visibility="public" |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 611 | optional="true" container="array" typedef="meteringRectangle"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 612 | <array> |
Igor Murashkin | 617da16 | 2012-11-29 13:35:15 -0800 | [diff] [blame] | 613 | <size>5</size> |
| 614 | <size>area_count</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 615 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 616 | <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 Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 620 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 621 | Not available if android.control.maxRegionsAe is 0. |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 622 | Otherwise will always be present. |
| 623 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 624 | The maximum number of regions supported by the device is determined by the value |
| 625 | of android.control.maxRegionsAe. |
| 626 | |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 627 | 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 Yeh | dc18257 | 2014-05-14 14:05:20 -0700 | [diff] [blame] | 631 | bottom-right pixel in the active pixel array. |
| 632 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 633 | The weight must be within `[0, 1000]`, and represents a weight |
Yin-Chia Yeh | dc18257 | 2014-05-14 14:05:20 -0700 | [diff] [blame] | 634 | 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 Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 638 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 639 | 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 Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 651 | </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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 660 | <tag id="BC" /> |
| 661 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 662 | <entry name="aeTargetFpsRange" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 663 | container="array" typedef="rangeInt" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 664 | <array> |
| 665 | <size>2</size> |
| 666 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 667 | <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 Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 672 | <details>Only constrains auto-exposure (AE) algorithm, not |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 673 | manual control of android.sensor.exposureTime and |
| 674 | android.sensor.frameDuration.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 675 | <tag id="BC" /> |
| 676 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 677 | <entry name="aePrecaptureTrigger" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 678 | enum="true" hwlevel="limited"> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 679 | <enum> |
| 680 | <value>IDLE |
| 681 | <notes>The trigger is idle.</notes> |
| 682 | </value> |
| 683 | <value>START |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 684 | <notes>The precapture metering sequence will be started |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 685 | 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 Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 689 | </value> |
| 690 | </enum> |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 691 | <description>Whether the camera device will trigger a precapture |
| 692 | metering sequence when it processes this request.</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 693 | <details>This entry is normally set to IDLE, or is not |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 694 | included at all in the request settings. When included and |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 695 | set to START, the camera device will trigger the autoexposure |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 696 | precapture metering sequence. |
| 697 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 698 | 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 Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 710 | android.control.aeState for AE precapture state transition |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 711 | 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 Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 718 | <tag id="BC" /> |
| 719 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 720 | <entry name="afMode" type="byte" visibility="public" enum="true" |
| 721 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 722 | <enum> |
| 723 | <value>OFF |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 724 | <notes>The auto-focus routine does not control the lens; |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 725 | android.lens.focusDistance is controlled by the |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 726 | application.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 727 | <value>AUTO |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 728 | <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 Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 736 | |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 737 | Use android.lens.info.minimumFocusDistance to determine if lens |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 738 | is fixed-focus. |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 739 | |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 740 | Triggering AF_CANCEL resets the lens position to default, |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 741 | and sets the AF state to INACTIVE.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 742 | <value>MACRO |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 743 | <notes>Close-up focusing mode. |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 744 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 745 | 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 Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 753 | ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 754 | NOT_FOCUSED). Triggering cancel AF resets the lens |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 755 | position to default, and sets the AF state to |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 756 | 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 Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 760 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 776 | 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 Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 780 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 789 | PASSIVE_SCAN if active, and then transition into |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 790 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 796 | <value>EDOF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 797 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 804 | INACTIVE.</notes></value> |
| 805 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 806 | <description>Whether auto-focus (AF) is currently enabled, and what |
| 807 | mode it is set to.</description> |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 808 | <range>android.control.afAvailableModes</range> |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 809 | <details>Only effective if android.control.mode = AUTO and the lens is not fixed focus |
| 810 | (i.e. `android.lens.info.minimumFocusDistance > 0`). |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 811 | |
Zhijun He | f163fa9 | 2014-01-14 09:59:04 -0800 | [diff] [blame] | 812 | 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 He | a19ede8 | 2014-05-27 15:06:42 -0700 | [diff] [blame] | 815 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 840 | <tag id="BC" /> |
| 841 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 842 | <entry name="afRegions" type="int32" visibility="public" |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 843 | optional="true" container="array" typedef="meteringRectangle"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 844 | <array> |
Igor Murashkin | 617da16 | 2012-11-29 13:35:15 -0800 | [diff] [blame] | 845 | <size>5</size> |
| 846 | <size>area_count</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 847 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 848 | <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 Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 852 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 853 | Not available if android.control.maxRegionsAf is 0. |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 854 | Otherwise will always be present. |
| 855 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 856 | The maximum number of focus areas supported by the device is determined by the value |
| 857 | of android.control.maxRegionsAf. |
| 858 | |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 859 | 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 Yeh | dc18257 | 2014-05-14 14:05:20 -0700 | [diff] [blame] | 863 | bottom-right pixel in the active pixel array. |
| 864 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 865 | The weight must be within `[0, 1000]`, and represents a weight |
Yin-Chia Yeh | dc18257 | 2014-05-14 14:05:20 -0700 | [diff] [blame] | 866 | 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 Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 870 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 871 | 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 Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 883 | </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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 892 | <tag id="BC" /> |
| 893 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 894 | <entry name="afTrigger" type="byte" visibility="public" enum="true" |
| 895 | hwlevel="legacy"> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 896 | <enum> |
| 897 | <value>IDLE |
| 898 | <notes>The trigger is idle.</notes> |
| 899 | </value> |
| 900 | <value>START |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 901 | <notes>Autofocus will trigger now.</notes> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 902 | </value> |
| 903 | <value>CANCEL |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 904 | <notes>Autofocus will return to its initial |
| 905 | state, and cancel any currently active trigger.</notes> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 906 | </value> |
| 907 | </enum> |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 908 | <description> |
| 909 | Whether the camera device will trigger autofocus for this request. |
| 910 | </description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 911 | <details>This entry is normally set to IDLE, or is not |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 912 | included at all in the request settings. |
| 913 | |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 914 | 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 920 | 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 He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 926 | </details> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 927 | <tag id="BC" /> |
| 928 | </entry> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 929 | <entry name="awbLock" type="byte" visibility="public" enum="true" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 930 | typedef="boolean" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 931 | <enum> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 932 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 933 | <notes>Auto-white balance lock is disabled; the AWB |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 934 | algorithm is free to update its parameters if in AUTO |
| 935 | mode.</notes></value> |
Eino-Ville Talvala | 76548fe | 2013-01-11 13:57:19 -0800 | [diff] [blame] | 936 | <value>ON |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 937 | <notes>Auto-white balance lock is enabled; the AWB |
| 938 | algorithm will not update its parameters while the lock |
Zhijun He | 4412faa | 2014-02-06 00:28:22 -0800 | [diff] [blame] | 939 | is active.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 940 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 941 | <description>Whether auto-white balance (AWB) is currently locked to its |
Zhijun He | 4412faa | 2014-02-06 00:28:22 -0800 | [diff] [blame] | 942 | latest calculated values.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 943 | <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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 961 | android.control.awbMode is in the AUTO mode; in other modes, |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 962 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 966 | <tag id="BC" /> |
| 967 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 968 | <entry name="awbMode" type="byte" visibility="public" enum="true" |
| 969 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 970 | <enum> |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 971 | <value>OFF |
| 972 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 973 | The camera device's auto-white balance routine is disabled. |
| 974 | |
| 975 | The application-selected color transform matrix |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 976 | (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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 983 | The camera device's auto-white balance routine is active. |
| 984 | |
| 985 | The application's values for android.colorCorrection.transform |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 986 | and android.colorCorrection.gains are ignored. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 987 | 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 He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 990 | </notes> |
| 991 | </value> |
| 992 | <value>INCANDESCENT |
| 993 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 994 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 995 | the camera device uses incandescent light as the assumed scene |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 996 | 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 He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1007 | </notes> |
| 1008 | </value> |
| 1009 | <value>FLUORESCENT |
| 1010 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1011 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1012 | the camera device uses fluorescent light as the assumed scene |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1013 | 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 He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1024 | </notes> |
| 1025 | </value> |
| 1026 | <value>WARM_FLUORESCENT |
| 1027 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1028 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1029 | the camera device uses warm fluorescent light as the assumed scene |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1030 | 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 He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1041 | </notes> |
| 1042 | </value> |
| 1043 | <value>DAYLIGHT |
| 1044 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1045 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1046 | the camera device uses daylight light as the assumed scene |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1047 | 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 He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1058 | </notes> |
| 1059 | </value> |
| 1060 | <value>CLOUDY_DAYLIGHT |
| 1061 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1062 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1063 | the camera device uses cloudy daylight light as the assumed scene |
| 1064 | illumination for white balance. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1065 | |
| 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 He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1071 | </notes> |
| 1072 | </value> |
| 1073 | <value>TWILIGHT |
| 1074 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1075 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1076 | the camera device uses twilight light as the assumed scene |
| 1077 | illumination for white balance. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1078 | |
| 1079 | The application's values for android.colorCorrection.transform |
| 1080 | and android.colorCorrection.gains are ignored. |
| 1081 | For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1082 | values used by the camera device for the transform and gains |
| 1083 | will be available in the capture result for this request. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1084 | </notes> |
| 1085 | </value> |
| 1086 | <value>SHADE |
| 1087 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1088 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1089 | the camera device uses shade light as the assumed scene |
| 1090 | illumination for white balance. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1091 | |
| 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 He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1097 | </notes> |
| 1098 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1099 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 1100 | <description>Whether auto-white balance (AWB) is currently setting the color |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1101 | transform fields, and what its illumination target |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 1102 | is.</description> |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1103 | <range>android.control.awbAvailableModes</range> |
| 1104 | <details> |
| 1105 | This control is only effective if android.control.mode is AUTO. |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 1106 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1107 | When set to the ON mode, the camera device's auto-white balance |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1108 | routine is enabled, overriding the application's selected |
| 1109 | android.colorCorrection.transform, android.colorCorrection.gains and |
| 1110 | android.colorCorrection.mode. |
| 1111 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1112 | When set to the OFF mode, the camera device's auto-white balance |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 1113 | routine is disabled. The application manually controls the white |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1114 | balance by android.colorCorrection.transform, android.colorCorrection.gains |
| 1115 | and android.colorCorrection.mode. |
| 1116 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1117 | 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 He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1124 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1125 | <tag id="BC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1126 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1127 | <entry name="awbRegions" type="int32" visibility="public" |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 1128 | optional="true" container="array" typedef="meteringRectangle"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1129 | <array> |
Igor Murashkin | 617da16 | 2012-11-29 13:35:15 -0800 | [diff] [blame] | 1130 | <size>5</size> |
| 1131 | <size>area_count</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1132 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1133 | <description>List of metering areas to use for auto-white-balance illuminant |
Ruben Brunk | 76e4c7d | 2014-01-31 11:05:30 -0800 | [diff] [blame] | 1134 | estimation.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1135 | <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 Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 1138 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1139 | Not available if android.control.maxRegionsAwb is 0. |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 1140 | Otherwise will always be present. |
| 1141 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1142 | The maximum number of regions supported by the device is determined by the value |
| 1143 | of android.control.maxRegionsAwb. |
| 1144 | |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 1145 | 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 Yeh | dc18257 | 2014-05-14 14:05:20 -0700 | [diff] [blame] | 1149 | 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 Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 1156 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1157 | 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 Brunk | 76e4c7d | 2014-01-31 11:05:30 -0800 | [diff] [blame] | 1169 | </details> |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 1170 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1178 | <tag id="BC" /> |
| 1179 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1180 | <entry name="captureIntent" type="byte" visibility="public" enum="true" |
| 1181 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1182 | <enum> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1183 | <value>CUSTOM |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1184 | <notes>The goal of this request doesn't fall into the other |
| 1185 | categories. The camera device will default to preview-like |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1186 | behavior.</notes></value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1187 | <value>PREVIEW |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1188 | <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 Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1193 | <value>STILL_CAPTURE |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1194 | <notes>This request is for a still capture-type |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1195 | use case. |
| 1196 | |
| 1197 | If the flash unit is under automatic control, it may fire as needed. |
| 1198 | </notes></value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1199 | <value>VIDEO_RECORD |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1200 | <notes>This request is for a video recording |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1201 | use case.</notes></value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1202 | <value>VIDEO_SNAPSHOT |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1203 | <notes>This request is for a video snapshot (still |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1204 | 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 Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1209 | <value>ZERO_SHUTTER_LAG |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1210 | <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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1213 | capture. |
| 1214 | </notes></value> |
Zhijun He | e713fa6 | 2014-04-09 10:55:50 -0700 | [diff] [blame] | 1215 | <value>MANUAL |
| 1216 | <notes>This request is for manual capture use case where |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1217 | 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 He | e713fa6 | 2014-04-09 10:55:50 -0700 | [diff] [blame] | 1221 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1222 | </enum> |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 1223 | <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 He | e713fa6 | 2014-04-09 10:55:50 -0700 | [diff] [blame] | 1227 | <details>This control (except for MANUAL) is only effective if |
| 1228 | `android.control.mode != OFF` and any 3A routine is active. |
| 1229 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1230 | ZERO_SHUTTER_LAG will be supported if android.request.availableCapabilities |
| 1231 | contains ZSL. MANUAL will be supported if android.request.availableCapabilities |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1232 | contains MANUAL_SENSOR. Other intent values are always supported. |
| 1233 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1234 | <tag id="BC" /> |
| 1235 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1236 | <entry name="effectMode" type="byte" visibility="public" enum="true" |
| 1237 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1238 | <enum> |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1239 | <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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1247 | a single color. |
| 1248 | |
| 1249 | This will typically be grayscale. |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1250 | </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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1295 | </enum> |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1296 | <description>A special color effect to apply.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1297 | <range>android.control.availableEffects</range> |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1298 | <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 Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1305 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1306 | <tag id="BC" /> |
| 1307 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1308 | <entry name="mode" type="byte" visibility="public" enum="true" |
| 1309 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1310 | <enum> |
| 1311 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1312 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1327 | <value>AUTO |
| 1328 | <notes>Use settings for each individual 3A routine. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1329 | |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1330 | Manual control of capture parameters is disabled. All |
| 1331 | controls in android.control.* besides sceneMode take |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1332 | effect.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1333 | <value>USE_SCENE_MODE |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1334 | <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 He | 4412faa | 2014-02-06 00:28:22 -0800 | [diff] [blame] | 1343 | <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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1346 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1354 | </enum> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1355 | <description>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 1356 | routines.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1357 | <details> |
| 1358 | This is a top-level 3A control switch. When set to OFF, all 3A control |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 1359 | by the camera device is disabled. The application must set the fields for |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 1360 | 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 He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 1366 | android.control.* are mostly disabled, and the camera device implements |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 1367 | one of the scene mode settings (such as ACTION, SUNSET, or PARTY) |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 1368 | as it wishes. The camera device scene mode 3A settings are provided by |
Zhijun He | 4412faa | 2014-02-06 00:28:22 -0800 | [diff] [blame] | 1369 | 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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1376 | |
| 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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1379 | support the MANUAL_SENSOR and MANUAL_POST_PROCSESING capabilities. |
| 1380 | FULL mode devices will always support OFF and OFF_KEEP_STATE. |
Zhijun He | 4412faa | 2014-02-06 00:28:22 -0800 | [diff] [blame] | 1381 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1382 | <tag id="BC" /> |
| 1383 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1384 | <entry name="sceneMode" type="byte" visibility="public" enum="true" |
| 1385 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1386 | <enum> |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1387 | <value id="0">DISABLED |
| 1388 | <notes> |
| 1389 | Indicates that no scene modes are set for a given capture request. |
| 1390 | </notes> |
| 1391 | </value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1392 | <value>FACE_PRIORITY |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1393 | <notes>If face detection support exists, use face |
| 1394 | detection data for auto-focus, auto-white balance, and |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1395 | auto-exposure routines. |
| 1396 | |
| 1397 | If face detection statistics are disabled |
| 1398 | (i.e. android.statistics.faceDetectMode is set to OFF), |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1399 | this should still operate correctly (but will not return |
| 1400 | face detection statistics to the framework). |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 1401 | |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1402 | 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1410 | |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1411 | 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1470 | |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1471 | 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 He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 1493 | <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 Brunk | 17b1dd5 | 2014-08-28 17:16:38 -0700 | [diff] [blame] | 1558 | <value optional="true" hidden="true">HDR |
| 1559 | <notes> |
| 1560 | Turn on custom high dynamic range (HDR) mode. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1561 | |
| 1562 | This is intended for LEGACY mode devices only; |
| 1563 | HAL3+ camera devices should not implement this mode. |
Ruben Brunk | 17b1dd5 | 2014-08-28 17:16:38 -0700 | [diff] [blame] | 1564 | </notes> |
| 1565 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1566 | </enum> |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1567 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1568 | Control for which scene mode is currently active. |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1569 | </description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1570 | <range>android.control.availableSceneModes</range> |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1571 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1572 | Scene modes are custom camera modes optimized for a certain set of conditions and |
| 1573 | capture settings. |
| 1574 | |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1575 | 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 He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 1590 | |
| 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 Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1597 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1598 | <tag id="BC" /> |
| 1599 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1600 | <entry name="videoStabilizationMode" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1601 | enum="true" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1602 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1603 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1611 | </enum> |
| 1612 | <description>Whether video stabilization is |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 1613 | active.</description> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1614 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1615 | Video stabilization automatically translates and scales images from |
| 1616 | the camera in order to stabilize motion between consecutive frames. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1617 | |
| 1618 | If enabled, video stabilization can modify the |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 1619 | android.scaler.cropRegion to keep the video stream stabilized. |
| 1620 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1621 | 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 He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 1627 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1628 | 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 He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 1632 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1633 | <tag id="BC" /> |
| 1634 | </entry> |
| 1635 | </controls> |
| 1636 | <static> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1637 | <entry name="aeAvailableAntibandingModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1638 | type_notes="list of enums" container="array" typedef="enumList" |
| 1639 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1640 | <array> |
| 1641 | <size>n</size> |
| 1642 | </array> |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 1643 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1644 | List of auto-exposure antibanding modes for android.control.aeAntibandingMode that are |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 1645 | supported by this camera device. |
| 1646 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1647 | <range>Any value listed in android.control.aeAntibandingMode</range> |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 1648 | <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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1652 | for this camera device with the |
| 1653 | android.control.aeAntibandingMode control. This list |
| 1654 | always includes AUTO. |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 1655 | </details> |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 1656 | <tag id="BC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1657 | </entry> |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1658 | <entry name="aeAvailableModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1659 | type_notes="list of enums" container="array" typedef="enumList" |
| 1660 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1661 | <array> |
| 1662 | <size>n</size> |
| 1663 | </array> |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1664 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1665 | List of auto-exposure modes for android.control.aeMode that are supported by this camera |
| 1666 | device. |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1667 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1668 | <range>Any value listed in android.control.aeMode</range> |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1669 | <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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1675 | All camera devices support ON, and all camera devices with flash |
| 1676 | units support ON_AUTO_FLASH and ON_ALWAYS_FLASH. |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1677 | |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 1678 | FULL mode camera devices always support OFF mode, |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1679 | which enables application control of camera exposure time, |
| 1680 | sensitivity, and frame duration. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1681 | |
| 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 Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1685 | </details> |
| 1686 | <tag id="BC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1687 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1688 | <entry name="aeAvailableTargetFpsRanges" type="int32" visibility="public" |
| 1689 | type_notes="list of pairs of frame rates" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1690 | container="array" typedef="rangeInt" |
| 1691 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1692 | <array> |
| 1693 | <size>2</size> |
| 1694 | <size>n</size> |
| 1695 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1696 | <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 He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 1703 | <tag id="BC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1704 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1705 | <entry name="aeCompensationRange" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1706 | container="array" typedef="rangeInt" |
| 1707 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1708 | <array> |
| 1709 | <size>2</size> |
| 1710 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1711 | <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 <= -2 EV` |
| 1716 | |
| 1717 | `Max.exposure compensation * android.control.aeCompensationStep >= 2 EV` |
| 1718 | </range> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1719 | <tag id="BC" /> |
| 1720 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1721 | <entry name="aeCompensationStep" type="rational" visibility="public" |
| 1722 | hwlevel="legacy"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1723 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1737 | <tag id="BC" /> |
| 1738 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1739 | <entry name="afAvailableModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1740 | type_notes="List of enums" container="array" typedef="enumList" |
| 1741 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1742 | <array> |
| 1743 | <size>n</size> |
| 1744 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1745 | <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 He | f163fa9 | 2014-01-14 09:59:04 -0800 | [diff] [blame] | 1750 | <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 Brunk | a5bcb40 | 2014-09-22 16:11:06 -0700 | [diff] [blame] | 1755 | 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 > 0`) will support AUTO mode. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1758 | |
| 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 He | f163fa9 | 2014-01-14 09:59:04 -0800 | [diff] [blame] | 1762 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1763 | <tag id="BC" /> |
| 1764 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1765 | <entry name="availableEffects" type="byte" visibility="public" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 1766 | type_notes="List of enums (android.control.effectMode)." container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1767 | typedef="enumList" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1768 | <array> |
| 1769 | <size>n</size> |
| 1770 | </array> |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1771 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1772 | List of color effects for android.control.effectMode that are supported by this camera |
| 1773 | device. |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1774 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1775 | <range>Any value listed in android.control.effectMode</range> |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1776 | <details> |
| 1777 | This list contains the color effect modes that can be applied to |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1778 | images produced by the camera device. |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1779 | Implementations are not expected to be consistent across all devices. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1780 | If no color effect modes are available for a device, this will only list |
| 1781 | OFF. |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1782 | |
| 1783 | A color effect will only be applied if |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1784 | 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 Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1788 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1789 | <tag id="BC" /> |
| 1790 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1791 | <entry name="availableSceneModes" type="byte" visibility="public" |
Ruben Brunk | bf870fc | 2014-01-14 17:46:58 -0800 | [diff] [blame] | 1792 | type_notes="List of enums (android.control.sceneMode)." |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1793 | container="array" typedef="enumList" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1794 | <array> |
| 1795 | <size>n</size> |
| 1796 | </array> |
Ruben Brunk | bf870fc | 2014-01-14 17:46:58 -0800 | [diff] [blame] | 1797 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1798 | List of scene modes for android.control.sceneMode that are supported by this camera |
| 1799 | device. |
Ruben Brunk | bf870fc | 2014-01-14 17:46:58 -0800 | [diff] [blame] | 1800 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1801 | <range>Any value listed in android.control.sceneMode</range> |
Ruben Brunk | bf870fc | 2014-01-14 17:46:58 -0800 | [diff] [blame] | 1802 | <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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1806 | 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 > |
| 1813 | 0`). |
Ruben Brunk | bf870fc | 2014-01-14 17:46:58 -0800 | [diff] [blame] | 1814 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1815 | <tag id="BC" /> |
| 1816 | </entry> |
| 1817 | <entry name="availableVideoStabilizationModes" type="byte" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 1818 | visibility="public" type_notes="List of enums." container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1819 | typedef="enumList" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1820 | <array> |
| 1821 | <size>n</size> |
| 1822 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1823 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1831 | <tag id="BC" /> |
| 1832 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1833 | <entry name="awbAvailableModes" type="byte" visibility="public" |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1834 | type_notes="List of enums" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1835 | container="array" typedef="enumList" hwlevel="legacy"> |
Alex Ray | a4251d9 | 2013-04-30 16:43:44 -0700 | [diff] [blame] | 1836 | <array> |
| 1837 | <size>n</size> |
| 1838 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1839 | <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 He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1844 | <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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1851 | 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 He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1853 | android.colorCorrection.transform and android.colorCorrection.gains |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1854 | (android.colorCorrection.mode must be set to TRANSFORM_MATRIX). This includes all FULL |
| 1855 | mode camera devices. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1856 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1857 | <tag id="BC" /> |
| 1858 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1859 | <entry name="maxRegions" type="int32" visibility="hidden" |
| 1860 | container="array" hwlevel="legacy"> |
Ruben Brunk | 120eea4 | 2014-01-15 15:55:08 -0800 | [diff] [blame] | 1861 | <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 &gt;= 0 for each element. For full-capability devices |
| 1873 | this value must be &gt;= 1 for AE and AF. The order of the elements is: |
| 1874 | `(AE, AWB, AF)`.</range> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1875 | <tag id="BC" /> |
| 1876 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1877 | <entry name="maxRegionsAe" type="int32" visibility="public" |
| 1878 | synthetic="true" hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1879 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1880 | The maximum number of metering regions that can be used by the auto-exposure (AE) |
| 1881 | routine. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1882 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1883 | <range>Value will be &gt;= 0. For FULL-capability devices, this |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1884 | value will be &gt;= 1. |
| 1885 | </range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1886 | <details> |
| 1887 | This corresponds to the the maximum allowed number of elements in |
| 1888 | android.control.aeRegions. |
| 1889 | </details> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1890 | <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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1894 | <entry name="maxRegionsAwb" type="int32" visibility="public" |
| 1895 | synthetic="true" hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1896 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1897 | The maximum number of metering regions that can be used by the auto-white balance (AWB) |
| 1898 | routine. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1899 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1900 | <range>Value will be &gt;= 0. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1901 | </range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1902 | <details> |
| 1903 | This corresponds to the the maximum allowed number of elements in |
| 1904 | android.control.awbRegions. |
| 1905 | </details> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1906 | <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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1910 | <entry name="maxRegionsAf" type="int32" visibility="public" |
| 1911 | synthetic="true" hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1912 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1913 | The maximum number of metering regions that can be used by the auto-focus (AF) routine. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1914 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1915 | <range>Value will be &gt;= 0. For FULL-capability devices, this |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1916 | value will be &gt;= 1. |
| 1917 | </range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1918 | <details> |
| 1919 | This corresponds to the the maximum allowed number of elements in |
| 1920 | android.control.afRegions. |
| 1921 | </details> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 1922 | <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 Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1926 | <entry name="sceneModeOverrides" type="byte" visibility="system" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1927 | container="array" hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1928 | <array> |
| 1929 | <size>3</size> |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 1930 | <size>length(availableSceneModes)</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1931 | </array> |
Ruben Brunk | cf77fe9 | 2014-01-14 19:31:21 -0800 | [diff] [blame] | 1932 | <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 Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 1948 | |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 1949 | The order of this list matches that of availableSceneModes, |
Ruben Brunk | cf77fe9 | 2014-01-14 19:31:21 -0800 | [diff] [blame] | 1950 | 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 Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 1957 | |
Ruben Brunk | cf77fe9 | 2014-01-14 19:31:21 -0800 | [diff] [blame] | 1958 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1971 | <tag id="BC" /> |
| 1972 | </entry> |
| 1973 | </static> |
| 1974 | <dynamic> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 1975 | <entry name="aePrecaptureId" type="int32" visibility="system" deprecated="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1976 | <description>The ID sent with the latest |
| 1977 | CAMERA2_TRIGGER_PRECAPTURE_METERING call</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 1978 | <details>Must be 0 if no |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1979 | CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet |
| 1980 | by HAL. Always updated even if AE algorithm ignores the |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 1981 | trigger</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1982 | </entry> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 1983 | <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 Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1989 | <clone entry="android.control.aeMode" kind="controls"> |
| 1990 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1991 | <clone entry="android.control.aeRegions" kind="controls"> |
| 1992 | </clone> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 1993 | <clone entry="android.control.aeTargetFpsRange" kind="controls"> |
| 1994 | </clone> |
| 1995 | <clone entry="android.control.aePrecaptureTrigger" kind="controls"> |
| 1996 | </clone> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1997 | <entry name="aeState" type="byte" visibility="public" enum="true" |
| 1998 | hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1999 | <enum> |
| 2000 | <value>INACTIVE |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2001 | <notes>AE is off or recently reset. |
| 2002 | |
| 2003 | When a camera device is opened, it starts in |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2004 | this state. This is a transient state, the camera device may skip reporting |
| 2005 | this state in capture result.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2006 | <value>SEARCHING |
| 2007 | <notes>AE doesn't yet have a good set of control values |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2008 | for the current scene. |
| 2009 | |
| 2010 | This is a transient state, the camera device may skip |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2011 | reporting this state in capture result.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2012 | <value>CONVERGED |
| 2013 | <notes>AE has a good set of control values for the |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2014 | current scene.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2015 | <value>LOCKED |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2016 | <notes>AE has been locked.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2017 | <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 He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2020 | capture.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2021 | <value>PRECAPTURE |
| 2022 | <notes>AE has been asked to do a precapture sequence |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2023 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2032 | </enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2033 | <description>Current state of the auto-exposure (AE) algorithm.</description> |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2034 | <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 He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2072 | |
| 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 He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2088 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2089 | </entry> |
| 2090 | <clone entry="android.control.afMode" kind="controls"> |
| 2091 | </clone> |
| 2092 | <clone entry="android.control.afRegions" kind="controls"> |
| 2093 | </clone> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2094 | <clone entry="android.control.afTrigger" kind="controls"> |
| 2095 | </clone> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2096 | <entry name="afState" type="byte" visibility="public" enum="true" |
| 2097 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2098 | <enum> |
| 2099 | <value>INACTIVE |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2100 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2107 | <value>PASSIVE_SCAN |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2108 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2114 | <value>PASSIVE_FOCUSED |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2115 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2121 | <value>ACTIVE_SCAN |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2122 | <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 Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 2128 | <value>FOCUSED_LOCKED |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2129 | <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 Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 2138 | <value>NOT_FOCUSED_LOCKED |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2139 | <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 Talvala | 492ba7c | 2013-09-20 17:24:00 -0700 | [diff] [blame] | 2148 | <value>PASSIVE_UNFOCUSED |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2149 | <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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2153 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2158 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 2159 | <description>Current state of auto-focus (AF) algorithm.</description> |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2160 | <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 He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2196 | 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 He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2212 | 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2220 | 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 He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2222 | 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2225 | 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 He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2227 | 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2240 | 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 He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2242 | 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 He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2251 | |
| 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 He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2263 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2264 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 2265 | <entry name="afTriggerId" type="int32" visibility="system" deprecated="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2266 | <description>The ID sent with the latest |
| 2267 | CAMERA2_TRIGGER_AUTOFOCUS call</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2268 | <details>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2269 | received yet by HAL. Always updated even if AF algorithm |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2270 | ignores the trigger</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2271 | </entry> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2272 | <clone entry="android.control.awbLock" kind="controls"> |
| 2273 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2274 | <clone entry="android.control.awbMode" kind="controls"> |
| 2275 | </clone> |
| 2276 | <clone entry="android.control.awbRegions" kind="controls"> |
| 2277 | </clone> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2278 | <clone entry="android.control.captureIntent" kind="controls"> |
| 2279 | </clone> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2280 | <entry name="awbState" type="byte" visibility="public" enum="true" |
| 2281 | hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2282 | <enum> |
| 2283 | <value>INACTIVE |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2284 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2290 | <value>SEARCHING |
| 2291 | <notes>AWB doesn't yet have a good set of control |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2292 | values for the current scene. |
| 2293 | |
| 2294 | This is a transient state, the camera device |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2295 | may skip reporting this state in capture result.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2296 | <value>CONVERGED |
| 2297 | <notes>AWB has a good set of control values for the |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2298 | current scene.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2299 | <value>LOCKED |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2300 | <notes>AWB has been locked. |
| 2301 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2302 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 2303 | <description>Current state of auto-white balance (AWB) algorithm.</description> |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2304 | <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 He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2336 | |
| 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 He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2349 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2350 | </entry> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2351 | <clone entry="android.control.effectMode" kind="controls"> |
| 2352 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2353 | <clone entry="android.control.mode" kind="controls"> |
| 2354 | </clone> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2355 | <clone entry="android.control.sceneMode" kind="controls"> |
| 2356 | </clone> |
| 2357 | <clone entry="android.control.videoStabilizationMode" kind="controls"> |
| 2358 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2359 | </dynamic> |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2360 | <static> |
| 2361 | <entry name="availableHighSpeedVideoConfigurations" type="int32" visibility="hidden" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2362 | container="array" typedef="highSpeedVideoConfiguration" hwlevel="limited"> |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2363 | <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 &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 Yeh | 35bdd4b | 2014-07-15 10:42:05 -0700 | [diff] [blame] | 2388 | 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 He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2391 | |
| 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 Yeh | 35bdd4b | 2014-07-15 10:42:05 -0700 | [diff] [blame] | 2400 | 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 He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2402 | |
| 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2411 | </section> |
| 2412 | <section name="demosaic"> |
| 2413 | <controls> |
Igor Murashkin | b556bc4 | 2012-12-04 16:07:21 -0800 | [diff] [blame] | 2414 | <entry name="mode" type="byte" enum="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2415 | <enum> |
| 2416 | <value>FAST |
| 2417 | <notes>Minimal or no slowdown of frame rate compared to |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2418 | Bayer RAW output.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2419 | <value>HIGH_QUALITY |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2420 | <notes>Improved processing quality but the frame rate is slowed down |
| 2421 | relative to raw output.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2422 | </enum> |
| 2423 | <description>Controls the quality of the demosaicing |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2424 | processing.</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 2425 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2426 | </entry> |
| 2427 | </controls> |
| 2428 | </section> |
| 2429 | <section name="edge"> |
| 2430 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2431 | <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2432 | <enum> |
| 2433 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2434 | <notes>No edge enhancement is applied.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2435 | <value>FAST |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2436 | <notes>Apply edge enhancement at a quality level that does not slow down frame rate relative to sensor |
Zhijun He | b1c5bab | 2013-12-16 15:08:14 -0800 | [diff] [blame] | 2437 | output</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2438 | <value>HIGH_QUALITY |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2439 | <notes>Apply high-quality edge enhancement, at a cost of reducing output frame rate. |
| 2440 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2441 | </enum> |
| 2442 | <description>Operation mode for edge |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 2443 | enhancement.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2444 | <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 Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 2447 | |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 2448 | FAST/HIGH_QUALITY both mean camera device determined enhancement |
Zhijun He | b1c5bab | 2013-12-16 15:08:14 -0800 | [diff] [blame] | 2449 | will be applied. HIGH_QUALITY mode indicates that the |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 2450 | 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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2452 | not slow down capture rate when applying edge enhancement.</details> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 2453 | <tag id="V1" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2454 | </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 He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 2459 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2460 | </entry> |
| 2461 | </controls> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 2462 | <static> |
| 2463 | <entry name="availableEdgeModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2464 | type_notes="list of enums" container="array" typedef="enumList" |
| 2465 | hwlevel="full"> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 2466 | <array> |
| 2467 | <size>n</size> |
| 2468 | </array> |
| 2469 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2470 | List of edge enhancement modes for android.edge.mode that are supported by this camera |
| 2471 | device. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 2472 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2473 | <range>Any value listed in android.edge.mode</range> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 2474 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2475 | Full-capability camera devices must always support OFF; all devices will list FAST. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 2476 | </details> |
| 2477 | <tag id="V1" /> |
| 2478 | </entry> |
| 2479 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2480 | <dynamic> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 2481 | <clone entry="android.edge.mode" kind="controls"> |
| 2482 | <tag id="V1" /> |
| 2483 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2484 | </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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2492 | <details>Power for snapshot may use a different scale than |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2493 | for torch mode. Only one entry for torch mode will be |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2494 | used</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 2495 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2496 | </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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2502 | <details>Clamped to (0, exposure time - flash |
| 2503 | duration).</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 2504 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2505 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2506 | <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2507 | <enum> |
| 2508 | <value>OFF |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 2509 | <notes> |
| 2510 | Do not fire the flash for this capture. |
| 2511 | </notes> |
| 2512 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2513 | <value>SINGLE |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 2514 | <notes> |
| 2515 | If the flash is available and charged, fire flash |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 2516 | for this capture. |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 2517 | </notes> |
| 2518 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2519 | <value>TORCH |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 2520 | <notes> |
| 2521 | Transition flash to continuously on. |
| 2522 | </notes> |
| 2523 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2524 | </enum> |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 2525 | <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 He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 2528 | (`android.flash.info.available == true`). |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 2529 | |
| 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 Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 2538 | control should be used along with auto-exposure (AE) precapture metering sequence |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 2539 | (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 He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 2543 | |
| 2544 | The flash status will be reported by android.flash.state in the capture result metadata. |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 2545 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2546 | <tag id="BC" /> |
| 2547 | </entry> |
| 2548 | </controls> |
| 2549 | <static> |
| 2550 | <namespace name="info"> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2551 | <entry name="available" type="byte" visibility="public" enum="true" |
| 2552 | typedef="boolean" hwlevel="legacy"> |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 2553 | <enum> |
| 2554 | <value>FALSE</value> |
| 2555 | <value>TRUE</value> |
| 2556 | </enum> |
| 2557 | <description>Whether this camera device has a |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2558 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2564 | <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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2571 | <details>1 second too long/too short for recharge? Should |
| 2572 | this be power-dependent?</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 2573 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2574 | </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 He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 2581 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2582 | </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 Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 2587 | <range>&gt;= 0</range> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 2588 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2589 | </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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2597 | <entry name="state" type="byte" visibility="public" enum="true" |
| 2598 | hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2599 | <enum> |
| 2600 | <value>UNAVAILABLE |
Zhijun He | e74a31c | 2014-03-25 11:33:29 -0700 | [diff] [blame] | 2601 | <notes>No flash on camera.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2602 | <value>CHARGING |
Zhijun He | e74a31c | 2014-03-25 11:33:29 -0700 | [diff] [blame] | 2603 | <notes>Flash is charging and cannot be fired.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2604 | <value>READY |
Zhijun He | e74a31c | 2014-03-25 11:33:29 -0700 | [diff] [blame] | 2605 | <notes>Flash is ready to fire.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2606 | <value>FIRED |
Zhijun He | e74a31c | 2014-03-25 11:33:29 -0700 | [diff] [blame] | 2607 | <notes>Flash fired for this capture.</notes></value> |
| 2608 | <value>PARTIAL |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2609 | <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 He | e74a31c | 2014-03-25 11:33:29 -0700 | [diff] [blame] | 2613 | due to hardware limitations.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2614 | </enum> |
| 2615 | <description>Current state of the flash |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 2616 | 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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2621 | |
| 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 He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 2632 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2633 | </entry> |
| 2634 | </dynamic> |
| 2635 | </section> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2636 | <section name="hotPixel"> |
| 2637 | <controls> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2638 | <entry name="mode" type="byte" visibility="public" enum="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2639 | <enum> |
| 2640 | <value>OFF |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2641 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2642 | No hot pixel correction is applied. |
| 2643 | |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2644 | The frame rate must not be reduced relative to sensor raw output |
| 2645 | for this option. |
| 2646 | |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2647 | The hotpixel map may be returned in android.statistics.hotPixelMap. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2648 | </notes> |
| 2649 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2650 | <value>FAST |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2651 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2652 | Hot pixel correction is applied, without reducing frame |
| 2653 | rate relative to sensor raw output. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2654 | |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2655 | The hotpixel map may be returned in android.statistics.hotPixelMap. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2656 | </notes> |
| 2657 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2658 | <value>HIGH_QUALITY |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2659 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2660 | High-quality hot pixel correction is applied, at a cost |
| 2661 | of reducing frame rate relative to sensor raw output. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2662 | |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2663 | The hotpixel map may be returned in android.statistics.hotPixelMap. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2664 | </notes> |
| 2665 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2666 | </enum> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2667 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2668 | Operational mode for hot pixel correction. |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2669 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2670 | <range>android.hotPixel.availableHotPixelModes</range> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2671 | <details> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2672 | Hotpixel correction interpolates out, or otherwise removes, pixels |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2673 | that do not accurately measure the incoming light (i.e. pixels that |
| 2674 | are stuck at an arbitrary value or are oversensitive). |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2675 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2676 | <tag id="V1" /> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 2677 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2678 | </entry> |
| 2679 | </controls> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2680 | <static> |
| 2681 | <entry name="availableHotPixelModes" type="byte" visibility="public" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 2682 | type_notes="list of enums" container="array" typedef="enumList"> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2683 | <array> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2684 | <size>n</size> |
| 2685 | </array> |
| 2686 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2687 | List of hot pixel correction modes for android.hotPixel.mode that are supported by this |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2688 | camera device. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2689 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2690 | <range>Any value listed in android.hotPixel.mode</range> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2691 | <details> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2692 | 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 Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2696 | pixels than actual pixels on the camera sensor. |
| 2697 | </hal_details> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2698 | <tag id="V1" /> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 2699 | <tag id="RAW" /> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 2700 | </entry> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 2701 | </static> |
| 2702 | <dynamic> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2703 | <clone entry="android.hotPixel.mode" kind="controls"> |
| 2704 | <tag id="V1" /> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 2705 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2706 | </clone> |
| 2707 | </dynamic> |
| 2708 | </section> |
| 2709 | <section name="jpeg"> |
| 2710 | <controls> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 2711 | <entry name="gpsLocation" type="byte" visibility="public" synthetic="true" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2712 | typedef="location" hwlevel="legacy"> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 2713 | <description> |
| 2714 | A location object to use when generating image GPS metadata. |
| 2715 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2716 | <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 Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 2721 | </entry> |
| 2722 | <entry name="gpsCoordinates" type="double" visibility="hidden" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2723 | type_notes="latitude, longitude, altitude. First two in degrees, the third in meters" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2724 | container="array" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2725 | <array> |
| 2726 | <size>3</size> |
| 2727 | </array> |
| 2728 | <description>GPS coordinates to include in output JPEG |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2729 | EXIF.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2730 | <range>(-180 - 180], [-90,90], [-inf, inf]</range> |
| 2731 | <tag id="BC" /> |
| 2732 | </entry> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 2733 | <entry name="gpsProcessingMethod" type="byte" visibility="hidden" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2734 | typedef="string" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2735 | <description>32 characters describing GPS algorithm to |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2736 | include in EXIF.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2737 | <units>UTF-8 null-terminated string</units> |
| 2738 | <tag id="BC" /> |
| 2739 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2740 | <entry name="gpsTimestamp" type="int64" visibility="hidden" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2741 | <description>Time GPS fix was made to include in |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2742 | EXIF.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2743 | <units>UTC in seconds since January 1, 1970</units> |
| 2744 | <tag id="BC" /> |
| 2745 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2746 | <entry name="orientation" type="int32" visibility="public" hwlevel="legacy"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2747 | <description>The orientation for a JPEG image.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2748 | <units>Degrees in multiples of 90</units> |
| 2749 | <range>0, 90, 180, 270</range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2750 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2782 | <tag id="BC" /> |
| 2783 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2784 | <entry name="quality" type="byte" visibility="public" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2785 | <description>Compression quality of the final JPEG |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 2786 | image.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2787 | <range>1-100; larger is higher quality</range> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2788 | <details>85-95 is typical usage range.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2789 | <tag id="BC" /> |
| 2790 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2791 | <entry name="thumbnailQuality" type="byte" visibility="public" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2792 | <description>Compression quality of JPEG |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2793 | thumbnail.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2794 | <range>1-100; larger is higher quality</range> |
| 2795 | <tag id="BC" /> |
| 2796 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 2797 | <entry name="thumbnailSize" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2798 | container="array" typedef="size" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2799 | <array> |
| 2800 | <size>2</size> |
| 2801 | </array> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 2802 | <description>Resolution of embedded JPEG thumbnail.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2803 | <range>android.jpeg.availableThumbnailSizes</range> |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 2804 | <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 He | 52e0955 | 2013-12-11 17:03:24 -0800 | [diff] [blame] | 2806 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2807 | 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 He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 2809 | |
| 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2823 | <tag id="BC" /> |
| 2824 | </entry> |
| 2825 | </controls> |
| 2826 | <static> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 2827 | <entry name="availableThumbnailSizes" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2828 | container="array" typedef="size" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2829 | <array> |
| 2830 | <size>2</size> |
| 2831 | <size>n</size> |
| 2832 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2833 | <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 He | 52e0955 | 2013-12-11 17:03:24 -0800 | [diff] [blame] | 2840 | |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 2841 | * 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 Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 2844 | aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. |
Zhijun He | 52e0955 | 2013-12-11 17:03:24 -0800 | [diff] [blame] | 2845 | The largest size is defined as the size that has the largest pixel area |
| 2846 | in a given size list. |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 2847 | * Each output JPEG size in android.scaler.availableStreamConfigurations will have at least |
Zhijun He | 52e0955 | 2013-12-11 17:03:24 -0800 | [diff] [blame] | 2848 | one corresponding size that has the same aspect ratio in availableThumbnailSizes, |
| 2849 | and vice versa. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2850 | * All non-`(0, 0)` sizes will have non-zero widths and heights.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2851 | <tag id="BC" /> |
| 2852 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 2853 | <entry name="maxSize" type="int32" visibility="system"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2854 | <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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2858 | <details>This is used for sizing the gralloc buffers for |
| 2859 | JPEG</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2860 | </entry> |
| 2861 | </static> |
| 2862 | <dynamic> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 2863 | <clone entry="android.jpeg.gpsLocation" kind="controls"> |
| 2864 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2865 | <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 Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 2878 | <range>&gt;= 0</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2879 | <details>If no JPEG output is produced for the request, |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 2880 | 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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2887 | 500000 make up the real data.</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 2888 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2889 | </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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2898 | <entry name="aperture" type="float" visibility="public" hwlevel="full"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2899 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2902 | <range>android.lens.info.availableApertures</range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2903 | <details>Setting this value is only supported on the camera devices that have a variable |
| 2904 | aperture lens. |
Zhijun He | 1b58d38 | 2014-01-10 10:22:53 -0800 | [diff] [blame] | 2905 | |
| 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 He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 2914 | While the aperture is still changing, android.lens.state will be set to MOVING. |
Zhijun He | 1b58d38 | 2014-01-10 10:22:53 -0800 | [diff] [blame] | 2915 | |
| 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2920 | <tag id="V1" /> |
| 2921 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2922 | <entry name="filterDensity" type="float" visibility="public" hwlevel="full"> |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 2923 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2924 | The desired setting for the lens neutral density filter(s). |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 2925 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2926 | <units>Exposure Value (EV)</units> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2927 | <range>android.lens.info.availableFilterDensities</range> |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 2928 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2929 | This control will not be supported on most camera devices. |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 2930 | |
| 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 He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 2939 | |
| 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 Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 2943 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2944 | <tag id="V1" /> |
| 2945 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2946 | <entry name="focalLength" type="float" visibility="public" hwlevel="legacy"> |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 2947 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2948 | The desired lens focal length; used for optical zoom. |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 2949 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2950 | <units>Millimeters</units> |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 2951 | <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 He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 2959 | frames before the lens can change to the requested focal length. |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 2960 | While the focal length is still changing, android.lens.state will |
| 2961 | be set to MOVING. |
| 2962 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2963 | Optical zoom will not be supported on most devices. |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 2964 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2965 | <tag id="V1" /> |
| 2966 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2967 | <entry name="focusDistance" type="float" visibility="public" hwlevel="full"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2968 | <description>Desired distance to plane of sharpest focus, |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 2969 | measured from frontmost surface of the lens.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2970 | <units>See android.lens.info.focusDistanceCalibration for details</units> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 2971 | <range>&gt;= 0</range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2972 | <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 He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 2979 | |
| 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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2984 | |
| 2985 | LEGACY devices support at most setting this to `0.0f` |
| 2986 | for infinity focus. |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 2987 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2988 | <tag id="BC" /> |
| 2989 | <tag id="V1" /> |
| 2990 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 2991 | <entry name="opticalStabilizationMode" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2992 | enum="true" hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2993 | <enum> |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 2994 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3000 | </enum> |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3001 | <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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3007 | 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 Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3013 | |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 3014 | 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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3020 | 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 He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 3023 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3024 | Not all devices will support OIS; see |
| 3025 | android.lens.info.availableOpticalStabilization for |
| 3026 | available controls. |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3027 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3028 | <tag id="V1" /> |
| 3029 | </entry> |
| 3030 | </controls> |
| 3031 | <static> |
| 3032 | <namespace name="info"> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3033 | <entry name="availableApertures" type="float" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3034 | container="array" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3035 | <array> |
| 3036 | <size>n</size> |
| 3037 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3038 | <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 He | 1b58d38 | 2014-01-10 10:22:53 -0800 | [diff] [blame] | 3043 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3044 | If the camera device supports a variable aperture, the aperture values |
Zhijun He | 1b58d38 | 2014-01-10 10:22:53 -0800 | [diff] [blame] | 3045 | in this list will be sorted in ascending order.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3046 | <tag id="V1" /> |
| 3047 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3048 | <entry name="availableFilterDensities" type="float" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3049 | container="array" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3050 | <array> |
| 3051 | <size>n</size> |
| 3052 | </array> |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3053 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3054 | List of neutral density filter values for |
| 3055 | android.lens.filterDensity that are supported by this camera device. |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3056 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3057 | <units>Exposure value (EV)</units> |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3058 | <range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3059 | Values are &gt;= 0 |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3060 | </range> |
| 3061 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3062 | 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 Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3065 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3066 | <tag id="V1" /> |
| 3067 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3068 | <entry name="availableFocalLengths" type="float" visibility="public" |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3069 | type_notes="The list of available focal lengths" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3070 | container="array" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3071 | <array> |
| 3072 | <size>n</size> |
| 3073 | </array> |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3074 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3075 | List of focal lengths for android.lens.focalLength that are supported by this camera |
| 3076 | device. |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3077 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3078 | <units>Millimeters</units> |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3079 | <range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3080 | Values are &gt; 0 |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3081 | </range> |
| 3082 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3083 | 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 Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3087 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3088 | <tag id="BC" /> |
| 3089 | <tag id="V1" /> |
| 3090 | </entry> |
| 3091 | <entry name="availableOpticalStabilization" type="byte" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 3092 | visibility="public" type_notes="list of enums" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3093 | typedef="enumList" hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3094 | <array> |
| 3095 | <size>n</size> |
| 3096 | </array> |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3097 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3098 | List of optical image stabilization (OIS) modes for |
| 3099 | android.lens.opticalStabilizationMode that are supported by this camera device. |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3100 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3101 | <range>Any value listed in android.lens.opticalStabilizationMode</range> |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3102 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3103 | If OIS is not supported by a given camera device, this list will |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3104 | contain only OFF. |
| 3105 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3106 | <tag id="V1" /> |
| 3107 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3108 | <entry name="hyperfocalDistance" type="float" visibility="public" optional="true" |
| 3109 | hwlevel="limited"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3110 | <description>Hyperfocal distance for this lens.</description> |
| 3111 | <units>See android.lens.info.focusDistanceCalibration for details</units> |
| 3112 | <range>If lens is fixed focus, &gt;= 0. If lens has focuser unit, the value is |
| 3113 | within `(0.0f, android.lens.info.minimumFocusDistance]`</range> |
Zhijun He | 27afb78 | 2014-04-29 19:23:08 -0700 | [diff] [blame] | 3114 | <details> |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3115 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3118 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3119 | <entry name="minimumFocusDistance" type="float" visibility="public" optional="true" |
| 3120 | hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3121 | <description>Shortest distance from frontmost surface |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3122 | of the lens that can be brought into sharp focus.</description> |
| 3123 | <units>See android.lens.info.focusDistanceCalibration for details</units> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 3124 | <range>&gt;= 0</range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3125 | <details>If the lens is fixed-focus, this will be |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3126 | 0.</details> |
Igor Murashkin | 7b72108 | 2014-06-19 15:45:58 -0700 | [diff] [blame] | 3127 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3133 | <tag id="V1" /> |
| 3134 | </entry> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 3135 | <entry name="shadingMapSize" type="int32" visibility="hidden" |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 3136 | type_notes="width and height (N, M) of lens shading map provided by the camera device." |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3137 | container="array" typedef="size" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3138 | <array> |
| 3139 | <size>2</size> |
| 3140 | </array> |
Igor Murashkin | 1dd4ecb | 2013-12-11 13:31:00 -0800 | [diff] [blame] | 3141 | <description>Dimensions of lens shading map.</description> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 3142 | <range>Both values &gt;= 1</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3143 | <details> |
Igor Murashkin | 1dd4ecb | 2013-12-11 13:31:00 -0800 | [diff] [blame] | 3144 | The map should be on the order of 30-40 rows and columns, and |
| 3145 | must be smaller than 64x64. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3146 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3147 | <tag id="V1" /> |
| 3148 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3149 | <entry name="focusDistanceCalibration" type="byte" visibility="public" |
| 3150 | enum="true" hwlevel="limited"> |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3151 | <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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3156 | |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3157 | 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3167 | 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 He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3174 | </notes> |
| 3175 | </value> |
| 3176 | <value>CALIBRATED |
| 3177 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3178 | 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 He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3186 | </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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3195 | |
| 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 He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3206 | </details> |
Yin-Chia Yeh | 52f6584 | 2014-08-18 10:44:21 -0700 | [diff] [blame] | 3207 | <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 He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3216 | <tag id="V1" /> |
| 3217 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3218 | </namespace> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3219 | <entry name="facing" type="byte" visibility="public" enum="true" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3220 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3221 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3229 | </enum> |
| 3230 | <description>Direction the camera faces relative to |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3231 | device screen.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3232 | </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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3242 | <details>Examples: |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 3243 | |
| 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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3254 | direction</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3255 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3256 | </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 He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3264 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3265 | </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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3278 | <details>Should be zero for fixed-focus cameras</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3279 | <tag id="BC" /> |
| 3280 | </clone> |
Zhijun He | 50451ad | 2013-09-26 10:27:47 -0700 | [diff] [blame] | 3281 | <entry name="focusRange" type="float" visibility="public" |
| 3282 | type_notes="Range of scene distances that are in focus" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3283 | container="array" typedef="pairFloatFloat" hwlevel="limited"> |
Zhijun He | 50451ad | 2013-09-26 10:27:47 -0700 | [diff] [blame] | 3284 | <array> |
| 3285 | <size>2</size> |
| 3286 | </array> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3287 | <description>The range of scene distances that are in |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 3288 | sharp focus (depth of field).</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3289 | <units>A pair of focus distances in diopters: (near, |
| 3290 | far); see android.lens.info.focusDistanceCalibration for details.</units> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 3291 | <range>&gt;=0</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3292 | <details>If variable focus not supported, can still report |
| 3293 | fixed depth of field range</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3294 | <tag id="BC" /> |
| 3295 | </entry> |
| 3296 | <clone entry="android.lens.opticalStabilizationMode" |
| 3297 | kind="controls"> |
| 3298 | <tag id="V1" /> |
| 3299 | </clone> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3300 | <entry name="state" type="byte" visibility="public" enum="true" hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3301 | <enum> |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3302 | <value>STATIONARY |
| 3303 | <notes> |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 3304 | The lens parameters (android.lens.focalLength, android.lens.focusDistance, |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3305 | android.lens.filterDensity and android.lens.aperture) are not changing. |
| 3306 | </notes> |
| 3307 | </value> |
| 3308 | <value>MOVING |
| 3309 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3310 | 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 He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3314 | </notes> |
| 3315 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3316 | </enum> |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3317 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3341 | <tag id="V1" /> |
| 3342 | </entry> |
| 3343 | </dynamic> |
| 3344 | </section> |
| 3345 | <section name="noiseReduction"> |
| 3346 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3347 | <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3348 | <enum> |
| 3349 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3350 | <notes>No noise reduction is applied.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3351 | <value>FAST |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3352 | <notes>Noise reduction is applied without reducing frame rate relative to sensor |
| 3353 | output.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3354 | <value>HIGH_QUALITY |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3355 | <notes>High-quality noise reduction is applied, at the cost of reducing frame rate |
| 3356 | relative to sensor output.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3357 | </enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3358 | <description>Mode of operation for the noise reduction algorithm.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3359 | <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 Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3363 | |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 3364 | 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3367 | even if it slows down capture rate. FAST means the camera device will not |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3368 | slow down capture rate when applying noise filtering. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3369 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3370 | <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 He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3377 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3378 | </entry> |
| 3379 | </controls> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3380 | <static> |
| 3381 | <entry name="availableNoiseReductionModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3382 | type_notes="list of enums" container="array" typedef="enumList" hwlevel="limited"> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3383 | <array> |
| 3384 | <size>n</size> |
| 3385 | </array> |
| 3386 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3387 | List of noise reduction modes for android.noiseReduction.mode that are supported |
| 3388 | by this camera device. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3389 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3390 | <range>Any value listed in android.noiseReduction.mode</range> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3391 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3392 | Full-capability camera devices will always support OFF and FAST. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3393 | |
| 3394 | Legacy-capability camera devices will only support FAST mode. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3395 | </details> |
| 3396 | <tag id="V1" /> |
| 3397 | </entry> |
| 3398 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3399 | <dynamic> |
| 3400 | <clone entry="android.noiseReduction.mode" kind="controls"> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3401 | <tag id="V1" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3402 | </clone> |
| 3403 | </dynamic> |
| 3404 | </section> |
| 3405 | <section name="quirks"> |
| 3406 | <static> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3407 | <entry name="meteringCropRegion" type="byte" visibility="system" deprecated="true" optional="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3408 | <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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3412 | <details>Normalized coordinates refer to those in the |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3413 | (-1000,1000) range mentioned in the |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 3414 | 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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3419 | removed in future versions of camera service.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3420 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3421 | <entry name="triggerAfWithAuto" type="byte" visibility="system" deprecated="true" optional="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3422 | <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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3425 | <details>HAL implementations should implement AF trigger |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3426 | 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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3429 | removed in future versions of camera service</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3430 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3431 | <entry name="useZslFormat" type="byte" visibility="system" deprecated="true" optional="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3432 | <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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3436 | <details>HAL implementations should use gralloc usage flags |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3437 | 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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3441 | camera service.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3442 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3443 | <entry name="usePartialResult" type="byte" visibility="hidden" deprecated="true" optional="true"> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 3444 | <description> |
| 3445 | If set to 1, the HAL will always split result |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 3446 | metadata for a single capture into multiple buffers, |
| 3447 | returned using multiple process_capture_result calls. |
| 3448 | </description> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 3449 | <details> |
| 3450 | Does not need to be listed in static |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 3451 | 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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3455 | </details> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 3456 | <hal_details> |
| 3457 | Refer to `camera3_capture_result::partial_result` |
| 3458 | for information on how to implement partial results. |
| 3459 | </hal_details> |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 3460 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3461 | </static> |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 3462 | <dynamic> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3463 | <entry name="partialResult" type="byte" visibility="hidden" deprecated="true" optional="true" enum="true" typedef="boolean"> |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 3464 | <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 He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 3472 | by the camera device, the last of which will be marked |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 3473 | FINAL.</notes> |
| 3474 | </value> |
| 3475 | </enum> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 3476 | <description> |
| 3477 | Whether a result given to the framework is the |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 3478 | 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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3481 | <range>Optional. Default value is FINAL.</range> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 3482 | <details> |
| 3483 | The entries in the result metadata buffers for a |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 3484 | 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 He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 3491 | only be used by the camera device if quirks.usePartialResult is set to 1. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3492 | </details> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 3493 | <hal_details> |
| 3494 | Refer to `camera3_capture_result::partial_result` |
| 3495 | for information on how to implement partial results. |
| 3496 | </hal_details> |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 3497 | </entry> |
| 3498 | </dynamic> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3499 | </section> |
| 3500 | <section name="request"> |
| 3501 | <controls> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3502 | <entry name="frameCount" type="int32" visibility="system" deprecated="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3503 | <description>A frame counter set by the framework. Must |
Igor Murashkin | 28548d2 | 2013-09-10 15:26:20 -0700 | [diff] [blame] | 3504 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3508 | <units>incrementing integer</units> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3509 | <range>Any int.</range> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3510 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3511 | <entry name="id" type="int32" visibility="hidden"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3512 | <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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3519 | <entry name="inputStreams" type="int32" visibility="system" deprecated="true" |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3520 | container="array"> |
| 3521 | <array> |
| 3522 | <size>n</size> |
| 3523 | </array> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3524 | <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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3527 | <range> |
Zhijun He | fb4701f | 2014-02-04 11:32:24 -0800 | [diff] [blame] | 3528 | Typically, only one entry allowed, must be a valid reprocess stream ID. |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 3529 | </range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3530 | <details>Only meaningful when android.request.type == |
| 3531 | REPROCESS. Ignored otherwise</details> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3532 | <tag id="HAL2" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3533 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3534 | <entry name="metadataMode" type="byte" visibility="system" |
| 3535 | enum="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3536 | <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 He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3553 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3554 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3555 | <entry name="outputStreams" type="int32" visibility="system" deprecated="true" |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3556 | container="array"> |
| 3557 | <array> |
| 3558 | <size>n</size> |
| 3559 | </array> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3560 | <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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3563 | <range>List must only include streams that have been |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3564 | created</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3565 | <details>If no output streams are listed, then the image |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3566 | data should simply be discarded. The image data must |
| 3567 | still be captured for metadata and statistics production, |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3568 | and the lens and flash must operate as requested.</details> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3569 | <tag id="HAL2" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3570 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3571 | <entry name="type" type="byte" visibility="system" deprecated="true" enum="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3572 | <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 Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 3579 | android.request.inputStreams parameter determines the |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3580 | 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 Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 3584 | REPROCESS. For HAL3, this tag is redundant. |
| 3585 | </description> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3586 | <tag id="HAL2" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3587 | </entry> |
| 3588 | </controls> |
| 3589 | <static> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 3590 | <entry name="maxNumOutputStreams" type="int32" visibility="hidden" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3591 | container="array" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3592 | <array> |
| 3593 | <size>3</size> |
| 3594 | </array> |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3595 | <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 He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 3599 | For processed (and stalling) format streams, &gt;= 1. |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3600 | |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 3601 | For Raw format (either stalling or non-stalling) streams, &gt;= 0. |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3602 | |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 3603 | For processed (but not stalling) format streams, &gt;= 3 |
Zhijun He | 2e76d00 | 2014-02-12 13:37:03 -0800 | [diff] [blame] | 3604 | for FULL mode devices (`android.info.supportedHardwareLevel == FULL`); |
| 3605 | &gt;= 2 for LIMITED mode devices (`android.info.supportedHardwareLevel == LIMITED`). |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3606 | </range> |
| 3607 | <details> |
| 3608 | This is a 3 element tuple that contains the max number of output simultaneous |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 3609 | 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 He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3612 | 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 Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 3616 | CPU resources that will consume more power. The image format for an output stream can |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 3617 | 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 He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3620 | |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 3621 | * Processed (but stalling): any non-RAW format with a stallDurations &gt; 0. |
| 3622 | Typically JPEG format (ImageFormat#JPEG). |
Zhijun He | f51d470 | 2014-07-01 04:43:52 -0700 | [diff] [blame] | 3623 | * Raw formats: ImageFormat#RAW_SENSOR, ImageFormat#RAW10 and ImageFormat#RAW_OPAQUE. |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 3624 | * Processed (but not-stalling): any non-RAW format without a stall duration. |
| 3625 | Typically ImageFormat#YUV_420_888, ImageFormat#NV21, ImageFormat#YV12. |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3626 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3627 | <tag id="BC" /> |
| 3628 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3629 | <entry name="maxNumOutputRaw" type="int32" visibility="public" synthetic="true" hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 3630 | <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 | &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 He | f51d470 | 2014-07-01 04:43:52 -0700 | [diff] [blame] | 3649 | * ImageFormat#RAW10 |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 3650 | * Opaque `RAW` |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3651 | |
| 3652 | LEGACY mode devices (android.info.supportedHardwareLevel `==` LEGACY) |
| 3653 | never support raw streams. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 3654 | </details> |
| 3655 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3656 | <entry name="maxNumOutputProc" type="int32" visibility="public" synthetic="true" hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 3657 | <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 | &gt;= 3 |
| 3663 | for FULL mode devices (`android.info.supportedHardwareLevel == FULL`); |
| 3664 | &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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3685 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3686 | LEGACY devices will support at least 2 processing/non-stalling streams. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 3687 | </details> |
| 3688 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3689 | <entry name="maxNumOutputProcStalling" type="int32" visibility="public" synthetic="true" hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 3690 | <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 | &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 &gt; 0. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3707 | Typically only the `JPEG` format (ImageFormat#JPEG) is a stalling format. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 3708 | |
| 3709 | For full guarantees, query StreamConfigurationMap#getOutputStallDuration with |
| 3710 | a processed format -- it will return a non-0 value for a stalling stream. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3711 | |
| 3712 | LEGACY devices will support up to 1 processing/stalling stream. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 3713 | </details> |
| 3714 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3715 | <entry name="maxNumReprocessStreams" type="int32" visibility="system" |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3716 | deprecated="true" container="array"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3717 | <array> |
| 3718 | <size>1</size> |
| 3719 | </array> |
| 3720 | <description>How many reprocessing streams of any type |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3721 | can be allocated at the same time.</description> |
| 3722 | <range>&gt;= 0</range> |
| 3723 | <details> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 3724 | Only used by HAL2.x. |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3725 | |
| 3726 | When set to 0, it means no reprocess stream is supported. |
| 3727 | </details> |
| 3728 | <tag id="HAL2" /> |
| 3729 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3730 | <entry name="maxNumInputStreams" type="int32" visibility="hidden" hwlevel="full"> |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3731 | <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 He | df726fa | 2014-06-25 08:35:53 -0700 | [diff] [blame] | 3736 | 0 or 1. |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3737 | </range> |
| 3738 | <details>When set to 0, it means no input stream is supported. |
| 3739 | |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 3740 | 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 He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 3745 | |
| 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3750 | </entry> |
| 3751 | </static> |
| 3752 | <dynamic> |
Igor Murashkin | 757ec24 | 2014-07-25 16:55:18 -0700 | [diff] [blame] | 3753 | <entry name="frameCount" type="int32" visibility="hidden" deprecated="true"> |
Igor Murashkin | 28548d2 | 2013-09-10 15:26:20 -0700 | [diff] [blame] | 3754 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3757 | <units>count of frames</units> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 3758 | <range>&gt; 0</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3759 | <details>Reset on release()</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3760 | </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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3766 | <entry name="pipelineDepth" type="byte" visibility="public" hwlevel="legacy"> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 3767 | <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>&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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3782 | </dynamic> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 3783 | <static> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3784 | <entry name="pipelineMaxDepth" type="byte" visibility="public" hwlevel="legacy"> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 3785 | <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 He | 452ed11 | 2014-07-17 17:42:56 -0700 | [diff] [blame] | 3807 | <entry name="partialResultCount" type="int32" visibility="public" optional="true"> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3808 | <description>Defines how many sub-components |
Igor Murashkin | 2e29110 | 2014-01-10 14:18:30 -0800 | [diff] [blame] | 3809 | a result will be composed of. |
| 3810 | </description> |
| 3811 | <range>&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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3816 | 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 Murashkin | 2e29110 | 2014-01-10 14:18:30 -0800 | [diff] [blame] | 3819 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 3820 | 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3824 | the application, and the rest of the metadata via later |
| 3825 | partial results. |
Igor Murashkin | 2e29110 | 2014-01-10 14:18:30 -0800 | [diff] [blame] | 3826 | </details> |
| 3827 | </entry> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3828 | <entry name="availableCapabilities" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3829 | enum="true" container="array" hwlevel="legacy"> |
Zhijun He | c593aee | 2014-05-29 13:31:49 -0700 | [diff] [blame] | 3830 | <array> |
| 3831 | <size>n</size> |
| 3832 | </array> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3833 | <enum> |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 3834 | <value>BACKWARD_COMPATIBLE |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3835 | <notes>The minimal set of capabilities that every camera |
| 3836 | device (regardless of android.info.supportedHardwareLevel) |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 3837 | supports. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3838 | |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 3839 | 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 Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3843 | </notes> |
| 3844 | </value> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3845 | <value optional="true">MANUAL_SENSOR |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3846 | <notes> |
| 3847 | The camera device can be manually controlled (3A algorithms such |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3848 | as auto-exposure, and auto-focus can be bypassed). |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 3849 | 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 Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3852 | |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 3853 | * Manual frame duration control |
| 3854 | * android.sensor.frameDuration |
| 3855 | * android.sensor.info.maxFrameDuration |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3856 | * 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3862 | * Manual lens control (if the lens is adjustable) |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3863 | * android.lens.* |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3864 | * Manual flash control (if a flash unit is present) |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3865 | * 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 He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 3872 | |
| 3873 | A given camera device may also support additional manual sensor controls, |
| 3874 | but this capability only covers the above list of controls. |
Ruben Brunk | 6285c4d | 2014-06-18 17:13:19 -0700 | [diff] [blame] | 3875 | |
| 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 Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3879 | </notes> |
| 3880 | </value> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3881 | <value optional="true">MANUAL_POST_PROCESSING |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3882 | <notes> |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 3883 | 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 Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3886 | |
| 3887 | * Manual tonemap control |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 3888 | * android.tonemap.curve |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3889 | * android.tonemap.mode |
| 3890 | * android.tonemap.maxCurvePoints |
| 3891 | * Manual white balance control |
| 3892 | * android.colorCorrection.transform |
| 3893 | * android.colorCorrection.gains |
Zhijun He | df726fa | 2014-06-25 08:35:53 -0700 | [diff] [blame] | 3894 | * Manual lens shading map control |
| 3895 | * android.shading.mode |
| 3896 | * android.statistics.lensShadingMapMode |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3897 | * android.statistics.lensShadingMap |
| 3898 | * android.lens.info.shadingMapSize |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 3899 | * Manual aberration correction control (if aberration correction is supported) |
Zhijun He | 3377641 | 2014-08-18 10:55:33 -0700 | [diff] [blame] | 3900 | * android.colorCorrection.aberrationMode |
| 3901 | * android.colorCorrection.availableAberrationModes |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3902 | |
| 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 He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 3906 | A given camera device may also support additional post-processing |
| 3907 | controls, but this capability only covers the above list of controls. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3908 | </notes> |
| 3909 | </value> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 3910 | <value optional="true">RAW |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 3911 | <notes> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 3912 | 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 Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 3918 | |
| 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3928 | <value optional="true" hidden="true">ZSL |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3929 | <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 Brunk | a43690a | 2014-11-11 11:47:03 -0800 | [diff] [blame^] | 3944 | <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 Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3965 | </enum> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3966 | <description>List of capabilities that this camera device |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3967 | 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 Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3981 | The following capabilities are guaranteed to be available on |
| 3982 | android.info.supportedHardwareLevel `==` FULL devices: |
| 3983 | |
| 3984 | * MANUAL_SENSOR |
Zhijun He | 5a1276a | 2014-06-02 16:46:03 -0700 | [diff] [blame] | 3985 | * MANUAL_POST_PROCESSING |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3986 | |
| 3987 | Other capabilities may be available on either FULL or LIMITED |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3988 | devices, but the application should query this key to be sure. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3989 | </details> |
| 3990 | <hal_details> |
| 3991 | Additional constraint details per-capability will be available |
| 3992 | in the Compatibility Test Suite. |
| 3993 | |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 3994 | Minimum baseline requirements required for the |
| 3995 | BACKWARD_COMPATIBLE capability are not explicitly listed. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3996 | Instead refer to "BC" tags and the camera CTS tests in the |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 3997 | android.hardware.camera2.cts package. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 3998 | |
| 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 Brunk | 6285c4d | 2014-06-18 17:13:19 -0700 | [diff] [blame] | 4008 | |
| 4009 | If MANUAL_SENSOR is omitted, the HAL may choose to omit the |
| 4010 | android.scaler.availableMinFrameDurations static property entirely. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4011 | </hal_details> |
| 4012 | </entry> |
| 4013 | <entry name="availableRequestKeys" type="int32" visibility="hidden" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4014 | container="array" hwlevel="legacy"> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4015 | <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 Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4029 | </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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4045 | container="array" hwlevel="legacy"> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4046 | <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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4054 | a CaptureResult that is listed here will generally never return a `null` |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4055 | 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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4061 | (Those sometimes-null keys will nevertheless be listed here |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4062 | 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 Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4068 | </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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4088 | container="array" hwlevel="legacy"> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4089 | <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 Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4098 | </details> |
| 4099 | <hal_details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4100 | Keys listed here must always have an entry in the static info metadata, |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4101 | 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 Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 4117 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4118 | </section> |
| 4119 | <section name="scaler"> |
| 4120 | <controls> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 4121 | <entry name="cropRegion" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4122 | container="array" typedef="rectangle" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4123 | <array> |
Eino-Ville Talvala | e04ec6e | 2013-04-16 15:35:18 -0700 | [diff] [blame] | 4124 | <size>4</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4125 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4126 | <description>The desired region of the sensor to read out for this capture.</description> |
| 4127 | <units>Pixel coordinates relative to |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 4128 | android.sensor.info.activeArraySize</units> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4129 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4130 | This control can be used to implement digital zoom. |
| 4131 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 4132 | 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 He | 507458b | 2014-05-21 11:11:10 -0700 | [diff] [blame] | 4145 | |
| 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 Talvala | e04ec6e | 2013-04-16 15:35:18 -0700 | [diff] [blame] | 4148 | |
| 4149 | For example, if the crop region is set to a 4:3 aspect |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 4150 | ratio, then 4:3 streams will use the exact crop |
| 4151 | region. 16:9 streams will further crop vertically |
Eino-Ville Talvala | e04ec6e | 2013-04-16 15:35:18 -0700 | [diff] [blame] | 4152 | (letterbox). |
| 4153 | |
| 4154 | Conversely, if the crop region is set to a 16:9, then 4:3 |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 4155 | outputs will crop horizontally (pillarbox), and 16:9 |
| 4156 | streams will match exactly. These additional crops will |
Eino-Ville Talvala | e04ec6e | 2013-04-16 15:35:18 -0700 | [diff] [blame] | 4157 | be centered within the crop region. |
| 4158 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 4159 | 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 Talvala | e04ec6e | 2013-04-16 15:35:18 -0700 | [diff] [blame] | 4170 | 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 Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 4177 | possible. |
| 4178 | |
| 4179 | HAL2.x uses only (x, y, width) |
| 4180 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4181 | <tag id="BC" /> |
| 4182 | </entry> |
| 4183 | </controls> |
| 4184 | <static> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 4185 | <entry name="availableFormats" type="int32" |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4186 | visibility="hidden" deprecated="true" enum="true" |
Eino-Ville Talvala | d4e240a | 2013-08-08 12:56:37 -0700 | [diff] [blame] | 4187 | container="array" typedef="imageFormat"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4188 | <array> |
| 4189 | <size>n</size> |
| 4190 | </array> |
Igor Murashkin | 96bd019 | 2012-11-19 16:49:37 -0800 | [diff] [blame] | 4191 | <enum> |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 4192 | <value optional="true" id="0x20">RAW16 |
| 4193 | <notes> |
| 4194 | RAW16 is a standard, cross-platform format for raw image |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4195 | 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 Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 4203 | |
| 4204 | Buffers of this format will also follow the constraints given for |
| 4205 | RAW_OPAQUE buffers, but with relaxed performance constraints. |
| 4206 | |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 4207 | See android.scaler.availableInputOutputFormatsMap for |
| 4208 | the full set of performance guarantees. |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 4209 | </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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4214 | image sensor. |
| 4215 | |
| 4216 | The actual structure of buffers of this format is |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 4217 | 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 Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 4231 | See android.scaler.availableInputOutputFormatsMap for the full set of |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 4232 | performance guarantees. |
| 4233 | </notes> |
Igor Murashkin | 96bd019 | 2012-11-19 16:49:37 -0800 | [diff] [blame] | 4234 | </value> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 4235 | <value optional="true" id="0x32315659">YV12 |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 4236 | <notes>YCrCb 4:2:0 Planar</notes> |
Igor Murashkin | 96bd019 | 2012-11-19 16:49:37 -0800 | [diff] [blame] | 4237 | </value> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 4238 | <value optional="true" id="0x11">YCrCb_420_SP |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 4239 | <notes>NV21</notes> |
Igor Murashkin | 96bd019 | 2012-11-19 16:49:37 -0800 | [diff] [blame] | 4240 | </value> |
Zhijun He | c2eebff | 2013-05-16 17:49:35 -0700 | [diff] [blame] | 4241 | <value id="0x22">IMPLEMENTATION_DEFINED |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 4242 | <notes>System internal format, not application-accessible</notes> |
Zhijun He | c2eebff | 2013-05-16 17:49:35 -0700 | [diff] [blame] | 4243 | </value> |
Zhijun He | c2eebff | 2013-05-16 17:49:35 -0700 | [diff] [blame] | 4244 | <value id="0x23">YCbCr_420_888 |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 4245 | <notes>Flexible YUV420 Format</notes> |
Zhijun He | c2eebff | 2013-05-16 17:49:35 -0700 | [diff] [blame] | 4246 | </value> |
Zhijun He | c2eebff | 2013-05-16 17:49:35 -0700 | [diff] [blame] | 4247 | <value id="0x21">BLOB |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 4248 | <notes>JPEG format</notes> |
Igor Murashkin | 96bd019 | 2012-11-19 16:49:37 -0800 | [diff] [blame] | 4249 | </value> |
| 4250 | </enum> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 4251 | <description>The list of image formats that are supported by this |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 4252 | camera device for output streams.</description> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 4253 | <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 Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 4273 | 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 He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 4277 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4278 | <tag id="BC" /> |
| 4279 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4280 | <entry name="availableJpegMinDurations" type="int64" visibility="hidden" deprecated="true" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4281 | container="array"> |
| 4282 | <array> |
| 4283 | <size>n</size> |
| 4284 | </array> |
| 4285 | <description>The minimum frame duration that is supported |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4286 | for each resolution in android.scaler.availableJpegSizes. |
| 4287 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4288 | <units>Nanoseconds</units> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4289 | <range>TODO: Remove property.</range> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4290 | <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 Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 4296 | frame duration will be &gt;= max(individual stream min |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4297 | durations)</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4298 | <tag id="BC" /> |
| 4299 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4300 | <entry name="availableJpegSizes" type="int32" visibility="hidden" |
| 4301 | deprecated="true" container="array" typedef="size"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4302 | <array> |
| 4303 | <size>n</size> |
| 4304 | <size>2</size> |
| 4305 | </array> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 4306 | <description>The JPEG resolutions that are supported by this camera device.</description> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4307 | <range>TODO: Remove property.</range> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 4308 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4317 | <tag id="BC" /> |
| 4318 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4319 | <entry name="availableMaxDigitalZoom" type="float" visibility="public" |
| 4320 | hwlevel="legacy"> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4321 | <description>The maximum ratio between both active area width |
| 4322 | and crop region width, and active area height and |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4323 | crop region height, for android.scaler.cropRegion. |
| 4324 | </description> |
| 4325 | <units>Zoom scale factor</units> |
| 4326 | <range>&gt;=1</range> |
| 4327 | <details> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4328 | 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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4335 | </details> |
Igor Murashkin | f11a4df | 2013-05-07 10:00:46 -0700 | [diff] [blame] | 4336 | <tag id="BC" /> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 4337 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4338 | <entry name="availableProcessedMinDurations" type="int64" visibility="hidden" deprecated="true" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4339 | container="array"> |
| 4340 | <array> |
| 4341 | <size>n</size> |
| 4342 | </array> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4343 | <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 Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4346 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4347 | <units>Nanoseconds</units> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4348 | <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 &gt;= max(individual stream min durations). |
| 4355 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4356 | <tag id="BC" /> |
| 4357 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4358 | <entry name="availableProcessedSizes" type="int32" visibility="hidden" |
| 4359 | deprecated="true" container="array" typedef="size"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4360 | <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 He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 4367 | 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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4380 | </details> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 4381 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4395 | <tag id="BC" /> |
| 4396 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4397 | <entry name="availableRawMinDurations" type="int64" deprecated="true" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4398 | container="array"> |
| 4399 | <array> |
| 4400 | <size>n</size> |
| 4401 | </array> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4402 | <description> |
Zhijun He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 4403 | For each available raw output size (defined in |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4404 | android.scaler.availableRawSizes), this property lists the minimum |
| 4405 | supportable frame duration for that size. |
| 4406 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4407 | <units>Nanoseconds</units> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4408 | <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 Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 4413 | frame duration will be &gt;= max(individual stream min |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4414 | durations)</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4415 | <tag id="BC" /> |
| 4416 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4417 | <entry name="availableRawSizes" type="int32" deprecated="true" |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 4418 | container="array" typedef="size"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4419 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4426 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4427 | </static> |
| 4428 | <dynamic> |
| 4429 | <clone entry="android.scaler.cropRegion" kind="controls"> |
| 4430 | </clone> |
| 4431 | </dynamic> |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 4432 | <static> |
| 4433 | <entry name="availableInputOutputFormatsMap" type="int32" |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4434 | visibility="hidden" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4435 | container="array" typedef="imageFormat" |
| 4436 | hwlevel="full"> |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 4437 | <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 Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 4443 | <details> |
| 4444 | All camera devices with at least 1 |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 4445 | android.request.maxNumInputStreams will have at least one |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 4446 | 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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 4455 | RAW_OPAQUE | RAW16 | RAW |
| 4456 | RAW16 | YUV_420_888 | RAW |
| 4457 | RAW16 | JPEG | RAW |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 4458 | |
| 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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4461 | StreamConfigurationMap#getOutputStallDuration(int,Size) |
| 4462 | for a `format =` RAW_OPAQUE is always 0). |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 4463 | |
| 4464 | Attempting to configure an input stream with output streams not |
| 4465 | listed as available in this map is not valid. |
| 4466 | |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4467 | TODO: typedef to ReprocessFormatMap |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 4468 | </details> |
| 4469 | <hal_details> |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 4470 | For the formats, see `system/core/include/system/graphics.h` for a definition |
| 4471 | of the image format enumerations. |
| 4472 | |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 4473 | 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 = &entry.i32[0]; |
| 4484 | for (size_t i = 0; i < entry.count; ) { |
| 4485 | int32_t format = contents[i++]; |
| 4486 | int32_t length = contents[i++]; |
| 4487 | int32_t output_formats[length]; |
| 4488 | memcpy(&output_formats[0], &contents[i], |
| 4489 | length * sizeof(int32_t)); |
| 4490 | i += length; |
| 4491 | } |
| 4492 | |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 4493 | // writing (static example, RAW+ZSL) |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 4494 | 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, &contents[0], |
| 4499 | sizeof(contents)/sizeof(contents[0]), &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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4511 | <entry name="availableStreamConfigurations" type="int32" visibility="hidden" |
| 4512 | enum="true" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4513 | typedef="streamConfiguration" hwlevel="legacy"> |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4514 | <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 Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4530 | 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 <= activeArraySize |
| 4552 | JPEG | 1280x720 (720) | Any | if 720p <= activeArraySize |
| 4553 | JPEG | 640x480 (480p) | Any | if 480p <= activeArraySize |
| 4554 | JPEG | 320x240 (240p) | Any | if 240p <= 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 He | 5a1276a | 2014-06-02 16:46:03 -0700 | [diff] [blame] | 4569 | 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 Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4585 | |
| 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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4613 | <entry name="availableMinFrameDurations" type="int64" visibility="hidden" |
| 4614 | container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4615 | typedef="streamConfigurationDuration" hwlevel="legacy"> |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4616 | <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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4638 | |
| 4639 | (Keep in sync with |
| 4640 | StreamConfigurationMap#getOutputMinFrameDuration) |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4641 | </details> |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 4642 | <tag id="V1" /> |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4643 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4644 | <entry name="availableStallDurations" type="int64" visibility="hidden" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4645 | container="array" typedef="streamConfigurationDuration" hwlevel="legacy"> |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4646 | <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 He | f51d470 | 2014-07-01 04:43:52 -0700 | [diff] [blame] | 4703 | * ImageFormat#JPEG |
| 4704 | * ImageFormat#RAW_SENSOR |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4705 | |
| 4706 | The following formats will never have a stall duration: |
| 4707 | |
Zhijun He | f51d470 | 2014-07-01 04:43:52 -0700 | [diff] [blame] | 4708 | * ImageFormat#YUV_420_888 |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4709 | |
| 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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4716 | |
| 4717 | (Keep up to date with |
| 4718 | StreamConfigurationMap#getOutputStallDuration(int, Size) ) |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4719 | </details> |
| 4720 | <hal_details> |
| 4721 | If possible, it is recommended that all non-JPEG formats |
Zhijun He | f51d470 | 2014-07-01 04:43:52 -0700 | [diff] [blame] | 4722 | (such as RAW16) should not have a stall duration. RAW10, RAW_OPAQUE and |
| 4723 | IMPLEMENTATION_DEFINED must not have stall durations. |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4724 | </hal_details> |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 4725 | <tag id="V1" /> |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4726 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4727 | <entry name="streamConfigurationMap" type="int32" visibility="public" |
| 4728 | synthetic="true" typedef="streamConfigurationMap" |
| 4729 | hwlevel="legacy"> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4730 | <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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4748 | 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 <= activeArraySize |
| 4756 | JPEG | 1280x720 (720) | Any | if 720p <= activeArraySize |
| 4757 | JPEG | 640x480 (480p) | Any | if 480p <= activeArraySize |
| 4758 | JPEG | 320x240 (240p) | Any | if 240p <= 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 Murashkin | efff0de | 2014-05-14 17:30:49 -0700 | [diff] [blame] | 4771 | 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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4775 | 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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4811 | <entry name="croppingType" type="byte" visibility="public" enum="true" |
| 4812 | hwlevel="legacy"> |
Zhijun He | d0f25ca | 2014-05-21 15:29:07 -0700 | [diff] [blame] | 4813 | <enum> |
| 4814 | <value>CENTER_ONLY |
| 4815 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4816 | The camera device only supports centered crop regions. |
Zhijun He | d0f25ca | 2014-05-21 15:29:07 -0700 | [diff] [blame] | 4817 | </notes> |
| 4818 | </value> |
| 4819 | <value>FREEFORM |
| 4820 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4821 | The camera device supports arbitrarily chosen crop regions. |
Zhijun He | d0f25ca | 2014-05-21 15:29:07 -0700 | [diff] [blame] | 4822 | </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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4838 | FREEFORM cropping. LEGACY capability devices will only support CENTER_ONLY cropping. |
Zhijun He | d0f25ca | 2014-05-21 15:29:07 -0700 | [diff] [blame] | 4839 | </details> |
| 4840 | </entry> |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 4841 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4842 | </section> |
| 4843 | <section name="sensor"> |
| 4844 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4845 | <entry name="exposureTime" type="int64" visibility="public" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4846 | <description>Duration each pixel is exposed to |
Zhijun He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 4847 | light.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4848 | <units>Nanoseconds</units> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4849 | <range>android.sensor.info.exposureTimeRange</range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4850 | <details>If the sensor can't expose this exact duration, it will shorten the |
Zhijun He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 4851 | duration exposed to the nearest possible value (rather than expose longer). |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4852 | 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 He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 4856 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4857 | <tag id="V1" /> |
| 4858 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4859 | <entry name="frameDuration" type="int64" visibility="public" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4860 | <description>Duration from start of frame exposure to |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4861 | start of next frame exposure.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4862 | <units>Nanoseconds</units> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4863 | <range>See android.sensor.info.maxFrameDuration, |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4864 | android.scaler.streamConfigurationMap. The duration |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4865 | 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 Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4898 | * 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 Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4902 | |
| 4903 | The necessary information for the application, given the model above, |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4904 | is provided via the android.scaler.streamConfigurationMap field |
| 4905 | using StreamConfigurationMap#getOutputMinFrameDuration(int, Size). |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4906 | 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 Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4910 | determine the minimum frame duration it can request from the camera |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4911 | device: |
| 4912 | |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4913 | 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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4916 | looking it up in android.scaler.streamConfigurationMap using |
| 4917 | StreamConfigurationMap#getOutputMinFrameDuration(int, Size) (with |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4918 | 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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4925 | StreamConfigurationMap#getOutputStallDuration(int,Size) using its |
| 4926 | respective size/format), then the frame duration in |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 4927 | `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 Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4939 | StreamConfigurationMap#getOutputStallDuration(int,Size). |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4940 | |
| 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 Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 4943 | </details> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4944 | <hal_details> |
| 4945 | For more details about stalling, see |
| 4946 | android.scaler.availableStallDurations. |
| 4947 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4948 | <tag id="V1" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4949 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4950 | <entry name="sensitivity" type="int32" visibility="public" hwlevel="full"> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 4951 | <description>The amount of gain applied to sensor data |
| 4952 | before processing.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4953 | <units>ISO arithmetic units</units> |
| 4954 | <range>android.sensor.info.sensitivityRange</range> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 4955 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4969 | <tag id="V1" /> |
| 4970 | </entry> |
| 4971 | </controls> |
| 4972 | <static> |
| 4973 | <namespace name="info"> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 4974 | <entry name="activeArraySize" type="int32" visibility="public" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4975 | type_notes="Four ints defining the active pixel rectangle" |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 4976 | container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4977 | typedef="rectangle" |
| 4978 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4979 | <array> |
| 4980 | <size>4</size> |
| 4981 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4982 | <description>The area of the image sensor which corresponds to |
Zhijun He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 4983 | active pixels.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4984 | <units>Pixel coordinates on the image sensor</units> |
| 4985 | <range> |
Zhijun He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 4986 | </range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4987 | <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 | &gt;= `(0,0)`. |
| 5005 | The `(width, height)` must be &lt;= `android.sensor.info.pixelArraySize`. |
| 5006 | </hal_details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5007 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5008 | </entry> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 5009 | <entry name="sensitivityRange" type="int32" visibility="public" |
| 5010 | type_notes="Range of supported sensitivities" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5011 | container="array" typedef="rangeInt" |
| 5012 | hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5013 | <array> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 5014 | <size>2</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5015 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5016 | <description>Range of sensitivities for android.sensor.sensitivity supported by this |
| 5017 | camera device.</description> |
Eino-Ville Talvala | d77b234 | 2014-09-25 10:27:48 -0700 | [diff] [blame] | 5018 | <range>Min <= 100, Max &gt;= 800</range> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5019 | <details> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5020 | The values are the standard ISO sensitivity values, |
| 5021 | as defined in ISO 12232:2006. |
| 5022 | </details> |
| 5023 | |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5024 | <tag id="BC" /> |
| 5025 | <tag id="V1" /> |
| 5026 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5027 | <entry name="colorFilterArrangement" type="byte" visibility="public" enum="true" |
| 5028 | hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5029 | <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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 5039 | <description>The arrangement of color filters on sensor; |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5040 | represents the colors in the top-left 2x2 section of |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 5041 | the sensor, in reading order.</description> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5042 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5043 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 5044 | <entry name="exposureTimeRange" type="int64" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5045 | type_notes="nanoseconds" container="array" typedef="rangeLong" |
| 5046 | hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5047 | <array> |
| 5048 | <size>2</size> |
| 5049 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5050 | <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 He | df726fa | 2014-06-25 08:35:53 -0700 | [diff] [blame] | 5055 | capability devices (android.info.supportedHardwareLevel == FULL), |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5056 | the maximum exposure time will be greater than 100ms.</range> |
Zhijun He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 5057 | <hal_details>For FULL capability devices (android.info.supportedHardwareLevel == FULL), |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5058 | The maximum of the range SHOULD be at least 1 second (1e9), MUST be at least |
| 5059 | 100ms. |
| 5060 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5061 | <tag id="V1" /> |
| 5062 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5063 | <entry name="maxFrameDuration" type="int64" visibility="public" |
| 5064 | hwlevel="full"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5065 | <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 He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 5068 | <range>For FULL capability devices |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5069 | (android.info.supportedHardwareLevel == FULL), at least 100ms. |
Zhijun He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 5070 | </range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5071 | <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 Murashkin | 061c600 | 2014-01-27 16:00:26 -0800 | [diff] [blame] | 5074 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5075 | Refer to StreamConfigurationMap#getOutputMinFrameDuration(int,Size) for the minimum |
| 5076 | frame duration values. |
Igor Murashkin | 061c600 | 2014-01-27 16:00:26 -0800 | [diff] [blame] | 5077 | </details> |
| 5078 | <hal_details> |
Zhijun He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 5079 | 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 Murashkin | 061c600 | 2014-01-27 16:00:26 -0800 | [diff] [blame] | 5082 | |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 5083 | 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 Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 5086 | |
| 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 Murashkin | 061c600 | 2014-01-27 16:00:26 -0800 | [diff] [blame] | 5095 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5096 | <tag id="V1" /> |
| 5097 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 5098 | <entry name="physicalSize" type="float" visibility="public" |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5099 | type_notes="width x height" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5100 | container="array" typedef="sizeF" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5101 | <array> |
| 5102 | <size>2</size> |
| 5103 | </array> |
| 5104 | <description>The physical dimensions of the full pixel |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5105 | array.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5106 | <units>Millimeters</units> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5107 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5111 | <tag id="V1" /> |
| 5112 | <tag id="BC" /> |
| 5113 | </entry> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 5114 | <entry name="pixelArraySize" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5115 | container="array" typedef="size" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5116 | <array> |
| 5117 | <size>2</size> |
| 5118 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5119 | <description>Dimensions of the full pixel array, possibly |
Zhijun He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 5120 | including black calibration pixels.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5121 | <units>Pixels</units> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5122 | <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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5130 | |
| 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 Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5134 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5135 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5136 | <tag id="BC" /> |
| 5137 | </entry> |
Ruben Brunk | 92dd85b | 2014-02-10 19:16:56 -0800 | [diff] [blame] | 5138 | <entry name="whiteLevel" type="int32" visibility="public"> |
| 5139 | <description> |
| 5140 | Maximum raw value output by sensor. |
| 5141 | </description> |
Ruben Brunk | d9d1213 | 2014-03-18 14:37:04 -0700 | [diff] [blame] | 5142 | <range>&gt; 255 (8-bit output)</range> |
Ruben Brunk | 92dd85b | 2014-02-10 19:16:56 -0800 | [diff] [blame] | 5143 | <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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5148 | android.sensor.blackLevelPattern key. |
Ruben Brunk | 92dd85b | 2014-02-10 19:16:56 -0800 | [diff] [blame] | 5149 | |
| 5150 | The white level is typically determined either by sensor bit depth |
Ruben Brunk | d9d1213 | 2014-03-18 14:37:04 -0700 | [diff] [blame] | 5151 | (8-14 bits is expected), or by the point where the sensor response |
Ruben Brunk | 92dd85b | 2014-02-10 19:16:56 -0800 | [diff] [blame] | 5152 | 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 Brunk | d9d1213 | 2014-03-18 14:37:04 -0700 | [diff] [blame] | 5155 | <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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5160 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5161 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5162 | <entry name="timestampSource" type="byte" visibility="public" |
| 5163 | enum="true" hwlevel="legacy"> |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 5164 | <enum> |
Eino-Ville Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 5165 | <value>UNKNOWN |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 5166 | <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 Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 5175 | <value>REALTIME |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 5176 | <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 Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 5183 | <description>The time base source for sensor capture start timestamps.</description> |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 5184 | <details> |
Eino-Ville Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 5185 | 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 He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 5190 | </details> |
| 5191 | <tag id="V1" /> |
| 5192 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5193 | </namespace> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5194 | <entry name="referenceIlluminant1" type="byte" visibility="public" |
| 5195 | enum="true"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5196 | <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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5234 | The values in this key correspond to the values defined for the |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5235 | EXIF LightSource tag. These illuminants are standard light sources |
| 5236 | that are often used calibrating camera devices. |
| 5237 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5238 | If this key is present, then android.sensor.colorTransform1, |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5239 | 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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5248 | and corresponding matrices must be present to support the RAW capability |
| 5249 | and DNG output. |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5250 | |
| 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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5269 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5270 | </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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5278 | <range>Any value listed in android.sensor.referenceIlluminant1</range> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5279 | <details> |
| 5280 | See android.sensor.referenceIlluminant1 for more details. |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5281 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5282 | If this key is present, then android.sensor.colorTransform2, |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5283 | android.sensor.calibrationTransform2, and |
| 5284 | android.sensor.forwardMatrix2 will also be present. |
| 5285 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5286 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5287 | </entry> |
| 5288 | <entry name="calibrationTransform1" type="rational" |
| 5289 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 5290 | type_notes="3x3 matrix in row-major-order" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5291 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5292 | <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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5311 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5312 | </entry> |
| 5313 | <entry name="calibrationTransform2" type="rational" |
| 5314 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 5315 | type_notes="3x3 matrix in row-major-order" container="array" |
| 5316 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5317 | <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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5340 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5341 | </entry> |
| 5342 | <entry name="colorTransform1" type="rational" |
| 5343 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 5344 | type_notes="3x3 matrix in row-major-order" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5345 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5346 | <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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5370 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5371 | </entry> |
| 5372 | <entry name="colorTransform2" type="rational" |
| 5373 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 5374 | type_notes="3x3 matrix in row-major-order" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5375 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5376 | <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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5403 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5404 | </entry> |
| 5405 | <entry name="forwardMatrix1" type="rational" |
| 5406 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 5407 | type_notes="3x3 matrix in row-major-order" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5408 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5409 | <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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5431 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5432 | </entry> |
| 5433 | <entry name="forwardMatrix2" type="rational" |
| 5434 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 5435 | type_notes="3x3 matrix in row-major-order" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5436 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5437 | <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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5462 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5463 | </entry> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 5464 | <entry name="baseGainFactor" type="rational" |
Alex Ray | ef40ad6 | 2013-10-01 17:52:33 -0700 | [diff] [blame] | 5465 | optional="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5466 | <description>Gain factor from electrons to raw units when |
| 5467 | ISO=100</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 5468 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5469 | </entry> |
Ruben Brunk | 24bdaaf | 2014-01-31 14:11:20 -0800 | [diff] [blame] | 5470 | <entry name="blackLevelPattern" type="int32" visibility="public" |
Ruben Brunk | cc09de1 | 2014-06-05 13:20:47 -0700 | [diff] [blame] | 5471 | optional="true" type_notes="2x2 raw count block" container="array" |
| 5472 | typedef="blackLevelPattern"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5473 | <array> |
| 5474 | <size>4</size> |
| 5475 | </array> |
Ruben Brunk | 24bdaaf | 2014-01-31 14:11:20 -0800 | [diff] [blame] | 5476 | <description> |
| 5477 | A fixed black level offset for each of the color filter arrangement |
| 5478 | (CFA) mosaic channels. |
| 5479 | </description> |
| 5480 | <range>&gt;= 0 for each.</range> |
| 5481 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5482 | This key specifies the zero light value for each of the CFA mosaic |
Ruben Brunk | 92dd85b | 2014-02-10 19:16:56 -0800 | [diff] [blame] | 5483 | channels in the camera sensor. The maximal value output by the |
| 5484 | sensor is represented by the value in android.sensor.info.whiteLevel. |
Ruben Brunk | 24bdaaf | 2014-01-31 14:11:20 -0800 | [diff] [blame] | 5485 | |
Ruben Brunk | cc09de1 | 2014-06-05 13:20:47 -0700 | [diff] [blame] | 5486 | The values are given in the same order as channels listed for the CFA |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5487 | layout key (see android.sensor.info.colorFilterArrangement), i.e. the |
Ruben Brunk | cc09de1 | 2014-06-05 13:20:47 -0700 | [diff] [blame] | 5488 | 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 Brunk | 24bdaaf | 2014-01-31 14:11:20 -0800 | [diff] [blame] | 5492 | 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 Brunk | cc09de1 | 2014-06-05 13:20:47 -0700 | [diff] [blame] | 5494 | </hal_details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5495 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5496 | </entry> |
Alex Ray | ef40ad6 | 2013-10-01 17:52:33 -0700 | [diff] [blame] | 5497 | <entry name="maxAnalogSensitivity" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5498 | optional="true" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5499 | <description>Maximum sensitivity that is implemented |
Zhijun He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 5500 | purely through analog gain.</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 5501 | <details>For android.sensor.sensitivity values less than or |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5502 | equal to this, all applied gain must be analog. For |
Zhijun He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 5503 | values above this, the gain applied can be a mix of analog and |
| 5504 | digital.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5505 | <tag id="V1" /> |
Alex Ray | ef40ad6 | 2013-10-01 17:52:33 -0700 | [diff] [blame] | 5506 | <tag id="FULL" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5507 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5508 | <entry name="orientation" type="int32" visibility="public" |
| 5509 | hwlevel="legacy"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5510 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5514 | 90</units> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5515 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5520 | <tag id="BC" /> |
| 5521 | </entry> |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 5522 | <entry name="profileHueSatMapDimensions" type="int32" |
Zhijun He | d0f482a | 2014-05-06 16:18:04 -0700 | [diff] [blame] | 5523 | visibility="system" optional="true" |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 5524 | 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 &gt;= 1, |
| 5535 | Saturation &gt;= 2, |
| 5536 | Value &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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5544 | <tag id="RAW" /> |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 5545 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5546 | </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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5554 | <entry name="timestamp" type="int64" visibility="public" |
| 5555 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5556 | <description>Time at start of exposure of first |
Zhijun He | cc5cfdc | 2014-06-11 10:44:53 -0700 | [diff] [blame] | 5557 | row of the image sensor active array, in nanoseconds.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5558 | <units>Nanoseconds</units> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 5559 | <range>&gt; 0</range> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5560 | <details>The timestamps are also included in all image |
| 5561 | buffers produced for the same capture, and will be identical |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 5562 | on all the outputs. |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5563 | |
Eino-Ville Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 5564 | When android.sensor.info.timestampSource `==` UNKNOWN, |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 5565 | 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 Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 5570 | When android.sensor.info.timestampSource `==` REALTIME, |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 5571 | 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 Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5576 | <hal_details> |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 5577 | All timestamps must be in reference to the kernel's |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5578 | 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 Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 5583 | If android.sensor.info.timestampSource `==` REALTIME, |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 5584 | The timestamp must be synchronized with the timestamps from other |
| 5585 | sensor subsystems that are using the same timebase. |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5586 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5587 | <tag id="BC" /> |
| 5588 | </entry> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 5589 | <entry name="temperature" type="float" |
Alex Ray | ef40ad6 | 2013-10-01 17:52:33 -0700 | [diff] [blame] | 5590 | optional="true"> |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 5591 | <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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5598 | <units>Celsius</units> |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 5599 | <range>Optional. This value is missing if no temperature is available.</range> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 5600 | <tag id="FUTURE" /> |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 5601 | </entry> |
Ruben Brunk | 7b9e9bc | 2014-02-06 18:37:48 -0800 | [diff] [blame] | 5602 | <entry name="neutralColorPoint" type="rational" visibility="public" |
| 5603 | optional="true" container="array"> |
| 5604 | <array> |
| 5605 | <size>3</size> |
| 5606 | </array> |
| 5607 | <description> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5608 | The estimated camera neutral color in the native sensor colorspace at |
| 5609 | the time of capture. |
Ruben Brunk | 7b9e9bc | 2014-02-06 18:37:48 -0800 | [diff] [blame] | 5610 | </description> |
| 5611 | <details> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 5612 | 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 Brunk | 7b9e9bc | 2014-02-06 18:37:48 -0800 | [diff] [blame] | 5618 | The order of the values is R, G, B; where R is in the lowest index. |
| 5619 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5620 | <tag id="RAW" /> |
Ruben Brunk | 7b9e9bc | 2014-02-06 18:37:48 -0800 | [diff] [blame] | 5621 | </entry> |
Ruben Brunk | 6a424ff | 2014-07-23 15:13:16 -0700 | [diff] [blame] | 5622 | <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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5633 | This key contains two noise model coefficients for each CFA channel |
Ruben Brunk | 6a424ff | 2014-07-23 15:13:16 -0700 | [diff] [blame] | 5634 | corresponding to the sensor amplification (S) and sensor readout |
| 5635 | noise (O). These are given as pairs of coefficients for each channel |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5636 | in the same order as channels listed for the CFA layout key |
Ruben Brunk | 6a424ff | 2014-07-23 15:13:16 -0700 | [diff] [blame] | 5637 | (see android.sensor.info.colorFilterArrangement). This is |
| 5638 | represented as an array of Pair&lt;Double, Double&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 Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 5663 | <entry name="profileHueSatMap" type="float" |
Zhijun He | d0f482a | 2014-05-06 16:18:04 -0700 | [diff] [blame] | 5664 | visibility="system" optional="true" |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 5665 | 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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5678 | The hue shift is given in degrees; saturation and value scale factors are |
| 5679 | unitless and are between 0 and 1 inclusive |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 5680 | </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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5687 | hue shift has the lowest index. The map entries are stored in the key |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 5688 | 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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5693 | <tag id="RAW" /> |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 5694 | </entry> |
| 5695 | <entry name="profileToneCurve" type="float" |
Zhijun He | d0f482a | 2014-05-06 16:18:04 -0700 | [diff] [blame] | 5696 | visibility="system" optional="true" |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 5697 | 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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5712 | This key contains a default tone curve that can be applied while |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 5713 | 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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5717 | <tag id="RAW" /> |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 5718 | </entry> |
Ruben Brunk | 6a5fd11 | 2014-02-11 17:55:32 -0800 | [diff] [blame] | 5719 | <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 | &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 Brunk | d9d1213 | 2014-03-18 14:37:04 -0700 | [diff] [blame] | 5733 | 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 Brunk | 6a5fd11 | 2014-02-11 17:55:32 -0800 | [diff] [blame] | 5739 | 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 &lt; 1.03 is a negligible split (&lt;3% divergence). |
| 5754 | * 1.20 &lt;= R &gt;= 1.03 will require some software |
| 5755 | correction to avoid demosaic errors (3-20% divergence). |
| 5756 | * R &gt; 1.20 will require strong software correction to produce |
| 5757 | a usuable image (&gt;20% divergence). |
| 5758 | </details> |
Ruben Brunk | d9d1213 | 2014-03-18 14:37:04 -0700 | [diff] [blame] | 5759 | <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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 5766 | <tag id="RAW" /> |
Ruben Brunk | 6a5fd11 | 2014-02-11 17:55:32 -0800 | [diff] [blame] | 5767 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5768 | </dynamic> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 5769 | <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 Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 5778 | <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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 5794 | <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 Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 5798 | </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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5902 | <range>android.sensor.availableTestPatternModes</range> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 5903 | <details> |
| 5904 | When a test pattern is enabled, all manual sensor controls specified |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 5905 | by android.sensor.* will be ignored. All other controls should |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 5906 | 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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5911 | |
| 5912 | Defaults to OFF. |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 5913 | </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 He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 5925 | <clone entry="android.sensor.testPatternData" kind="controls"> |
| 5926 | </clone> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 5927 | <clone entry="android.sensor.testPatternMode" kind="controls"> |
| 5928 | </clone> |
| 5929 | </dynamic> |
| 5930 | <static> |
Zhijun He | 29a973d | 2014-03-27 23:54:16 -0700 | [diff] [blame] | 5931 | <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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5936 | <description>List of sensor test pattern modes for android.sensor.testPatternMode |
| 5937 | supported by this camera device. |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 5938 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5939 | <range>Any value listed in android.sensor.testPatternMode</range> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5940 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5941 | Defaults to OFF, and always includes OFF if defined. |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5942 | </details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5943 | <hal_details> |
| 5944 | All custom modes must be >= CUSTOM1. |
| 5945 | </hal_details> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 5946 | </entry> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 5947 | </static> |
Zhijun He | cc5cfdc | 2014-06-11 10:44:53 -0700 | [diff] [blame] | 5948 | <dynamic> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5949 | <entry name="rollingShutterSkew" type="int64" visibility="public" hwlevel="limited"> |
Zhijun He | cc5cfdc | 2014-06-11 10:44:53 -0700 | [diff] [blame] | 5950 | <description>Duration between the start of first row exposure |
| 5951 | and the start of last row exposure.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5952 | <units>Nanoseconds</units> |
Zhijun He | cc5cfdc | 2014-06-11 10:44:53 -0700 | [diff] [blame] | 5953 | <range> &gt;= 0 and &lt; |
| 5954 | StreamConfigurationMap#getOutputMinFrameDuration(int, Size).</range> |
| 5955 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5956 | 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 He | cc5cfdc | 2014-06-11 10:44:53 -0700 | [diff] [blame] | 5960 | |
| 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5971 | </section> |
| 5972 | <section name="shading"> |
| 5973 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5974 | <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5975 | <enum> |
| 5976 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 5977 | <notes>No lens shading correction is applied.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5978 | <value>FAST |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 5979 | <notes>Apply lens shading corrections, without slowing |
| 5980 | frame rate relative to sensor raw output</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5981 | <value>HIGH_QUALITY |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 5982 | <notes>Apply high-quality lens shading correction, at the |
| 5983 | cost of reduced frame rate.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5984 | </enum> |
| 5985 | <description>Quality of lens shading correction applied |
Zhijun He | 2f86a21 | 2014-01-15 10:34:02 -0800 | [diff] [blame] | 5986 | 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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5991 | 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 He | 2f86a21 | 2014-01-15 10:34:02 -0800 | [diff] [blame] | 5994 | |
| 5995 | [ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5996 | 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 He | 2f86a21 | 2014-01-15 10:34:02 -0800 | [diff] [blame] | 6001 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6002 | 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 He | 46f82f0 | 2014-05-20 18:22:18 -0700 | [diff] [blame] | 6007 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6008 | 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 He | 2f86a21 | 2014-01-15 10:34:02 -0800 | [diff] [blame] | 6013 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6014 | </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 He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6020 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6021 | </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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6030 | <entry name="faceDetectMode" type="byte" visibility="public" enum="true" |
| 6031 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6032 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6033 | <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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6038 | </notes></value> |
| 6039 | <value optional="true">FULL |
| 6040 | <notes>Return all face |
| 6041 | metadata. |
| 6042 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6043 | In this mode, face rectangles, scores, landmarks, and face IDs are all valid. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6044 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6045 | </enum> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6046 | <description>Operating mode for the face detector |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6047 | unit.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6048 | <range>android.statistics.info.availableFaceDetectModes</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6049 | <details>Whether face detection is enabled, and whether it |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6050 | should output just the basic fields or the full set of |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6051 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6058 | <tag id="BC" /> |
| 6059 | </entry> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 6060 | <entry name="histogramMode" type="byte" enum="true" typedef="boolean"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6061 | <enum> |
| 6062 | <value>OFF</value> |
| 6063 | <value>ON</value> |
| 6064 | </enum> |
| 6065 | <description>Operating mode for histogram |
| 6066 | generation</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6067 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6068 | </entry> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 6069 | <entry name="sharpnessMapMode" type="byte" enum="true" typedef="boolean"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6070 | <enum> |
| 6071 | <value>OFF</value> |
| 6072 | <value>ON</value> |
| 6073 | </enum> |
| 6074 | <description>Operating mode for sharpness map |
| 6075 | generation</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6076 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6077 | </entry> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6078 | <entry name="hotPixelMapMode" type="byte" visibility="public" enum="true" |
| 6079 | typedef="boolean"> |
| 6080 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6081 | <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 Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6087 | </enum> |
| 6088 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6089 | Operating mode for hot pixel map generation. |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6090 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6091 | <range>android.statistics.info.availableHotPixelMapModes</range> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6092 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6093 | 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 Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6095 | </details> |
| 6096 | <tag id="V1" /> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6097 | <tag id="RAW" /> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6098 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6099 | </controls> |
| 6100 | <static> |
| 6101 | <namespace name="info"> |
| 6102 | <entry name="availableFaceDetectModes" type="byte" |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6103 | visibility="public" |
| 6104 | type_notes="List of enums from android.statistics.faceDetectMode" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 6105 | container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6106 | typedef="enumList" |
| 6107 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6108 | <array> |
| 6109 | <size>n</size> |
| 6110 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6111 | <description>List of face detection modes for android.statistics.faceDetectMode that are |
| 6112 | supported by this camera device. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6113 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6114 | <range>Any value listed in android.statistics.faceDetectMode</range> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6115 | <details>OFF is always supported. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6116 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6117 | </entry> |
| 6118 | <entry name="histogramBucketCount" type="int32"> |
| 6119 | <description>Number of histogram buckets |
| 6120 | supported</description> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 6121 | <range>&gt;= 64</range> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6122 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6123 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6124 | <entry name="maxFaceCount" type="int32" visibility="public" hwlevel="legacy"> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6125 | <description>The maximum number of simultaneously detectable |
| 6126 | faces.</description> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6127 | <range>0 for cameras without available face detection; otherwise: |
| 6128 | `>=4` for LIMITED or FULL hwlevel devices or |
| 6129 | `>0` for LEGACY devices.</range> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6130 | <tag id="BC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6131 | </entry> |
| 6132 | <entry name="maxHistogramCount" type="int32"> |
| 6133 | <description>Maximum value possible for a histogram |
| 6134 | bucket</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6135 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6136 | </entry> |
| 6137 | <entry name="maxSharpnessMapValue" type="int32"> |
| 6138 | <description>Maximum value possible for a sharpness map |
| 6139 | region.</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6140 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6141 | </entry> |
| 6142 | <entry name="sharpnessMapSize" type="int32" |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 6143 | type_notes="width x height" container="array" typedef="size"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6144 | <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 He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6150 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6151 | </entry> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6152 | <entry name="availableHotPixelMapModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6153 | type_notes="list of enums" container="array" typedef="boolean"> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6154 | <array> |
| 6155 | <size>n</size> |
| 6156 | </array> |
| 6157 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6158 | List of hot pixel map output modes for android.statistics.hotPixelMapMode that are |
| 6159 | supported by this camera device. |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6160 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6161 | <range>Any value listed in android.statistics.hotPixelMapMode</range> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6162 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6163 | If no hotpixel map output is available for this camera device, this will contain only |
| 6164 | `false`. |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6165 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6166 | ON is always supported on devices with the RAW capability. |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6167 | </details> |
| 6168 | <tag id="V1" /> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6169 | <tag id="RAW" /> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6170 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6171 | </namespace> |
| 6172 | </static> |
| 6173 | <dynamic> |
| 6174 | <clone entry="android.statistics.faceDetectMode" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6175 | kind="controls"></clone> |
| 6176 | <entry name="faceIds" type="int32" visibility="hidden" container="array" |
| 6177 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6178 | <array> |
| 6179 | <size>n</size> |
| 6180 | </array> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6181 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6188 | <tag id="BC" /> |
| 6189 | </entry> |
Zhijun He | 3b4c206 | 2013-10-07 11:23:30 -0700 | [diff] [blame] | 6190 | <entry name="faceLandmarks" type="int32" visibility="hidden" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6191 | type_notes="(leftEyeX, leftEyeY, rightEyeX, rightEyeY, mouthX, mouthY)" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6192 | container="array" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6193 | <array> |
| 6194 | <size>n</size> |
| 6195 | <size>6</size> |
| 6196 | </array> |
| 6197 | <description>List of landmarks for detected |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6198 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6204 | <tag id="BC" /> |
| 6205 | </entry> |
Zhijun He | 3b4c206 | 2013-10-07 11:23:30 -0700 | [diff] [blame] | 6206 | <entry name="faceRectangles" type="int32" visibility="hidden" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6207 | type_notes="(xmin, ymin, xmax, ymax). (0,0) is top-left of active pixel area" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6208 | container="array" typedef="rectangle" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6209 | <array> |
| 6210 | <size>n</size> |
| 6211 | <size>4</size> |
| 6212 | </array> |
| 6213 | <description>List of the bounding rectangles for detected |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6214 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6220 | <tag id="BC" /> |
| 6221 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6222 | <entry name="faceScores" type="byte" visibility="hidden" container="array" |
| 6223 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6224 | <array> |
| 6225 | <size>n</size> |
| 6226 | </array> |
| 6227 | <description>List of the face confidence scores for |
| 6228 | detected faces</description> |
Zhijun He | 59ccb1e | 2013-10-02 14:06:15 -0700 | [diff] [blame] | 6229 | <range>1-100</range> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6230 | <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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6235 | <tag id="BC" /> |
| 6236 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6237 | <entry name="faces" type="int32" visibility="public" synthetic="true" |
| 6238 | container="array" typedef="face" hwlevel="legacy"> |
Igor Murashkin | efff0de | 2014-05-14 17:30:49 -0700 | [diff] [blame] | 6239 | <array> |
| 6240 | <size>n</size> |
| 6241 | </array> |
| 6242 | <description>List of the faces detected through camera face detection |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6243 | in this capture.</description> |
Igor Murashkin | efff0de | 2014-05-14 17:30:49 -0700 | [diff] [blame] | 6244 | <details> |
| 6245 | Only available if android.statistics.faceDetectMode `!=` OFF. |
| 6246 | </details> |
| 6247 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6248 | <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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6257 | <details>The k'th bucket (0-based) covers the input range |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6258 | (with w = android.sensor.info.whiteLevel) of [ k * w/N, |
| 6259 | (k + 1) * w / N ). If only a monochrome sharpness map is |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6260 | supported, all channels should have the same data</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6261 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6262 | </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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6275 | <details>If only a monochrome sharpness map is supported, |
| 6276 | all channels should have the same data</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6277 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6278 | </entry> |
| 6279 | <clone entry="android.statistics.sharpnessMapMode" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6280 | kind="controls"></clone> |
| 6281 | <entry name="lensShadingCorrectionMap" type="byte" visibility="public" |
| 6282 | typedef="lensShadingMap" hwlevel="full"> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 6283 | <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 &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 He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6335 | type_notes="2D array of float gain factors per channel to correct lens shading" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6336 | container="array" hwlevel="full"> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6337 | <array> |
| 6338 | <size>4</size> |
| 6339 | <size>n</size> |
| 6340 | <size>m</size> |
| 6341 | </array> |
Igor Murashkin | 1dd4ecb | 2013-12-11 13:31:00 -0800 | [diff] [blame] | 6342 | <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 Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 6345 | <range>Each gain factor is &gt;= 1</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6346 | <details>The least shaded section of the image should have a gain factor |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6347 | of 1; all other sections should have gains above 1. |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 6348 | |
| 6349 | When android.colorCorrection.mode = TRANSFORM_MATRIX, the map |
| 6350 | must take into account the colorCorrection settings. |
Igor Murashkin | 1dd4ecb | 2013-12-11 13:31:00 -0800 | [diff] [blame] | 6351 | |
| 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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6392 | </details> |
Zhijun He | 46f82f0 | 2014-05-20 18:22:18 -0700 | [diff] [blame] | 6393 | <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 He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6404 | </entry> |
Igor Murashkin | 0fe2f13 | 2014-01-13 16:59:47 -0800 | [diff] [blame] | 6405 | <entry name="predictedColorGains" type="float" |
| 6406 | visibility="hidden" |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 6407 | deprecated="true" |
Igor Murashkin | 0fe2f13 | 2014-01-13 16:59:47 -0800 | [diff] [blame] | 6408 | optional="true" |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6409 | 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 He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 6415 | by the camera device's statistics units for the current output frame. |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6416 | </description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6417 | <details> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6418 | 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 Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 6424 | see android.colorCorrection.gains for details. |
| 6425 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6426 | This value should always be calculated by the auto-white balance (AWB) block, |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 6427 | regardless of the android.control.* current values. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6428 | </details> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6429 | </entry> |
Igor Murashkin | 0fe2f13 | 2014-01-13 16:59:47 -0800 | [diff] [blame] | 6430 | <entry name="predictedColorTransform" type="rational" |
| 6431 | visibility="hidden" |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 6432 | deprecated="true" |
Igor Murashkin | 0fe2f13 | 2014-01-13 16:59:47 -0800 | [diff] [blame] | 6433 | optional="true" |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6434 | 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 He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 6441 | calculated by the camera device's statistics units for the current |
| 6442 | output frame.</description> |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 6443 | <details>The camera device will provide the estimate from its |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6444 | statistics unit on the white balance transforms to use |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 6445 | for the next frame. These are the values the camera device believes |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6446 | 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 Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 6454 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6455 | This value should always be calculated by the auto-white balance (AWB) block, |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 6456 | regardless of the android.control.* current values. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6457 | </details> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6458 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6459 | <entry name="sceneFlicker" type="byte" visibility="public" enum="true" |
| 6460 | hwlevel="full"> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6461 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6462 | <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 He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6471 | </enum> |
Zhijun He | b8512c5 | 2014-02-03 11:46:58 -0800 | [diff] [blame] | 6472 | <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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6482 | (`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 He | b8512c5 | 2014-02-03 11:46:58 -0800 | [diff] [blame] | 6488 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6489 | Reports NONE if there doesn't appear to be flickering illumination. |
Zhijun He | b8512c5 | 2014-02-03 11:46:58 -0800 | [diff] [blame] | 6490 | </details> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6491 | </entry> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6492 | <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 Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 6496 | container="array" typedef="point"> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6497 | <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 <= 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 Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6528 | <tag id="RAW" /> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 6529 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6530 | </dynamic> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6531 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6532 | <entry name="lensShadingMapMode" type="byte" visibility="public" enum="true" hwlevel="full"> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6533 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6534 | <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 He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6538 | </enum> |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 6539 | <description>Whether the camera device will output the lens |
| 6540 | shading map in output result metadata.</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6541 | <details>When set to ON, |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6542 | android.statistics.lensShadingMap will be provided in |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6543 | the output result metadata. |
| 6544 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6545 | ON is always supported on devices with the RAW capability. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6546 | </details> |
| 6547 | <tag id="RAW" /> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6548 | </entry> |
| 6549 | </controls> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 6550 | <dynamic> |
| 6551 | <clone entry="android.statistics.lensShadingMapMode" kind="controls"> |
| 6552 | </clone> |
| 6553 | </dynamic> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6554 | </section> |
| 6555 | <section name="tonemap"> |
| 6556 | <controls> |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 6557 | <entry name="curveBlue" type="float" visibility="hidden" |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 6558 | type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints." |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6559 | container="array" hwlevel="full"> |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 6560 | <array> |
| 6561 | <size>n</size> |
| 6562 | <size>2</size> |
| 6563 | </array> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6564 | <description>Tonemapping / contrast / gamma curve for the blue |
| 6565 | channel, to use when android.tonemap.mode is |
| 6566 | CONTRAST_CURVE.</description> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6567 | <details>See android.tonemap.curveRed for more details.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6568 | </entry> |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 6569 | <entry name="curveGreen" type="float" visibility="hidden" |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 6570 | type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints." |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6571 | container="array" hwlevel="full"> |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 6572 | <array> |
| 6573 | <size>n</size> |
| 6574 | <size>2</size> |
| 6575 | </array> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6576 | <description>Tonemapping / contrast / gamma curve for the green |
| 6577 | channel, to use when android.tonemap.mode is |
| 6578 | CONTRAST_CURVE.</description> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6579 | <details>See android.tonemap.curveRed for more details.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6580 | </entry> |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 6581 | <entry name="curveRed" type="float" visibility="hidden" |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 6582 | type_notes="1D array of float pairs (P_IN, P_OUT). The maximum number of pairs is specified by android.tonemap.maxCurvePoints." |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6583 | container="array" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6584 | <array> |
| 6585 | <size>n</size> |
| 6586 | <size>2</size> |
| 6587 | </array> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6588 | <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 He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 6596 | |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6597 | android.tonemap.curveRed = |
| 6598 | [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ] |
Zhijun He | 6ebd25a | 2014-02-15 21:21:30 -0800 | [diff] [blame] | 6599 | 2 <= N <= android.tonemap.maxCurvePoints |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 6600 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6601 | 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 Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6603 | 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6655 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6656 | <entry name="curve" type="float" visibility="public" synthetic="true" |
| 6657 | typedef="tonemapCurve" |
| 6658 | hwlevel="full"> |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 6659 | <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 <= N <= 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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6723 | <entry name="mode" type="byte" visibility="public" enum="true" |
| 6724 | hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6725 | <enum> |
| 6726 | <value>CONTRAST_CURVE |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6727 | <notes>Use the tone mapping curve specified in |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 6728 | the android.tonemap.curve* entries. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6729 | |
| 6730 | All color enhancement and tonemapping must be disabled, except |
| 6731 | for applying the tonemapping curve specified by |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 6732 | android.tonemap.curve. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6733 | |
| 6734 | Must not slow down frame rate relative to raw |
| 6735 | sensor output. |
| 6736 | </notes> |
| 6737 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6738 | <value>FAST |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6739 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6740 | Advanced gamma mapping and color enhancement may be applied, without |
| 6741 | reducing frame rate compared to raw sensor output. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6742 | </notes> |
| 6743 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6744 | <value>HIGH_QUALITY |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6745 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6746 | High-quality gamma mapping and color enhancement will be applied, at |
| 6747 | the cost of reduced frame rate compared to raw sensor output. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6748 | </notes> |
| 6749 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6750 | </enum> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6751 | <description>High-level global contrast/gamma/tonemapping control. |
| 6752 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6753 | <range>android.tonemap.availableToneMapModes</range> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6754 | <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 Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 6769 | emit its own tonemap curve in android.tonemap.curve. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6770 | These values are always available, and as close as possible to the |
| 6771 | actually used nonlinear/nonglobal transforms. |
| 6772 | |
Zhijun He | 46f82f0 | 2014-05-20 18:22:18 -0700 | [diff] [blame] | 6773 | If a request is sent with CONTRAST_CURVE with the camera device's |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6774 | provided curve in FAST or HIGH_QUALITY, the image's tonemap will be |
| 6775 | roughly the same.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6776 | </entry> |
| 6777 | </controls> |
| 6778 | <static> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6779 | <entry name="maxCurvePoints" type="int32" visibility="public" |
| 6780 | hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6781 | <description>Maximum number of supported points in the |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 6782 | tonemap curve that can be used for android.tonemap.curve. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6783 | </description> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6784 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6785 | 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 Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 6788 | |
| 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 Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6796 | </entry> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 6797 | <entry name="availableToneMapModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6798 | type_notes="list of enums" container="array" typedef="enumList" hwlevel="full"> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 6799 | <array> |
| 6800 | <size>n</size> |
| 6801 | </array> |
| 6802 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6803 | List of tonemapping modes for android.tonemap.mode that are supported by this camera |
| 6804 | device. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 6805 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6806 | <range>Any value listed in android.tonemap.mode</range> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 6807 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6808 | Camera devices that support the MANUAL_POST_PROCESSING capability will always list |
| 6809 | CONTRAST_CURVE and FAST. This includes all FULL level devices. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 6810 | </details> |
| 6811 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6812 | </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 Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 6820 | <clone entry="android.tonemap.curve" kind="controls"> |
| 6821 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6822 | <clone entry="android.tonemap.mode" kind="controls"> |
| 6823 | </clone> |
| 6824 | </dynamic> |
| 6825 | </section> |
Igor Murashkin | c469f7d | 2013-04-23 14:31:02 -0700 | [diff] [blame] | 6826 | <section name="led"> |
| 6827 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6828 | <entry name="transmit" type="byte" visibility="hidden" optional="true" |
| 6829 | enum="true" typedef="boolean"> |
Igor Murashkin | c469f7d | 2013-04-23 14:31:02 -0700 | [diff] [blame] | 6830 | <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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6853 | <entry name="availableLeds" type="byte" visibility="hidden" optional="true" |
| 6854 | enum="true" |
| 6855 | container="array"> |
Igor Murashkin | c469f7d | 2013-04-23 14:31:02 -0700 | [diff] [blame] | 6856 | <array> |
| 6857 | <size>n</size> |
| 6858 | </array> |
| 6859 | <enum> |
| 6860 | <value>TRANSMIT |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6861 | <notes>android.led.transmit control is used.</notes> |
Igor Murashkin | c469f7d | 2013-04-23 14:31:02 -0700 | [diff] [blame] | 6862 | </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 Murashkin | 38b8cae | 2013-05-23 16:38:59 -0700 | [diff] [blame] | 6869 | <section name="info"> |
| 6870 | <static> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 6871 | <entry name="supportedHardwareLevel" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6872 | enum="true" hwlevel="legacy"> |
Igor Murashkin | 38b8cae | 2013-05-23 16:38:59 -0700 | [diff] [blame] | 6873 | <enum> |
Ruben Brunk | 31b50c2 | 2014-07-02 00:13:46 +0000 | [diff] [blame] | 6874 | <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 Murashkin | 38b8cae | 2013-05-23 16:38:59 -0700 | [diff] [blame] | 6892 | </enum> |
| 6893 | <description> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 6894 | Generally classifies the overall set of the camera device functionality. |
| 6895 | </description> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 6896 | <details> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6897 | Camera devices will come in three flavors: LEGACY, LIMITED and FULL. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 6898 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6899 | A FULL device will support below capabilities: |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 6900 | |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 6901 | * 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 He | df726fa | 2014-06-25 08:35:53 -0700 | [diff] [blame] | 6905 | * Arbitrary cropping region (android.scaler.croppingType `==` FREEFORM) |
| 6906 | * At least 3 processed (but not stalling) format output streams (android.request.maxNumOutputProc `>=` 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 Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 6910 | |
| 6911 | A LIMITED device may have some or none of the above characteristics. |
| 6912 | To find out more refer to android.request.availableCapabilities. |
Ruben Brunk | 31b50c2 | 2014-07-02 00:13:46 +0000 | [diff] [blame] | 6913 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6914 | 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 Brunk | 31b50c2 | 2014-07-02 00:13:46 +0000 | [diff] [blame] | 6924 | 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 Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6926 | |
| 6927 | Each higher level supports everything the lower level supports |
| 6928 | in this order: FULL `>` LIMITED `>` LEGACY. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 6929 | </details> |
| 6930 | <hal_details> |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 6931 | 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 Murashkin | 38b8cae | 2013-05-23 16:38:59 -0700 | [diff] [blame] | 6938 | |
| 6939 | For full details refer to "S3. Operational Modes" in camera3.h |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6940 | |
| 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 Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 6944 | </hal_details> |
Igor Murashkin | 38b8cae | 2013-05-23 16:38:59 -0700 | [diff] [blame] | 6945 | </entry> |
| 6946 | </static> |
| 6947 | </section> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6948 | <section name="blackLevel"> |
| 6949 | <controls> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 6950 | <entry name="lock" type="byte" visibility="public" enum="true" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6951 | typedef="boolean" hwlevel="full"> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6952 | <enum> |
| 6953 | <value>OFF</value> |
| 6954 | <value>ON</value> |
| 6955 | </enum> |
| 6956 | <description> Whether black-level compensation is locked |
Eino-Ville Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 6957 | to its current values, or is free to vary.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6958 | <details>When set to `true` (ON), the values used for black-level |
Eino-Ville Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 6959 | compensation will not change until the lock is set to |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6960 | `false` (OFF). |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6961 | |
| 6962 | Since changes to certain capture parameters (such as |
| 6963 | exposure time) may require resetting of black level |
Eino-Ville Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 6964 | compensation, the camera device must report whether setting |
| 6965 | the black level lock was successful in the output result |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 6966 | metadata. |
| 6967 | |
Igor Murashkin | 8aa2a11 | 2013-12-09 12:06:17 -0800 | [diff] [blame] | 6968 | 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 Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 6977 | 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 Murashkin | 8aa2a11 | 2013-12-09 12:06:17 -0800 | [diff] [blame] | 6980 | |
| 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 Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 6988 | 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 Murashkin | 8aa2a11 | 2013-12-09 12:06:17 -0800 | [diff] [blame] | 6991 | |
Eino-Ville Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 6992 | 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 He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 7004 | <tag id="HAL2" /> |
| 7005 | </entry> |
| 7006 | </controls> |
| 7007 | <dynamic> |
| 7008 | <clone entry="android.blackLevel.lock" |
Igor Murashkin | 8aa2a11 | 2013-12-09 12:06:17 -0800 | [diff] [blame] | 7009 | kind="controls"> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 7010 | <details> |
Eino-Ville Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 7011 | 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 Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 7015 | </details> |
Igor Murashkin | 8aa2a11 | 2013-12-09 12:06:17 -0800 | [diff] [blame] | 7016 | </clone> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 7017 | </dynamic> |
| 7018 | </section> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7019 | <section name="sync"> |
| 7020 | <dynamic> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7021 | <entry name="frameNumber" type="int64" visibility="hidden" enum="true" |
| 7022 | hwlevel="legacy"> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7023 | <enum> |
| 7024 | <value id="-1">CONVERGING |
| 7025 | <notes> |
| 7026 | The current result is not yet fully synchronized to any request. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7027 | |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7028 | 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 Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7040 | 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 Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7045 | |
| 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 He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 7128 | <tag id="V1" /> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7129 | </entry> |
| 7130 | </dynamic> |
| 7131 | <static> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7132 | <entry name="maxLatency" type="int32" visibility="public" enum="true" |
| 7133 | hwlevel="legacy"> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7134 | <enum> |
| 7135 | <value id="0">PER_FRAME_CONTROL |
| 7136 | <notes> |
| 7137 | Every frame has the requests immediately applied. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7138 | |
| 7139 | Furthermore for all results, |
Igor Murashkin | 757ec24 | 2014-07-25 16:55:18 -0700 | [diff] [blame] | 7140 | `android.sync.frameNumber == CaptureResult#getFrameNumber()` |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7141 | |
| 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 Murashkin | 757ec24 | 2014-07-25 16:55:18 -0700 | [diff] [blame] | 7157 | |
| 7158 | All LEGACY capability devices will have this as their maxLatency. |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7159 | </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 Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7168 | <units>Frame counts</units> |
| 7169 | <range>A positive value, PER_FRAME_CONTROL, or UNKNOWN.</range> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7170 | <details> |
| 7171 | This defines the maximum distance (in number of metadata results), |
| 7172 | between android.sync.frameNumber and the equivalent |
Igor Murashkin | 757ec24 | 2014-07-25 16:55:18 -0700 | [diff] [blame] | 7173 | frame number for that result. |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7174 | |
| 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 < 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 Murashkin | 757ec24 | 2014-07-25 16:55:18 -0700 | [diff] [blame] | 7204 | android.request.frameCount or `CaptureResult#getFrameNumber()`. |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7205 | |
| 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 He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 7210 | <tag id="V1" /> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 7211 | </entry> |
| 7212 | </static> |
| 7213 | </section> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7214 | </namespace> |
| 7215 | </metadata> |