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"> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 31 | Entry is only used by camera device legacy HAL 2.x |
Alex Ray | ef40ad6 | 2013-10-01 17:52:33 -0700 | [diff] [blame] | 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> |
Eino-Ville Talvala | a166f50 | 2015-02-23 15:51:58 -0800 | [diff] [blame] | 36 | <tag id="DEPTH"> |
| 37 | Entry is required for the depth capability. |
| 38 | </tag> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 39 | <tag id="REPROC"> |
Chien-Yu Chen | f8581f6 | 2015-05-12 15:13:00 -0700 | [diff] [blame] | 40 | Entry is required for the YUV or PRIVATE reprocessing capability. |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 41 | </tag> |
Shuzhen Wang | 0144f58 | 2017-11-30 12:03:37 -0800 | [diff] [blame] | 42 | <tag id="LOGICALCAMERA"> |
| 43 | Entry is required for logical multi-camera capability. |
| 44 | </tag> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 45 | <tag id="FUTURE"> |
| 46 | Entry is under-specified and is not required for now. This is for book-keeping purpose, |
| 47 | do not implement or use it, it may be revised for future. |
| 48 | </tag> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 49 | </tags> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 50 | |
| 51 | <types> |
Igor Murashkin | b0f18b4 | 2014-05-30 10:51:40 -0700 | [diff] [blame] | 52 | <typedef name="pairFloatFloat"> |
| 53 | <language name="java">android.util.Pair<Float,Float></language> |
| 54 | </typedef> |
Ruben Brunk | 804a052 | 2014-07-09 11:28:16 -0700 | [diff] [blame] | 55 | <typedef name="pairDoubleDouble"> |
| 56 | <language name="java">android.util.Pair<Double,Double></language> |
| 57 | </typedef> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 58 | <typedef name="rectangle"> |
| 59 | <language name="java">android.graphics.Rect</language> |
| 60 | </typedef> |
| 61 | <typedef name="size"> |
Igor Murashkin | efff0de | 2014-05-14 17:30:49 -0700 | [diff] [blame] | 62 | <language name="java">android.util.Size</language> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 63 | </typedef> |
| 64 | <typedef name="string"> |
| 65 | <language name="java">String</language> |
| 66 | </typedef> |
| 67 | <typedef name="boolean"> |
| 68 | <language name="java">boolean</language> |
| 69 | </typedef> |
Eino-Ville Talvala | d4e240a | 2013-08-08 12:56:37 -0700 | [diff] [blame] | 70 | <typedef name="imageFormat"> |
| 71 | <language name="java">int</language> |
| 72 | </typedef> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 73 | <typedef name="streamConfigurationMap"> |
| 74 | <language name="java">android.hardware.camera2.params.StreamConfigurationMap</language> |
| 75 | </typedef> |
| 76 | <typedef name="streamConfiguration"> |
| 77 | <language name="java">android.hardware.camera2.params.StreamConfiguration</language> |
| 78 | </typedef> |
| 79 | <typedef name="streamConfigurationDuration"> |
| 80 | <language name="java">android.hardware.camera2.params.StreamConfigurationDuration</language> |
| 81 | </typedef> |
Igor Murashkin | efff0de | 2014-05-14 17:30:49 -0700 | [diff] [blame] | 82 | <typedef name="face"> |
| 83 | <language name="java">android.hardware.camera2.params.Face</language> |
| 84 | </typedef> |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 85 | <typedef name="meteringRectangle"> |
| 86 | <language name="java">android.hardware.camera2.params.MeteringRectangle</language> |
| 87 | </typedef> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 88 | <typedef name="rangeFloat"> |
| 89 | <language name="java">android.util.Range<Float></language> |
| 90 | </typedef> |
| 91 | <typedef name="rangeInt"> |
| 92 | <language name="java">android.util.Range<Integer></language> |
| 93 | </typedef> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 94 | <typedef name="rangeLong"> |
| 95 | <language name="java">android.util.Range<Long></language> |
| 96 | </typedef> |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 97 | <typedef name="colorSpaceTransform"> |
| 98 | <language name="java">android.hardware.camera2.params.ColorSpaceTransform</language> |
| 99 | </typedef> |
| 100 | <typedef name="rggbChannelVector"> |
| 101 | <language name="java">android.hardware.camera2.params.RggbChannelVector</language> |
| 102 | </typedef> |
Ruben Brunk | cc09de1 | 2014-06-05 13:20:47 -0700 | [diff] [blame] | 103 | <typedef name="blackLevelPattern"> |
| 104 | <language name="java">android.hardware.camera2.params.BlackLevelPattern</language> |
| 105 | </typedef> |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 106 | <typedef name="enumList"> |
| 107 | <language name="java">int</language> |
| 108 | </typedef> |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 109 | <typedef name="sizeF"> |
| 110 | <language name="java">android.util.SizeF</language> |
| 111 | </typedef> |
| 112 | <typedef name="point"> |
| 113 | <language name="java">android.graphics.Point</language> |
| 114 | </typedef> |
| 115 | <typedef name="tonemapCurve"> |
| 116 | <language name="java">android.hardware.camera2.params.TonemapCurve</language> |
| 117 | </typedef> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 118 | <typedef name="lensShadingMap"> |
| 119 | <language name="java">android.hardware.camera2.params.LensShadingMap</language> |
| 120 | </typedef> |
| 121 | <typedef name="location"> |
| 122 | <language name="java">android.location.Location</language> |
| 123 | </typedef> |
Yin-Chia Yeh | 35bdd4b | 2014-07-15 10:42:05 -0700 | [diff] [blame] | 124 | <typedef name="highSpeedVideoConfiguration"> |
| 125 | <language name="java">android.hardware.camera2.params.HighSpeedVideoConfiguration</language> |
| 126 | </typedef> |
Chien-Yu Chen | 9e48beb | 2015-03-18 18:33:17 -0700 | [diff] [blame] | 127 | <typedef name="reprocessFormatsMap"> |
| 128 | <language name="java">android.hardware.camera2.params.ReprocessFormatsMap</language> |
| 129 | </typedef> |
Chien-Yu Chen | a5cfee9 | 2018-02-15 12:34:30 -0800 | [diff] [blame^] | 130 | <typedef name="oisSample"> |
| 131 | <language name="java">android.hardware.camera2.params.OisSample</language> |
| 132 | </typedef> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 133 | </types> |
| 134 | |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 135 | <namespace name="android"> |
| 136 | <section name="colorCorrection"> |
| 137 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 138 | <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 139 | <enum> |
| 140 | <value>TRANSFORM_MATRIX |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 141 | <notes>Use the android.colorCorrection.transform matrix |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 142 | and android.colorCorrection.gains to do color conversion. |
| 143 | |
| 144 | All advanced white balance adjustments (not specified |
| 145 | by our white balance pipeline) must be disabled. |
| 146 | |
| 147 | If AWB is enabled with `android.control.awbMode != OFF`, then |
| 148 | TRANSFORM_MATRIX is ignored. The camera device will override |
| 149 | this value to either FAST or HIGH_QUALITY. |
| 150 | </notes> |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 151 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 152 | <value>FAST |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 153 | <notes>Color correction processing must not slow down |
| 154 | capture rate relative to sensor raw output. |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 155 | |
| 156 | Advanced white balance adjustments above and beyond |
| 157 | the specified white balance pipeline may be applied. |
| 158 | |
| 159 | If AWB is enabled with `android.control.awbMode != OFF`, then |
| 160 | the camera device uses the last frame's AWB values |
| 161 | (or defaults if AWB has never been run). |
| 162 | </notes> |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 163 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 164 | <value>HIGH_QUALITY |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 165 | <notes>Color correction processing operates at improved |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 166 | quality but the capture rate might be reduced (relative to sensor |
| 167 | raw output rate) |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 168 | |
| 169 | Advanced white balance adjustments above and beyond |
| 170 | the specified white balance pipeline may be applied. |
| 171 | |
| 172 | If AWB is enabled with `android.control.awbMode != OFF`, then |
| 173 | the camera device uses the last frame's AWB values |
| 174 | (or defaults if AWB has never been run). |
| 175 | </notes> |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 176 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 177 | </enum> |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 178 | |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 179 | <description> |
| 180 | The mode control selects how the image data is converted from the |
| 181 | sensor's native color into linear sRGB color. |
| 182 | </description> |
| 183 | <details> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 184 | When auto-white balance (AWB) is enabled with android.control.awbMode, this |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 185 | control is overridden by the AWB routine. When AWB is disabled, the |
| 186 | application controls how the color mapping is performed. |
| 187 | |
| 188 | We define the expected processing pipeline below. For consistency |
| 189 | across devices, this is always the case with TRANSFORM_MATRIX. |
| 190 | |
| 191 | When either FULL or HIGH_QUALITY is used, the camera device may |
| 192 | do additional processing but android.colorCorrection.gains and |
| 193 | android.colorCorrection.transform will still be provided by the |
| 194 | camera device (in the results) and be roughly correct. |
| 195 | |
| 196 | Switching to TRANSFORM_MATRIX and using the data provided from |
| 197 | FAST or HIGH_QUALITY will yield a picture with the same white point |
| 198 | as what was produced by the camera device in the earlier frame. |
| 199 | |
| 200 | The expected processing pipeline is as follows: |
| 201 | |
| 202 | ![White balance processing pipeline](android.colorCorrection.mode/processing_pipeline.png) |
| 203 | |
| 204 | The white balance is encoded by two values, a 4-channel white-balance |
| 205 | gain vector (applied in the Bayer domain), and a 3x3 color transform |
| 206 | matrix (applied after demosaic). |
| 207 | |
| 208 | The 4-channel white-balance gains are defined as: |
| 209 | |
| 210 | android.colorCorrection.gains = [ R G_even G_odd B ] |
| 211 | |
| 212 | where `G_even` is the gain for green pixels on even rows of the |
| 213 | output, and `G_odd` is the gain for green pixels on the odd rows. |
| 214 | These may be identical for a given camera device implementation; if |
| 215 | the camera device does not support a separate gain for even/odd green |
| 216 | channels, it will use the `G_even` value, and write `G_odd` equal to |
| 217 | `G_even` in the output result metadata. |
| 218 | |
| 219 | The matrices for color transforms are defined as a 9-entry vector: |
| 220 | |
| 221 | android.colorCorrection.transform = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ] |
| 222 | |
| 223 | which define a transform from input sensor colors, `P_in = [ r g b ]`, |
| 224 | to output linear sRGB, `P_out = [ r' g' b' ]`, |
| 225 | |
| 226 | with colors as follows: |
| 227 | |
| 228 | r' = I0r + I1g + I2b |
| 229 | g' = I3r + I4g + I5b |
| 230 | b' = I6r + I7g + I8b |
| 231 | |
| 232 | Both the input and output value ranges must match. Overflow/underflow |
| 233 | values are clipped to fit within the range. |
| 234 | </details> |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 235 | <hal_details> |
| 236 | HAL must support both FAST and HIGH_QUALITY if color correction control is available |
| 237 | on the camera device, but the underlying implementation can be the same for both modes. |
| 238 | That is, if the highest quality implementation on the camera device does not slow down |
| 239 | capture rate, then FAST and HIGH_QUALITY should generate the same output. |
| 240 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 241 | </entry> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 242 | <entry name="transform" type="rational" visibility="public" |
| 243 | type_notes="3x3 rational matrix in row-major order" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 244 | container="array" typedef="colorSpaceTransform" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 245 | <array> |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 246 | <size>3</size> |
| 247 | <size>3</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 248 | </array> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 249 | <description>A color transform matrix to use to transform |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 250 | from sensor RGB color space to output linear sRGB color space. |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 251 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 252 | <units>Unitless scale factors</units> |
Zhijun He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 253 | <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] | 254 | android.colorCorrection.mode is not TRANSFORM_MATRIX, or |
| 255 | directly by the application in the request when the |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 256 | android.colorCorrection.mode is TRANSFORM_MATRIX. |
| 257 | |
Zhijun He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 258 | In the latter case, the camera device may round the matrix to account |
| 259 | for precision issues; the final rounded matrix should be reported back |
| 260 | in this matrix result metadata. The transform should keep the magnitude |
| 261 | of the output color values within `[0, 1.0]` (assuming input color |
| 262 | values is within the normalized range `[0, 1.0]`), or clipping may occur. |
Yin-Chia Yeh | c4d5f37 | 2015-01-28 13:18:31 -0800 | [diff] [blame] | 263 | |
| 264 | The valid range of each matrix element varies on different devices, but |
| 265 | values within [-1.5, 3.0] are guaranteed not to be clipped. |
Zhijun He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 266 | </details> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 267 | </entry> |
| 268 | <entry name="gains" type="float" visibility="public" |
| 269 | type_notes="A 1D array of floats for 4 color channel gains" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 270 | container="array" typedef="rggbChannelVector" hwlevel="full"> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 271 | <array> |
| 272 | <size>4</size> |
| 273 | </array> |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 274 | <description>Gains applying to Bayer raw color channels for |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 275 | white-balance.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 276 | <units>Unitless gain factors</units> |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 277 | <details> |
| 278 | These per-channel gains are either set by the camera device |
| 279 | when the request android.colorCorrection.mode is not |
| 280 | TRANSFORM_MATRIX, or directly by the application in the |
| 281 | request when the android.colorCorrection.mode is |
| 282 | TRANSFORM_MATRIX. |
| 283 | |
| 284 | The gains in the result metadata are the gains actually |
| 285 | applied by the camera device to the current frame. |
Yin-Chia Yeh | c4d5f37 | 2015-01-28 13:18:31 -0800 | [diff] [blame] | 286 | |
| 287 | The valid range of gains varies on different devices, but gains |
| 288 | between [1.0, 3.0] are guaranteed not to be clipped. Even if a given |
| 289 | device allows gains below 1.0, this is usually not recommended because |
| 290 | this can create color artifacts. |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 291 | </details> |
| 292 | <hal_details> |
| 293 | The 4-channel white-balance gains are defined in |
Igor Murashkin | 43817ad | 2014-01-10 15:58:35 -0800 | [diff] [blame] | 294 | the order of `[R G_even G_odd B]`, where `G_even` is the gain |
| 295 | 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] | 296 | is the gain for green pixels on the odd rows. |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 297 | |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 298 | If a HAL does not support a separate gain for even/odd green |
| 299 | channels, it must use the `G_even` value, and write |
| 300 | `G_odd` equal to `G_even` in the output result metadata. |
| 301 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 302 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 303 | <entry name="aberrationMode" type="byte" visibility="public" enum="true" hwlevel="legacy"> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 304 | <enum> |
| 305 | <value>OFF |
| 306 | <notes> |
| 307 | No aberration correction is applied. |
| 308 | </notes> |
| 309 | </value> |
| 310 | <value>FAST |
| 311 | <notes> |
| 312 | Aberration correction will not slow down capture rate |
| 313 | relative to sensor raw output. |
| 314 | </notes> |
| 315 | </value> |
| 316 | <value>HIGH_QUALITY |
| 317 | <notes> |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 318 | Aberration correction operates at improved quality but the capture rate might be |
| 319 | reduced (relative to sensor raw output rate) |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 320 | </notes> |
| 321 | </value> |
| 322 | </enum> |
| 323 | <description> |
| 324 | Mode of operation for the chromatic aberration correction algorithm. |
| 325 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 326 | <range>android.colorCorrection.availableAberrationModes</range> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 327 | <details> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 328 | Chromatic (color) aberration is caused by the fact that different wavelengths of light |
| 329 | can not focus on the same point after exiting from the lens. This metadata defines |
| 330 | the high level control of chromatic aberration correction algorithm, which aims to |
| 331 | minimize the chromatic artifacts that may occur along the object boundaries in an |
| 332 | image. |
| 333 | |
| 334 | FAST/HIGH_QUALITY both mean that camera device determined aberration |
| 335 | correction will be applied. HIGH_QUALITY mode indicates that the camera device will |
| 336 | use the highest-quality aberration correction algorithms, even if it slows down |
| 337 | capture rate. FAST means the camera device will not slow down capture rate when |
| 338 | applying aberration correction. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 339 | |
| 340 | LEGACY devices will always be in FAST mode. |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 341 | </details> |
| 342 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 343 | </controls> |
| 344 | <dynamic> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 345 | <clone entry="android.colorCorrection.mode" kind="controls"> |
| 346 | </clone> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 347 | <clone entry="android.colorCorrection.transform" kind="controls"> |
| 348 | </clone> |
| 349 | <clone entry="android.colorCorrection.gains" kind="controls"> |
| 350 | </clone> |
Zhijun He | 3377641 | 2014-08-18 10:55:33 -0700 | [diff] [blame] | 351 | <clone entry="android.colorCorrection.aberrationMode" kind="controls"> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 352 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 353 | </dynamic> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 354 | <static> |
Zhijun He | 3377641 | 2014-08-18 10:55:33 -0700 | [diff] [blame] | 355 | <entry name="availableAberrationModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 356 | type_notes="list of enums" container="array" typedef="enumList" hwlevel="legacy"> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 357 | <array> |
| 358 | <size>n</size> |
| 359 | </array> |
| 360 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 361 | List of aberration correction modes for android.colorCorrection.aberrationMode that are |
| 362 | supported by this camera device. |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 363 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 364 | <range>Any value listed in android.colorCorrection.aberrationMode</range> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 365 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 366 | This key lists the valid modes for android.colorCorrection.aberrationMode. If no |
| 367 | aberration correction modes are available for a device, this list will solely include |
Yin-Chia Yeh | aed8cea | 2015-01-06 10:30:16 -0800 | [diff] [blame] | 368 | OFF mode. All camera devices will support either OFF or FAST mode. |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 369 | |
Yin-Chia Yeh | aed8cea | 2015-01-06 10:30:16 -0800 | [diff] [blame] | 370 | Camera devices that support the MANUAL_POST_PROCESSING capability will always list |
| 371 | OFF mode. This includes all FULL level devices. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 372 | |
| 373 | LEGACY devices will always only support FAST mode. |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 374 | </details> |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 375 | <hal_details> |
| 376 | HAL must support both FAST and HIGH_QUALITY if chromatic aberration control is available |
| 377 | on the camera device, but the underlying implementation can be the same for both modes. |
| 378 | That is, if the highest quality implementation on the camera device does not slow down |
| 379 | capture rate, then FAST and HIGH_QUALITY will generate the same output. |
| 380 | </hal_details> |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 381 | <tag id="V1" /> |
| 382 | </entry> |
| 383 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 384 | </section> |
| 385 | <section name="control"> |
| 386 | <controls> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 387 | <entry name="aeAntibandingMode" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 388 | enum="true" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 389 | <enum> |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 390 | <value>OFF |
| 391 | <notes> |
| 392 | The camera device will not adjust exposure duration to |
| 393 | avoid banding problems. |
| 394 | </notes> |
| 395 | </value> |
| 396 | <value>50HZ |
| 397 | <notes> |
| 398 | The camera device will adjust exposure duration to |
| 399 | avoid banding problems with 50Hz illumination sources. |
| 400 | </notes> |
| 401 | </value> |
| 402 | <value>60HZ |
| 403 | <notes> |
| 404 | The camera device will adjust exposure duration to |
| 405 | avoid banding problems with 60Hz illumination |
| 406 | sources. |
| 407 | </notes> |
| 408 | </value> |
| 409 | <value>AUTO |
| 410 | <notes> |
| 411 | The camera device will automatically adapt its |
| 412 | antibanding routine to the current illumination |
Yin-Chia Yeh | 9d1b452 | 2014-11-25 11:51:48 -0800 | [diff] [blame] | 413 | condition. This is the default mode if AUTO is |
| 414 | available on given camera device. |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 415 | </notes> |
| 416 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 417 | </enum> |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 418 | <description> |
| 419 | The desired setting for the camera device's auto-exposure |
| 420 | algorithm's antibanding compensation. |
| 421 | </description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 422 | <range> |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 423 | android.control.aeAvailableAntibandingModes |
| 424 | </range> |
| 425 | <details> |
| 426 | Some kinds of lighting fixtures, such as some fluorescent |
| 427 | lights, flicker at the rate of the power supply frequency |
| 428 | (60Hz or 50Hz, depending on country). While this is |
| 429 | typically not noticeable to a person, it can be visible to |
| 430 | a camera device. If a camera sets its exposure time to the |
| 431 | wrong value, the flicker may become visible in the |
| 432 | viewfinder as flicker or in a final captured image, as a |
| 433 | set of variable-brightness bands across the image. |
| 434 | |
| 435 | Therefore, the auto-exposure routines of camera devices |
| 436 | include antibanding routines that ensure that the chosen |
| 437 | exposure value will not cause such banding. The choice of |
| 438 | exposure time depends on the rate of flicker, which the |
| 439 | camera device can detect automatically, or the expected |
| 440 | rate can be selected by the application using this |
| 441 | control. |
| 442 | |
| 443 | A given camera device may not support all of the possible |
| 444 | options for the antibanding mode. The |
| 445 | android.control.aeAvailableAntibandingModes key contains |
| 446 | the available modes for a given camera device. |
| 447 | |
Yin-Chia Yeh | 9d1b452 | 2014-11-25 11:51:48 -0800 | [diff] [blame] | 448 | AUTO mode is the default if it is available on given |
| 449 | camera device. When AUTO mode is not available, the |
| 450 | default will be either 50HZ or 60HZ, and both 50HZ |
| 451 | and 60HZ will be available. |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 452 | |
| 453 | If manual exposure control is enabled (by setting |
| 454 | android.control.aeMode or android.control.mode to OFF), |
| 455 | then this setting has no effect, and the application must |
| 456 | ensure it selects exposure times that do not cause banding |
| 457 | issues. The android.statistics.sceneFlicker key can assist |
| 458 | the application in this. |
| 459 | </details> |
| 460 | <hal_details> |
| 461 | For all capture request templates, this field must be set |
Yin-Chia Yeh | 9d1b452 | 2014-11-25 11:51:48 -0800 | [diff] [blame] | 462 | to AUTO if AUTO mode is available. If AUTO is not available, |
| 463 | the default must be either 50HZ or 60HZ, and both 50HZ and |
| 464 | 60HZ must be available. |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 465 | |
| 466 | If manual exposure control is enabled (by setting |
| 467 | android.control.aeMode or android.control.mode to OFF), |
| 468 | then the exposure values provided by the application must not be |
| 469 | adjusted for antibanding. |
| 470 | </hal_details> |
| 471 | <tag id="BC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 472 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 473 | <entry name="aeExposureCompensation" type="int32" visibility="public" hwlevel="legacy"> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 474 | <description>Adjustment to auto-exposure (AE) target image |
| 475 | brightness.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 476 | <units>Compensation steps</units> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 477 | <range>android.control.aeCompensationRange</range> |
| 478 | <details> |
| 479 | The adjustment is measured as a count of steps, with the |
| 480 | step size defined by android.control.aeCompensationStep and the |
| 481 | allowed range by android.control.aeCompensationRange. |
| 482 | |
| 483 | For example, if the exposure value (EV) step is 0.333, '6' |
| 484 | will mean an exposure compensation of +2 EV; -3 will mean an |
| 485 | exposure compensation of -1 EV. One EV represents a doubling |
| 486 | of image brightness. Note that this control will only be |
| 487 | effective if android.control.aeMode `!=` OFF. This control |
| 488 | will take effect even when android.control.aeLock `== true`. |
Yin-Chia Yeh | 7754e6a | 2014-05-05 14:26:03 -0700 | [diff] [blame] | 489 | |
| 490 | In the event of exposure compensation value being changed, camera device |
| 491 | may take several frames to reach the newly requested exposure target. |
| 492 | During that time, android.control.aeState field will be in the SEARCHING |
| 493 | state. Once the new exposure target is reached, android.control.aeState will |
| 494 | change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or |
| 495 | FLASH_REQUIRED (if the scene is too dark for still capture). |
| 496 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 497 | <tag id="BC" /> |
| 498 | </entry> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 499 | <entry name="aeLock" type="byte" visibility="public" enum="true" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 500 | typedef="boolean" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 501 | <enum> |
Eino-Ville Talvala | 76548fe | 2013-01-11 13:57:19 -0800 | [diff] [blame] | 502 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 503 | <notes>Auto-exposure lock is disabled; the AE algorithm |
Eino-Ville Talvala | 76548fe | 2013-01-11 13:57:19 -0800 | [diff] [blame] | 504 | is free to update its parameters.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 505 | <value>ON |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 506 | <notes>Auto-exposure lock is enabled; the AE algorithm |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 507 | must not update the exposure and sensitivity parameters |
Yin-Chia Yeh | 7754e6a | 2014-05-05 14:26:03 -0700 | [diff] [blame] | 508 | while the lock is active. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 509 | |
Yin-Chia Yeh | 7754e6a | 2014-05-05 14:26:03 -0700 | [diff] [blame] | 510 | android.control.aeExposureCompensation setting changes |
| 511 | will still take effect while auto-exposure is locked. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 512 | |
| 513 | Some rare LEGACY devices may not support |
| 514 | 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] | 515 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 516 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 517 | <description>Whether auto-exposure (AE) is currently locked to its latest |
Zhijun He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 518 | calculated values.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 519 | <details> |
| 520 | When set to `true` (ON), the AE algorithm is locked to its latest parameters, |
| 521 | and will not change exposure settings until the lock is set to `false` (OFF). |
| 522 | |
| 523 | Note that even when AE is locked, the flash may be fired if |
| 524 | the android.control.aeMode is ON_AUTO_FLASH / |
| 525 | ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE. |
Zhijun He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 526 | |
Yin-Chia Yeh | 7754e6a | 2014-05-05 14:26:03 -0700 | [diff] [blame] | 527 | When android.control.aeExposureCompensation is changed, even if the AE lock |
| 528 | is ON, the camera device will still adjust its exposure value. |
| 529 | |
Zhijun He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 530 | If AE precapture is triggered (see android.control.aePrecaptureTrigger) |
| 531 | when AE is already locked, the camera device will not change the exposure time |
| 532 | (android.sensor.exposureTime) and sensitivity (android.sensor.sensitivity) |
| 533 | parameters. The flash may be fired if the android.control.aeMode |
| 534 | is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the |
| 535 | android.control.aeMode is ON_ALWAYS_FLASH, the scene may become overexposed. |
Zhijun He | e7cd556 | 2015-02-05 14:32:57 -0800 | [diff] [blame] | 536 | Similarly, AE precapture trigger CANCEL has no effect when AE is already locked. |
| 537 | |
| 538 | When an AE precapture sequence is triggered, AE unlock will not be able to unlock |
| 539 | the AE if AE is locked by the camera device internally during precapture metering |
| 540 | sequence In other words, submitting requests with AE unlock has no effect for an |
| 541 | ongoing precapture metering sequence. Otherwise, the precapture metering sequence |
| 542 | will never succeed in a sequence of preview requests where AE lock is always set |
| 543 | to `false`. |
Zhijun He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 544 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 545 | Since the camera device has a pipeline of in-flight requests, the settings that |
| 546 | get locked do not necessarily correspond to the settings that were present in the |
| 547 | latest capture result received from the camera device, since additional captures |
| 548 | and AE updates may have occurred even before the result was sent out. If an |
| 549 | application is switching between automatic and manual control and wishes to eliminate |
| 550 | any flicker during the switch, the following procedure is recommended: |
| 551 | |
| 552 | 1. Starting in auto-AE mode: |
| 553 | 2. Lock AE |
| 554 | 3. Wait for the first result to be output that has the AE locked |
| 555 | 4. Copy exposure settings from that result into a request, set the request to manual AE |
| 556 | 5. Submit the capture request, proceed to run manual AE as desired. |
| 557 | |
Zhijun He | 44d0b3d | 2014-02-04 16:42:46 -0800 | [diff] [blame] | 558 | See android.control.aeState for AE lock related state transition details. |
| 559 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 560 | <tag id="BC" /> |
| 561 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 562 | <entry name="aeMode" type="byte" visibility="public" enum="true" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 563 | <enum> |
| 564 | <value>OFF |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 565 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 566 | The camera device's autoexposure routine is disabled. |
| 567 | |
| 568 | The application-selected android.sensor.exposureTime, |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 569 | android.sensor.sensitivity and |
| 570 | android.sensor.frameDuration are used by the camera |
| 571 | device, along with android.flash.* fields, if there's |
| 572 | a flash unit for this camera device. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 573 | |
Yin-Chia Yeh | 668e43c | 2014-11-12 11:38:10 -0800 | [diff] [blame] | 574 | Note that auto-white balance (AWB) and auto-focus (AF) |
| 575 | behavior is device dependent when AE is in OFF mode. |
| 576 | To have consistent behavior across different devices, |
| 577 | it is recommended to either set AWB and AF to OFF mode |
| 578 | or lock AWB and AF before setting AE to OFF. |
| 579 | See android.control.awbMode, android.control.afMode, |
| 580 | android.control.awbLock, and android.control.afTrigger |
| 581 | for more details. |
| 582 | |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 583 | LEGACY devices do not support the OFF mode and will |
| 584 | override attempts to use this value to ON. |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 585 | </notes> |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 586 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 587 | <value>ON |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 588 | <notes> |
| 589 | The camera device's autoexposure routine is active, |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 590 | with no flash control. |
| 591 | |
| 592 | The application's values for |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 593 | android.sensor.exposureTime, |
| 594 | android.sensor.sensitivity, and |
| 595 | android.sensor.frameDuration are ignored. The |
| 596 | application has control over the various |
| 597 | android.flash.* fields. |
| 598 | </notes> |
Igor Murashkin | 6ad61d4 | 2012-11-21 09:44:05 -0800 | [diff] [blame] | 599 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 600 | <value>ON_AUTO_FLASH |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 601 | <notes> |
| 602 | Like ON, except that the camera device also controls |
| 603 | the camera's flash unit, firing it in low-light |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 604 | conditions. |
| 605 | |
| 606 | The flash may be fired during a precapture sequence |
| 607 | (triggered by android.control.aePrecaptureTrigger) and |
| 608 | may be fired for captures for which the |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 609 | android.control.captureIntent field is set to |
| 610 | STILL_CAPTURE |
| 611 | </notes> |
| 612 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 613 | <value>ON_ALWAYS_FLASH |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 614 | <notes> |
| 615 | Like ON, except that the camera device also controls |
| 616 | the camera's flash unit, always firing it for still |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 617 | captures. |
| 618 | |
| 619 | The flash may be fired during a precapture sequence |
| 620 | (triggered by android.control.aePrecaptureTrigger) and |
| 621 | will always be fired for captures for which the |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 622 | android.control.captureIntent field is set to |
| 623 | STILL_CAPTURE |
| 624 | </notes> |
| 625 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 626 | <value>ON_AUTO_FLASH_REDEYE |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 627 | <notes> |
| 628 | Like ON_AUTO_FLASH, but with automatic red eye |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 629 | reduction. |
| 630 | |
| 631 | If deemed necessary by the camera device, a red eye |
| 632 | reduction flash will fire during the precapture |
| 633 | sequence. |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 634 | </notes> |
| 635 | </value> |
Chien-Yu Chen | 11f62a5 | 2018-01-11 11:32:52 -0800 | [diff] [blame] | 636 | <value hal_version="3.3">ON_EXTERNAL_FLASH |
| 637 | <notes> |
| 638 | An external flash has been turned on. |
| 639 | |
| 640 | It informs the camera device that an external flash has been turned on, and that |
| 641 | metering (and continuous focus if active) should be quickly recaculated to account |
| 642 | for the external flash. Otherwise, this mode acts like ON. |
| 643 | |
| 644 | When the external flash is turned off, AE mode should be changed to one of the |
| 645 | other available AE modes. |
| 646 | |
| 647 | If the camera device supports AE external flash mode, aeState must be |
| 648 | FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without |
| 649 | flash. |
| 650 | </notes> |
| 651 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 652 | </enum> |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 653 | <description>The desired mode for the camera device's |
| 654 | auto-exposure routine.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 655 | <range>android.control.aeAvailableModes</range> |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 656 | <details> |
| 657 | This control is only effective if android.control.mode is |
| 658 | AUTO. |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 659 | |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 660 | When set to any of the ON modes, the camera device's |
| 661 | auto-exposure routine is enabled, overriding the |
| 662 | application's selected exposure time, sensor sensitivity, |
| 663 | and frame duration (android.sensor.exposureTime, |
| 664 | android.sensor.sensitivity, and |
| 665 | android.sensor.frameDuration). If one of the FLASH modes |
| 666 | is selected, the camera device's flash unit controls are |
| 667 | also overridden. |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 668 | |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 669 | The FLASH modes are only available if the camera device |
| 670 | has a flash unit (android.flash.info.available is `true`). |
| 671 | |
| 672 | If flash TORCH mode is desired, this field must be set to |
| 673 | ON or OFF, and android.flash.mode set to TORCH. |
| 674 | |
| 675 | When set to any of the ON modes, the values chosen by the |
| 676 | camera device auto-exposure routine for the overridden |
| 677 | fields for a given capture will be available in its |
| 678 | CaptureResult. |
| 679 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 680 | <tag id="BC" /> |
| 681 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 682 | <entry name="aeRegions" type="int32" visibility="public" |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 683 | optional="true" container="array" typedef="meteringRectangle"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 684 | <array> |
Igor Murashkin | 617da16 | 2012-11-29 13:35:15 -0800 | [diff] [blame] | 685 | <size>5</size> |
| 686 | <size>area_count</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 687 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 688 | <description>List of metering areas to use for auto-exposure adjustment.</description> |
| 689 | <units>Pixel coordinates within android.sensor.info.activeArraySize</units> |
| 690 | <range>Coordinates must be between `[(0,0), (width, height))` of |
| 691 | android.sensor.info.activeArraySize</range> |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 692 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 693 | Not available if android.control.maxRegionsAe is 0. |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 694 | Otherwise will always be present. |
| 695 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 696 | The maximum number of regions supported by the device is determined by the value |
| 697 | of android.control.maxRegionsAe. |
| 698 | |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 699 | The coordinate system is based on the active pixel array, |
| 700 | with (0,0) being the top-left pixel in the active pixel array, and |
| 701 | (android.sensor.info.activeArraySize.width - 1, |
| 702 | android.sensor.info.activeArraySize.height - 1) being the |
Yin-Chia Yeh | dc18257 | 2014-05-14 14:05:20 -0700 | [diff] [blame] | 703 | bottom-right pixel in the active pixel array. |
| 704 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 705 | The weight must be within `[0, 1000]`, and represents a weight |
Yin-Chia Yeh | dc18257 | 2014-05-14 14:05:20 -0700 | [diff] [blame] | 706 | for every pixel in the area. This means that a large metering area |
| 707 | with the same weight as a smaller area will have more effect in |
| 708 | the metering result. Metering areas can partially overlap and the |
| 709 | camera device will add the weights in the overlap region. |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 710 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 711 | The weights are relative to weights of other exposure metering regions, so if only one |
| 712 | region is used, all non-zero weights will have the same effect. A region with 0 |
| 713 | weight is ignored. |
| 714 | |
| 715 | If all regions have 0 weight, then no specific metering area needs to be used by the |
| 716 | camera device. |
| 717 | |
| 718 | If the metering region is outside the used android.scaler.cropRegion returned in |
| 719 | capture result metadata, the camera device will ignore the sections outside the crop |
| 720 | region and output only the intersection rectangle as the metering region in the result |
| 721 | metadata. If the region is entirely outside the crop region, it will be ignored and |
| 722 | not reported in the result metadata. |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 723 | </details> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 724 | <ndk_details> |
| 725 | The data representation is `int[5 * area_count]`. |
| 726 | Every five elements represent a metering region of `(xmin, ymin, xmax, ymax, weight)`. |
| 727 | The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and |
| 728 | ymax. |
| 729 | </ndk_details> |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 730 | <hal_details> |
| 731 | The HAL level representation of MeteringRectangle[] is a |
| 732 | int[5 * area_count]. |
| 733 | Every five elements represent a metering region of |
| 734 | (xmin, ymin, xmax, ymax, weight). |
| 735 | The rectangle is defined to be inclusive on xmin and ymin, but |
| 736 | exclusive on xmax and ymax. |
| 737 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 738 | <tag id="BC" /> |
| 739 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 740 | <entry name="aeTargetFpsRange" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 741 | container="array" typedef="rangeInt" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 742 | <array> |
| 743 | <size>2</size> |
| 744 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 745 | <description>Range over which the auto-exposure routine can |
| 746 | adjust the capture frame rate to maintain good |
| 747 | exposure.</description> |
| 748 | <units>Frames per second (FPS)</units> |
| 749 | <range>Any of the entries in android.control.aeAvailableTargetFpsRanges</range> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 750 | <details>Only constrains auto-exposure (AE) algorithm, not |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 751 | manual control of android.sensor.exposureTime and |
| 752 | android.sensor.frameDuration.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 753 | <tag id="BC" /> |
| 754 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 755 | <entry name="aePrecaptureTrigger" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 756 | enum="true" hwlevel="limited"> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 757 | <enum> |
| 758 | <value>IDLE |
| 759 | <notes>The trigger is idle.</notes> |
| 760 | </value> |
| 761 | <value>START |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 762 | <notes>The precapture metering sequence will be started |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 763 | by the camera device. |
| 764 | |
| 765 | The exact effect of the precapture trigger depends on |
| 766 | the current AE mode and state.</notes> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 767 | </value> |
Zhijun He | e7cd556 | 2015-02-05 14:32:57 -0800 | [diff] [blame] | 768 | <value>CANCEL |
| 769 | <notes>The camera device will cancel any currently active or completed |
| 770 | precapture metering sequence, the auto-exposure routine will return to its |
| 771 | initial state.</notes> |
| 772 | </value> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 773 | </enum> |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 774 | <description>Whether the camera device will trigger a precapture |
| 775 | metering sequence when it processes this request.</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 776 | <details>This entry is normally set to IDLE, or is not |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 777 | included at all in the request settings. When included and |
Zhijun He | cad6619 | 2015-02-06 13:42:40 -0800 | [diff] [blame] | 778 | set to START, the camera device will trigger the auto-exposure (AE) |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 779 | precapture metering sequence. |
| 780 | |
Zhijun He | e7cd556 | 2015-02-05 14:32:57 -0800 | [diff] [blame] | 781 | When set to CANCEL, the camera device will cancel any active |
| 782 | precapture metering trigger, and return to its initial AE state. |
| 783 | If a precapture metering sequence is already completed, and the camera |
| 784 | device has implicitly locked the AE for subsequent still capture, the |
| 785 | CANCEL trigger will unlock the AE and return to its initial AE state. |
| 786 | |
Zhijun He | cad6619 | 2015-02-06 13:42:40 -0800 | [diff] [blame] | 787 | The precapture sequence should be triggered before starting a |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 788 | high-quality still capture for final metering decisions to |
| 789 | be made, and for firing pre-capture flash pulses to estimate |
| 790 | scene brightness and required final capture flash power, when |
| 791 | the flash is enabled. |
| 792 | |
| 793 | Normally, this entry should be set to START for only a |
| 794 | single request, and the application should wait until the |
| 795 | sequence completes before starting a new one. |
| 796 | |
Zhijun He | cad6619 | 2015-02-06 13:42:40 -0800 | [diff] [blame] | 797 | When a precapture metering sequence is finished, the camera device |
| 798 | may lock the auto-exposure routine internally to be able to accurately expose the |
| 799 | subsequent still capture image (`android.control.captureIntent == STILL_CAPTURE`). |
| 800 | For this case, the AE may not resume normal scan if no subsequent still capture is |
| 801 | submitted. To ensure that the AE routine restarts normal scan, the application should |
| 802 | submit a request with `android.control.aeLock == true`, followed by a request |
| 803 | with `android.control.aeLock == false`, if the application decides not to submit a |
Zhijun He | e7cd556 | 2015-02-05 14:32:57 -0800 | [diff] [blame] | 804 | still capture request after the precapture sequence completes. Alternatively, for |
| 805 | API level 23 or newer devices, the CANCEL can be used to unlock the camera device |
| 806 | internally locked AE if the application doesn't submit a still capture request after |
| 807 | the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not |
| 808 | be used in devices that have earlier API levels. |
Zhijun He | cad6619 | 2015-02-06 13:42:40 -0800 | [diff] [blame] | 809 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 810 | The exact effect of auto-exposure (AE) precapture trigger |
| 811 | depends on the current AE mode and state; see |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 812 | android.control.aeState for AE precapture state transition |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 813 | details. |
| 814 | |
| 815 | On LEGACY-level devices, the precapture trigger is not supported; |
| 816 | capturing a high-resolution JPEG image will automatically trigger a |
| 817 | precapture sequence before the high-resolution capture, including |
| 818 | potentially firing a pre-capture flash. |
Eino-Ville Talvala | 8565fea | 2015-06-24 15:17:09 -0700 | [diff] [blame] | 819 | |
| 820 | Using the precapture trigger and the auto-focus trigger android.control.afTrigger |
| 821 | simultaneously is allowed. However, since these triggers often require cooperation between |
| 822 | the auto-focus and auto-exposure routines (for example, the may need to be enabled for a |
| 823 | focus sweep), the camera device may delay acting on a later trigger until the previous |
| 824 | trigger has been fully handled. This may lead to longer intervals between the trigger and |
| 825 | changes to android.control.aeState indicating the start of the precapture sequence, for |
| 826 | example. |
| 827 | |
| 828 | If both the precapture and the auto-focus trigger are activated on the same request, then |
| 829 | the camera device will complete them in the optimal order for that device. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 830 | </details> |
Eino-Ville Talvala | 8565fea | 2015-06-24 15:17:09 -0700 | [diff] [blame] | 831 | <hal_details> |
| 832 | The HAL must support triggering the AE precapture trigger while an AF trigger is active |
| 833 | (and vice versa), or at the same time as the AF trigger. It is acceptable for the HAL to |
| 834 | treat these as two consecutive triggers, for example handling the AF trigger and then the |
| 835 | AE trigger. Or the HAL may choose to optimize the case with both triggers fired at once, |
| 836 | to minimize the latency for converging both focus and exposure/flash usage. |
| 837 | </hal_details> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 838 | <tag id="BC" /> |
| 839 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 840 | <entry name="afMode" type="byte" visibility="public" enum="true" |
| 841 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 842 | <enum> |
| 843 | <value>OFF |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 844 | <notes>The auto-focus routine does not control the lens; |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 845 | android.lens.focusDistance is controlled by the |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 846 | application.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 847 | <value>AUTO |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 848 | <notes>Basic automatic focus mode. |
| 849 | |
| 850 | In this mode, the lens does not move unless |
| 851 | the autofocus trigger action is called. When that trigger |
| 852 | is activated, AF will transition to ACTIVE_SCAN, then to |
| 853 | the outcome of the scan (FOCUSED or NOT_FOCUSED). |
| 854 | |
| 855 | Always supported if lens is not fixed focus. |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 856 | |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 857 | Use android.lens.info.minimumFocusDistance to determine if lens |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 858 | is fixed-focus. |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 859 | |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 860 | Triggering AF_CANCEL resets the lens position to default, |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 861 | and sets the AF state to INACTIVE.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 862 | <value>MACRO |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 863 | <notes>Close-up focusing mode. |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 864 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 865 | In this mode, the lens does not move unless the |
| 866 | autofocus trigger action is called. When that trigger is |
| 867 | activated, AF will transition to ACTIVE_SCAN, then to |
| 868 | the outcome of the scan (FOCUSED or NOT_FOCUSED). This |
| 869 | mode is optimized for focusing on objects very close to |
| 870 | the camera. |
| 871 | |
| 872 | When that trigger is activated, AF will transition to |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 873 | ACTIVE_SCAN, then to the outcome of the scan (FOCUSED or |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 874 | NOT_FOCUSED). Triggering cancel AF resets the lens |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 875 | position to default, and sets the AF state to |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 876 | INACTIVE.</notes></value> |
| 877 | <value>CONTINUOUS_VIDEO |
| 878 | <notes>In this mode, the AF algorithm modifies the lens |
| 879 | position continually to attempt to provide a |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 880 | constantly-in-focus image stream. |
| 881 | |
| 882 | The focusing behavior should be suitable for good quality |
| 883 | video recording; typically this means slower focus |
| 884 | movement and no overshoots. When the AF trigger is not |
| 885 | involved, the AF algorithm should start in INACTIVE state, |
| 886 | and then transition into PASSIVE_SCAN and PASSIVE_FOCUSED |
| 887 | states as appropriate. When the AF trigger is activated, |
| 888 | the algorithm should immediately transition into |
| 889 | AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the |
| 890 | lens position until a cancel AF trigger is received. |
| 891 | |
| 892 | Once cancel is received, the algorithm should transition |
| 893 | back to INACTIVE and resume passive scan. Note that this |
| 894 | behavior is not identical to CONTINUOUS_PICTURE, since an |
| 895 | ongoing PASSIVE_SCAN must immediately be |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 896 | canceled.</notes></value> |
| 897 | <value>CONTINUOUS_PICTURE |
| 898 | <notes>In this mode, the AF algorithm modifies the lens |
| 899 | position continually to attempt to provide a |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 900 | constantly-in-focus image stream. |
| 901 | |
| 902 | The focusing behavior should be suitable for still image |
| 903 | capture; typically this means focusing as fast as |
| 904 | possible. When the AF trigger is not involved, the AF |
| 905 | algorithm should start in INACTIVE state, and then |
| 906 | transition into PASSIVE_SCAN and PASSIVE_FOCUSED states as |
| 907 | appropriate as it attempts to maintain focus. When the AF |
| 908 | trigger is activated, the algorithm should finish its |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 909 | PASSIVE_SCAN if active, and then transition into |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 910 | AF_FOCUSED or AF_NOT_FOCUSED as appropriate, and lock the |
| 911 | lens position until a cancel AF trigger is received. |
| 912 | |
| 913 | When the AF cancel trigger is activated, the algorithm |
| 914 | should transition back to INACTIVE and then act as if it |
| 915 | has just been started.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 916 | <value>EDOF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 917 | <notes>Extended depth of field (digital focus) mode. |
| 918 | |
| 919 | The camera device will produce images with an extended |
| 920 | depth of field automatically; no special focusing |
| 921 | operations need to be done before taking a picture. |
| 922 | |
| 923 | AF triggers are ignored, and the AF state will always be |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 924 | INACTIVE.</notes></value> |
| 925 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 926 | <description>Whether auto-focus (AF) is currently enabled, and what |
| 927 | mode it is set to.</description> |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 928 | <range>android.control.afAvailableModes</range> |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 929 | <details>Only effective if android.control.mode = AUTO and the lens is not fixed focus |
Yin-Chia Yeh | 668e43c | 2014-11-12 11:38:10 -0800 | [diff] [blame] | 930 | (i.e. `android.lens.info.minimumFocusDistance > 0`). Also note that |
| 931 | when android.control.aeMode is OFF, the behavior of AF is device |
| 932 | dependent. It is recommended to lock AF by using android.control.afTrigger before |
| 933 | setting android.control.aeMode to OFF, or set AF mode to OFF when AE is OFF. |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 934 | |
Zhijun He | f163fa9 | 2014-01-14 09:59:04 -0800 | [diff] [blame] | 935 | If the lens is controlled by the camera device auto-focus algorithm, |
| 936 | the camera device will report the current AF status in android.control.afState |
| 937 | in result metadata.</details> |
Zhijun He | a19ede8 | 2014-05-27 15:06:42 -0700 | [diff] [blame] | 938 | <hal_details> |
| 939 | When afMode is AUTO or MACRO, the lens must not move until an AF trigger is sent in a |
| 940 | request (android.control.afTrigger `==` START). After an AF trigger, the afState will end |
| 941 | up with either FOCUSED_LOCKED or NOT_FOCUSED_LOCKED state (see |
| 942 | android.control.afState for detailed state transitions), which indicates that the lens is |
| 943 | locked and will not move. If camera movement (e.g. tilting camera) causes the lens to move |
| 944 | after the lens is locked, the HAL must compensate this movement appropriately such that |
| 945 | the same focal plane remains in focus. |
| 946 | |
| 947 | When afMode is one of the continuous auto focus modes, the HAL is free to start a AF |
| 948 | scan whenever it's not locked. When the lens is locked after an AF trigger |
| 949 | (see android.control.afState for detailed state transitions), the HAL should maintain the |
| 950 | same lock behavior as above. |
| 951 | |
| 952 | When afMode is OFF, the application controls focus manually. The accuracy of the |
| 953 | focus distance control depends on the android.lens.info.focusDistanceCalibration. |
| 954 | However, the lens must not move regardless of the camera movement for any focus distance |
| 955 | manual control. |
| 956 | |
| 957 | To put this in concrete terms, if the camera has lens elements which may move based on |
| 958 | camera orientation or motion (e.g. due to gravity), then the HAL must drive the lens to |
| 959 | remain in a fixed position invariant to the camera's orientation or motion, for example, |
| 960 | by using accelerometer measurements in the lens control logic. This is a typical issue |
| 961 | that will arise on camera modules with open-loop VCMs. |
| 962 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 963 | <tag id="BC" /> |
| 964 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 965 | <entry name="afRegions" type="int32" visibility="public" |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 966 | optional="true" container="array" typedef="meteringRectangle"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 967 | <array> |
Igor Murashkin | 617da16 | 2012-11-29 13:35:15 -0800 | [diff] [blame] | 968 | <size>5</size> |
| 969 | <size>area_count</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 970 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 971 | <description>List of metering areas to use for auto-focus.</description> |
| 972 | <units>Pixel coordinates within android.sensor.info.activeArraySize</units> |
| 973 | <range>Coordinates must be between `[(0,0), (width, height))` of |
| 974 | android.sensor.info.activeArraySize</range> |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 975 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 976 | Not available if android.control.maxRegionsAf is 0. |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 977 | Otherwise will always be present. |
| 978 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 979 | The maximum number of focus areas supported by the device is determined by the value |
| 980 | of android.control.maxRegionsAf. |
| 981 | |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 982 | The coordinate system is based on the active pixel array, |
| 983 | with (0,0) being the top-left pixel in the active pixel array, and |
| 984 | (android.sensor.info.activeArraySize.width - 1, |
| 985 | android.sensor.info.activeArraySize.height - 1) being the |
Yin-Chia Yeh | dc18257 | 2014-05-14 14:05:20 -0700 | [diff] [blame] | 986 | bottom-right pixel in the active pixel array. |
| 987 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 988 | The weight must be within `[0, 1000]`, and represents a weight |
Yin-Chia Yeh | dc18257 | 2014-05-14 14:05:20 -0700 | [diff] [blame] | 989 | for every pixel in the area. This means that a large metering area |
| 990 | with the same weight as a smaller area will have more effect in |
| 991 | the metering result. Metering areas can partially overlap and the |
| 992 | camera device will add the weights in the overlap region. |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 993 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 994 | The weights are relative to weights of other metering regions, so if only one region |
| 995 | is used, all non-zero weights will have the same effect. A region with 0 weight is |
| 996 | ignored. |
| 997 | |
| 998 | If all regions have 0 weight, then no specific metering area needs to be used by the |
| 999 | camera device. |
| 1000 | |
| 1001 | If the metering region is outside the used android.scaler.cropRegion returned in |
| 1002 | capture result metadata, the camera device will ignore the sections outside the crop |
| 1003 | region and output only the intersection rectangle as the metering region in the result |
| 1004 | metadata. If the region is entirely outside the crop region, it will be ignored and |
| 1005 | not reported in the result metadata. |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 1006 | </details> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 1007 | <ndk_details> |
| 1008 | The data representation is `int[5 * area_count]`. |
| 1009 | Every five elements represent a metering region of `(xmin, ymin, xmax, ymax, weight)`. |
| 1010 | The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and |
| 1011 | ymax. |
| 1012 | </ndk_details> |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 1013 | <hal_details> |
| 1014 | The HAL level representation of MeteringRectangle[] is a |
| 1015 | int[5 * area_count]. |
| 1016 | Every five elements represent a metering region of |
| 1017 | (xmin, ymin, xmax, ymax, weight). |
| 1018 | The rectangle is defined to be inclusive on xmin and ymin, but |
| 1019 | exclusive on xmax and ymax. |
| 1020 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1021 | <tag id="BC" /> |
| 1022 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1023 | <entry name="afTrigger" type="byte" visibility="public" enum="true" |
| 1024 | hwlevel="legacy"> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 1025 | <enum> |
| 1026 | <value>IDLE |
| 1027 | <notes>The trigger is idle.</notes> |
| 1028 | </value> |
| 1029 | <value>START |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 1030 | <notes>Autofocus will trigger now.</notes> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 1031 | </value> |
| 1032 | <value>CANCEL |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 1033 | <notes>Autofocus will return to its initial |
| 1034 | state, and cancel any currently active trigger.</notes> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 1035 | </value> |
| 1036 | </enum> |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 1037 | <description> |
| 1038 | Whether the camera device will trigger autofocus for this request. |
| 1039 | </description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 1040 | <details>This entry is normally set to IDLE, or is not |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 1041 | included at all in the request settings. |
| 1042 | |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 1043 | When included and set to START, the camera device will trigger the |
| 1044 | autofocus algorithm. If autofocus is disabled, this trigger has no effect. |
| 1045 | |
| 1046 | When set to CANCEL, the camera device will cancel any active trigger, |
| 1047 | and return to its initial AF state. |
| 1048 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1049 | Generally, applications should set this entry to START or CANCEL for only a |
| 1050 | single capture, and then return it to IDLE (or not set at all). Specifying |
| 1051 | START for multiple captures in a row means restarting the AF operation over |
| 1052 | and over again. |
| 1053 | |
| 1054 | See android.control.afState for what the trigger means for each AF mode. |
Eino-Ville Talvala | 8565fea | 2015-06-24 15:17:09 -0700 | [diff] [blame] | 1055 | |
| 1056 | Using the autofocus trigger and the precapture trigger android.control.aePrecaptureTrigger |
| 1057 | simultaneously is allowed. However, since these triggers often require cooperation between |
| 1058 | the auto-focus and auto-exposure routines (for example, the may need to be enabled for a |
| 1059 | focus sweep), the camera device may delay acting on a later trigger until the previous |
| 1060 | trigger has been fully handled. This may lead to longer intervals between the trigger and |
| 1061 | changes to android.control.afState, for example. |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 1062 | </details> |
Eino-Ville Talvala | 8565fea | 2015-06-24 15:17:09 -0700 | [diff] [blame] | 1063 | <hal_details> |
| 1064 | The HAL must support triggering the AF trigger while an AE precapture trigger is active |
| 1065 | (and vice versa), or at the same time as the AE trigger. It is acceptable for the HAL to |
| 1066 | treat these as two consecutive triggers, for example handling the AF trigger and then the |
| 1067 | AE trigger. Or the HAL may choose to optimize the case with both triggers fired at once, |
| 1068 | to minimize the latency for converging both focus and exposure/flash usage. |
| 1069 | </hal_details> |
Eino-Ville Talvala | 3b4383a | 2013-03-18 09:42:48 -0700 | [diff] [blame] | 1070 | <tag id="BC" /> |
| 1071 | </entry> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 1072 | <entry name="awbLock" type="byte" visibility="public" enum="true" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1073 | typedef="boolean" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1074 | <enum> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1075 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1076 | <notes>Auto-white balance lock is disabled; the AWB |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1077 | algorithm is free to update its parameters if in AUTO |
| 1078 | mode.</notes></value> |
Eino-Ville Talvala | 76548fe | 2013-01-11 13:57:19 -0800 | [diff] [blame] | 1079 | <value>ON |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1080 | <notes>Auto-white balance lock is enabled; the AWB |
| 1081 | algorithm will not update its parameters while the lock |
Zhijun He | 4412faa | 2014-02-06 00:28:22 -0800 | [diff] [blame] | 1082 | is active.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1083 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 1084 | <description>Whether auto-white balance (AWB) is currently locked to its |
Zhijun He | 4412faa | 2014-02-06 00:28:22 -0800 | [diff] [blame] | 1085 | latest calculated values.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1086 | <details> |
| 1087 | When set to `true` (ON), the AWB algorithm is locked to its latest parameters, |
| 1088 | and will not change color balance settings until the lock is set to `false` (OFF). |
| 1089 | |
| 1090 | Since the camera device has a pipeline of in-flight requests, the settings that |
| 1091 | get locked do not necessarily correspond to the settings that were present in the |
| 1092 | latest capture result received from the camera device, since additional captures |
| 1093 | and AWB updates may have occurred even before the result was sent out. If an |
| 1094 | application is switching between automatic and manual control and wishes to eliminate |
| 1095 | any flicker during the switch, the following procedure is recommended: |
| 1096 | |
| 1097 | 1. Starting in auto-AWB mode: |
| 1098 | 2. Lock AWB |
| 1099 | 3. Wait for the first result to be output that has the AWB locked |
| 1100 | 4. Copy AWB settings from that result into a request, set the request to manual AWB |
| 1101 | 5. Submit the capture request, proceed to run manual AWB as desired. |
| 1102 | |
| 1103 | Note that AWB lock is only meaningful when |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1104 | android.control.awbMode is in the AUTO mode; in other modes, |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1105 | AWB is already fixed to a specific setting. |
| 1106 | |
| 1107 | Some LEGACY devices may not support ON; the value is then overridden to OFF. |
| 1108 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1109 | <tag id="BC" /> |
| 1110 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1111 | <entry name="awbMode" type="byte" visibility="public" enum="true" |
| 1112 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1113 | <enum> |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1114 | <value>OFF |
| 1115 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1116 | The camera device's auto-white balance routine is disabled. |
| 1117 | |
| 1118 | The application-selected color transform matrix |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1119 | (android.colorCorrection.transform) and gains |
| 1120 | (android.colorCorrection.gains) are used by the camera |
| 1121 | device for manual white balance control. |
| 1122 | </notes> |
| 1123 | </value> |
| 1124 | <value>AUTO |
| 1125 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1126 | The camera device's auto-white balance routine is active. |
| 1127 | |
| 1128 | The application's values for android.colorCorrection.transform |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1129 | and android.colorCorrection.gains are ignored. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1130 | For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1131 | values used by the camera device for the transform and gains |
| 1132 | will be available in the capture result for this request. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1133 | </notes> |
| 1134 | </value> |
| 1135 | <value>INCANDESCENT |
| 1136 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1137 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1138 | the camera device uses incandescent light as the assumed scene |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1139 | illumination for white balance. |
| 1140 | |
| 1141 | While the exact white balance transforms are up to the |
| 1142 | camera device, they will approximately match the CIE |
| 1143 | standard illuminant A. |
| 1144 | |
| 1145 | The application's values for android.colorCorrection.transform |
| 1146 | and android.colorCorrection.gains are ignored. |
| 1147 | For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1148 | values used by the camera device for the transform and gains |
| 1149 | will be available in the capture result for this request. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1150 | </notes> |
| 1151 | </value> |
| 1152 | <value>FLUORESCENT |
| 1153 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1154 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1155 | the camera device uses fluorescent light as the assumed scene |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1156 | illumination for white balance. |
| 1157 | |
| 1158 | While the exact white balance transforms are up to the |
| 1159 | camera device, they will approximately match the CIE |
| 1160 | standard illuminant F2. |
| 1161 | |
| 1162 | The application's values for android.colorCorrection.transform |
| 1163 | and android.colorCorrection.gains are ignored. |
| 1164 | For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1165 | values used by the camera device for the transform and gains |
| 1166 | will be available in the capture result for this request. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1167 | </notes> |
| 1168 | </value> |
| 1169 | <value>WARM_FLUORESCENT |
| 1170 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1171 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1172 | the camera device uses warm fluorescent light as the assumed scene |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1173 | illumination for white balance. |
| 1174 | |
| 1175 | While the exact white balance transforms are up to the |
| 1176 | camera device, they will approximately match the CIE |
| 1177 | standard illuminant F4. |
| 1178 | |
| 1179 | The application's values for android.colorCorrection.transform |
| 1180 | and android.colorCorrection.gains are ignored. |
| 1181 | For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1182 | values used by the camera device for the transform and gains |
| 1183 | will be available in the capture result for this request. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1184 | </notes> |
| 1185 | </value> |
| 1186 | <value>DAYLIGHT |
| 1187 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1188 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1189 | the camera device uses daylight light as the assumed scene |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1190 | illumination for white balance. |
| 1191 | |
| 1192 | While the exact white balance transforms are up to the |
| 1193 | camera device, they will approximately match the CIE |
| 1194 | standard illuminant D65. |
| 1195 | |
| 1196 | The application's values for android.colorCorrection.transform |
| 1197 | and android.colorCorrection.gains are ignored. |
| 1198 | For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1199 | values used by the camera device for the transform and gains |
| 1200 | will be available in the capture result for this request. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1201 | </notes> |
| 1202 | </value> |
| 1203 | <value>CLOUDY_DAYLIGHT |
| 1204 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1205 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1206 | the camera device uses cloudy daylight light as the assumed scene |
| 1207 | illumination for white balance. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1208 | |
| 1209 | The application's values for android.colorCorrection.transform |
| 1210 | and android.colorCorrection.gains are ignored. |
| 1211 | For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1212 | values used by the camera device for the transform and gains |
| 1213 | will be available in the capture result for this request. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1214 | </notes> |
| 1215 | </value> |
| 1216 | <value>TWILIGHT |
| 1217 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1218 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1219 | the camera device uses twilight light as the assumed scene |
| 1220 | illumination for white balance. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1221 | |
| 1222 | The application's values for android.colorCorrection.transform |
| 1223 | and android.colorCorrection.gains are ignored. |
| 1224 | For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1225 | values used by the camera device for the transform and gains |
| 1226 | will be available in the capture result for this request. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1227 | </notes> |
| 1228 | </value> |
| 1229 | <value>SHADE |
| 1230 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1231 | The camera device's auto-white balance routine is disabled; |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1232 | the camera device uses shade light as the assumed scene |
| 1233 | illumination for white balance. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1234 | |
| 1235 | The application's values for android.colorCorrection.transform |
| 1236 | and android.colorCorrection.gains are ignored. |
| 1237 | For devices that support the MANUAL_POST_PROCESSING capability, the |
| 1238 | values used by the camera device for the transform and gains |
| 1239 | will be available in the capture result for this request. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1240 | </notes> |
| 1241 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1242 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 1243 | <description>Whether auto-white balance (AWB) is currently setting the color |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1244 | transform fields, and what its illumination target |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 1245 | is.</description> |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1246 | <range>android.control.awbAvailableModes</range> |
| 1247 | <details> |
| 1248 | This control is only effective if android.control.mode is AUTO. |
Zhijun He | f552923 | 2013-12-13 17:48:53 -0800 | [diff] [blame] | 1249 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1250 | 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] | 1251 | routine is enabled, overriding the application's selected |
| 1252 | android.colorCorrection.transform, android.colorCorrection.gains and |
Yin-Chia Yeh | 668e43c | 2014-11-12 11:38:10 -0800 | [diff] [blame] | 1253 | android.colorCorrection.mode. Note that when android.control.aeMode |
| 1254 | is OFF, the behavior of AWB is device dependent. It is recommened to |
| 1255 | also set AWB mode to OFF or lock AWB by using android.control.awbLock before |
| 1256 | setting AE mode to OFF. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1257 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1258 | 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] | 1259 | routine is disabled. The application manually controls the white |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1260 | balance by android.colorCorrection.transform, android.colorCorrection.gains |
| 1261 | and android.colorCorrection.mode. |
| 1262 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1263 | When set to any other modes, the camera device's auto-white |
| 1264 | balance routine is disabled. The camera device uses each |
| 1265 | particular illumination target for white balance |
| 1266 | adjustment. The application's values for |
| 1267 | android.colorCorrection.transform, |
| 1268 | android.colorCorrection.gains and |
| 1269 | android.colorCorrection.mode are ignored. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 1270 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1271 | <tag id="BC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1272 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1273 | <entry name="awbRegions" type="int32" visibility="public" |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 1274 | optional="true" container="array" typedef="meteringRectangle"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1275 | <array> |
Igor Murashkin | 617da16 | 2012-11-29 13:35:15 -0800 | [diff] [blame] | 1276 | <size>5</size> |
| 1277 | <size>area_count</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1278 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1279 | <description>List of metering areas to use for auto-white-balance illuminant |
Ruben Brunk | 76e4c7d | 2014-01-31 11:05:30 -0800 | [diff] [blame] | 1280 | estimation.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1281 | <units>Pixel coordinates within android.sensor.info.activeArraySize</units> |
| 1282 | <range>Coordinates must be between `[(0,0), (width, height))` of |
| 1283 | android.sensor.info.activeArraySize</range> |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 1284 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1285 | Not available if android.control.maxRegionsAwb is 0. |
Yin-Chia Yeh | 8554ed5 | 2014-09-04 09:33:34 -0700 | [diff] [blame] | 1286 | Otherwise will always be present. |
| 1287 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1288 | The maximum number of regions supported by the device is determined by the value |
| 1289 | of android.control.maxRegionsAwb. |
| 1290 | |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 1291 | The coordinate system is based on the active pixel array, |
| 1292 | with (0,0) being the top-left pixel in the active pixel array, and |
| 1293 | (android.sensor.info.activeArraySize.width - 1, |
| 1294 | android.sensor.info.activeArraySize.height - 1) being the |
Yin-Chia Yeh | dc18257 | 2014-05-14 14:05:20 -0700 | [diff] [blame] | 1295 | bottom-right pixel in the active pixel array. |
| 1296 | |
| 1297 | The weight must range from 0 to 1000, and represents a weight |
| 1298 | for every pixel in the area. This means that a large metering area |
| 1299 | with the same weight as a smaller area will have more effect in |
| 1300 | the metering result. Metering areas can partially overlap and the |
| 1301 | camera device will add the weights in the overlap region. |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 1302 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1303 | The weights are relative to weights of other white balance metering regions, so if |
| 1304 | only one region is used, all non-zero weights will have the same effect. A region with |
| 1305 | 0 weight is ignored. |
| 1306 | |
| 1307 | If all regions have 0 weight, then no specific metering area needs to be used by the |
| 1308 | camera device. |
| 1309 | |
| 1310 | If the metering region is outside the used android.scaler.cropRegion returned in |
| 1311 | capture result metadata, the camera device will ignore the sections outside the crop |
| 1312 | region and output only the intersection rectangle as the metering region in the result |
| 1313 | metadata. If the region is entirely outside the crop region, it will be ignored and |
| 1314 | not reported in the result metadata. |
Ruben Brunk | 76e4c7d | 2014-01-31 11:05:30 -0800 | [diff] [blame] | 1315 | </details> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 1316 | <ndk_details> |
| 1317 | The data representation is `int[5 * area_count]`. |
| 1318 | Every five elements represent a metering region of `(xmin, ymin, xmax, ymax, weight)`. |
| 1319 | The rectangle is defined to be inclusive on xmin and ymin, but exclusive on xmax and |
| 1320 | ymax. |
| 1321 | </ndk_details> |
Yin-Chia Yeh | 739effc | 2014-05-16 15:13:13 -0700 | [diff] [blame] | 1322 | <hal_details> |
| 1323 | The HAL level representation of MeteringRectangle[] is a |
| 1324 | int[5 * area_count]. |
| 1325 | Every five elements represent a metering region of |
| 1326 | (xmin, ymin, xmax, ymax, weight). |
| 1327 | The rectangle is defined to be inclusive on xmin and ymin, but |
| 1328 | exclusive on xmax and ymax. |
| 1329 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1330 | <tag id="BC" /> |
| 1331 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1332 | <entry name="captureIntent" type="byte" visibility="public" enum="true" |
| 1333 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1334 | <enum> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1335 | <value>CUSTOM |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1336 | <notes>The goal of this request doesn't fall into the other |
| 1337 | categories. The camera device will default to preview-like |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1338 | behavior.</notes></value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1339 | <value>PREVIEW |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1340 | <notes>This request is for a preview-like use case. |
| 1341 | |
| 1342 | The precapture trigger may be used to start off a metering |
| 1343 | w/flash sequence. |
| 1344 | </notes></value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1345 | <value>STILL_CAPTURE |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1346 | <notes>This request is for a still capture-type |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1347 | use case. |
| 1348 | |
| 1349 | If the flash unit is under automatic control, it may fire as needed. |
| 1350 | </notes></value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1351 | <value>VIDEO_RECORD |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1352 | <notes>This request is for a video recording |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1353 | use case.</notes></value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1354 | <value>VIDEO_SNAPSHOT |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1355 | <notes>This request is for a video snapshot (still |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1356 | image while recording video) use case. |
| 1357 | |
| 1358 | The camera device should take the highest-quality image |
| 1359 | possible (given the other settings) without disrupting the |
| 1360 | frame rate of video recording. </notes></value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1361 | <value>ZERO_SHUTTER_LAG |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1362 | <notes>This request is for a ZSL usecase; the |
| 1363 | application will stream full-resolution images and |
| 1364 | reprocess one or several later for a final |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1365 | capture. |
| 1366 | </notes></value> |
Zhijun He | e713fa6 | 2014-04-09 10:55:50 -0700 | [diff] [blame] | 1367 | <value>MANUAL |
| 1368 | <notes>This request is for manual capture use case where |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1369 | the applications want to directly control the capture parameters. |
| 1370 | |
| 1371 | For example, the application may wish to manually control |
| 1372 | android.sensor.exposureTime, android.sensor.sensitivity, etc. |
Zhijun He | e713fa6 | 2014-04-09 10:55:50 -0700 | [diff] [blame] | 1373 | </notes></value> |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 1374 | <value hal_version="3.3">MOTION_TRACKING |
| 1375 | <notes>This request is for a motion tracking use case, where |
| 1376 | the application will use camera and inertial sensor data to |
| 1377 | locate and track objects in the world. |
| 1378 | |
| 1379 | The camera device auto-exposure routine will limit the exposure time |
| 1380 | of the camera to no more than 20 milliseconds, to minimize motion blur. |
| 1381 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1382 | </enum> |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 1383 | <description>Information to the camera device 3A (auto-exposure, |
| 1384 | auto-focus, auto-white balance) routines about the purpose |
| 1385 | of this capture, to help the camera device to decide optimal 3A |
| 1386 | strategy.</description> |
Zhijun He | e713fa6 | 2014-04-09 10:55:50 -0700 | [diff] [blame] | 1387 | <details>This control (except for MANUAL) is only effective if |
| 1388 | `android.control.mode != OFF` and any 3A routine is active. |
| 1389 | |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 1390 | All intents are supported by all devices, except that: |
| 1391 | * ZERO_SHUTTER_LAG will be supported if android.request.availableCapabilities contains |
| 1392 | PRIVATE_REPROCESSING or YUV_REPROCESSING. |
| 1393 | * MANUAL will be supported if android.request.availableCapabilities contains |
| 1394 | MANUAL_SENSOR. |
| 1395 | * MOTION_TRACKING will be supported if android.request.availableCapabilities contains |
| 1396 | MOTION_TRACKING. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1397 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1398 | <tag id="BC" /> |
| 1399 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1400 | <entry name="effectMode" type="byte" visibility="public" enum="true" |
| 1401 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1402 | <enum> |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1403 | <value>OFF |
| 1404 | <notes> |
| 1405 | No color effect will be applied. |
| 1406 | </notes> |
| 1407 | </value> |
| 1408 | <value optional="true">MONO |
| 1409 | <notes> |
| 1410 | A "monocolor" effect where the image is mapped into |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1411 | a single color. |
| 1412 | |
| 1413 | This will typically be grayscale. |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1414 | </notes> |
| 1415 | </value> |
| 1416 | <value optional="true">NEGATIVE |
| 1417 | <notes> |
| 1418 | A "photo-negative" effect where the image's colors |
| 1419 | are inverted. |
| 1420 | </notes> |
| 1421 | </value> |
| 1422 | <value optional="true">SOLARIZE |
| 1423 | <notes> |
| 1424 | A "solarisation" effect (Sabattier effect) where the |
| 1425 | image is wholly or partially reversed in |
| 1426 | tone. |
| 1427 | </notes> |
| 1428 | </value> |
| 1429 | <value optional="true">SEPIA |
| 1430 | <notes> |
| 1431 | A "sepia" effect where the image is mapped into warm |
| 1432 | gray, red, and brown tones. |
| 1433 | </notes> |
| 1434 | </value> |
| 1435 | <value optional="true">POSTERIZE |
| 1436 | <notes> |
| 1437 | A "posterization" effect where the image uses |
| 1438 | discrete regions of tone rather than a continuous |
| 1439 | gradient of tones. |
| 1440 | </notes> |
| 1441 | </value> |
| 1442 | <value optional="true">WHITEBOARD |
| 1443 | <notes> |
| 1444 | A "whiteboard" effect where the image is typically displayed |
| 1445 | as regions of white, with black or grey details. |
| 1446 | </notes> |
| 1447 | </value> |
| 1448 | <value optional="true">BLACKBOARD |
| 1449 | <notes> |
| 1450 | A "blackboard" effect where the image is typically displayed |
| 1451 | as regions of black, with white or grey details. |
| 1452 | </notes> |
| 1453 | </value> |
| 1454 | <value optional="true">AQUA |
| 1455 | <notes> |
| 1456 | An "aqua" effect where a blue hue is added to the image. |
| 1457 | </notes> |
| 1458 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1459 | </enum> |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1460 | <description>A special color effect to apply.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1461 | <range>android.control.availableEffects</range> |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1462 | <details> |
| 1463 | When this mode is set, a color effect will be applied |
| 1464 | to images produced by the camera device. The interpretation |
| 1465 | and implementation of these color effects is left to the |
| 1466 | implementor of the camera device, and should not be |
| 1467 | depended on to be consistent (or present) across all |
| 1468 | devices. |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 1469 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1470 | <tag id="BC" /> |
| 1471 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1472 | <entry name="mode" type="byte" visibility="public" enum="true" |
| 1473 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1474 | <enum> |
| 1475 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1476 | <notes>Full application control of pipeline. |
| 1477 | |
| 1478 | All control by the device's metering and focusing (3A) |
| 1479 | routines is disabled, and no other settings in |
| 1480 | android.control.* have any effect, except that |
| 1481 | android.control.captureIntent may be used by the camera |
| 1482 | device to select post-processing values for processing |
| 1483 | blocks that do not allow for manual control, or are not |
| 1484 | exposed by the camera API. |
| 1485 | |
| 1486 | However, the camera device's 3A routines may continue to |
| 1487 | collect statistics and update their internal state so that |
| 1488 | when control is switched to AUTO mode, good control values |
| 1489 | can be immediately applied. |
| 1490 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1491 | <value>AUTO |
| 1492 | <notes>Use settings for each individual 3A routine. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1493 | |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1494 | Manual control of capture parameters is disabled. All |
| 1495 | controls in android.control.* besides sceneMode take |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1496 | effect.</notes></value> |
Yin-Chia Yeh | c4d5f37 | 2015-01-28 13:18:31 -0800 | [diff] [blame] | 1497 | <value optional="true">USE_SCENE_MODE |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1498 | <notes>Use a specific scene mode. |
| 1499 | |
| 1500 | Enabling this disables control.aeMode, control.awbMode and |
| 1501 | control.afMode controls; the camera device will ignore |
| 1502 | those settings while USE_SCENE_MODE is active (except for |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 1503 | FACE_PRIORITY scene mode). Other control entries are still active. |
Eino-Ville Talvala | 8565fea | 2015-06-24 15:17:09 -0700 | [diff] [blame] | 1504 | This setting can only be used if scene mode is supported (i.e. |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 1505 | android.control.availableSceneModes |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1506 | contain some modes other than DISABLED).</notes></value> |
Yin-Chia Yeh | c4d5f37 | 2015-01-28 13:18:31 -0800 | [diff] [blame] | 1507 | <value optional="true">OFF_KEEP_STATE |
Zhijun He | 4412faa | 2014-02-06 00:28:22 -0800 | [diff] [blame] | 1508 | <notes>Same as OFF mode, except that this capture will not be |
| 1509 | used by camera device background auto-exposure, auto-white balance and |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1510 | auto-focus algorithms (3A) to update their statistics. |
| 1511 | |
| 1512 | Specifically, the 3A routines are locked to the last |
| 1513 | values set from a request with AUTO, OFF, or |
| 1514 | USE_SCENE_MODE, and any statistics or state updates |
| 1515 | collected from manual captures with OFF_KEEP_STATE will be |
| 1516 | discarded by the camera device. |
| 1517 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1518 | </enum> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1519 | <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] | 1520 | routines.</description> |
Yin-Chia Yeh | c4d5f37 | 2015-01-28 13:18:31 -0800 | [diff] [blame] | 1521 | <range>android.control.availableModes</range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1522 | <details> |
| 1523 | 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] | 1524 | 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] | 1525 | capture parameters itself. |
| 1526 | |
| 1527 | When set to AUTO, the individual algorithm controls in |
| 1528 | android.control.* are in effect, such as android.control.afMode. |
| 1529 | |
| 1530 | When set to USE_SCENE_MODE, the individual controls in |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 1531 | android.control.* are mostly disabled, and the camera device |
| 1532 | implements one of the scene mode settings (such as ACTION, |
| 1533 | SUNSET, or PARTY) as it wishes. The camera device scene mode |
| 1534 | 3A settings are provided by {@link |
| 1535 | android.hardware.camera2.CaptureResult|ACameraCaptureSession_captureCallback_result |
| 1536 | capture results}. |
Zhijun He | 4412faa | 2014-02-06 00:28:22 -0800 | [diff] [blame] | 1537 | |
| 1538 | When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference |
| 1539 | is that this frame will not be used by camera device background 3A statistics |
| 1540 | update, as if this frame is never captured. This mode can be used in the scenario |
| 1541 | where the application doesn't want a 3A manual control capture to affect |
| 1542 | the subsequent auto 3A capture results. |
| 1543 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1544 | <tag id="BC" /> |
| 1545 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1546 | <entry name="sceneMode" type="byte" visibility="public" enum="true" |
| 1547 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1548 | <enum> |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1549 | <value id="0">DISABLED |
| 1550 | <notes> |
| 1551 | Indicates that no scene modes are set for a given capture request. |
| 1552 | </notes> |
| 1553 | </value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 1554 | <value>FACE_PRIORITY |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1555 | <notes>If face detection support exists, use face |
| 1556 | detection data for auto-focus, auto-white balance, and |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1557 | auto-exposure routines. |
| 1558 | |
| 1559 | If face detection statistics are disabled |
| 1560 | (i.e. android.statistics.faceDetectMode is set to OFF), |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1561 | this should still operate correctly (but will not return |
| 1562 | face detection statistics to the framework). |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 1563 | |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1564 | Unlike the other scene modes, android.control.aeMode, |
| 1565 | android.control.awbMode, and android.control.afMode |
| 1566 | remain active when FACE_PRIORITY is set. |
| 1567 | </notes> |
| 1568 | </value> |
| 1569 | <value optional="true">ACTION |
| 1570 | <notes> |
| 1571 | Optimized for photos of quickly moving objects. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1572 | |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1573 | Similar to SPORTS. |
| 1574 | </notes> |
| 1575 | </value> |
| 1576 | <value optional="true">PORTRAIT |
| 1577 | <notes> |
| 1578 | Optimized for still photos of people. |
| 1579 | </notes> |
| 1580 | </value> |
| 1581 | <value optional="true">LANDSCAPE |
| 1582 | <notes> |
| 1583 | Optimized for photos of distant macroscopic objects. |
| 1584 | </notes> |
| 1585 | </value> |
| 1586 | <value optional="true">NIGHT |
| 1587 | <notes> |
| 1588 | Optimized for low-light settings. |
| 1589 | </notes> |
| 1590 | </value> |
| 1591 | <value optional="true">NIGHT_PORTRAIT |
| 1592 | <notes> |
| 1593 | Optimized for still photos of people in low-light |
| 1594 | settings. |
| 1595 | </notes> |
| 1596 | </value> |
| 1597 | <value optional="true">THEATRE |
| 1598 | <notes> |
| 1599 | Optimized for dim, indoor settings where flash must |
| 1600 | remain off. |
| 1601 | </notes> |
| 1602 | </value> |
| 1603 | <value optional="true">BEACH |
| 1604 | <notes> |
| 1605 | Optimized for bright, outdoor beach settings. |
| 1606 | </notes> |
| 1607 | </value> |
| 1608 | <value optional="true">SNOW |
| 1609 | <notes> |
| 1610 | Optimized for bright, outdoor settings containing snow. |
| 1611 | </notes> |
| 1612 | </value> |
| 1613 | <value optional="true">SUNSET |
| 1614 | <notes> |
| 1615 | Optimized for scenes of the setting sun. |
| 1616 | </notes> |
| 1617 | </value> |
| 1618 | <value optional="true">STEADYPHOTO |
| 1619 | <notes> |
| 1620 | Optimized to avoid blurry photos due to small amounts of |
| 1621 | device motion (for example: due to hand shake). |
| 1622 | </notes> |
| 1623 | </value> |
| 1624 | <value optional="true">FIREWORKS |
| 1625 | <notes> |
| 1626 | Optimized for nighttime photos of fireworks. |
| 1627 | </notes> |
| 1628 | </value> |
| 1629 | <value optional="true">SPORTS |
| 1630 | <notes> |
| 1631 | Optimized for photos of quickly moving people. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1632 | |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1633 | Similar to ACTION. |
| 1634 | </notes> |
| 1635 | </value> |
| 1636 | <value optional="true">PARTY |
| 1637 | <notes> |
| 1638 | Optimized for dim, indoor settings with multiple moving |
| 1639 | people. |
| 1640 | </notes> |
| 1641 | </value> |
| 1642 | <value optional="true">CANDLELIGHT |
| 1643 | <notes> |
| 1644 | Optimized for dim settings where the main light source |
| 1645 | is a flame. |
| 1646 | </notes> |
| 1647 | </value> |
| 1648 | <value optional="true">BARCODE |
| 1649 | <notes> |
| 1650 | Optimized for accurately capturing a photo of barcode |
| 1651 | for use by camera applications that wish to read the |
| 1652 | barcode value. |
| 1653 | </notes> |
| 1654 | </value> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 1655 | <value deprecated="true" optional="true" ndk_hidden="true">HIGH_SPEED_VIDEO |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 1656 | <notes> |
Eino-Ville Talvala | f55c1a8 | 2015-06-30 13:32:09 -0700 | [diff] [blame] | 1657 | This is deprecated, please use {@link |
| 1658 | android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession} |
| 1659 | and {@link |
| 1660 | android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList} |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 1661 | for high speed video recording. |
| 1662 | |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 1663 | Optimized for high speed video recording (frame rate >=60fps) use case. |
| 1664 | |
| 1665 | The supported high speed video sizes and fps ranges are specified in |
| 1666 | android.control.availableHighSpeedVideoConfigurations. To get desired |
| 1667 | output frame rates, the application is only allowed to select video size |
| 1668 | and fps range combinations listed in this static metadata. The fps range |
| 1669 | can be control via android.control.aeTargetFpsRange. |
| 1670 | |
| 1671 | In this mode, the camera device will override aeMode, awbMode, and afMode to |
| 1672 | ON, ON, and CONTINUOUS_VIDEO, respectively. All post-processing block mode |
| 1673 | controls will be overridden to be FAST. Therefore, no manual control of capture |
| 1674 | and post-processing parameters is possible. All other controls operate the |
| 1675 | same as when android.control.mode == AUTO. This means that all other |
| 1676 | android.control.* fields continue to work, such as |
| 1677 | |
| 1678 | * android.control.aeTargetFpsRange |
| 1679 | * android.control.aeExposureCompensation |
| 1680 | * android.control.aeLock |
| 1681 | * android.control.awbLock |
| 1682 | * android.control.effectMode |
| 1683 | * android.control.aeRegions |
| 1684 | * android.control.afRegions |
| 1685 | * android.control.awbRegions |
| 1686 | * android.control.afTrigger |
| 1687 | * android.control.aePrecaptureTrigger |
| 1688 | |
| 1689 | Outside of android.control.*, the following controls will work: |
| 1690 | |
| 1691 | * android.flash.mode (automatic flash for still capture will not work since aeMode is ON) |
| 1692 | * android.lens.opticalStabilizationMode (if it is supported) |
| 1693 | * android.scaler.cropRegion |
| 1694 | * android.statistics.faceDetectMode |
| 1695 | |
| 1696 | For high speed recording use case, the actual maximum supported frame rate may |
| 1697 | be lower than what camera can output, depending on the destination Surfaces for |
| 1698 | the image data. For example, if the destination surface is from video encoder, |
| 1699 | the application need check if the video encoder is capable of supporting the |
| 1700 | high frame rate for a given video size, or it will end up with lower recording |
| 1701 | frame rate. If the destination surface is from preview window, the preview frame |
| 1702 | rate will be bounded by the screen refresh rate. |
| 1703 | |
| 1704 | The camera device will only support up to 2 output high speed streams |
| 1705 | (processed non-stalling format defined in android.request.maxNumOutputStreams) |
| 1706 | in this mode. This control will be effective only if all of below conditions are true: |
| 1707 | |
| 1708 | * The application created no more than maxNumHighSpeedStreams processed non-stalling |
| 1709 | format output streams, where maxNumHighSpeedStreams is calculated as |
| 1710 | min(2, android.request.maxNumOutputStreams[Processed (but not-stalling)]). |
| 1711 | * The stream sizes are selected from the sizes reported by |
| 1712 | android.control.availableHighSpeedVideoConfigurations. |
| 1713 | * No processed non-stalling or raw streams are configured. |
| 1714 | |
| 1715 | When above conditions are NOT satistied, the controls of this mode and |
| 1716 | android.control.aeTargetFpsRange will be ignored by the camera device, |
| 1717 | the camera device will fall back to android.control.mode `==` AUTO, |
| 1718 | and the returned capture result metadata will give the fps range choosen |
| 1719 | by the camera device. |
| 1720 | |
| 1721 | Switching into or out of this mode may trigger some camera ISP/sensor |
| 1722 | reconfigurations, which may introduce extra latency. It is recommended that |
| 1723 | the application avoids unnecessary scene mode switch as much as possible. |
| 1724 | </notes> |
| 1725 | </value> |
Eino-Ville Talvala | 14cd098 | 2014-12-05 10:46:45 -0800 | [diff] [blame] | 1726 | <value optional="true">HDR |
Ruben Brunk | 17b1dd5 | 2014-08-28 17:16:38 -0700 | [diff] [blame] | 1727 | <notes> |
Eino-Ville Talvala | 14cd098 | 2014-12-05 10:46:45 -0800 | [diff] [blame] | 1728 | Turn on a device-specific high dynamic range (HDR) mode. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1729 | |
Eino-Ville Talvala | 14cd098 | 2014-12-05 10:46:45 -0800 | [diff] [blame] | 1730 | In this scene mode, the camera device captures images |
| 1731 | that keep a larger range of scene illumination levels |
| 1732 | visible in the final image. For example, when taking a |
| 1733 | picture of a object in front of a bright window, both |
| 1734 | the object and the scene through the window may be |
| 1735 | visible when using HDR mode, while in normal AUTO mode, |
| 1736 | one or the other may be poorly exposed. As a tradeoff, |
| 1737 | HDR mode generally takes much longer to capture a single |
| 1738 | image, has no user control, and may have other artifacts |
| 1739 | depending on the HDR method used. |
| 1740 | |
| 1741 | Therefore, HDR captures operate at a much slower rate |
| 1742 | than regular captures. |
| 1743 | |
| 1744 | In this mode, on LIMITED or FULL devices, when a request |
| 1745 | is made with a android.control.captureIntent of |
| 1746 | STILL_CAPTURE, the camera device will capture an image |
| 1747 | using a high dynamic range capture technique. On LEGACY |
| 1748 | devices, captures that target a JPEG-format output will |
| 1749 | be captured with HDR, and the capture intent is not |
| 1750 | relevant. |
| 1751 | |
| 1752 | The HDR capture may involve the device capturing a burst |
| 1753 | of images internally and combining them into one, or it |
| 1754 | may involve the device using specialized high dynamic |
| 1755 | range capture hardware. In all cases, a single image is |
| 1756 | produced in response to a capture request submitted |
| 1757 | while in HDR mode. |
| 1758 | |
| 1759 | Since substantial post-processing is generally needed to |
Eino-Ville Talvala | 1f883d4 | 2016-04-04 10:47:43 -0700 | [diff] [blame] | 1760 | produce an HDR image, only YUV, PRIVATE, and JPEG |
| 1761 | outputs are supported for LIMITED/FULL device HDR |
| 1762 | captures, and only JPEG outputs are supported for LEGACY |
| 1763 | HDR captures. Using a RAW output for HDR capture is not |
Eino-Ville Talvala | 14cd098 | 2014-12-05 10:46:45 -0800 | [diff] [blame] | 1764 | supported. |
Eino-Ville Talvala | 1f883d4 | 2016-04-04 10:47:43 -0700 | [diff] [blame] | 1765 | |
| 1766 | Some devices may also support always-on HDR, which |
| 1767 | applies HDR processing at full frame rate. For these |
| 1768 | devices, intents other than STILL_CAPTURE will also |
| 1769 | produce an HDR output with no frame rate impact compared |
| 1770 | to normal operation, though the quality may be lower |
| 1771 | than for STILL_CAPTURE intents. |
| 1772 | |
| 1773 | If SCENE_MODE_HDR is used with unsupported output types |
| 1774 | or capture intents, the images captured will be as if |
| 1775 | the SCENE_MODE was not enabled at all. |
Ruben Brunk | 17b1dd5 | 2014-08-28 17:16:38 -0700 | [diff] [blame] | 1776 | </notes> |
| 1777 | </value> |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 1778 | <value optional="true" hidden="true">FACE_PRIORITY_LOW_LIGHT |
| 1779 | <notes>Same as FACE_PRIORITY scene mode, except that the camera |
Andy Huibers | ce1319b | 2015-07-11 08:36:42 -0700 | [diff] [blame] | 1780 | device will choose higher sensitivity values (android.sensor.sensitivity) |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 1781 | under low light conditions. |
| 1782 | |
| 1783 | The camera device may be tuned to expose the images in a reduced |
| 1784 | sensitivity range to produce the best quality images. For example, |
| 1785 | if the android.sensor.info.sensitivityRange gives range of [100, 1600], |
| 1786 | the camera device auto-exposure routine tuning process may limit the actual |
Andy Huibers | ce1319b | 2015-07-11 08:36:42 -0700 | [diff] [blame] | 1787 | exposure sensitivity range to [100, 1200] to ensure that the noise level isn't |
| 1788 | exessive in order to preserve the image quality. Under this situation, the image under |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 1789 | low light may be under-exposed when the sensor max exposure time (bounded by the |
| 1790 | android.control.aeTargetFpsRange when android.control.aeMode is one of the |
Andy Huibers | ce1319b | 2015-07-11 08:36:42 -0700 | [diff] [blame] | 1791 | ON_* modes) and effective max sensitivity are reached. This scene mode allows the |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 1792 | camera device auto-exposure routine to increase the sensitivity up to the max |
| 1793 | sensitivity specified by android.sensor.info.sensitivityRange when the scene is too |
| 1794 | dark and the max exposure time is reached. The captured images may be noisier |
Andy Huibers | ce1319b | 2015-07-11 08:36:42 -0700 | [diff] [blame] | 1795 | compared with the images captured in normal FACE_PRIORITY mode; therefore, it is |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 1796 | recommended that the application only use this scene mode when it is capable of |
| 1797 | reducing the noise level of the captured images. |
| 1798 | |
| 1799 | Unlike the other scene modes, android.control.aeMode, |
| 1800 | android.control.awbMode, and android.control.afMode |
| 1801 | remain active when FACE_PRIORITY_LOW_LIGHT is set. |
| 1802 | </notes> |
| 1803 | </value> |
Yin-Chia Yeh | ff19a62 | 2016-03-09 14:44:14 -0800 | [diff] [blame] | 1804 | <value optional="true" hidden="true" id="100">DEVICE_CUSTOM_START |
| 1805 | <notes> |
| 1806 | Scene mode values within the range of |
| 1807 | `[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]` are reserved for device specific |
| 1808 | customized scene modes. |
| 1809 | </notes> |
| 1810 | </value> |
| 1811 | <value optional="true" hidden="true" id="127">DEVICE_CUSTOM_END |
| 1812 | <notes> |
| 1813 | Scene mode values within the range of |
| 1814 | `[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]` are reserved for device specific |
| 1815 | customized scene modes. |
| 1816 | </notes> |
| 1817 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1818 | </enum> |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1819 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1820 | Control for which scene mode is currently active. |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1821 | </description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1822 | <range>android.control.availableSceneModes</range> |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1823 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1824 | Scene modes are custom camera modes optimized for a certain set of conditions and |
| 1825 | capture settings. |
| 1826 | |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1827 | This is the mode that that is active when |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 1828 | `android.control.mode == USE_SCENE_MODE`. Aside from FACE_PRIORITY, these modes will |
| 1829 | disable android.control.aeMode, android.control.awbMode, and android.control.afMode |
| 1830 | while in use. |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1831 | |
| 1832 | The interpretation and implementation of these scene modes is left |
| 1833 | to the implementor of the camera device. Their behavior will not be |
| 1834 | consistent across all devices, and any given device may only implement |
| 1835 | a subset of these modes. |
| 1836 | </details> |
| 1837 | <hal_details> |
| 1838 | HAL implementations that include scene modes are expected to provide |
| 1839 | the per-scene settings to use for android.control.aeMode, |
| 1840 | android.control.awbMode, and android.control.afMode in |
| 1841 | android.control.sceneModeOverrides. |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 1842 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 1843 | For HIGH_SPEED_VIDEO mode, if it is included in android.control.availableSceneModes, the |
| 1844 | HAL must list supported video size and fps range in |
| 1845 | android.control.availableHighSpeedVideoConfigurations. For a given size, e.g. 1280x720, |
| 1846 | if the HAL has two different sensor configurations for normal streaming mode and high |
| 1847 | speed streaming, when this scene mode is set/reset in a sequence of capture requests, the |
| 1848 | HAL may have to switch between different sensor modes. This mode is deprecated in legacy |
| 1849 | HAL3.3, to support high speed video recording, please implement |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 1850 | android.control.availableHighSpeedVideoConfigurations and CONSTRAINED_HIGH_SPEED_VIDEO |
| 1851 | capbility defined in android.request.availableCapabilities. |
Ruben Brunk | 9e28ea7 | 2014-01-14 18:55:29 -0800 | [diff] [blame] | 1852 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1853 | <tag id="BC" /> |
| 1854 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1855 | <entry name="videoStabilizationMode" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1856 | enum="true" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1857 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1858 | <value>OFF |
| 1859 | <notes> |
| 1860 | Video stabilization is disabled. |
| 1861 | </notes></value> |
| 1862 | <value>ON |
| 1863 | <notes> |
| 1864 | Video stabilization is enabled. |
| 1865 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1866 | </enum> |
| 1867 | <description>Whether video stabilization is |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 1868 | active.</description> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1869 | <details> |
Jianing Wei | 2d95089 | 2015-09-29 14:01:43 -0700 | [diff] [blame] | 1870 | Video stabilization automatically warps images from |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1871 | the camera in order to stabilize motion between consecutive frames. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 1872 | |
| 1873 | If enabled, video stabilization can modify the |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 1874 | android.scaler.cropRegion to keep the video stream stabilized. |
| 1875 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1876 | Switching between different video stabilization modes may take several |
| 1877 | frames to initialize, the camera device will report the current mode |
| 1878 | in capture result metadata. For example, When "ON" mode is requested, |
| 1879 | the video stabilization modes in the first several capture results may |
| 1880 | still be "OFF", and it will become "ON" when the initialization is |
| 1881 | done. |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 1882 | |
Jianing Wei | 2d95089 | 2015-09-29 14:01:43 -0700 | [diff] [blame] | 1883 | In addition, not all recording sizes or frame rates may be supported for |
| 1884 | stabilization by a device that reports stabilization support. It is guaranteed |
| 1885 | that an output targeting a MediaRecorder or MediaCodec will be stabilized if |
| 1886 | the recording resolution is less than or equal to 1920 x 1080 (width less than |
| 1887 | or equal to 1920, height less than or equal to 1080), and the recording |
| 1888 | frame rate is less than or equal to 30fps. At other sizes, the CaptureResult |
| 1889 | android.control.videoStabilizationMode field will return |
| 1890 | OFF if the recording output is not stabilized, or if there are no output |
| 1891 | Surface types that can be stabilized. |
| 1892 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1893 | If a camera device supports both this mode and OIS |
| 1894 | (android.lens.opticalStabilizationMode), turning both modes on may |
| 1895 | produce undesirable interaction, so it is recommended not to enable |
| 1896 | both at the same time. |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 1897 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1898 | <tag id="BC" /> |
| 1899 | </entry> |
| 1900 | </controls> |
| 1901 | <static> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1902 | <entry name="aeAvailableAntibandingModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1903 | type_notes="list of enums" container="array" typedef="enumList" |
| 1904 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1905 | <array> |
| 1906 | <size>n</size> |
| 1907 | </array> |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 1908 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1909 | 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] | 1910 | supported by this camera device. |
| 1911 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1912 | <range>Any value listed in android.control.aeAntibandingMode</range> |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 1913 | <details> |
| 1914 | Not all of the auto-exposure anti-banding modes may be |
| 1915 | supported by a given camera device. This field lists the |
| 1916 | valid anti-banding modes that the application may request |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1917 | for this camera device with the |
Yin-Chia Yeh | 9d1b452 | 2014-11-25 11:51:48 -0800 | [diff] [blame] | 1918 | android.control.aeAntibandingMode control. |
Eino-Ville Talvala | 19ce2c1 | 2013-12-30 12:03:45 -0800 | [diff] [blame] | 1919 | </details> |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 1920 | <tag id="BC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1921 | </entry> |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1922 | <entry name="aeAvailableModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1923 | type_notes="list of enums" container="array" typedef="enumList" |
| 1924 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1925 | <array> |
| 1926 | <size>n</size> |
| 1927 | </array> |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1928 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1929 | List of auto-exposure modes for android.control.aeMode that are supported by this camera |
| 1930 | device. |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1931 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1932 | <range>Any value listed in android.control.aeMode</range> |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1933 | <details> |
| 1934 | Not all the auto-exposure modes may be supported by a |
| 1935 | given camera device, especially if no flash unit is |
| 1936 | available. This entry lists the valid modes for |
| 1937 | android.control.aeMode for this camera device. |
| 1938 | |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1939 | All camera devices support ON, and all camera devices with flash |
| 1940 | units support ON_AUTO_FLASH and ON_ALWAYS_FLASH. |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1941 | |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 1942 | FULL mode camera devices always support OFF mode, |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1943 | which enables application control of camera exposure time, |
| 1944 | sensitivity, and frame duration. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1945 | |
| 1946 | LEGACY mode camera devices never support OFF mode. |
| 1947 | LIMITED mode devices support OFF if they support the MANUAL_SENSOR |
| 1948 | capability. |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 1949 | </details> |
| 1950 | <tag id="BC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1951 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1952 | <entry name="aeAvailableTargetFpsRanges" type="int32" visibility="public" |
| 1953 | type_notes="list of pairs of frame rates" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1954 | container="array" typedef="rangeInt" |
| 1955 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1956 | <array> |
| 1957 | <size>2</size> |
| 1958 | <size>n</size> |
| 1959 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1960 | <description>List of frame rate ranges for android.control.aeTargetFpsRange supported by |
| 1961 | this camera device.</description> |
| 1962 | <units>Frames per second (FPS)</units> |
| 1963 | <details> |
Yin-Chia Yeh | 11aee3e | 2015-05-21 11:23:48 -0700 | [diff] [blame] | 1964 | For devices at the LEGACY level or above: |
| 1965 | |
Yin-Chia Yeh | 30bf75b | 2015-11-20 15:16:05 -0800 | [diff] [blame] | 1966 | * For constant-framerate recording, for each normal |
| 1967 | {@link android.media.CamcorderProfile CamcorderProfile}, that is, a |
Yin-Chia Yeh | 11aee3e | 2015-05-21 11:23:48 -0700 | [diff] [blame] | 1968 | {@link android.media.CamcorderProfile CamcorderProfile} that has |
| 1969 | {@link android.media.CamcorderProfile#quality quality} in |
| 1970 | the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW}, |
| 1971 | {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is |
| 1972 | supported by the device and has |
| 1973 | {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} `x`, this list will |
| 1974 | always include (`x`,`x`). |
Yin-Chia Yeh | 30bf75b | 2015-11-20 15:16:05 -0800 | [diff] [blame] | 1975 | |
| 1976 | * Also, a camera device must either not support any |
| 1977 | {@link android.media.CamcorderProfile CamcorderProfile}, |
| 1978 | or support at least one |
| 1979 | normal {@link android.media.CamcorderProfile CamcorderProfile} that has |
| 1980 | {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} `x` >= 24. |
Yin-Chia Yeh | 11aee3e | 2015-05-21 11:23:48 -0700 | [diff] [blame] | 1981 | |
| 1982 | For devices at the LIMITED level or above: |
| 1983 | |
| 1984 | * For YUV_420_888 burst capture use case, this list will always include (`min`, `max`) |
| 1985 | and (`max`, `max`) where `min` <= 15 and `max` = the maximum output frame rate of the |
| 1986 | maximum YUV_420_888 output size. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1987 | </details> |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 1988 | <tag id="BC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1989 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 1990 | <entry name="aeCompensationRange" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 1991 | container="array" typedef="rangeInt" |
| 1992 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 1993 | <array> |
| 1994 | <size>2</size> |
| 1995 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 1996 | <description>Maximum and minimum exposure compensation values for |
| 1997 | android.control.aeExposureCompensation, in counts of android.control.aeCompensationStep, |
| 1998 | that are supported by this camera device.</description> |
| 1999 | <range> |
Zhijun He | fa73c08 | 2015-02-04 13:51:22 -0800 | [diff] [blame] | 2000 | Range [0,0] indicates that exposure compensation is not supported. |
| 2001 | |
| 2002 | For LIMITED and FULL devices, range must follow below requirements if exposure |
| 2003 | compensation is supported (`range != [0, 0]`): |
| 2004 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2005 | `Min.exposure compensation * android.control.aeCompensationStep <= -2 EV` |
| 2006 | |
| 2007 | `Max.exposure compensation * android.control.aeCompensationStep >= 2 EV` |
Ruben Brunk | 12aeef1 | 2014-11-20 11:44:48 -0800 | [diff] [blame] | 2008 | |
Zhijun He | fa73c08 | 2015-02-04 13:51:22 -0800 | [diff] [blame] | 2009 | LEGACY devices may support a smaller range than this. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2010 | </range> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2011 | <tag id="BC" /> |
| 2012 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2013 | <entry name="aeCompensationStep" type="rational" visibility="public" |
| 2014 | hwlevel="legacy"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2015 | <description>Smallest step by which the exposure compensation |
| 2016 | can be changed.</description> |
| 2017 | <units>Exposure Value (EV)</units> |
| 2018 | <details> |
| 2019 | This is the unit for android.control.aeExposureCompensation. For example, if this key has |
| 2020 | a value of `1/2`, then a setting of `-2` for android.control.aeExposureCompensation means |
| 2021 | that the target EV offset for the auto-exposure routine is -1 EV. |
| 2022 | |
| 2023 | One unit of EV compensation changes the brightness of the captured image by a factor |
| 2024 | of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness. |
| 2025 | </details> |
| 2026 | <hal_details> |
| 2027 | This must be less than or equal to 1/2. |
| 2028 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2029 | <tag id="BC" /> |
| 2030 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 2031 | <entry name="afAvailableModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2032 | type_notes="List of enums" container="array" typedef="enumList" |
| 2033 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2034 | <array> |
| 2035 | <size>n</size> |
| 2036 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2037 | <description> |
| 2038 | List of auto-focus (AF) modes for android.control.afMode that are |
| 2039 | supported by this camera device. |
| 2040 | </description> |
| 2041 | <range>Any value listed in android.control.afMode</range> |
Zhijun He | f163fa9 | 2014-01-14 09:59:04 -0800 | [diff] [blame] | 2042 | <details> |
| 2043 | Not all the auto-focus modes may be supported by a |
| 2044 | given camera device. This entry lists the valid modes for |
| 2045 | android.control.afMode for this camera device. |
| 2046 | |
Ruben Brunk | a5bcb40 | 2014-09-22 16:11:06 -0700 | [diff] [blame] | 2047 | All LIMITED and FULL mode camera devices will support OFF mode, and all |
| 2048 | camera devices with adjustable focuser units |
| 2049 | (`android.lens.info.minimumFocusDistance > 0`) will support AUTO mode. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2050 | |
| 2051 | LEGACY devices will support OFF mode only if they support |
| 2052 | focusing to infinity (by also setting android.lens.focusDistance to |
| 2053 | `0.0f`). |
Zhijun He | f163fa9 | 2014-01-14 09:59:04 -0800 | [diff] [blame] | 2054 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2055 | <tag id="BC" /> |
| 2056 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 2057 | <entry name="availableEffects" type="byte" visibility="public" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 2058 | type_notes="List of enums (android.control.effectMode)." container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2059 | typedef="enumList" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2060 | <array> |
| 2061 | <size>n</size> |
| 2062 | </array> |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 2063 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2064 | List of color effects for android.control.effectMode that are supported by this camera |
| 2065 | device. |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 2066 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2067 | <range>Any value listed in android.control.effectMode</range> |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 2068 | <details> |
| 2069 | 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] | 2070 | images produced by the camera device. |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 2071 | Implementations are not expected to be consistent across all devices. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2072 | If no color effect modes are available for a device, this will only list |
| 2073 | OFF. |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 2074 | |
| 2075 | A color effect will only be applied if |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2076 | android.control.mode != OFF. OFF is always included in this list. |
| 2077 | |
| 2078 | This control has no effect on the operation of other control routines such |
| 2079 | as auto-exposure, white balance, or focus. |
Ruben Brunk | b28b35f | 2014-01-14 17:17:19 -0800 | [diff] [blame] | 2080 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2081 | <tag id="BC" /> |
| 2082 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 2083 | <entry name="availableSceneModes" type="byte" visibility="public" |
Ruben Brunk | bf870fc | 2014-01-14 17:46:58 -0800 | [diff] [blame] | 2084 | type_notes="List of enums (android.control.sceneMode)." |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2085 | container="array" typedef="enumList" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2086 | <array> |
| 2087 | <size>n</size> |
| 2088 | </array> |
Ruben Brunk | bf870fc | 2014-01-14 17:46:58 -0800 | [diff] [blame] | 2089 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2090 | List of scene modes for android.control.sceneMode that are supported by this camera |
| 2091 | device. |
Ruben Brunk | bf870fc | 2014-01-14 17:46:58 -0800 | [diff] [blame] | 2092 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2093 | <range>Any value listed in android.control.sceneMode</range> |
Ruben Brunk | bf870fc | 2014-01-14 17:46:58 -0800 | [diff] [blame] | 2094 | <details> |
| 2095 | This list contains scene modes that can be set for the camera device. |
| 2096 | Only scene modes that have been fully implemented for the |
| 2097 | camera device may be included here. Implementations are not expected |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2098 | to be consistent across all devices. |
| 2099 | |
| 2100 | If no scene modes are supported by the camera device, this |
| 2101 | will be set to DISABLED. Otherwise DISABLED will not be listed. |
| 2102 | |
| 2103 | FACE_PRIORITY is always listed if face detection is |
| 2104 | supported (i.e.`android.statistics.info.maxFaceCount > |
| 2105 | 0`). |
Ruben Brunk | bf870fc | 2014-01-14 17:46:58 -0800 | [diff] [blame] | 2106 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2107 | <tag id="BC" /> |
| 2108 | </entry> |
| 2109 | <entry name="availableVideoStabilizationModes" type="byte" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 2110 | visibility="public" type_notes="List of enums." container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2111 | typedef="enumList" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2112 | <array> |
| 2113 | <size>n</size> |
| 2114 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2115 | <description> |
| 2116 | List of video stabilization modes for android.control.videoStabilizationMode |
| 2117 | that are supported by this camera device. |
| 2118 | </description> |
| 2119 | <range>Any value listed in android.control.videoStabilizationMode</range> |
| 2120 | <details> |
| 2121 | OFF will always be listed. |
| 2122 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2123 | <tag id="BC" /> |
| 2124 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 2125 | <entry name="awbAvailableModes" type="byte" visibility="public" |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 2126 | type_notes="List of enums" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2127 | container="array" typedef="enumList" hwlevel="legacy"> |
Alex Ray | a4251d9 | 2013-04-30 16:43:44 -0700 | [diff] [blame] | 2128 | <array> |
| 2129 | <size>n</size> |
| 2130 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2131 | <description> |
| 2132 | List of auto-white-balance modes for android.control.awbMode that are supported by this |
| 2133 | camera device. |
| 2134 | </description> |
| 2135 | <range>Any value listed in android.control.awbMode</range> |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 2136 | <details> |
| 2137 | Not all the auto-white-balance modes may be supported by a |
| 2138 | given camera device. This entry lists the valid modes for |
| 2139 | android.control.awbMode for this camera device. |
| 2140 | |
| 2141 | All camera devices will support ON mode. |
| 2142 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2143 | Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF |
| 2144 | mode, which enables application control of white balance, by using |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 2145 | android.colorCorrection.transform and android.colorCorrection.gains |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2146 | (android.colorCorrection.mode must be set to TRANSFORM_MATRIX). This includes all FULL |
| 2147 | mode camera devices. |
Zhijun He | 7787f7f | 2014-01-14 16:30:31 -0800 | [diff] [blame] | 2148 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2149 | <tag id="BC" /> |
| 2150 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 2151 | <entry name="maxRegions" type="int32" visibility="ndk_public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2152 | container="array" hwlevel="legacy"> |
Ruben Brunk | 120eea4 | 2014-01-15 15:55:08 -0800 | [diff] [blame] | 2153 | <array> |
| 2154 | <size>3</size> |
| 2155 | </array> |
| 2156 | <description> |
| 2157 | List of the maximum number of regions that can be used for metering in |
| 2158 | auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF); |
| 2159 | this corresponds to the the maximum number of elements in |
| 2160 | android.control.aeRegions, android.control.awbRegions, |
| 2161 | and android.control.afRegions. |
| 2162 | </description> |
| 2163 | <range> |
| 2164 | Value must be &gt;= 0 for each element. For full-capability devices |
| 2165 | this value must be &gt;= 1 for AE and AF. The order of the elements is: |
| 2166 | `(AE, AWB, AF)`.</range> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2167 | <tag id="BC" /> |
| 2168 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 2169 | <entry name="maxRegionsAe" type="int32" visibility="java_public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2170 | synthetic="true" hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 2171 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2172 | The maximum number of metering regions that can be used by the auto-exposure (AE) |
| 2173 | routine. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 2174 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2175 | <range>Value will be &gt;= 0. For FULL-capability devices, this |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 2176 | value will be &gt;= 1. |
| 2177 | </range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2178 | <details> |
| 2179 | This corresponds to the the maximum allowed number of elements in |
| 2180 | android.control.aeRegions. |
| 2181 | </details> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 2182 | <hal_details>This entry is private to the framework. Fill in |
| 2183 | maxRegions to have this entry be automatically populated. |
| 2184 | </hal_details> |
| 2185 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 2186 | <entry name="maxRegionsAwb" type="int32" visibility="java_public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2187 | synthetic="true" hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 2188 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2189 | The maximum number of metering regions that can be used by the auto-white balance (AWB) |
| 2190 | routine. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 2191 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2192 | <range>Value will be &gt;= 0. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 2193 | </range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2194 | <details> |
| 2195 | This corresponds to the the maximum allowed number of elements in |
| 2196 | android.control.awbRegions. |
| 2197 | </details> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 2198 | <hal_details>This entry is private to the framework. Fill in |
| 2199 | maxRegions to have this entry be automatically populated. |
| 2200 | </hal_details> |
| 2201 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 2202 | <entry name="maxRegionsAf" type="int32" visibility="java_public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2203 | synthetic="true" hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 2204 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2205 | 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] | 2206 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2207 | <range>Value will be &gt;= 0. For FULL-capability devices, this |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 2208 | value will be &gt;= 1. |
| 2209 | </range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2210 | <details> |
| 2211 | This corresponds to the the maximum allowed number of elements in |
| 2212 | android.control.afRegions. |
| 2213 | </details> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 2214 | <hal_details>This entry is private to the framework. Fill in |
| 2215 | maxRegions to have this entry be automatically populated. |
| 2216 | </hal_details> |
| 2217 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 2218 | <entry name="sceneModeOverrides" type="byte" visibility="system" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2219 | container="array" hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2220 | <array> |
| 2221 | <size>3</size> |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 2222 | <size>length(availableSceneModes)</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2223 | </array> |
Ruben Brunk | cf77fe9 | 2014-01-14 19:31:21 -0800 | [diff] [blame] | 2224 | <description> |
| 2225 | Ordered list of auto-exposure, auto-white balance, and auto-focus |
| 2226 | settings to use with each available scene mode. |
| 2227 | </description> |
| 2228 | <range> |
| 2229 | For each available scene mode, the list must contain three |
| 2230 | entries containing the android.control.aeMode, |
| 2231 | android.control.awbMode, and android.control.afMode values used |
| 2232 | by the camera device. The entry order is `(aeMode, awbMode, afMode)` |
| 2233 | where aeMode has the lowest index position. |
| 2234 | </range> |
| 2235 | <details> |
| 2236 | When a scene mode is enabled, the camera device is expected |
| 2237 | to override android.control.aeMode, android.control.awbMode, |
| 2238 | and android.control.afMode with its preferred settings for |
| 2239 | that scene mode. |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 2240 | |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 2241 | The order of this list matches that of availableSceneModes, |
Ruben Brunk | cf77fe9 | 2014-01-14 19:31:21 -0800 | [diff] [blame] | 2242 | with 3 entries for each mode. The overrides listed |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 2243 | for FACE_PRIORITY and FACE_PRIORITY_LOW_LIGHT (if supported) are ignored, |
| 2244 | since for that mode the application-set android.control.aeMode, |
Ruben Brunk | cf77fe9 | 2014-01-14 19:31:21 -0800 | [diff] [blame] | 2245 | android.control.awbMode, and android.control.afMode values are |
| 2246 | used instead, matching the behavior when android.control.mode |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 2247 | is set to AUTO. It is recommended that the FACE_PRIORITY and |
| 2248 | FACE_PRIORITY_LOW_LIGHT (if supported) overrides should be set to 0. |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 2249 | |
Ruben Brunk | cf77fe9 | 2014-01-14 19:31:21 -0800 | [diff] [blame] | 2250 | For example, if availableSceneModes contains |
| 2251 | `(FACE_PRIORITY, ACTION, NIGHT)`, then the camera framework |
| 2252 | expects sceneModeOverrides to have 9 entries formatted like: |
| 2253 | `(0, 0, 0, ON_AUTO_FLASH, AUTO, CONTINUOUS_PICTURE, |
| 2254 | ON_AUTO_FLASH, INCANDESCENT, AUTO)`. |
| 2255 | </details> |
| 2256 | <hal_details> |
| 2257 | To maintain backward compatibility, this list will be made available |
| 2258 | in the static metadata of the camera service. The camera service will |
| 2259 | use these values to set android.control.aeMode, |
| 2260 | android.control.awbMode, and android.control.afMode when using a scene |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 2261 | mode other than FACE_PRIORITY and FACE_PRIORITY_LOW_LIGHT (if supported). |
Ruben Brunk | cf77fe9 | 2014-01-14 19:31:21 -0800 | [diff] [blame] | 2262 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2263 | <tag id="BC" /> |
| 2264 | </entry> |
| 2265 | </static> |
| 2266 | <dynamic> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 2267 | <entry name="aePrecaptureId" type="int32" visibility="system" deprecated="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2268 | <description>The ID sent with the latest |
| 2269 | CAMERA2_TRIGGER_PRECAPTURE_METERING call</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2270 | <details>Must be 0 if no |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2271 | CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet |
| 2272 | by HAL. Always updated even if AE algorithm ignores the |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2273 | trigger</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2274 | </entry> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2275 | <clone entry="android.control.aeAntibandingMode" kind="controls"> |
| 2276 | </clone> |
| 2277 | <clone entry="android.control.aeExposureCompensation" kind="controls"> |
| 2278 | </clone> |
| 2279 | <clone entry="android.control.aeLock" kind="controls"> |
| 2280 | </clone> |
Eino-Ville Talvala | 9fa0d90 | 2014-01-08 16:16:53 -0800 | [diff] [blame] | 2281 | <clone entry="android.control.aeMode" kind="controls"> |
| 2282 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2283 | <clone entry="android.control.aeRegions" kind="controls"> |
| 2284 | </clone> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2285 | <clone entry="android.control.aeTargetFpsRange" kind="controls"> |
| 2286 | </clone> |
| 2287 | <clone entry="android.control.aePrecaptureTrigger" kind="controls"> |
| 2288 | </clone> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2289 | <entry name="aeState" type="byte" visibility="public" enum="true" |
| 2290 | hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2291 | <enum> |
| 2292 | <value>INACTIVE |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2293 | <notes>AE is off or recently reset. |
| 2294 | |
| 2295 | When a camera device is opened, it starts in |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2296 | this state. This is a transient state, the camera device may skip reporting |
| 2297 | this state in capture result.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2298 | <value>SEARCHING |
| 2299 | <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] | 2300 | for the current scene. |
| 2301 | |
| 2302 | This is a transient state, the camera device may skip |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2303 | reporting this state in capture result.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2304 | <value>CONVERGED |
| 2305 | <notes>AE has a good set of control values for the |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2306 | current scene.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2307 | <value>LOCKED |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2308 | <notes>AE has been locked.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2309 | <value>FLASH_REQUIRED |
| 2310 | <notes>AE has a good set of control values, but flash |
| 2311 | needs to be fired for good quality still |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2312 | capture.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2313 | <value>PRECAPTURE |
| 2314 | <notes>AE has been asked to do a precapture sequence |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2315 | and is currently executing it. |
| 2316 | |
| 2317 | Precapture can be triggered through setting |
Zhijun He | e7cd556 | 2015-02-05 14:32:57 -0800 | [diff] [blame] | 2318 | android.control.aePrecaptureTrigger to START. Currently |
| 2319 | active and completed (if it causes camera device internal AE lock) precapture |
| 2320 | metering sequence can be canceled through setting |
| 2321 | android.control.aePrecaptureTrigger to CANCEL. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2322 | |
| 2323 | Once PRECAPTURE completes, AE will transition to CONVERGED |
| 2324 | or FLASH_REQUIRED as appropriate. This is a transient |
| 2325 | state, the camera device may skip reporting this state in |
| 2326 | capture result.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2327 | </enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2328 | <description>Current state of the auto-exposure (AE) algorithm.</description> |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2329 | <details>Switching between or enabling AE modes (android.control.aeMode) always |
| 2330 | resets the AE state to INACTIVE. Similarly, switching between android.control.mode, |
| 2331 | or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all |
| 2332 | the algorithm states to INACTIVE. |
| 2333 | |
| 2334 | The camera device can do several state transitions between two results, if it is |
| 2335 | allowed by the state transition table. For example: INACTIVE may never actually be |
| 2336 | seen in a result. |
| 2337 | |
| 2338 | The state in the result is the state for this image (in sync with this image): if |
| 2339 | AE state becomes CONVERGED, then the image data associated with this result should |
| 2340 | be good to use. |
| 2341 | |
| 2342 | Below are state transition tables for different AE modes. |
| 2343 | |
| 2344 | State | Transition Cause | New State | Notes |
| 2345 | :------------:|:----------------:|:---------:|:-----------------------: |
| 2346 | INACTIVE | | INACTIVE | Camera device auto exposure algorithm is disabled |
| 2347 | |
Chien-Yu Chen | 11f62a5 | 2018-01-11 11:32:52 -0800 | [diff] [blame] | 2348 | When android.control.aeMode is AE_MODE_ON*: |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2349 | |
| 2350 | State | Transition Cause | New State | Notes |
| 2351 | :-------------:|:--------------------------------------------:|:--------------:|:-----------------: |
| 2352 | INACTIVE | Camera device initiates AE scan | SEARCHING | Values changing |
| 2353 | INACTIVE | android.control.aeLock is ON | LOCKED | Values locked |
| 2354 | SEARCHING | Camera device finishes AE scan | CONVERGED | Good values, not changing |
| 2355 | SEARCHING | Camera device finishes AE scan | FLASH_REQUIRED | Converged but too dark w/o flash |
| 2356 | SEARCHING | android.control.aeLock is ON | LOCKED | Values locked |
| 2357 | CONVERGED | Camera device initiates AE scan | SEARCHING | Values changing |
| 2358 | CONVERGED | android.control.aeLock is ON | LOCKED | Values locked |
| 2359 | FLASH_REQUIRED | Camera device initiates AE scan | SEARCHING | Values changing |
| 2360 | FLASH_REQUIRED | android.control.aeLock is ON | LOCKED | Values locked |
| 2361 | LOCKED | android.control.aeLock is OFF | SEARCHING | Values not good after unlock |
| 2362 | LOCKED | android.control.aeLock is OFF | CONVERGED | Values good after unlock |
| 2363 | LOCKED | android.control.aeLock is OFF | FLASH_REQUIRED | Exposure good, but too dark |
| 2364 | PRECAPTURE | Sequence done. android.control.aeLock is OFF | CONVERGED | Ready for high-quality capture |
| 2365 | PRECAPTURE | Sequence done. android.control.aeLock is ON | LOCKED | Ready for high-quality capture |
Zhijun He | e7cd556 | 2015-02-05 14:32:57 -0800 | [diff] [blame] | 2366 | LOCKED | aeLock is ON and aePrecaptureTrigger is START | LOCKED | Precapture trigger is ignored when AE is already locked |
| 2367 | LOCKED | aeLock is ON and aePrecaptureTrigger is CANCEL| LOCKED | Precapture trigger is ignored when AE is already locked |
| 2368 | Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is START | PRECAPTURE | Start AE precapture metering sequence |
| 2369 | Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is CANCEL| INACTIVE | Currently active precapture metering sequence is canceled |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2370 | |
Chien-Yu Chen | 11f62a5 | 2018-01-11 11:32:52 -0800 | [diff] [blame] | 2371 | If the camera device supports AE external flash mode (ON_EXTERNAL_FLASH is included in |
| 2372 | android.control.aeAvailableModes), aeState must be FLASH_REQUIRED after the camera device |
| 2373 | finishes AE scan and it's too dark without flash. |
| 2374 | |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2375 | For the above table, the camera device may skip reporting any state changes that happen |
| 2376 | without application intervention (i.e. mode switch, trigger, locking). Any state that |
| 2377 | can be skipped in that manner is called a transient state. |
| 2378 | |
Chien-Yu Chen | 11f62a5 | 2018-01-11 11:32:52 -0800 | [diff] [blame] | 2379 | For example, for above AE modes (AE_MODE_ON*), in addition to the state transitions |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2380 | listed in above table, it is also legal for the camera device to skip one or more |
| 2381 | transient states between two results. See below table for examples: |
| 2382 | |
| 2383 | State | Transition Cause | New State | Notes |
| 2384 | :-------------:|:-----------------------------------------------------------:|:--------------:|:-----------------: |
| 2385 | INACTIVE | Camera device finished AE scan | CONVERGED | Values are already good, transient states are skipped by camera device. |
Zhijun He | e7cd556 | 2015-02-05 14:32:57 -0800 | [diff] [blame] | 2386 | Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is START, sequence done | FLASH_REQUIRED | Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device. |
| 2387 | Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is START, sequence done | CONVERGED | Converged after a precapture sequence, transient states are skipped by camera device. |
| 2388 | Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is CANCEL, converged | FLASH_REQUIRED | Converged but too dark w/o flash after a precapture sequence is canceled, transient states are skipped by camera device. |
| 2389 | Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is CANCEL, converged | CONVERGED | Converged after a precapture sequenceis canceled, transient states are skipped by camera device. |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2390 | 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. |
| 2391 | 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] | 2392 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2393 | </entry> |
| 2394 | <clone entry="android.control.afMode" kind="controls"> |
| 2395 | </clone> |
| 2396 | <clone entry="android.control.afRegions" kind="controls"> |
| 2397 | </clone> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2398 | <clone entry="android.control.afTrigger" kind="controls"> |
| 2399 | </clone> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2400 | <entry name="afState" type="byte" visibility="public" enum="true" |
| 2401 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2402 | <enum> |
| 2403 | <value>INACTIVE |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2404 | <notes>AF is off or has not yet tried to scan/been asked |
| 2405 | to scan. |
| 2406 | |
| 2407 | When a camera device is opened, it starts in this |
| 2408 | state. This is a transient state, the camera device may |
| 2409 | skip reporting this state in capture |
| 2410 | result.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2411 | <value>PASSIVE_SCAN |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2412 | <notes>AF is currently performing an AF scan initiated the |
| 2413 | camera device in a continuous autofocus mode. |
| 2414 | |
| 2415 | Only used by CONTINUOUS_* AF modes. This is a transient |
| 2416 | state, the camera device may skip reporting this state in |
| 2417 | capture result.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2418 | <value>PASSIVE_FOCUSED |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2419 | <notes>AF currently believes it is in focus, but may |
| 2420 | restart scanning at any time. |
| 2421 | |
| 2422 | Only used by CONTINUOUS_* AF modes. This is a transient |
| 2423 | state, the camera device may skip reporting this state in |
| 2424 | capture result.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2425 | <value>ACTIVE_SCAN |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2426 | <notes>AF is performing an AF scan because it was |
| 2427 | triggered by AF trigger. |
| 2428 | |
| 2429 | Only used by AUTO or MACRO AF modes. This is a transient |
| 2430 | state, the camera device may skip reporting this state in |
| 2431 | capture result.</notes></value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 2432 | <value>FOCUSED_LOCKED |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2433 | <notes>AF believes it is focused correctly and has locked |
| 2434 | focus. |
| 2435 | |
| 2436 | This state is reached only after an explicit START AF trigger has been |
| 2437 | sent (android.control.afTrigger), when good focus has been obtained. |
| 2438 | |
| 2439 | The lens will remain stationary until the AF mode (android.control.afMode) is changed or |
| 2440 | a new AF trigger is sent to the camera device (android.control.afTrigger). |
| 2441 | </notes></value> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 2442 | <value>NOT_FOCUSED_LOCKED |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2443 | <notes>AF has failed to focus successfully and has locked |
| 2444 | focus. |
| 2445 | |
| 2446 | This state is reached only after an explicit START AF trigger has been |
| 2447 | sent (android.control.afTrigger), when good focus cannot be obtained. |
| 2448 | |
| 2449 | The lens will remain stationary until the AF mode (android.control.afMode) is changed or |
| 2450 | a new AF trigger is sent to the camera device (android.control.afTrigger). |
| 2451 | </notes></value> |
Eino-Ville Talvala | 492ba7c | 2013-09-20 17:24:00 -0700 | [diff] [blame] | 2452 | <value>PASSIVE_UNFOCUSED |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2453 | <notes>AF finished a passive scan without finding focus, |
| 2454 | and may restart scanning at any time. |
| 2455 | |
| 2456 | 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] | 2457 | device may skip reporting this state in capture result. |
| 2458 | |
| 2459 | LEGACY camera devices do not support this state. When a passive |
| 2460 | scan has finished, it will always go to PASSIVE_FOCUSED. |
| 2461 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2462 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 2463 | <description>Current state of auto-focus (AF) algorithm.</description> |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2464 | <details> |
| 2465 | Switching between or enabling AF modes (android.control.afMode) always |
| 2466 | resets the AF state to INACTIVE. Similarly, switching between android.control.mode, |
| 2467 | or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all |
| 2468 | the algorithm states to INACTIVE. |
| 2469 | |
| 2470 | The camera device can do several state transitions between two results, if it is |
| 2471 | allowed by the state transition table. For example: INACTIVE may never actually be |
| 2472 | seen in a result. |
| 2473 | |
| 2474 | The state in the result is the state for this image (in sync with this image): if |
| 2475 | AF state becomes FOCUSED, then the image data associated with this result should |
| 2476 | be sharp. |
| 2477 | |
| 2478 | Below are state transition tables for different AF modes. |
| 2479 | |
| 2480 | When android.control.afMode is AF_MODE_OFF or AF_MODE_EDOF: |
| 2481 | |
| 2482 | State | Transition Cause | New State | Notes |
| 2483 | :------------:|:----------------:|:---------:|:-----------: |
| 2484 | INACTIVE | | INACTIVE | Never changes |
| 2485 | |
| 2486 | When android.control.afMode is AF_MODE_AUTO or AF_MODE_MACRO: |
| 2487 | |
| 2488 | State | Transition Cause | New State | Notes |
| 2489 | :-----------------:|:----------------:|:------------------:|:--------------: |
| 2490 | INACTIVE | AF_TRIGGER | ACTIVE_SCAN | Start AF sweep, Lens now moving |
| 2491 | ACTIVE_SCAN | AF sweep done | FOCUSED_LOCKED | Focused, Lens now locked |
| 2492 | ACTIVE_SCAN | AF sweep done | NOT_FOCUSED_LOCKED | Not focused, Lens now locked |
| 2493 | ACTIVE_SCAN | AF_CANCEL | INACTIVE | Cancel/reset AF, Lens now locked |
| 2494 | FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF |
| 2495 | FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving |
| 2496 | NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF |
| 2497 | NOT_FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving |
| 2498 | Any state | Mode change | INACTIVE | |
| 2499 | |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2500 | For the above table, the camera device may skip reporting any state changes that happen |
| 2501 | without application intervention (i.e. mode switch, trigger, locking). Any state that |
| 2502 | can be skipped in that manner is called a transient state. |
| 2503 | |
| 2504 | For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the |
| 2505 | state transitions listed in above table, it is also legal for the camera device to skip |
| 2506 | one or more transient states between two results. See below table for examples: |
| 2507 | |
| 2508 | State | Transition Cause | New State | Notes |
| 2509 | :-----------------:|:----------------:|:------------------:|:--------------: |
| 2510 | INACTIVE | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked. |
| 2511 | INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked. |
| 2512 | FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked. |
| 2513 | NOT_FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is good after a scan, lens is not locked. |
| 2514 | |
| 2515 | |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2516 | When android.control.afMode is AF_MODE_CONTINUOUS_VIDEO: |
| 2517 | |
| 2518 | State | Transition Cause | New State | Notes |
| 2519 | :-----------------:|:-----------------------------------:|:------------------:|:--------------: |
| 2520 | INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
| 2521 | INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked |
| 2522 | PASSIVE_SCAN | Camera device completes current scan| PASSIVE_FOCUSED | End AF scan, Lens now locked |
| 2523 | 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] | 2524 | PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, if focus is good. Lens now locked |
| 2525 | 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] | 2526 | PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked |
| 2527 | PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
| 2528 | 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] | 2529 | PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, lens now locked |
| 2530 | PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2531 | FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect |
| 2532 | FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
| 2533 | NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect |
| 2534 | NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
| 2535 | |
| 2536 | When android.control.afMode is AF_MODE_CONTINUOUS_PICTURE: |
| 2537 | |
| 2538 | State | Transition Cause | New State | Notes |
| 2539 | :-----------------:|:------------------------------------:|:------------------:|:--------------: |
| 2540 | INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
| 2541 | INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked |
| 2542 | PASSIVE_SCAN | Camera device completes current scan | PASSIVE_FOCUSED | End AF scan, Lens now locked |
| 2543 | 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] | 2544 | PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Eventual transition once the focus is good. Lens now locked |
| 2545 | 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] | 2546 | PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked |
| 2547 | PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
| 2548 | PASSIVE_UNFOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
| 2549 | PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate trans. Lens now locked |
| 2550 | PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked |
| 2551 | FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect |
| 2552 | FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
| 2553 | NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect |
| 2554 | NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2555 | |
| 2556 | When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO |
| 2557 | (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the |
| 2558 | camera device. When a trigger is included in a mode switch request, the trigger |
| 2559 | will be evaluated in the context of the new mode in the request. |
| 2560 | See below table for examples: |
| 2561 | |
| 2562 | State | Transition Cause | New State | Notes |
| 2563 | :-----------:|:--------------------------------------:|:----------------------------------------:|:--------------: |
| 2564 | any state | CAF-->AUTO mode switch | INACTIVE | Mode switch without trigger, initial state must be INACTIVE |
| 2565 | any state | CAF-->AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE | Mode switch with trigger, INACTIVE is skipped |
| 2566 | 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] | 2567 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2568 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 2569 | <entry name="afTriggerId" type="int32" visibility="system" deprecated="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2570 | <description>The ID sent with the latest |
| 2571 | CAMERA2_TRIGGER_AUTOFOCUS call</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2572 | <details>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2573 | received yet by HAL. Always updated even if AF algorithm |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 2574 | ignores the trigger</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2575 | </entry> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2576 | <clone entry="android.control.awbLock" kind="controls"> |
| 2577 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2578 | <clone entry="android.control.awbMode" kind="controls"> |
| 2579 | </clone> |
| 2580 | <clone entry="android.control.awbRegions" kind="controls"> |
| 2581 | </clone> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2582 | <clone entry="android.control.captureIntent" kind="controls"> |
| 2583 | </clone> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2584 | <entry name="awbState" type="byte" visibility="public" enum="true" |
| 2585 | hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2586 | <enum> |
| 2587 | <value>INACTIVE |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2588 | <notes>AWB is not in auto mode, or has not yet started metering. |
| 2589 | |
| 2590 | When a camera device is opened, it starts in this |
| 2591 | state. This is a transient state, the camera device may |
| 2592 | skip reporting this state in capture |
| 2593 | result.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2594 | <value>SEARCHING |
| 2595 | <notes>AWB doesn't yet have a good set of control |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2596 | values for the current scene. |
| 2597 | |
| 2598 | This is a transient state, the camera device |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2599 | may skip reporting this state in capture result.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2600 | <value>CONVERGED |
| 2601 | <notes>AWB has a good set of control values for the |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2602 | current scene.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2603 | <value>LOCKED |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2604 | <notes>AWB has been locked. |
| 2605 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2606 | </enum> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 2607 | <description>Current state of auto-white balance (AWB) algorithm.</description> |
Zhijun He | 92e698d | 2014-01-13 16:24:31 -0800 | [diff] [blame] | 2608 | <details>Switching between or enabling AWB modes (android.control.awbMode) always |
| 2609 | resets the AWB state to INACTIVE. Similarly, switching between android.control.mode, |
| 2610 | or android.control.sceneMode if `android.control.mode == USE_SCENE_MODE` resets all |
| 2611 | the algorithm states to INACTIVE. |
| 2612 | |
| 2613 | The camera device can do several state transitions between two results, if it is |
| 2614 | allowed by the state transition table. So INACTIVE may never actually be seen in |
| 2615 | a result. |
| 2616 | |
| 2617 | The state in the result is the state for this image (in sync with this image): if |
| 2618 | AWB state becomes CONVERGED, then the image data associated with this result should |
| 2619 | be good to use. |
| 2620 | |
| 2621 | Below are state transition tables for different AWB modes. |
| 2622 | |
| 2623 | When `android.control.awbMode != AWB_MODE_AUTO`: |
| 2624 | |
| 2625 | State | Transition Cause | New State | Notes |
| 2626 | :------------:|:----------------:|:---------:|:-----------------------: |
| 2627 | INACTIVE | |INACTIVE |Camera device auto white balance algorithm is disabled |
| 2628 | |
| 2629 | When android.control.awbMode is AWB_MODE_AUTO: |
| 2630 | |
| 2631 | State | Transition Cause | New State | Notes |
| 2632 | :-------------:|:--------------------------------:|:-------------:|:-----------------: |
| 2633 | INACTIVE | Camera device initiates AWB scan | SEARCHING | Values changing |
| 2634 | INACTIVE | android.control.awbLock is ON | LOCKED | Values locked |
| 2635 | SEARCHING | Camera device finishes AWB scan | CONVERGED | Good values, not changing |
| 2636 | SEARCHING | android.control.awbLock is ON | LOCKED | Values locked |
| 2637 | CONVERGED | Camera device initiates AWB scan | SEARCHING | Values changing |
| 2638 | CONVERGED | android.control.awbLock is ON | LOCKED | Values locked |
| 2639 | LOCKED | android.control.awbLock is OFF | SEARCHING | Values not good after unlock |
Zhijun He | 3fc9512 | 2014-02-11 17:18:29 -0800 | [diff] [blame] | 2640 | |
| 2641 | For the above table, the camera device may skip reporting any state changes that happen |
| 2642 | without application intervention (i.e. mode switch, trigger, locking). Any state that |
| 2643 | can be skipped in that manner is called a transient state. |
| 2644 | |
| 2645 | For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions |
| 2646 | listed in above table, it is also legal for the camera device to skip one or more |
| 2647 | transient states between two results. See below table for examples: |
| 2648 | |
| 2649 | State | Transition Cause | New State | Notes |
| 2650 | :-------------:|:--------------------------------:|:-------------:|:-----------------: |
| 2651 | INACTIVE | Camera device finished AWB scan | CONVERGED | Values are already good, transient states are skipped by camera device. |
| 2652 | 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] | 2653 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2654 | </entry> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2655 | <clone entry="android.control.effectMode" kind="controls"> |
| 2656 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2657 | <clone entry="android.control.mode" kind="controls"> |
| 2658 | </clone> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 2659 | <clone entry="android.control.sceneMode" kind="controls"> |
| 2660 | </clone> |
| 2661 | <clone entry="android.control.videoStabilizationMode" kind="controls"> |
| 2662 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2663 | </dynamic> |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2664 | <static> |
| 2665 | <entry name="availableHighSpeedVideoConfigurations" type="int32" visibility="hidden" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2666 | container="array" typedef="highSpeedVideoConfiguration" hwlevel="limited"> |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2667 | <array> |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 2668 | <size>5</size> |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2669 | <size>n</size> |
| 2670 | </array> |
| 2671 | <description> |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 2672 | List of available high speed video size, fps range and max batch size configurations |
| 2673 | supported by the camera device, in the format of (width, height, fps_min, fps_max, batch_size_max). |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2674 | </description> |
| 2675 | <range> |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 2676 | For each configuration, the fps_max &gt;= 120fps. |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2677 | </range> |
| 2678 | <details> |
Zhijun He | 4b466e7 | 2015-06-23 07:59:24 -0700 | [diff] [blame] | 2679 | When CONSTRAINED_HIGH_SPEED_VIDEO is supported in android.request.availableCapabilities, |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 2680 | this metadata will list the supported high speed video size, fps range and max batch size |
| 2681 | configurations. All the sizes listed in this configuration will be a subset of the sizes |
| 2682 | reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes} |
| 2683 | for processed non-stalling formats. |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2684 | |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 2685 | For the high speed video use case, the application must |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2686 | select the video size and fps range from this metadata to configure the recording and |
| 2687 | preview streams and setup the recording requests. For example, if the application intends |
| 2688 | to do high speed recording, it can select the maximum size reported by this metadata to |
| 2689 | configure output streams. Once the size is selected, application can filter this metadata |
| 2690 | 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] | 2691 | recording requests. Note that for the use case of multiple output streams, application |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 2692 | must select one unique size from this metadata to use (e.g., preview and recording streams |
| 2693 | must have the same size). Otherwise, the high speed capture session creation will fail. |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2694 | |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 2695 | The min and max fps will be multiple times of 30fps. |
| 2696 | |
| 2697 | High speed video streaming extends significant performance pressue to camera hardware, |
| 2698 | to achieve efficient high speed streaming, the camera device may have to aggregate |
| 2699 | multiple frames together and send to camera device for processing where the request |
| 2700 | controls are same for all the frames in this batch. Max batch size indicates |
| 2701 | the max possible number of frames the camera device will group together for this high |
| 2702 | speed stream configuration. This max batch size will be used to generate a high speed |
| 2703 | recording request list by |
Eino-Ville Talvala | f55c1a8 | 2015-06-30 13:32:09 -0700 | [diff] [blame] | 2704 | {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList}. |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 2705 | The max batch size for each configuration will satisfy below conditions: |
| 2706 | |
| 2707 | * Each max batch size will be a divisor of its corresponding fps_max / 30. For example, |
| 2708 | if max_fps is 300, max batch size will only be 1, 2, 5, or 10. |
| 2709 | * The camera device may choose smaller internal batch size for each configuration, but |
| 2710 | the actual batch size will be a divisor of max batch size. For example, if the max batch |
| 2711 | size is 8, the actual batch size used by camera device will only be 1, 2, 4, or 8. |
| 2712 | * The max batch size in each configuration entry must be no larger than 32. |
| 2713 | |
| 2714 | The camera device doesn't have to support batch mode to achieve high speed video recording, |
| 2715 | in such case, batch_size_max will be reported as 1 in each configuration entry. |
| 2716 | |
| 2717 | This fps ranges in this configuration list can only be used to create requests |
| 2718 | that are submitted to a high speed camera capture session created by |
| 2719 | {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}. |
| 2720 | The fps ranges reported in this metadata must not be used to setup capture requests for |
| 2721 | normal capture session, or it will cause request error. |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2722 | </details> |
| 2723 | <hal_details> |
| 2724 | All the sizes listed in this configuration will be a subset of the sizes reported by |
| 2725 | android.scaler.availableStreamConfigurations for processed non-stalling output formats. |
Yin-Chia Yeh | 35bdd4b | 2014-07-15 10:42:05 -0700 | [diff] [blame] | 2726 | Note that for all high speed video configurations, HAL must be able to support a minimum |
| 2727 | 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] | 2728 | |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 2729 | The HAL may support multiple sensor modes for high speed outputs, for example, 120fps |
| 2730 | sensor mode and 120fps recording, 240fps sensor mode for 240fps recording. The application |
| 2731 | usually starts preview first, then starts recording. To avoid sensor mode switch caused |
| 2732 | stutter when starting recording as much as possible, the application may want to ensure |
| 2733 | the same sensor mode is used for preview and recording. Therefore, The HAL must advertise |
| 2734 | the variable fps range [30, fps_max] for each fixed fps range in this configuration list. |
| 2735 | For example, if the HAL advertises [120, 120] and [240, 240], the HAL must also advertise |
| 2736 | [30, 120] and [30, 240] for each configuration. In doing so, if the application intends to |
| 2737 | do 120fps recording, it can select [30, 120] to start preview, and [120, 120] to start |
| 2738 | recording. For these variable fps ranges, it's up to the HAL to decide the actual fps |
| 2739 | values that are suitable for smooth preview streaming. If the HAL sees different max_fps |
| 2740 | values that fall into different sensor modes in a sequence of requests, the HAL must |
| 2741 | switch the sensor mode as quick as possible to minimize the mode switch caused stutter. |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2742 | </hal_details> |
| 2743 | <tag id="V1" /> |
| 2744 | </entry> |
Yin-Chia Yeh | 3417b29 | 2015-02-20 15:34:14 -0800 | [diff] [blame] | 2745 | <entry name="aeLockAvailable" type="byte" visibility="public" enum="true" |
| 2746 | typedef="boolean" hwlevel="legacy"> |
| 2747 | <enum> |
| 2748 | <value>FALSE</value> |
| 2749 | <value>TRUE</value> |
| 2750 | </enum> |
| 2751 | <description>Whether the camera device supports android.control.aeLock</description> |
| 2752 | <details> |
Yin-Chia Yeh | e36c5ed | 2015-04-02 14:31:53 -0700 | [diff] [blame] | 2753 | Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always |
| 2754 | list `true`. This includes FULL devices. |
Yin-Chia Yeh | 3417b29 | 2015-02-20 15:34:14 -0800 | [diff] [blame] | 2755 | </details> |
| 2756 | <tag id="BC"/> |
| 2757 | </entry> |
| 2758 | <entry name="awbLockAvailable" type="byte" visibility="public" enum="true" |
| 2759 | typedef="boolean" hwlevel="legacy"> |
| 2760 | <enum> |
| 2761 | <value>FALSE</value> |
| 2762 | <value>TRUE</value> |
| 2763 | </enum> |
| 2764 | <description>Whether the camera device supports android.control.awbLock</description> |
| 2765 | <details> |
Yin-Chia Yeh | e36c5ed | 2015-04-02 14:31:53 -0700 | [diff] [blame] | 2766 | Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will |
| 2767 | always list `true`. This includes FULL devices. |
Yin-Chia Yeh | 3417b29 | 2015-02-20 15:34:14 -0800 | [diff] [blame] | 2768 | </details> |
| 2769 | <tag id="BC"/> |
| 2770 | </entry> |
| 2771 | <entry name="availableModes" type="byte" visibility="public" |
| 2772 | type_notes="List of enums (android.control.mode)." container="array" |
| 2773 | typedef="enumList" hwlevel="legacy"> |
| 2774 | <array> |
| 2775 | <size>n</size> |
| 2776 | </array> |
| 2777 | <description> |
| 2778 | List of control modes for android.control.mode that are supported by this camera |
| 2779 | device. |
| 2780 | </description> |
| 2781 | <range>Any value listed in android.control.mode</range> |
| 2782 | <details> |
| 2783 | This list contains control modes that can be set for the camera device. |
| 2784 | LEGACY mode devices will always support AUTO mode. LIMITED and FULL |
| 2785 | devices will always support OFF, AUTO modes. |
| 2786 | </details> |
| 2787 | </entry> |
Yin-Chia Yeh | 2003c8d | 2016-01-18 19:14:55 -0800 | [diff] [blame] | 2788 | <entry name="postRawSensitivityBoostRange" type="int32" visibility="public" |
| 2789 | type_notes="Range of supported post RAW sensitivitiy boosts" |
| 2790 | container="array" typedef="rangeInt"> |
| 2791 | <array> |
| 2792 | <size>2</size> |
| 2793 | </array> |
| 2794 | <description>Range of boosts for android.control.postRawSensitivityBoost supported |
| 2795 | by this camera device. |
| 2796 | </description> |
| 2797 | <units>ISO arithmetic units, the same as android.sensor.sensitivity</units> |
| 2798 | <details> |
| 2799 | Devices support post RAW sensitivity boost will advertise |
| 2800 | android.control.postRawSensitivityBoost key for controling |
| 2801 | post RAW sensitivity boost. |
| 2802 | |
| 2803 | This key will be `null` for devices that do not support any RAW format |
| 2804 | outputs. For devices that do support RAW format outputs, this key will always |
| 2805 | present, and if a device does not support post RAW sensitivity boost, it will |
| 2806 | list `(100, 100)` in this key. |
| 2807 | </details> |
| 2808 | <hal_details> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 2809 | This key is added in legacy HAL3.4. For legacy HAL3.3 or earlier devices, camera |
| 2810 | framework will generate this key as `(100, 100)` if device supports any of RAW output |
| 2811 | formats. All legacy HAL3.4 and above devices should list this key if device supports |
| 2812 | any of RAW output formats. |
Yin-Chia Yeh | 2003c8d | 2016-01-18 19:14:55 -0800 | [diff] [blame] | 2813 | </hal_details> |
| 2814 | </entry> |
Zhijun He | 17f2d2c | 2014-06-10 18:21:34 -0700 | [diff] [blame] | 2815 | </static> |
Yin-Chia Yeh | 2003c8d | 2016-01-18 19:14:55 -0800 | [diff] [blame] | 2816 | <controls> |
| 2817 | <entry name="postRawSensitivityBoost" type="int32" visibility="public"> |
Yin-Chia Yeh | 84a51a4 | 2016-04-11 16:37:49 -0700 | [diff] [blame] | 2818 | <description>The amount of additional sensitivity boost applied to output images |
Yin-Chia Yeh | 2003c8d | 2016-01-18 19:14:55 -0800 | [diff] [blame] | 2819 | after RAW sensor data is captured. |
| 2820 | </description> |
| 2821 | <units>ISO arithmetic units, the same as android.sensor.sensitivity</units> |
| 2822 | <range>android.control.postRawSensitivityBoostRange</range> |
| 2823 | <details> |
| 2824 | Some camera devices support additional digital sensitivity boosting in the |
| 2825 | camera processing pipeline after sensor RAW image is captured. |
| 2826 | Such a boost will be applied to YUV/JPEG format output images but will not |
| 2827 | have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE. |
| 2828 | |
Yin-Chia Yeh | 84a51a4 | 2016-04-11 16:37:49 -0700 | [diff] [blame] | 2829 | This key will be `null` for devices that do not support any RAW format |
| 2830 | outputs. For devices that do support RAW format outputs, this key will always |
| 2831 | present, and if a device does not support post RAW sensitivity boost, it will |
| 2832 | list `100` in this key. |
Yin-Chia Yeh | 2003c8d | 2016-01-18 19:14:55 -0800 | [diff] [blame] | 2833 | |
| 2834 | If the camera device cannot apply the exact boost requested, it will reduce the |
| 2835 | boost to the nearest supported value. |
| 2836 | The final boost value used will be available in the output capture result. |
| 2837 | |
| 2838 | For devices that support post RAW sensitivity boost, the YUV/JPEG output images |
| 2839 | of such device will have the total sensitivity of |
Yin-Chia Yeh | 5a12e62 | 2016-01-26 13:26:56 -0800 | [diff] [blame] | 2840 | `android.sensor.sensitivity * android.control.postRawSensitivityBoost / 100` |
Yin-Chia Yeh | 2003c8d | 2016-01-18 19:14:55 -0800 | [diff] [blame] | 2841 | The sensitivity of RAW format images will always be `android.sensor.sensitivity` |
| 2842 | |
| 2843 | This control is only effective if android.control.aeMode or android.control.mode is set to |
| 2844 | OFF; otherwise the auto-exposure algorithm will override this value. |
| 2845 | </details> |
| 2846 | </entry> |
| 2847 | </controls> |
| 2848 | <dynamic> |
| 2849 | <clone entry="android.control.postRawSensitivityBoost" kind="controls"> |
| 2850 | </clone> |
| 2851 | </dynamic> |
Chien-Yu Chen | 5e46b0a | 2017-01-09 15:55:06 -0800 | [diff] [blame] | 2852 | <controls> |
| 2853 | <entry name="enableZsl" type="byte" visibility="public" enum="true" typedef="boolean"> |
| 2854 | <enum> |
| 2855 | <value>FALSE |
| 2856 | <notes>Requests with android.control.captureIntent == STILL_CAPTURE must be captured |
| 2857 | after previous requests.</notes></value> |
| 2858 | <value>TRUE |
| 2859 | <notes>Requests with android.control.captureIntent == STILL_CAPTURE may or may not be |
| 2860 | captured before previous requests.</notes></value> |
| 2861 | </enum> |
| 2862 | <description>Allow camera device to enable zero-shutter-lag mode for requests with |
| 2863 | android.control.captureIntent == STILL_CAPTURE. |
| 2864 | </description> |
| 2865 | <details> |
| 2866 | If enableZsl is `true`, the camera device may enable zero-shutter-lag mode for requests with |
| 2867 | STILL_CAPTURE capture intent. The camera device may use images captured in the past to |
| 2868 | produce output images for a zero-shutter-lag request. The result metadata including the |
| 2869 | android.sensor.timestamp reflects the source frames used to produce output images. |
| 2870 | Therefore, the contents of the output images and the result metadata may be out of order |
| 2871 | compared to previous regular requests. enableZsl does not affect requests with other |
| 2872 | capture intents. |
| 2873 | |
| 2874 | For example, when requests are submitted in the following order: |
| 2875 | Request A: enableZsl is ON, android.control.captureIntent is PREVIEW |
| 2876 | Request B: enableZsl is ON, android.control.captureIntent is STILL_CAPTURE |
| 2877 | |
| 2878 | The output images for request B may have contents captured before the output images for |
| 2879 | request A, and the result metadata for request B may be older than the result metadata for |
| 2880 | request A. |
| 2881 | |
Chien-Yu Chen | 4727280 | 2017-04-18 15:17:15 -0700 | [diff] [blame] | 2882 | Note that when enableZsl is `true`, it is not guaranteed to get output images captured in |
| 2883 | the past for requests with STILL_CAPTURE capture intent. |
Chien-Yu Chen | 5e46b0a | 2017-01-09 15:55:06 -0800 | [diff] [blame] | 2884 | |
Chien-Yu Chen | 4727280 | 2017-04-18 15:17:15 -0700 | [diff] [blame] | 2885 | For applications targeting SDK versions O and newer, the value of enableZsl in |
| 2886 | TEMPLATE_STILL_CAPTURE template may be `true`. The value in other templates is always |
| 2887 | `false` if present. |
| 2888 | |
| 2889 | For applications targeting SDK versions older than O, the value of enableZsl in all |
| 2890 | capture templates is always `false` if present. |
Chien-Yu Chen | 853e0dd | 2017-05-03 12:17:47 -0700 | [diff] [blame] | 2891 | |
| 2892 | For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template. |
Chien-Yu Chen | 5e46b0a | 2017-01-09 15:55:06 -0800 | [diff] [blame] | 2893 | </details> |
| 2894 | <hal_details> |
| 2895 | It is valid for HAL to produce regular output images for requests with STILL_CAPTURE |
| 2896 | capture intent. |
| 2897 | </hal_details> |
| 2898 | </entry> |
| 2899 | </controls> |
| 2900 | <dynamic> |
| 2901 | <clone entry="android.control.enableZsl" kind="controls"> |
| 2902 | </clone> |
Chien-Yu Chen | c357faa | 2018-01-19 10:50:17 -0800 | [diff] [blame] | 2903 | <entry name="afSceneChange" type="byte" visibility="public" enum="true" hal_version="3.3"> |
Chien-Yu Chen | b8c6828 | 2017-11-27 16:12:38 -0800 | [diff] [blame] | 2904 | <enum> |
| 2905 | <value>NOT_DETECTED |
| 2906 | <notes>Scene change is not detected within the AF region(s).</notes></value> |
| 2907 | <value>DETECTED |
| 2908 | <notes>Scene change is detected within the AF region(s).</notes></value> |
| 2909 | </enum> |
| 2910 | <description>Whether a significant scene change is detected within the currently-set AF |
| 2911 | region(s).</description> |
| 2912 | <details>When the camera focus routine detects a change in the scene it is looking at, |
| 2913 | such as a large shift in camera viewpoint, significant motion in the scene, or a |
| 2914 | significant illumination change, this value will be set to DETECTED for a single capture |
| 2915 | result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar |
| 2916 | to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes. |
| 2917 | |
Chien-Yu Chen | b8c6828 | 2017-11-27 16:12:38 -0800 | [diff] [blame] | 2918 | This key will be available if the camera device advertises this key via {@link |
| 2919 | android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys|ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}. |
| 2920 | </details> |
| 2921 | </entry> |
Chien-Yu Chen | 5e46b0a | 2017-01-09 15:55:06 -0800 | [diff] [blame] | 2922 | </dynamic> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2923 | </section> |
| 2924 | <section name="demosaic"> |
| 2925 | <controls> |
Igor Murashkin | b556bc4 | 2012-12-04 16:07:21 -0800 | [diff] [blame] | 2926 | <entry name="mode" type="byte" enum="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2927 | <enum> |
| 2928 | <value>FAST |
| 2929 | <notes>Minimal or no slowdown of frame rate compared to |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2930 | Bayer RAW output.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2931 | <value>HIGH_QUALITY |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 2932 | <notes>Improved processing quality but the frame rate might be slowed down |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2933 | relative to raw output.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2934 | </enum> |
| 2935 | <description>Controls the quality of the demosaicing |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2936 | processing.</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 2937 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2938 | </entry> |
| 2939 | </controls> |
| 2940 | </section> |
| 2941 | <section name="edge"> |
| 2942 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 2943 | <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2944 | <enum> |
| 2945 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2946 | <notes>No edge enhancement is applied.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2947 | <value>FAST |
Chien-Yu Chen | 9365b4e | 2015-07-14 16:33:58 -0700 | [diff] [blame] | 2948 | <notes>Apply edge enhancement at a quality level that does not slow down frame rate |
| 2949 | relative to sensor output. It may be the same as OFF if edge enhancement will |
| 2950 | slow down frame rate relative to sensor.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2951 | <value>HIGH_QUALITY |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 2952 | <notes>Apply high-quality edge enhancement, at a cost of possibly reduced output frame rate. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 2953 | </notes></value> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 2954 | <value optional="true">ZERO_SHUTTER_LAG <notes>Edge enhancement is applied at different |
| 2955 | levels for different output streams, based on resolution. Streams at maximum recording |
| 2956 | resolution (see {@link |
| 2957 | android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession}) |
| 2958 | or below have edge enhancement applied, while higher-resolution streams have no edge |
| 2959 | enhancement applied. The level of edge enhancement for low-resolution streams is tuned |
| 2960 | so that frame rate is not impacted, and the quality is equal to or better than FAST |
| 2961 | (since it is only applied to lower-resolution outputs, quality may improve from FAST). |
Eino-Ville Talvala | 073e458 | 2015-07-07 10:40:59 -0700 | [diff] [blame] | 2962 | |
| 2963 | This mode is intended to be used by applications operating in a zero-shutter-lag mode |
| 2964 | with YUV or PRIVATE reprocessing, where the application continuously captures |
| 2965 | high-resolution intermediate buffers into a circular buffer, from which a final image is |
| 2966 | produced via reprocessing when a user takes a picture. For such a use case, the |
| 2967 | high-resolution buffers must not have edge enhancement applied to maximize efficiency of |
| 2968 | preview and to avoid double-applying enhancement when reprocessed, while low-resolution |
| 2969 | buffers (used for recording or preview, generally) need edge enhancement applied for |
| 2970 | reasonable preview quality. |
| 2971 | |
| 2972 | This mode is guaranteed to be supported by devices that support either the |
| 2973 | YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities |
Chien-Yu Chen | d91ea14 | 2015-07-08 11:49:38 -0700 | [diff] [blame] | 2974 | (android.request.availableCapabilities lists either of those capabilities) and it will |
| 2975 | be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template. |
Eino-Ville Talvala | 073e458 | 2015-07-07 10:40:59 -0700 | [diff] [blame] | 2976 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 2977 | </enum> |
| 2978 | <description>Operation mode for edge |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 2979 | enhancement.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 2980 | <range>android.edge.availableEdgeModes</range> |
| 2981 | <details>Edge enhancement improves sharpness and details in the captured image. OFF means |
| 2982 | no enhancement will be applied by the camera device. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 2983 | |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 2984 | FAST/HIGH_QUALITY both mean camera device determined enhancement |
Zhijun He | b1c5bab | 2013-12-16 15:08:14 -0800 | [diff] [blame] | 2985 | will be applied. HIGH_QUALITY mode indicates that the |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 2986 | camera device will use the highest-quality enhancement algorithms, |
| 2987 | even if it slows down capture rate. FAST means the camera device will |
Chien-Yu Chen | 9365b4e | 2015-07-14 16:33:58 -0700 | [diff] [blame] | 2988 | not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if |
| 2989 | edge enhancement will slow down capture rate. Every output stream will have a similar |
| 2990 | amount of enhancement applied. |
Eino-Ville Talvala | 073e458 | 2015-07-07 10:40:59 -0700 | [diff] [blame] | 2991 | |
| 2992 | ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular |
| 2993 | buffer of high-resolution images during preview and reprocess image(s) from that buffer |
| 2994 | into a final capture when triggered by the user. In this mode, the camera device applies |
| 2995 | edge enhancement to low-resolution streams (below maximum recording resolution) to |
| 2996 | maximize preview quality, but does not apply edge enhancement to high-resolution streams, |
| 2997 | since those will be reprocessed later if necessary. |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 2998 | |
| 2999 | For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera |
| 3000 | device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively. |
Chien-Yu Chen | 9365b4e | 2015-07-14 16:33:58 -0700 | [diff] [blame] | 3001 | The camera device may adjust its internal edge enhancement parameters for best |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 3002 | image quality based on the android.reprocess.effectiveExposureFactor, if it is set. |
| 3003 | </details> |
| 3004 | <hal_details> |
| 3005 | For YUV_REPROCESSING The HAL can use android.reprocess.effectiveExposureFactor to |
| 3006 | adjust the internal edge enhancement reduction parameters appropriately to get the best |
| 3007 | quality images. |
| 3008 | </hal_details> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3009 | <tag id="V1" /> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 3010 | <tag id="REPROC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3011 | </entry> |
| 3012 | <entry name="strength" type="byte"> |
| 3013 | <description>Control the amount of edge enhancement |
| 3014 | applied to the images</description> |
| 3015 | <units>1-10; 10 is maximum sharpening</units> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3016 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3017 | </entry> |
| 3018 | </controls> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3019 | <static> |
| 3020 | <entry name="availableEdgeModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3021 | type_notes="list of enums" container="array" typedef="enumList" |
| 3022 | hwlevel="full"> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3023 | <array> |
| 3024 | <size>n</size> |
| 3025 | </array> |
| 3026 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3027 | List of edge enhancement modes for android.edge.mode that are supported by this camera |
| 3028 | device. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3029 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3030 | <range>Any value listed in android.edge.mode</range> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3031 | <details> |
Chien-Yu Chen | d91ea14 | 2015-07-08 11:49:38 -0700 | [diff] [blame] | 3032 | Full-capability camera devices must always support OFF; camera devices that support |
| 3033 | YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will |
| 3034 | list FAST. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3035 | </details> |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 3036 | <hal_details> |
| 3037 | HAL must support both FAST and HIGH_QUALITY if edge enhancement control is available |
| 3038 | on the camera device, but the underlying implementation can be the same for both modes. |
| 3039 | That is, if the highest quality implementation on the camera device does not slow down |
| 3040 | capture rate, then FAST and HIGH_QUALITY will generate the same output. |
| 3041 | </hal_details> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3042 | <tag id="V1" /> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 3043 | <tag id="REPROC" /> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3044 | </entry> |
| 3045 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3046 | <dynamic> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3047 | <clone entry="android.edge.mode" kind="controls"> |
| 3048 | <tag id="V1" /> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 3049 | <tag id="REPROC" /> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 3050 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3051 | </dynamic> |
| 3052 | </section> |
| 3053 | <section name="flash"> |
| 3054 | <controls> |
| 3055 | <entry name="firingPower" type="byte"> |
| 3056 | <description>Power for flash firing/torch</description> |
| 3057 | <units>10 is max power; 0 is no flash. Linear</units> |
| 3058 | <range>0 - 10</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3059 | <details>Power for snapshot may use a different scale than |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3060 | for torch mode. Only one entry for torch mode will be |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3061 | used</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3062 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3063 | </entry> |
| 3064 | <entry name="firingTime" type="int64"> |
| 3065 | <description>Firing time of flash relative to start of |
| 3066 | exposure</description> |
| 3067 | <units>nanoseconds</units> |
| 3068 | <range>0-(exposure time-flash duration)</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3069 | <details>Clamped to (0, exposure time - flash |
| 3070 | duration).</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3071 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3072 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3073 | <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3074 | <enum> |
| 3075 | <value>OFF |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 3076 | <notes> |
| 3077 | Do not fire the flash for this capture. |
| 3078 | </notes> |
| 3079 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3080 | <value>SINGLE |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 3081 | <notes> |
| 3082 | If the flash is available and charged, fire flash |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3083 | for this capture. |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 3084 | </notes> |
| 3085 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3086 | <value>TORCH |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 3087 | <notes> |
| 3088 | Transition flash to continuously on. |
| 3089 | </notes> |
| 3090 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3091 | </enum> |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 3092 | <description>The desired mode for for the camera device's flash control.</description> |
| 3093 | <details> |
| 3094 | This control is only effective when flash unit is available |
Zhijun He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 3095 | (`android.flash.info.available == true`). |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 3096 | |
| 3097 | When this control is used, the android.control.aeMode must be set to ON or OFF. |
| 3098 | Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH, |
| 3099 | ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control. |
| 3100 | |
| 3101 | When set to OFF, the camera device will not fire flash for this capture. |
| 3102 | |
| 3103 | When set to SINGLE, the camera device will fire flash regardless of the camera |
| 3104 | 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] | 3105 | control should be used along with auto-exposure (AE) precapture metering sequence |
Zhijun He | ea27bc3 | 2014-01-15 13:47:59 -0800 | [diff] [blame] | 3106 | (android.control.aePrecaptureTrigger), otherwise, the image may be incorrectly exposed. |
| 3107 | |
| 3108 | When set to TORCH, the flash will be on continuously. This mode can be used |
| 3109 | 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] | 3110 | |
| 3111 | 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] | 3112 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3113 | <tag id="BC" /> |
| 3114 | </entry> |
| 3115 | </controls> |
| 3116 | <static> |
| 3117 | <namespace name="info"> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3118 | <entry name="available" type="byte" visibility="public" enum="true" |
| 3119 | typedef="boolean" hwlevel="legacy"> |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3120 | <enum> |
| 3121 | <value>FALSE</value> |
| 3122 | <value>TRUE</value> |
| 3123 | </enum> |
| 3124 | <description>Whether this camera device has a |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3125 | flash unit.</description> |
| 3126 | <details> |
| 3127 | Will be `false` if no flash is available. |
| 3128 | |
| 3129 | If there is no flash unit, none of the flash controls do |
| 3130 | anything.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3131 | <tag id="BC" /> |
| 3132 | </entry> |
| 3133 | <entry name="chargeDuration" type="int64"> |
| 3134 | <description>Time taken before flash can fire |
| 3135 | again</description> |
| 3136 | <units>nanoseconds</units> |
| 3137 | <range>0-1e9</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3138 | <details>1 second too long/too short for recharge? Should |
| 3139 | this be power-dependent?</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3140 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3141 | </entry> |
| 3142 | </namespace> |
| 3143 | <entry name="colorTemperature" type="byte"> |
| 3144 | <description>The x,y whitepoint of the |
| 3145 | flash</description> |
| 3146 | <units>pair of floats</units> |
| 3147 | <range>0-1 for both</range> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3148 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3149 | </entry> |
| 3150 | <entry name="maxEnergy" type="byte"> |
| 3151 | <description>Max energy output of the flash for a full |
| 3152 | power single flash</description> |
| 3153 | <units>lumen-seconds</units> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 3154 | <range>&gt;= 0</range> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3155 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3156 | </entry> |
| 3157 | </static> |
| 3158 | <dynamic> |
| 3159 | <clone entry="android.flash.firingPower" kind="controls"> |
| 3160 | </clone> |
| 3161 | <clone entry="android.flash.firingTime" kind="controls"> |
| 3162 | </clone> |
| 3163 | <clone entry="android.flash.mode" kind="controls"></clone> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3164 | <entry name="state" type="byte" visibility="public" enum="true" |
| 3165 | hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3166 | <enum> |
| 3167 | <value>UNAVAILABLE |
Zhijun He | e74a31c | 2014-03-25 11:33:29 -0700 | [diff] [blame] | 3168 | <notes>No flash on camera.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3169 | <value>CHARGING |
Zhijun He | e74a31c | 2014-03-25 11:33:29 -0700 | [diff] [blame] | 3170 | <notes>Flash is charging and cannot be fired.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3171 | <value>READY |
Zhijun He | e74a31c | 2014-03-25 11:33:29 -0700 | [diff] [blame] | 3172 | <notes>Flash is ready to fire.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3173 | <value>FIRED |
Zhijun He | e74a31c | 2014-03-25 11:33:29 -0700 | [diff] [blame] | 3174 | <notes>Flash fired for this capture.</notes></value> |
| 3175 | <value>PARTIAL |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3176 | <notes>Flash partially illuminated this frame. |
| 3177 | |
| 3178 | This is usually due to the next or previous frame having |
| 3179 | the flash fire, and the flash spilling into this capture |
Zhijun He | e74a31c | 2014-03-25 11:33:29 -0700 | [diff] [blame] | 3180 | due to hardware limitations.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3181 | </enum> |
| 3182 | <description>Current state of the flash |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3183 | unit.</description> |
| 3184 | <details> |
| 3185 | When the camera device doesn't have flash unit |
| 3186 | (i.e. `android.flash.info.available == false`), this state will always be UNAVAILABLE. |
| 3187 | Other states indicate the current flash status. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3188 | |
| 3189 | In certain conditions, this will be available on LEGACY devices: |
| 3190 | |
| 3191 | * Flash-less cameras always return UNAVAILABLE. |
| 3192 | * Using android.control.aeMode `==` ON_ALWAYS_FLASH |
| 3193 | will always return FIRED. |
| 3194 | * Using android.flash.mode `==` TORCH |
| 3195 | will always return FIRED. |
| 3196 | |
| 3197 | In all other conditions the state will not be available on |
| 3198 | LEGACY devices (i.e. it will be `null`). |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3199 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3200 | </entry> |
| 3201 | </dynamic> |
| 3202 | </section> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3203 | <section name="hotPixel"> |
| 3204 | <controls> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3205 | <entry name="mode" type="byte" visibility="public" enum="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3206 | <enum> |
| 3207 | <value>OFF |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3208 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3209 | No hot pixel correction is applied. |
| 3210 | |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3211 | The frame rate must not be reduced relative to sensor raw output |
| 3212 | for this option. |
| 3213 | |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 3214 | The hotpixel map may be returned in android.statistics.hotPixelMap. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3215 | </notes> |
| 3216 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3217 | <value>FAST |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3218 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3219 | Hot pixel correction is applied, without reducing frame |
| 3220 | rate relative to sensor raw output. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3221 | |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 3222 | The hotpixel map may be returned in android.statistics.hotPixelMap. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3223 | </notes> |
| 3224 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3225 | <value>HIGH_QUALITY |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3226 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3227 | High-quality hot pixel correction is applied, at a cost |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 3228 | of possibly reduced frame rate relative to sensor raw output. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3229 | |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 3230 | The hotpixel map may be returned in android.statistics.hotPixelMap. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3231 | </notes> |
| 3232 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3233 | </enum> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3234 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3235 | Operational mode for hot pixel correction. |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 3236 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3237 | <range>android.hotPixel.availableHotPixelModes</range> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 3238 | <details> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3239 | Hotpixel correction interpolates out, or otherwise removes, pixels |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3240 | that do not accurately measure the incoming light (i.e. pixels that |
| 3241 | are stuck at an arbitrary value or are oversensitive). |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 3242 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3243 | <tag id="V1" /> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 3244 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3245 | </entry> |
| 3246 | </controls> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 3247 | <static> |
| 3248 | <entry name="availableHotPixelModes" type="byte" visibility="public" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 3249 | type_notes="list of enums" container="array" typedef="enumList"> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3250 | <array> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3251 | <size>n</size> |
| 3252 | </array> |
| 3253 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3254 | 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] | 3255 | camera device. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3256 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3257 | <range>Any value listed in android.hotPixel.mode</range> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 3258 | <details> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 3259 | FULL mode camera devices will always support FAST. |
| 3260 | </details> |
| 3261 | <hal_details> |
| 3262 | To avoid performance issues, there will be significantly fewer hot |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3263 | pixels than actual pixels on the camera sensor. |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 3264 | HAL must support both FAST and HIGH_QUALITY if hot pixel correction control is available |
| 3265 | on the camera device, but the underlying implementation can be the same for both modes. |
| 3266 | That is, if the highest quality implementation on the camera device does not slow down |
| 3267 | capture rate, then FAST and HIGH_QUALITY will generate the same output. |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3268 | </hal_details> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 3269 | <tag id="V1" /> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 3270 | <tag id="RAW" /> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 3271 | </entry> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 3272 | </static> |
| 3273 | <dynamic> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3274 | <clone entry="android.hotPixel.mode" kind="controls"> |
| 3275 | <tag id="V1" /> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 3276 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3277 | </clone> |
| 3278 | </dynamic> |
| 3279 | </section> |
| 3280 | <section name="jpeg"> |
| 3281 | <controls> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 3282 | <entry name="gpsLocation" type="byte" visibility="java_public" synthetic="true" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3283 | typedef="location" hwlevel="legacy"> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 3284 | <description> |
| 3285 | A location object to use when generating image GPS metadata. |
| 3286 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3287 | <details> |
| 3288 | Setting a location object in a request will include the GPS coordinates of the location |
| 3289 | into any JPEG images captured based on the request. These coordinates can then be |
| 3290 | viewed by anyone who receives the JPEG image. |
| 3291 | </details> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 3292 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 3293 | <entry name="gpsCoordinates" type="double" visibility="ndk_public" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3294 | 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] | 3295 | container="array" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3296 | <array> |
| 3297 | <size>3</size> |
| 3298 | </array> |
| 3299 | <description>GPS coordinates to include in output JPEG |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3300 | EXIF.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3301 | <range>(-180 - 180], [-90,90], [-inf, inf]</range> |
| 3302 | <tag id="BC" /> |
| 3303 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 3304 | <entry name="gpsProcessingMethod" type="byte" visibility="ndk_public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3305 | typedef="string" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3306 | <description>32 characters describing GPS algorithm to |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3307 | include in EXIF.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3308 | <units>UTF-8 null-terminated string</units> |
| 3309 | <tag id="BC" /> |
| 3310 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 3311 | <entry name="gpsTimestamp" type="int64" visibility="ndk_public" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3312 | <description>Time GPS fix was made to include in |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3313 | EXIF.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3314 | <units>UTC in seconds since January 1, 1970</units> |
| 3315 | <tag id="BC" /> |
| 3316 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3317 | <entry name="orientation" type="int32" visibility="public" hwlevel="legacy"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3318 | <description>The orientation for a JPEG image.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3319 | <units>Degrees in multiples of 90</units> |
| 3320 | <range>0, 90, 180, 270</range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3321 | <details> |
| 3322 | The clockwise rotation angle in degrees, relative to the orientation |
| 3323 | to the camera, that the JPEG picture needs to be rotated by, to be viewed |
| 3324 | upright. |
| 3325 | |
| 3326 | Camera devices may either encode this value into the JPEG EXIF header, or |
Yin-Chia Yeh | 58a8b19 | 2015-03-27 13:54:56 -0700 | [diff] [blame] | 3327 | rotate the image data to match this orientation. When the image data is rotated, |
| 3328 | the thumbnail data will also be rotated. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3329 | |
| 3330 | Note that this orientation is relative to the orientation of the camera sensor, given |
| 3331 | by android.sensor.orientation. |
| 3332 | |
| 3333 | To translate from the device orientation given by the Android sensor APIs, the following |
| 3334 | sample code may be used: |
| 3335 | |
| 3336 | private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) { |
| 3337 | if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0; |
| 3338 | int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION); |
| 3339 | |
| 3340 | // Round device orientation to a multiple of 90 |
| 3341 | deviceOrientation = (deviceOrientation + 45) / 90 * 90; |
| 3342 | |
| 3343 | // Reverse device orientation for front-facing cameras |
| 3344 | boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT; |
| 3345 | if (facingFront) deviceOrientation = -deviceOrientation; |
| 3346 | |
| 3347 | // Calculate desired JPEG orientation relative to camera orientation to make |
| 3348 | // the image upright relative to the device orientation |
| 3349 | int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360; |
| 3350 | |
| 3351 | return jpegOrientation; |
| 3352 | } |
| 3353 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3354 | <tag id="BC" /> |
| 3355 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3356 | <entry name="quality" type="byte" visibility="public" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3357 | <description>Compression quality of the final JPEG |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 3358 | image.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3359 | <range>1-100; larger is higher quality</range> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3360 | <details>85-95 is typical usage range.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3361 | <tag id="BC" /> |
| 3362 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3363 | <entry name="thumbnailQuality" type="byte" visibility="public" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3364 | <description>Compression quality of JPEG |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3365 | thumbnail.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3366 | <range>1-100; larger is higher quality</range> |
| 3367 | <tag id="BC" /> |
| 3368 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3369 | <entry name="thumbnailSize" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3370 | container="array" typedef="size" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3371 | <array> |
| 3372 | <size>2</size> |
| 3373 | </array> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 3374 | <description>Resolution of embedded JPEG thumbnail.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3375 | <range>android.jpeg.availableThumbnailSizes</range> |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 3376 | <details>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail, |
| 3377 | but the captured JPEG will still be a valid image. |
Zhijun He | 52e0955 | 2013-12-11 17:03:24 -0800 | [diff] [blame] | 3378 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3379 | For best results, when issuing a request for a JPEG image, the thumbnail size selected |
| 3380 | should have the same aspect ratio as the main JPEG output. |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 3381 | |
| 3382 | If the thumbnail image aspect ratio differs from the JPEG primary image aspect |
| 3383 | ratio, the camera device creates the thumbnail by cropping it from the primary image. |
| 3384 | For example, if the primary image has 4:3 aspect ratio, the thumbnail image has |
| 3385 | 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to |
| 3386 | generate the thumbnail image. The thumbnail image will always have a smaller Field |
| 3387 | Of View (FOV) than the primary image when aspect ratios differ. |
Yin-Chia Yeh | 390230b | 2015-06-22 15:50:05 -0700 | [diff] [blame] | 3388 | |
| 3389 | When an android.jpeg.orientation of non-zero degree is requested, |
| 3390 | the camera device will handle thumbnail rotation in one of the following ways: |
| 3391 | |
| 3392 | * Set the {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag} |
| 3393 | and keep jpeg and thumbnail image data unrotated. |
| 3394 | * Rotate the jpeg and thumbnail image data and not set |
| 3395 | {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}. In this |
| 3396 | case, LIMITED or FULL hardware level devices will report rotated thumnail size in |
| 3397 | capture result, so the width and height will be interchanged if 90 or 270 degree |
| 3398 | orientation is requested. LEGACY device will always report unrotated thumbnail |
| 3399 | size. |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 3400 | </details> |
| 3401 | <hal_details> |
| 3402 | The HAL must not squeeze or stretch the downscaled primary image to generate thumbnail. |
| 3403 | The cropping must be done on the primary jpeg image rather than the sensor active array. |
| 3404 | The stream cropping rule specified by "S5. Cropping" in camera3.h doesn't apply to the |
| 3405 | thumbnail image cropping. |
| 3406 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3407 | <tag id="BC" /> |
| 3408 | </entry> |
| 3409 | </controls> |
| 3410 | <static> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3411 | <entry name="availableThumbnailSizes" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3412 | container="array" typedef="size" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3413 | <array> |
| 3414 | <size>2</size> |
| 3415 | <size>n</size> |
| 3416 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3417 | <description>List of JPEG thumbnail sizes for android.jpeg.thumbnailSize supported by this |
| 3418 | camera device.</description> |
| 3419 | <details> |
| 3420 | This list will include at least one non-zero resolution, plus `(0,0)` for indicating no |
| 3421 | thumbnail should be generated. |
| 3422 | |
| 3423 | Below condiditions will be satisfied for this size list: |
Zhijun He | 52e0955 | 2013-12-11 17:03:24 -0800 | [diff] [blame] | 3424 | |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 3425 | * The sizes will be sorted by increasing pixel area (width x height). |
| 3426 | If several resolutions have the same area, they will be sorted by increasing width. |
| 3427 | * 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] | 3428 | aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. |
Zhijun He | 52e0955 | 2013-12-11 17:03:24 -0800 | [diff] [blame] | 3429 | The largest size is defined as the size that has the largest pixel area |
| 3430 | in a given size list. |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 3431 | * Each output JPEG size in android.scaler.availableStreamConfigurations will have at least |
Zhijun He | 52e0955 | 2013-12-11 17:03:24 -0800 | [diff] [blame] | 3432 | one corresponding size that has the same aspect ratio in availableThumbnailSizes, |
| 3433 | and vice versa. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3434 | * 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] | 3435 | <tag id="BC" /> |
| 3436 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3437 | <entry name="maxSize" type="int32" visibility="system"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3438 | <description>Maximum size in bytes for the compressed |
| 3439 | JPEG buffer</description> |
| 3440 | <range>Must be large enough to fit any JPEG produced by |
| 3441 | the camera</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3442 | <details>This is used for sizing the gralloc buffers for |
| 3443 | JPEG</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3444 | </entry> |
| 3445 | </static> |
| 3446 | <dynamic> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 3447 | <clone entry="android.jpeg.gpsLocation" kind="controls"> |
| 3448 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3449 | <clone entry="android.jpeg.gpsCoordinates" kind="controls"> |
| 3450 | </clone> |
| 3451 | <clone entry="android.jpeg.gpsProcessingMethod" |
| 3452 | kind="controls"></clone> |
| 3453 | <clone entry="android.jpeg.gpsTimestamp" kind="controls"> |
| 3454 | </clone> |
| 3455 | <clone entry="android.jpeg.orientation" kind="controls"> |
| 3456 | </clone> |
| 3457 | <clone entry="android.jpeg.quality" kind="controls"> |
| 3458 | </clone> |
| 3459 | <entry name="size" type="int32"> |
| 3460 | <description>The size of the compressed JPEG image, in |
| 3461 | bytes</description> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 3462 | <range>&gt;= 0</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3463 | <details>If no JPEG output is produced for the request, |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 3464 | this must be 0. |
| 3465 | |
| 3466 | Otherwise, this describes the real size of the compressed |
| 3467 | JPEG image placed in the output stream. More specifically, |
| 3468 | if android.jpeg.maxSize = 1000000, and a specific capture |
| 3469 | has android.jpeg.size = 500000, then the output buffer from |
| 3470 | the JPEG stream will be 1000000 bytes, of which the first |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3471 | 500000 make up the real data.</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 3472 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3473 | </entry> |
| 3474 | <clone entry="android.jpeg.thumbnailQuality" |
| 3475 | kind="controls"></clone> |
| 3476 | <clone entry="android.jpeg.thumbnailSize" kind="controls"> |
| 3477 | </clone> |
| 3478 | </dynamic> |
| 3479 | </section> |
| 3480 | <section name="lens"> |
| 3481 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3482 | <entry name="aperture" type="float" visibility="public" hwlevel="full"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3483 | <description>The desired lens aperture size, as a ratio of lens focal length to the |
| 3484 | effective aperture diameter.</description> |
| 3485 | <units>The f-number (f/N)</units> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3486 | <range>android.lens.info.availableApertures</range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3487 | <details>Setting this value is only supported on the camera devices that have a variable |
| 3488 | aperture lens. |
Zhijun He | 1b58d38 | 2014-01-10 10:22:53 -0800 | [diff] [blame] | 3489 | |
| 3490 | When this is supported and android.control.aeMode is OFF, |
| 3491 | this can be set along with android.sensor.exposureTime, |
| 3492 | android.sensor.sensitivity, and android.sensor.frameDuration |
| 3493 | to achieve manual exposure control. |
| 3494 | |
| 3495 | The requested aperture value may take several frames to reach the |
| 3496 | requested value; the camera device will report the current (intermediate) |
| 3497 | aperture size in capture result metadata while the aperture is changing. |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3498 | 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] | 3499 | |
| 3500 | When this is supported and android.control.aeMode is one of |
| 3501 | the ON modes, this will be overridden by the camera device |
| 3502 | auto-exposure algorithm, the overridden values are then provided |
| 3503 | back to the user in the corresponding result.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3504 | <tag id="V1" /> |
| 3505 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3506 | <entry name="filterDensity" type="float" visibility="public" hwlevel="full"> |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3507 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3508 | The desired setting for the lens neutral density filter(s). |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3509 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3510 | <units>Exposure Value (EV)</units> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3511 | <range>android.lens.info.availableFilterDensities</range> |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3512 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3513 | This control will not be supported on most camera devices. |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3514 | |
| 3515 | Lens filters are typically used to lower the amount of light the |
| 3516 | sensor is exposed to (measured in steps of EV). As used here, an EV |
| 3517 | step is the standard logarithmic representation, which are |
| 3518 | non-negative, and inversely proportional to the amount of light |
| 3519 | hitting the sensor. For example, setting this to 0 would result |
| 3520 | in no reduction of the incoming light, and setting this to 2 would |
| 3521 | mean that the filter is set to reduce incoming light by two stops |
| 3522 | (allowing 1/4 of the prior amount of light to the sensor). |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3523 | |
| 3524 | It may take several frames before the lens filter density changes |
| 3525 | to the requested value. While the filter density is still changing, |
| 3526 | android.lens.state will be set to MOVING. |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3527 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3528 | <tag id="V1" /> |
| 3529 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3530 | <entry name="focalLength" type="float" visibility="public" hwlevel="legacy"> |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3531 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3532 | The desired lens focal length; used for optical zoom. |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3533 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3534 | <units>Millimeters</units> |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3535 | <range>android.lens.info.availableFocalLengths</range> |
| 3536 | <details> |
| 3537 | This setting controls the physical focal length of the camera |
| 3538 | device's lens. Changing the focal length changes the field of |
| 3539 | view of the camera device, and is usually used for optical zoom. |
| 3540 | |
| 3541 | Like android.lens.focusDistance and android.lens.aperture, this |
| 3542 | setting won't be applied instantaneously, and it may take several |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3543 | frames before the lens can change to the requested focal length. |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3544 | While the focal length is still changing, android.lens.state will |
| 3545 | be set to MOVING. |
| 3546 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3547 | Optical zoom will not be supported on most devices. |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3548 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3549 | <tag id="V1" /> |
| 3550 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3551 | <entry name="focusDistance" type="float" visibility="public" hwlevel="full"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3552 | <description>Desired distance to plane of sharpest focus, |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 3553 | measured from frontmost surface of the lens.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3554 | <units>See android.lens.info.focusDistanceCalibration for details</units> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 3555 | <range>&gt;= 0</range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3556 | <details> |
| 3557 | This control can be used for setting manual focus, on devices that support |
| 3558 | the MANUAL_SENSOR capability and have a variable-focus lens (see |
| 3559 | android.lens.info.minimumFocusDistance). |
| 3560 | |
| 3561 | A value of `0.0f` means infinity focus. The value set will be clamped to |
| 3562 | `[0.0f, android.lens.info.minimumFocusDistance]`. |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3563 | |
| 3564 | Like android.lens.focalLength, this setting won't be applied |
| 3565 | instantaneously, and it may take several frames before the lens |
| 3566 | can move to the requested focus distance. While the lens is still moving, |
| 3567 | android.lens.state will be set to MOVING. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3568 | |
| 3569 | LEGACY devices support at most setting this to `0.0f` |
| 3570 | for infinity focus. |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3571 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3572 | <tag id="BC" /> |
| 3573 | <tag id="V1" /> |
| 3574 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3575 | <entry name="opticalStabilizationMode" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3576 | enum="true" hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3577 | <enum> |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3578 | <value>OFF |
| 3579 | <notes>Optical stabilization is unavailable.</notes> |
| 3580 | </value> |
| 3581 | <value optional="true">ON |
| 3582 | <notes>Optical stabilization is enabled.</notes> |
| 3583 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3584 | </enum> |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3585 | <description> |
| 3586 | Sets whether the camera device uses optical image stabilization (OIS) |
| 3587 | when capturing images. |
| 3588 | </description> |
| 3589 | <range>android.lens.info.availableOpticalStabilization</range> |
| 3590 | <details> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3591 | OIS is used to compensate for motion blur due to small |
| 3592 | movements of the camera during capture. Unlike digital image |
| 3593 | stabilization (android.control.videoStabilizationMode), OIS |
| 3594 | makes use of mechanical elements to stabilize the camera |
| 3595 | sensor, and thus allows for longer exposure times before |
| 3596 | camera shake becomes apparent. |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3597 | |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 3598 | Switching between different optical stabilization modes may take several |
| 3599 | frames to initialize, the camera device will report the current mode in |
| 3600 | capture result metadata. For example, When "ON" mode is requested, the |
| 3601 | optical stabilization modes in the first several capture results may still |
| 3602 | be "OFF", and it will become "ON" when the initialization is done. |
| 3603 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3604 | If a camera device supports both OIS and digital image stabilization |
| 3605 | (android.control.videoStabilizationMode), turning both modes on may produce undesirable |
| 3606 | 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] | 3607 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3608 | Not all devices will support OIS; see |
| 3609 | android.lens.info.availableOpticalStabilization for |
| 3610 | available controls. |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3611 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3612 | <tag id="V1" /> |
| 3613 | </entry> |
| 3614 | </controls> |
| 3615 | <static> |
| 3616 | <namespace name="info"> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3617 | <entry name="availableApertures" type="float" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3618 | container="array" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3619 | <array> |
| 3620 | <size>n</size> |
| 3621 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3622 | <description>List of aperture size values for android.lens.aperture that are |
| 3623 | supported by this camera device.</description> |
| 3624 | <units>The aperture f-number</units> |
| 3625 | <details>If the camera device doesn't support a variable lens aperture, |
| 3626 | 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] | 3627 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3628 | If the camera device supports a variable aperture, the aperture values |
Zhijun He | 1b58d38 | 2014-01-10 10:22:53 -0800 | [diff] [blame] | 3629 | in this list will be sorted in ascending order.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3630 | <tag id="V1" /> |
| 3631 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3632 | <entry name="availableFilterDensities" type="float" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3633 | container="array" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3634 | <array> |
| 3635 | <size>n</size> |
| 3636 | </array> |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3637 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3638 | List of neutral density filter values for |
| 3639 | android.lens.filterDensity that are supported by this camera device. |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3640 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3641 | <units>Exposure value (EV)</units> |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3642 | <range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3643 | Values are &gt;= 0 |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3644 | </range> |
| 3645 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3646 | If a neutral density filter is not supported by this camera device, |
| 3647 | this list will contain only 0. Otherwise, this list will include every |
| 3648 | filter density supported by the camera device, in ascending order. |
Ruben Brunk | 83eb303 | 2014-01-15 16:12:07 -0800 | [diff] [blame] | 3649 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3650 | <tag id="V1" /> |
| 3651 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 3652 | <entry name="availableFocalLengths" type="float" visibility="public" |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3653 | type_notes="The list of available focal lengths" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3654 | container="array" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3655 | <array> |
| 3656 | <size>n</size> |
| 3657 | </array> |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3658 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3659 | List of focal lengths for android.lens.focalLength that are supported by this camera |
| 3660 | device. |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3661 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3662 | <units>Millimeters</units> |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3663 | <range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3664 | Values are &gt; 0 |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3665 | </range> |
| 3666 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3667 | If optical zoom is not supported, this list will only contain |
| 3668 | a single value corresponding to the fixed focal length of the |
| 3669 | device. Otherwise, this list will include every focal length supported |
| 3670 | by the camera device, in ascending order. |
Ruben Brunk | ac9bbb9 | 2014-01-15 18:39:35 -0800 | [diff] [blame] | 3671 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3672 | <tag id="BC" /> |
| 3673 | <tag id="V1" /> |
| 3674 | </entry> |
| 3675 | <entry name="availableOpticalStabilization" type="byte" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 3676 | visibility="public" type_notes="list of enums" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3677 | typedef="enumList" hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3678 | <array> |
| 3679 | <size>n</size> |
| 3680 | </array> |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3681 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3682 | List of optical image stabilization (OIS) modes for |
| 3683 | android.lens.opticalStabilizationMode that are supported by this camera device. |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3684 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3685 | <range>Any value listed in android.lens.opticalStabilizationMode</range> |
Ruben Brunk | 218639c | 2014-01-15 18:09:41 -0800 | [diff] [blame] | 3686 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3687 | 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] | 3688 | contain only OFF. |
| 3689 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3690 | <tag id="V1" /> |
| 3691 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3692 | <entry name="hyperfocalDistance" type="float" visibility="public" optional="true" |
| 3693 | hwlevel="limited"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3694 | <description>Hyperfocal distance for this lens.</description> |
| 3695 | <units>See android.lens.info.focusDistanceCalibration for details</units> |
| 3696 | <range>If lens is fixed focus, &gt;= 0. If lens has focuser unit, the value is |
| 3697 | within `(0.0f, android.lens.info.minimumFocusDistance]`</range> |
Zhijun He | 27afb78 | 2014-04-29 19:23:08 -0700 | [diff] [blame] | 3698 | <details> |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3699 | If the lens is not fixed focus, the camera device will report this |
| 3700 | field when android.lens.info.focusDistanceCalibration is APPROXIMATE or CALIBRATED. |
| 3701 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3702 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3703 | <entry name="minimumFocusDistance" type="float" visibility="public" optional="true" |
| 3704 | hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3705 | <description>Shortest distance from frontmost surface |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3706 | of the lens that can be brought into sharp focus.</description> |
| 3707 | <units>See android.lens.info.focusDistanceCalibration for details</units> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 3708 | <range>&gt;= 0</range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3709 | <details>If the lens is fixed-focus, this will be |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3710 | 0.</details> |
Igor Murashkin | 7b72108 | 2014-06-19 15:45:58 -0700 | [diff] [blame] | 3711 | <hal_details>Mandatory for FULL devices; LIMITED devices |
| 3712 | must always set this value to 0 for fixed-focus; and may omit |
| 3713 | the minimum focus distance otherwise. |
| 3714 | |
| 3715 | This field is also mandatory for all devices advertising |
| 3716 | the MANUAL_SENSOR capability.</hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3717 | <tag id="V1" /> |
| 3718 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 3719 | <entry name="shadingMapSize" type="int32" visibility="ndk_public" |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 3720 | 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] | 3721 | container="array" typedef="size" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3722 | <array> |
| 3723 | <size>2</size> |
| 3724 | </array> |
Igor Murashkin | 1dd4ecb | 2013-12-11 13:31:00 -0800 | [diff] [blame] | 3725 | <description>Dimensions of lens shading map.</description> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 3726 | <range>Both values &gt;= 1</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3727 | <details> |
Igor Murashkin | 1dd4ecb | 2013-12-11 13:31:00 -0800 | [diff] [blame] | 3728 | The map should be on the order of 30-40 rows and columns, and |
| 3729 | must be smaller than 64x64. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3730 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3731 | <tag id="V1" /> |
| 3732 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3733 | <entry name="focusDistanceCalibration" type="byte" visibility="public" |
| 3734 | enum="true" hwlevel="limited"> |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3735 | <enum> |
| 3736 | <value>UNCALIBRATED |
| 3737 | <notes> |
| 3738 | The lens focus distance is not accurate, and the units used for |
| 3739 | android.lens.focusDistance do not correspond to any physical units. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3740 | |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3741 | Setting the lens to the same focus distance on separate occasions may |
| 3742 | result in a different real focus distance, depending on factors such |
| 3743 | as the orientation of the device, the age of the focusing mechanism, |
| 3744 | and the device temperature. The focus distance value will still be |
| 3745 | in the range of `[0, android.lens.info.minimumFocusDistance]`, where 0 |
| 3746 | represents the farthest focus. |
| 3747 | </notes> |
| 3748 | </value> |
| 3749 | <value>APPROXIMATE |
| 3750 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3751 | The lens focus distance is measured in diopters. |
| 3752 | |
| 3753 | However, setting the lens to the same focus distance |
| 3754 | on separate occasions may result in a different real |
| 3755 | focus distance, depending on factors such as the |
| 3756 | orientation of the device, the age of the focusing |
| 3757 | mechanism, and the device temperature. |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3758 | </notes> |
| 3759 | </value> |
| 3760 | <value>CALIBRATED |
| 3761 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3762 | The lens focus distance is measured in diopters, and |
| 3763 | is calibrated. |
| 3764 | |
| 3765 | The lens mechanism is calibrated so that setting the |
| 3766 | same focus distance is repeatable on multiple |
| 3767 | occasions with good accuracy, and the focus distance |
| 3768 | corresponds to the real physical distance to the plane |
| 3769 | of best focus. |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3770 | </notes> |
| 3771 | </value> |
| 3772 | </enum> |
| 3773 | <description>The lens focus distance calibration quality.</description> |
| 3774 | <details> |
| 3775 | The lens focus distance calibration quality determines the reliability of |
| 3776 | focus related metadata entries, i.e. android.lens.focusDistance, |
| 3777 | android.lens.focusRange, android.lens.info.hyperfocalDistance, and |
| 3778 | android.lens.info.minimumFocusDistance. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3779 | |
| 3780 | APPROXIMATE and CALIBRATED devices report the focus metadata in |
| 3781 | units of diopters (1/meter), so `0.0f` represents focusing at infinity, |
| 3782 | and increasing positive numbers represent focusing closer and closer |
| 3783 | to the camera device. The focus distance control also uses diopters |
| 3784 | on these devices. |
| 3785 | |
| 3786 | UNCALIBRATED devices do not use units that are directly comparable |
| 3787 | to any real physical measurement, but `0.0f` still represents farthest |
| 3788 | focus, and android.lens.info.minimumFocusDistance represents the |
| 3789 | nearest focus the device can achieve. |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3790 | </details> |
Yin-Chia Yeh | 52f6584 | 2014-08-18 10:44:21 -0700 | [diff] [blame] | 3791 | <hal_details> |
| 3792 | For devices advertise APPROXIMATE quality or higher, diopters 0 (infinity |
| 3793 | focus) must work. When autofocus is disabled (android.control.afMode == OFF) |
| 3794 | and the lens focus distance is set to 0 diopters |
| 3795 | (android.lens.focusDistance == 0), the lens will move to focus at infinity |
| 3796 | and is stably focused at infinity even if the device tilts. It may take the |
| 3797 | lens some time to move; during the move the lens state should be MOVING and |
| 3798 | the output diopter value should be changing toward 0. |
| 3799 | </hal_details> |
Zhijun He | f92c76a | 2014-02-06 01:40:35 -0800 | [diff] [blame] | 3800 | <tag id="V1" /> |
| 3801 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3802 | </namespace> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3803 | <entry name="facing" type="byte" visibility="public" enum="true" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3804 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3805 | <value>FRONT |
| 3806 | <notes> |
| 3807 | The camera device faces the same direction as the device's screen. |
| 3808 | </notes></value> |
| 3809 | <value>BACK |
| 3810 | <notes> |
| 3811 | The camera device faces the opposite direction as the device's screen. |
| 3812 | </notes></value> |
Zhijun He | be30d4f | 2015-01-12 15:06:16 -0800 | [diff] [blame] | 3813 | <value>EXTERNAL |
| 3814 | <notes> |
| 3815 | The camera device is an external camera, and has no fixed facing relative to the |
| 3816 | device's screen. |
| 3817 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3818 | </enum> |
| 3819 | <description>Direction the camera faces relative to |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3820 | device screen.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3821 | </entry> |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3822 | <entry name="poseRotation" type="float" visibility="public" |
| 3823 | container="array"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3824 | <array> |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3825 | <size>4</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3826 | </array> |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3827 | <description> |
| 3828 | The orientation of the camera relative to the sensor |
| 3829 | coordinate system. |
| 3830 | </description> |
| 3831 | <units> |
Eino-Ville Talvala | c572dfc | 2015-08-19 16:09:46 -0700 | [diff] [blame] | 3832 | Quaternion coefficients |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3833 | </units> |
| 3834 | <details> |
Eino-Ville Talvala | c572dfc | 2015-08-19 16:09:46 -0700 | [diff] [blame] | 3835 | The four coefficients that describe the quaternion |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3836 | rotation from the Android sensor coordinate system to a |
| 3837 | camera-aligned coordinate system where the X-axis is |
| 3838 | aligned with the long side of the image sensor, the Y-axis |
| 3839 | is aligned with the short side of the image sensor, and |
| 3840 | the Z-axis is aligned with the optical axis of the sensor. |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 3841 | |
Eino-Ville Talvala | c572dfc | 2015-08-19 16:09:46 -0700 | [diff] [blame] | 3842 | To convert from the quaternion coefficients `(x,y,z,w)` |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3843 | to the axis of rotation `(a_x, a_y, a_z)` and rotation |
| 3844 | amount `theta`, the following formulas can be used: |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 3845 | |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3846 | theta = 2 * acos(w) |
| 3847 | a_x = x / sin(theta/2) |
| 3848 | a_y = y / sin(theta/2) |
| 3849 | a_z = z / sin(theta/2) |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 3850 | |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3851 | To create a 3x3 rotation matrix that applies the rotation |
Eino-Ville Talvala | c572dfc | 2015-08-19 16:09:46 -0700 | [diff] [blame] | 3852 | defined by this quaternion, the following matrix can be |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3853 | used: |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 3854 | |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3855 | R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw, |
| 3856 | 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw, |
| 3857 | 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ] |
| 3858 | |
| 3859 | This matrix can then be used to apply the rotation to a |
| 3860 | column vector point with |
| 3861 | |
| 3862 | `p' = Rp` |
| 3863 | |
| 3864 | where `p` is in the device sensor coordinate system, and |
| 3865 | `p'` is in the camera-oriented coordinate system. |
| 3866 | </details> |
| 3867 | <tag id="DEPTH" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3868 | </entry> |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3869 | <entry name="poseTranslation" type="float" visibility="public" |
| 3870 | container="array"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3871 | <array> |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3872 | <size>3</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3873 | </array> |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3874 | <description>Position of the camera optical center.</description> |
| 3875 | <units>Meters</units> |
| 3876 | <details> |
Eino-Ville Talvala | 3014c13 | 2015-05-29 17:15:37 -0700 | [diff] [blame] | 3877 | The position of the camera device's lens optical center, |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 3878 | as a three-dimensional vector `(x,y,z)`. |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3879 | |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 3880 | Prior to Android P, or when android.lens.poseReference is PRIMARY_CAMERA, this position |
| 3881 | is relative to the optical center of the largest camera device facing in the same |
| 3882 | direction as this camera, in the {@link android.hardware.SensorEvent Android sensor |
| 3883 | coordinate axes}. Note that only the axis definitions are shared with the sensor |
| 3884 | coordinate system, but not the origin. |
Eino-Ville Talvala | 3014c13 | 2015-05-29 17:15:37 -0700 | [diff] [blame] | 3885 | |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 3886 | If this device is the largest or only camera device with a given facing, then this |
| 3887 | position will be `(0, 0, 0)`; a camera device with a lens optical center located 3 cm |
| 3888 | from the main sensor along the +X axis (to the right from the user's perspective) will |
| 3889 | report `(0.03, 0, 0)`. |
Eino-Ville Talvala | 3014c13 | 2015-05-29 17:15:37 -0700 | [diff] [blame] | 3890 | |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 3891 | To transform a pixel coordinates between two cameras facing the same direction, first |
| 3892 | the source camera android.lens.radialDistortion must be corrected for. Then the source |
| 3893 | camera android.lens.intrinsicCalibration needs to be applied, followed by the |
| 3894 | android.lens.poseRotation of the source camera, the translation of the source camera |
| 3895 | relative to the destination camera, the android.lens.poseRotation of the destination |
| 3896 | camera, and finally the inverse of android.lens.intrinsicCalibration of the destination |
| 3897 | camera. This obtains a radial-distortion-free coordinate in the destination camera pixel |
| 3898 | coordinates. |
| 3899 | |
| 3900 | To compare this against a real image from the destination camera, the destination camera |
| 3901 | image then needs to be corrected for radial distortion before comparison or sampling. |
| 3902 | |
| 3903 | When android.lens.poseReference is GYROSCOPE, then this position is relative to |
| 3904 | the center of the primary gyroscope on the device. |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3905 | </details> |
| 3906 | <tag id="DEPTH" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3907 | </entry> |
| 3908 | </static> |
| 3909 | <dynamic> |
| 3910 | <clone entry="android.lens.aperture" kind="controls"> |
| 3911 | <tag id="V1" /> |
| 3912 | </clone> |
| 3913 | <clone entry="android.lens.filterDensity" kind="controls"> |
| 3914 | <tag id="V1" /> |
| 3915 | </clone> |
| 3916 | <clone entry="android.lens.focalLength" kind="controls"> |
| 3917 | <tag id="BC" /> |
| 3918 | </clone> |
| 3919 | <clone entry="android.lens.focusDistance" kind="controls"> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3920 | <details>Should be zero for fixed-focus cameras</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3921 | <tag id="BC" /> |
| 3922 | </clone> |
Zhijun He | 50451ad | 2013-09-26 10:27:47 -0700 | [diff] [blame] | 3923 | <entry name="focusRange" type="float" visibility="public" |
| 3924 | type_notes="Range of scene distances that are in focus" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3925 | container="array" typedef="pairFloatFloat" hwlevel="limited"> |
Zhijun He | 50451ad | 2013-09-26 10:27:47 -0700 | [diff] [blame] | 3926 | <array> |
| 3927 | <size>2</size> |
| 3928 | </array> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3929 | <description>The range of scene distances that are in |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 3930 | sharp focus (depth of field).</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 3931 | <units>A pair of focus distances in diopters: (near, |
| 3932 | far); see android.lens.info.focusDistanceCalibration for details.</units> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 3933 | <range>&gt;=0</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 3934 | <details>If variable focus not supported, can still report |
| 3935 | fixed depth of field range</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3936 | <tag id="BC" /> |
| 3937 | </entry> |
| 3938 | <clone entry="android.lens.opticalStabilizationMode" |
| 3939 | kind="controls"> |
| 3940 | <tag id="V1" /> |
| 3941 | </clone> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 3942 | <entry name="state" type="byte" visibility="public" enum="true" hwlevel="limited"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3943 | <enum> |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3944 | <value>STATIONARY |
| 3945 | <notes> |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 3946 | The lens parameters (android.lens.focalLength, android.lens.focusDistance, |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3947 | android.lens.filterDensity and android.lens.aperture) are not changing. |
| 3948 | </notes> |
| 3949 | </value> |
| 3950 | <value>MOVING |
| 3951 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 3952 | One or several of the lens parameters |
| 3953 | (android.lens.focalLength, android.lens.focusDistance, |
| 3954 | android.lens.filterDensity or android.lens.aperture) is |
| 3955 | currently changing. |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3956 | </notes> |
| 3957 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3958 | </enum> |
Zhijun He | 5169ce1 | 2014-01-24 16:48:25 -0800 | [diff] [blame] | 3959 | <description>Current lens status.</description> |
| 3960 | <details> |
| 3961 | For lens parameters android.lens.focalLength, android.lens.focusDistance, |
| 3962 | android.lens.filterDensity and android.lens.aperture, when changes are requested, |
| 3963 | they may take several frames to reach the requested values. This state indicates |
| 3964 | the current status of the lens parameters. |
| 3965 | |
| 3966 | When the state is STATIONARY, the lens parameters are not changing. This could be |
| 3967 | either because the parameters are all fixed, or because the lens has had enough |
| 3968 | time to reach the most recently-requested values. |
| 3969 | If all these lens parameters are not changable for a camera device, as listed below: |
| 3970 | |
| 3971 | * Fixed focus (`android.lens.info.minimumFocusDistance == 0`), which means |
| 3972 | android.lens.focusDistance parameter will always be 0. |
| 3973 | * Fixed focal length (android.lens.info.availableFocalLengths contains single value), |
| 3974 | which means the optical zoom is not supported. |
| 3975 | * No ND filter (android.lens.info.availableFilterDensities contains only 0). |
| 3976 | * Fixed aperture (android.lens.info.availableApertures contains single value). |
| 3977 | |
| 3978 | Then this state will always be STATIONARY. |
| 3979 | |
| 3980 | When the state is MOVING, it indicates that at least one of the lens parameters |
| 3981 | is changing. |
| 3982 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3983 | <tag id="V1" /> |
| 3984 | </entry> |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3985 | <clone entry="android.lens.poseRotation" kind="static"> |
| 3986 | </clone> |
| 3987 | <clone entry="android.lens.poseTranslation" kind="static"> |
| 3988 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 3989 | </dynamic> |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 3990 | <static> |
| 3991 | <entry name="intrinsicCalibration" type="float" visibility="public" |
| 3992 | container="array"> |
| 3993 | <array> |
| 3994 | <size>5</size> |
| 3995 | </array> |
| 3996 | <description> |
| 3997 | The parameters for this camera device's intrinsic |
| 3998 | calibration. |
| 3999 | </description> |
| 4000 | <units> |
Eino-Ville Talvala | 7d09eff | 2015-06-16 11:36:01 -0700 | [diff] [blame] | 4001 | Pixels in the |
| 4002 | android.sensor.info.preCorrectionActiveArraySize |
| 4003 | coordinate system. |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 4004 | </units> |
| 4005 | <details> |
| 4006 | The five calibration parameters that describe the |
| 4007 | transform from camera-centric 3D coordinates to sensor |
| 4008 | pixel coordinates: |
| 4009 | |
| 4010 | [f_x, f_y, c_x, c_y, s] |
| 4011 | |
| 4012 | Where `f_x` and `f_y` are the horizontal and vertical |
| 4013 | focal lengths, `[c_x, c_y]` is the position of the optical |
| 4014 | axis, and `s` is a skew parameter for the sensor plane not |
| 4015 | being aligned with the lens plane. |
| 4016 | |
| 4017 | These are typically used within a transformation matrix K: |
| 4018 | |
| 4019 | K = [ f_x, s, c_x, |
| 4020 | 0, f_y, c_y, |
| 4021 | 0 0, 1 ] |
| 4022 | |
| 4023 | which can then be combined with the camera pose rotation |
| 4024 | `R` and translation `t` (android.lens.poseRotation and |
| 4025 | android.lens.poseTranslation, respective) to calculate the |
| 4026 | complete transform from world coordinates to pixel |
| 4027 | coordinates: |
| 4028 | |
| 4029 | P = [ K 0 * [ R t |
| 4030 | 0 1 ] 0 1 ] |
| 4031 | |
| 4032 | and with `p_w` being a point in the world coordinate system |
| 4033 | and `p_s` being a point in the camera active pixel array |
| 4034 | coordinate system, and with the mapping including the |
| 4035 | homogeneous division by z: |
| 4036 | |
| 4037 | p_h = (x_h, y_h, z_h) = P p_w |
| 4038 | p_s = p_h / z_h |
| 4039 | |
| 4040 | so `[x_s, y_s]` is the pixel coordinates of the world |
| 4041 | point, `z_s = 1`, and `w_s` is a measurement of disparity |
| 4042 | (depth) in pixel coordinates. |
Eino-Ville Talvala | 7d09eff | 2015-06-16 11:36:01 -0700 | [diff] [blame] | 4043 | |
| 4044 | Note that the coordinate system for this transform is the |
| 4045 | android.sensor.info.preCorrectionActiveArraySize system, |
| 4046 | where `(0,0)` is the top-left of the |
| 4047 | preCorrectionActiveArraySize rectangle. Once the pose and |
| 4048 | intrinsic calibration transforms have been applied to a |
| 4049 | world point, then the android.lens.radialDistortion |
| 4050 | transform needs to be applied, and the result adjusted to |
| 4051 | be in the android.sensor.info.activeArraySize coordinate |
| 4052 | system (where `(0, 0)` is the top-left of the |
| 4053 | activeArraySize rectangle), to determine the final pixel |
| 4054 | coordinate of the world point for processed (non-RAW) |
| 4055 | output buffers. |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 4056 | </details> |
| 4057 | <tag id="DEPTH" /> |
| 4058 | </entry> |
| 4059 | <entry name="radialDistortion" type="float" visibility="public" |
| 4060 | container="array"> |
| 4061 | <array> |
Ruben Brunk | 6ad7038 | 2015-06-12 10:19:40 -0700 | [diff] [blame] | 4062 | <size>6</size> |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 4063 | </array> |
| 4064 | <description> |
| 4065 | The correction coefficients to correct for this camera device's |
Eino-Ville Talvala | b5dd68b | 2015-05-29 16:03:31 -0700 | [diff] [blame] | 4066 | radial and tangential lens distortion. |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 4067 | </description> |
| 4068 | <units> |
Eino-Ville Talvala | b5dd68b | 2015-05-29 16:03:31 -0700 | [diff] [blame] | 4069 | Unitless coefficients. |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 4070 | </units> |
| 4071 | <details> |
Ruben Brunk | 6ad7038 | 2015-06-12 10:19:40 -0700 | [diff] [blame] | 4072 | Four radial distortion coefficients `[kappa_0, kappa_1, kappa_2, |
Eino-Ville Talvala | b5dd68b | 2015-05-29 16:03:31 -0700 | [diff] [blame] | 4073 | kappa_3]` and two tangential distortion coefficients |
| 4074 | `[kappa_4, kappa_5]` that can be used to correct the |
| 4075 | lens's geometric distortion with the mapping equations: |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 4076 | |
Ruben Brunk | 6ad7038 | 2015-06-12 10:19:40 -0700 | [diff] [blame] | 4077 | x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + |
Eino-Ville Talvala | b5dd68b | 2015-05-29 16:03:31 -0700 | [diff] [blame] | 4078 | kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 ) |
Ruben Brunk | 6ad7038 | 2015-06-12 10:19:40 -0700 | [diff] [blame] | 4079 | y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + |
Eino-Ville Talvala | b5dd68b | 2015-05-29 16:03:31 -0700 | [diff] [blame] | 4080 | kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 ) |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 4081 | |
Eino-Ville Talvala | b5dd68b | 2015-05-29 16:03:31 -0700 | [diff] [blame] | 4082 | Here, `[x_c, y_c]` are the coordinates to sample in the |
| 4083 | input image that correspond to the pixel values in the |
| 4084 | corrected image at the coordinate `[x_i, y_i]`: |
| 4085 | |
| 4086 | correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage) |
| 4087 | |
| 4088 | The pixel coordinates are defined in a normalized |
| 4089 | coordinate system related to the |
| 4090 | android.lens.intrinsicCalibration calibration fields. |
| 4091 | Both `[x_i, y_i]` and `[x_c, y_c]` have `(0,0)` at the |
| 4092 | lens optical center `[c_x, c_y]`. The maximum magnitudes |
| 4093 | of both x and y coordinates are normalized to be 1 at the |
| 4094 | edge further from the optical center, so the range |
| 4095 | for both dimensions is `-1 <= x <= 1`. |
| 4096 | |
| 4097 | Finally, `r` represents the radial distance from the |
| 4098 | optical center, `r^2 = x_i^2 + y_i^2`, and its magnitude |
| 4099 | is therefore no larger than `|r| <= sqrt(2)`. |
| 4100 | |
| 4101 | The distortion model used is the Brown-Conrady model. |
Eino-Ville Talvala | 489e58c | 2015-02-09 15:47:27 -0800 | [diff] [blame] | 4102 | </details> |
| 4103 | <tag id="DEPTH" /> |
| 4104 | </entry> |
| 4105 | </static> |
Eino-Ville Talvala | c572dfc | 2015-08-19 16:09:46 -0700 | [diff] [blame] | 4106 | <dynamic> |
| 4107 | <clone entry="android.lens.intrinsicCalibration" kind="static"> |
| 4108 | </clone> |
| 4109 | <clone entry="android.lens.radialDistortion" kind="static"> |
| 4110 | </clone> |
| 4111 | </dynamic> |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 4112 | <static> |
| 4113 | <entry name="poseReference" type="byte" visibility="public" enum="true" hal_version="3.3"> |
| 4114 | <enum> |
| 4115 | <value>PRIMARY_CAMERA |
| 4116 | <notes>The value of android.lens.poseTranslation is relative to the optical center of |
| 4117 | the largest camera device facing the same direction as this camera. |
| 4118 | |
Eino-Ville Talvala | baf8047 | 2018-02-05 16:26:26 -0800 | [diff] [blame] | 4119 | This is the default value for API levels before Android P. |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 4120 | </notes> |
| 4121 | </value> |
| 4122 | <value>GYROSCOPE |
| 4123 | <notes>The value of android.lens.poseTranslation is relative to the position of the |
| 4124 | primary gyroscope of this Android device. |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 4125 | </notes> |
| 4126 | </value> |
| 4127 | </enum> |
| 4128 | <description> |
| 4129 | The origin for android.lens.poseTranslation. |
| 4130 | </description> |
| 4131 | <details> |
| 4132 | Different calibration methods and use cases can produce better or worse results |
| 4133 | depending on the selected coordinate origin. |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 4134 | </details> |
| 4135 | </entry> |
| 4136 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4137 | </section> |
| 4138 | <section name="noiseReduction"> |
| 4139 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4140 | <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4141 | <enum> |
| 4142 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4143 | <notes>No noise reduction is applied.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4144 | <value>FAST |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4145 | <notes>Noise reduction is applied without reducing frame rate relative to sensor |
Chien-Yu Chen | 9365b4e | 2015-07-14 16:33:58 -0700 | [diff] [blame] | 4146 | output. It may be the same as OFF if noise reduction will reduce frame rate |
| 4147 | relative to sensor.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4148 | <value>HIGH_QUALITY |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 4149 | <notes>High-quality noise reduction is applied, at the cost of possibly reduced frame |
| 4150 | rate relative to sensor output.</notes></value> |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4151 | <value optional="true">MINIMAL |
| 4152 | <notes>MINIMAL noise reduction is applied without reducing frame rate relative to |
| 4153 | sensor output. </notes></value> |
Eino-Ville Talvala | 073e458 | 2015-07-07 10:40:59 -0700 | [diff] [blame] | 4154 | <value optional="true">ZERO_SHUTTER_LAG |
| 4155 | |
| 4156 | <notes>Noise reduction is applied at different levels for different output streams, |
| 4157 | based on resolution. Streams at maximum recording resolution (see {@link |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4158 | android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession}) |
| 4159 | or below have noise reduction applied, while higher-resolution streams have MINIMAL (if |
| 4160 | supported) or no noise reduction applied (if MINIMAL is not supported.) The degree of |
| 4161 | noise reduction for low-resolution streams is tuned so that frame rate is not impacted, |
| 4162 | and the quality is equal to or better than FAST (since it is only applied to |
| 4163 | lower-resolution outputs, quality may improve from FAST). |
Eino-Ville Talvala | 073e458 | 2015-07-07 10:40:59 -0700 | [diff] [blame] | 4164 | |
| 4165 | This mode is intended to be used by applications operating in a zero-shutter-lag mode |
| 4166 | with YUV or PRIVATE reprocessing, where the application continuously captures |
| 4167 | high-resolution intermediate buffers into a circular buffer, from which a final image is |
| 4168 | produced via reprocessing when a user takes a picture. For such a use case, the |
| 4169 | high-resolution buffers must not have noise reduction applied to maximize efficiency of |
| 4170 | preview and to avoid over-applying noise filtering when reprocessing, while |
| 4171 | low-resolution buffers (used for recording or preview, generally) need noise reduction |
| 4172 | applied for reasonable preview quality. |
| 4173 | |
| 4174 | This mode is guaranteed to be supported by devices that support either the |
| 4175 | YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities |
Chien-Yu Chen | d91ea14 | 2015-07-08 11:49:38 -0700 | [diff] [blame] | 4176 | (android.request.availableCapabilities lists either of those capabilities) and it will |
| 4177 | be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template. |
Eino-Ville Talvala | 073e458 | 2015-07-07 10:40:59 -0700 | [diff] [blame] | 4178 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4179 | </enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4180 | <description>Mode of operation for the noise reduction algorithm.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4181 | <range>android.noiseReduction.availableNoiseReductionModes</range> |
| 4182 | <details>The noise reduction algorithm attempts to improve image quality by removing |
| 4183 | excessive noise added by the capture process, especially in dark conditions. |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4184 | |
| 4185 | OFF means no noise reduction will be applied by the camera device, for both raw and |
| 4186 | YUV domain. |
| 4187 | |
| 4188 | MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove |
| 4189 | demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF. |
| 4190 | This mode is optional, may not be support by all devices. The application should check |
| 4191 | android.noiseReduction.availableNoiseReductionModes before using it. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 4192 | |
Zhijun He | f90eeaf | 2014-01-16 12:13:35 -0800 | [diff] [blame] | 4193 | FAST/HIGH_QUALITY both mean camera device determined noise filtering |
| 4194 | will be applied. HIGH_QUALITY mode indicates that the camera device |
| 4195 | will use the highest-quality noise filtering algorithms, |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4196 | even if it slows down capture rate. FAST means the camera device will not |
Chien-Yu Chen | 9365b4e | 2015-07-14 16:33:58 -0700 | [diff] [blame] | 4197 | slow down capture rate when applying noise filtering. FAST may be the same as MINIMAL if |
| 4198 | MINIMAL is listed, or the same as OFF if any noise filtering will slow down capture rate. |
| 4199 | Every output stream will have a similar amount of enhancement applied. |
Eino-Ville Talvala | 073e458 | 2015-07-07 10:40:59 -0700 | [diff] [blame] | 4200 | |
| 4201 | ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular |
| 4202 | buffer of high-resolution images during preview and reprocess image(s) from that buffer |
| 4203 | into a final capture when triggered by the user. In this mode, the camera device applies |
| 4204 | noise reduction to low-resolution streams (below maximum recording resolution) to maximize |
| 4205 | preview quality, but does not apply noise reduction to high-resolution streams, since |
| 4206 | those will be reprocessed later if necessary. |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4207 | |
| 4208 | For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device |
| 4209 | will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device |
| 4210 | may adjust the noise reduction parameters for best image quality based on the |
| 4211 | android.reprocess.effectiveExposureFactor if it is set. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4212 | </details> |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4213 | <hal_details> |
| 4214 | For YUV_REPROCESSING The HAL can use android.reprocess.effectiveExposureFactor to |
| 4215 | adjust the internal noise reduction parameters appropriately to get the best quality |
| 4216 | images. |
| 4217 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4218 | <tag id="V1" /> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 4219 | <tag id="REPROC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4220 | </entry> |
| 4221 | <entry name="strength" type="byte"> |
| 4222 | <description>Control the amount of noise reduction |
| 4223 | applied to the images</description> |
| 4224 | <units>1-10; 10 is max noise reduction</units> |
| 4225 | <range>1 - 10</range> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 4226 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4227 | </entry> |
| 4228 | </controls> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 4229 | <static> |
| 4230 | <entry name="availableNoiseReductionModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4231 | type_notes="list of enums" container="array" typedef="enumList" hwlevel="limited"> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 4232 | <array> |
| 4233 | <size>n</size> |
| 4234 | </array> |
| 4235 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4236 | List of noise reduction modes for android.noiseReduction.mode that are supported |
| 4237 | by this camera device. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 4238 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4239 | <range>Any value listed in android.noiseReduction.mode</range> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 4240 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4241 | Full-capability camera devices will always support OFF and FAST. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4242 | |
Chien-Yu Chen | d91ea14 | 2015-07-08 11:49:38 -0700 | [diff] [blame] | 4243 | Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support |
| 4244 | ZERO_SHUTTER_LAG. |
| 4245 | |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4246 | Legacy-capability camera devices will only support FAST mode. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 4247 | </details> |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 4248 | <hal_details> |
| 4249 | HAL must support both FAST and HIGH_QUALITY if noise reduction control is available |
| 4250 | on the camera device, but the underlying implementation can be the same for both modes. |
| 4251 | That is, if the highest quality implementation on the camera device does not slow down |
| 4252 | capture rate, then FAST and HIGH_QUALITY will generate the same output. |
| 4253 | </hal_details> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 4254 | <tag id="V1" /> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 4255 | <tag id="REPROC" /> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 4256 | </entry> |
| 4257 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4258 | <dynamic> |
| 4259 | <clone entry="android.noiseReduction.mode" kind="controls"> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 4260 | <tag id="V1" /> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 4261 | <tag id="REPROC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4262 | </clone> |
| 4263 | </dynamic> |
| 4264 | </section> |
| 4265 | <section name="quirks"> |
| 4266 | <static> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4267 | <entry name="meteringCropRegion" type="byte" visibility="system" deprecated="true" optional="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4268 | <description>If set to 1, the camera service does not |
| 4269 | scale 'normalized' coordinates with respect to the crop |
| 4270 | region. This applies to metering input (a{e,f,wb}Region |
| 4271 | and output (face rectangles).</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4272 | <details>Normalized coordinates refer to those in the |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4273 | (-1000,1000) range mentioned in the |
Eino-Ville Talvala | fcef4c2 | 2013-07-16 16:18:44 -0700 | [diff] [blame] | 4274 | android.hardware.Camera API. |
| 4275 | |
| 4276 | HAL implementations should instead always use and emit |
| 4277 | sensor array-relative coordinates for all region data. Does |
| 4278 | not need to be listed in static metadata. Support will be |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4279 | removed in future versions of camera service.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4280 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4281 | <entry name="triggerAfWithAuto" type="byte" visibility="system" deprecated="true" optional="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4282 | <description>If set to 1, then the camera service always |
| 4283 | switches to FOCUS_MODE_AUTO before issuing a AF |
| 4284 | trigger.</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4285 | <details>HAL implementations should implement AF trigger |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4286 | modes for AUTO, MACRO, CONTINUOUS_FOCUS, and |
| 4287 | CONTINUOUS_PICTURE modes instead of using this flag. Does |
| 4288 | not need to be listed in static metadata. Support will be |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4289 | removed in future versions of camera service</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4290 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4291 | <entry name="useZslFormat" type="byte" visibility="system" deprecated="true" optional="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4292 | <description>If set to 1, the camera service uses |
| 4293 | CAMERA2_PIXEL_FORMAT_ZSL instead of |
| 4294 | HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED for the zero |
| 4295 | shutter lag stream</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4296 | <details>HAL implementations should use gralloc usage flags |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4297 | to determine that a stream will be used for |
| 4298 | zero-shutter-lag, instead of relying on an explicit |
| 4299 | format setting. Does not need to be listed in static |
| 4300 | metadata. Support will be removed in future versions of |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4301 | camera service.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4302 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4303 | <entry name="usePartialResult" type="byte" visibility="hidden" deprecated="true" optional="true"> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 4304 | <description> |
| 4305 | If set to 1, the HAL will always split result |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 4306 | metadata for a single capture into multiple buffers, |
| 4307 | returned using multiple process_capture_result calls. |
| 4308 | </description> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 4309 | <details> |
| 4310 | Does not need to be listed in static |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 4311 | metadata. Support for partial results will be reworked in |
| 4312 | future versions of camera service. This quirk will stop |
| 4313 | working at that point; DO NOT USE without careful |
| 4314 | consideration of future support. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4315 | </details> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 4316 | <hal_details> |
| 4317 | Refer to `camera3_capture_result::partial_result` |
| 4318 | for information on how to implement partial results. |
| 4319 | </hal_details> |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 4320 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4321 | </static> |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 4322 | <dynamic> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4323 | <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] | 4324 | <enum> |
| 4325 | <value>FINAL |
| 4326 | <notes>The last or only metadata result buffer |
| 4327 | for this capture.</notes> |
| 4328 | </value> |
| 4329 | <value>PARTIAL |
| 4330 | <notes>A partial buffer of result metadata for this |
| 4331 | capture. More result buffers for this capture will be sent |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 4332 | by the camera device, the last of which will be marked |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 4333 | FINAL.</notes> |
| 4334 | </value> |
| 4335 | </enum> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 4336 | <description> |
| 4337 | Whether a result given to the framework is the |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 4338 | final one for the capture, or only a partial that contains a |
| 4339 | subset of the full set of dynamic metadata |
| 4340 | values.</description> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4341 | <range>Optional. Default value is FINAL.</range> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 4342 | <details> |
| 4343 | The entries in the result metadata buffers for a |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 4344 | single capture may not overlap, except for this entry. The |
| 4345 | FINAL buffers must retain FIFO ordering relative to the |
| 4346 | requests that generate them, so the FINAL buffer for frame 3 must |
| 4347 | always be sent to the framework after the FINAL buffer for frame 2, and |
| 4348 | before the FINAL buffer for frame 4. PARTIAL buffers may be returned |
| 4349 | in any order relative to other frames, but all PARTIAL buffers for a given |
| 4350 | 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] | 4351 | 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] | 4352 | </details> |
Igor Murashkin | 7761a22 | 2014-01-27 16:06:38 -0800 | [diff] [blame] | 4353 | <hal_details> |
| 4354 | Refer to `camera3_capture_result::partial_result` |
| 4355 | for information on how to implement partial results. |
| 4356 | </hal_details> |
Eino-Ville Talvala | 82ce331 | 2013-10-09 18:21:30 -0700 | [diff] [blame] | 4357 | </entry> |
| 4358 | </dynamic> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4359 | </section> |
| 4360 | <section name="request"> |
| 4361 | <controls> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4362 | <entry name="frameCount" type="int32" visibility="system" deprecated="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4363 | <description>A frame counter set by the framework. Must |
Igor Murashkin | 28548d2 | 2013-09-10 15:26:20 -0700 | [diff] [blame] | 4364 | be maintained unchanged in output frame. This value monotonically |
| 4365 | increases with every new result (that is, each new result has a unique |
| 4366 | frameCount value). |
| 4367 | </description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4368 | <units>incrementing integer</units> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4369 | <range>Any int.</range> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4370 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 4371 | <entry name="id" type="int32" visibility="hidden"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4372 | <description>An application-specified ID for the current |
| 4373 | request. Must be maintained unchanged in output |
| 4374 | frame</description> |
| 4375 | <units>arbitrary integer assigned by application</units> |
| 4376 | <range>Any int</range> |
| 4377 | <tag id="V1" /> |
| 4378 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4379 | <entry name="inputStreams" type="int32" visibility="system" deprecated="true" |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 4380 | container="array"> |
| 4381 | <array> |
| 4382 | <size>n</size> |
| 4383 | </array> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4384 | <description>List which camera reprocess stream is used |
| 4385 | for the source of reprocessing data.</description> |
| 4386 | <units>List of camera reprocess stream IDs</units> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4387 | <range> |
Zhijun He | fb4701f | 2014-02-04 11:32:24 -0800 | [diff] [blame] | 4388 | 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] | 4389 | </range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4390 | <details>Only meaningful when android.request.type == |
| 4391 | REPROCESS. Ignored otherwise</details> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 4392 | <tag id="HAL2" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4393 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 4394 | <entry name="metadataMode" type="byte" visibility="system" |
| 4395 | enum="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4396 | <enum> |
| 4397 | <value>NONE |
| 4398 | <notes>No metadata should be produced on output, except |
| 4399 | for application-bound buffer data. If no |
| 4400 | application-bound streams exist, no frame should be |
| 4401 | placed in the output frame queue. If such streams |
| 4402 | exist, a frame should be placed on the output queue |
| 4403 | with null metadata but with the necessary output buffer |
| 4404 | information. Timestamp information should still be |
| 4405 | included with any output stream buffers</notes></value> |
| 4406 | <value>FULL |
| 4407 | <notes>All metadata should be produced. Statistics will |
| 4408 | only be produced if they are separately |
| 4409 | enabled</notes></value> |
| 4410 | </enum> |
| 4411 | <description>How much metadata to produce on |
| 4412 | output</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 4413 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4414 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4415 | <entry name="outputStreams" type="int32" visibility="system" deprecated="true" |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 4416 | container="array"> |
| 4417 | <array> |
| 4418 | <size>n</size> |
| 4419 | </array> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4420 | <description>Lists which camera output streams image data |
| 4421 | from this capture must be sent to</description> |
| 4422 | <units>List of camera stream IDs</units> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4423 | <range>List must only include streams that have been |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4424 | created</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4425 | <details>If no output streams are listed, then the image |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4426 | data should simply be discarded. The image data must |
| 4427 | still be captured for metadata and statistics production, |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4428 | and the lens and flash must operate as requested.</details> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 4429 | <tag id="HAL2" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4430 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4431 | <entry name="type" type="byte" visibility="system" deprecated="true" enum="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4432 | <enum> |
| 4433 | <value>CAPTURE |
| 4434 | <notes>Capture a new image from the imaging hardware, |
| 4435 | and process it according to the |
| 4436 | settings</notes></value> |
| 4437 | <value>REPROCESS |
| 4438 | <notes>Process previously captured data; the |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 4439 | android.request.inputStreams parameter determines the |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4440 | source reprocessing stream. TODO: Mark dynamic metadata |
| 4441 | needed for reprocessing with [RP]</notes></value> |
| 4442 | </enum> |
| 4443 | <description>The type of the request; either CAPTURE or |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4444 | REPROCESS. For legacy HAL3, this tag is redundant. |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 4445 | </description> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 4446 | <tag id="HAL2" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4447 | </entry> |
| 4448 | </controls> |
| 4449 | <static> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 4450 | <entry name="maxNumOutputStreams" type="int32" visibility="ndk_public" |
| 4451 | container="array" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4452 | <array> |
| 4453 | <size>3</size> |
| 4454 | </array> |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4455 | <description>The maximum numbers of different types of output streams |
| 4456 | that can be configured and used simultaneously by a camera device. |
| 4457 | </description> |
| 4458 | <range> |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 4459 | For processed (and stalling) format streams, &gt;= 1. |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4460 | |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 4461 | For Raw format (either stalling or non-stalling) streams, &gt;= 0. |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4462 | |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 4463 | For processed (but not stalling) format streams, &gt;= 3 |
Zhijun He | 2e76d00 | 2014-02-12 13:37:03 -0800 | [diff] [blame] | 4464 | for FULL mode devices (`android.info.supportedHardwareLevel == FULL`); |
| 4465 | &gt;= 2 for LIMITED mode devices (`android.info.supportedHardwareLevel == LIMITED`). |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4466 | </range> |
| 4467 | <details> |
| 4468 | 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] | 4469 | streams for raw sensor, processed (but not stalling), and processed (and stalling) |
| 4470 | formats respectively. For example, assuming that JPEG is typically a processed and |
| 4471 | 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] | 4472 | number is 3, and max JPEG stream number is 2, then this tuple should be `(1, 3, 2)`. |
| 4473 | |
| 4474 | This lists the upper bound of the number of output streams supported by |
| 4475 | the camera device. Using more streams simultaneously may require more hardware and |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 4476 | 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] | 4477 | be any supported format provided by android.scaler.availableStreamConfigurations. |
| 4478 | The formats defined in android.scaler.availableStreamConfigurations can be catergorized |
| 4479 | into the 3 stream types as below: |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4480 | |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 4481 | * Processed (but stalling): any non-RAW format with a stallDurations &gt; 0. |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4482 | Typically {@link android.graphics.ImageFormat#JPEG|AIMAGE_FORMAT_JPEG JPEG format}. |
| 4483 | * Raw formats: {@link android.graphics.ImageFormat#RAW_SENSOR|AIMAGE_FORMAT_RAW16 |
| 4484 | RAW_SENSOR}, {@link android.graphics.ImageFormat#RAW10|AIMAGE_FORMAT_RAW10 RAW10}, or |
| 4485 | {@link android.graphics.ImageFormat#RAW12|AIMAGE_FORMAT_RAW12 RAW12}. |
| 4486 | * Processed (but not-stalling): any non-RAW format without a stall duration. Typically |
| 4487 | {@link android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888 YUV_420_888}, |
| 4488 | {@link android.graphics.ImageFormat#NV21 NV21}, or {@link |
| 4489 | android.graphics.ImageFormat#YV12 YV12}. |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4490 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4491 | <tag id="BC" /> |
| 4492 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 4493 | <entry name="maxNumOutputRaw" type="int32" visibility="java_public" synthetic="true" |
| 4494 | hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 4495 | <description>The maximum numbers of different types of output streams |
| 4496 | that can be configured and used simultaneously by a camera device |
| 4497 | for any `RAW` formats. |
| 4498 | </description> |
| 4499 | <range> |
| 4500 | &gt;= 0 |
| 4501 | </range> |
| 4502 | <details> |
| 4503 | This value contains the max number of output simultaneous |
| 4504 | streams from the raw sensor. |
| 4505 | |
| 4506 | This lists the upper bound of the number of output streams supported by |
| 4507 | the camera device. Using more streams simultaneously may require more hardware and |
| 4508 | CPU resources that will consume more power. The image format for this kind of an output stream can |
| 4509 | be any `RAW` and supported format provided by android.scaler.streamConfigurationMap. |
| 4510 | |
| 4511 | In particular, a `RAW` format is typically one of: |
| 4512 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4513 | * {@link android.graphics.ImageFormat#RAW_SENSOR|AIMAGE_FORMAT_RAW16 RAW_SENSOR} |
| 4514 | * {@link android.graphics.ImageFormat#RAW10|AIMAGE_FORMAT_RAW10 RAW10} |
| 4515 | * {@link android.graphics.ImageFormat#RAW12|AIMAGE_FORMAT_RAW12 RAW12} |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4516 | |
| 4517 | LEGACY mode devices (android.info.supportedHardwareLevel `==` LEGACY) |
| 4518 | never support raw streams. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 4519 | </details> |
| 4520 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 4521 | <entry name="maxNumOutputProc" type="int32" visibility="java_public" synthetic="true" |
| 4522 | hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 4523 | <description>The maximum numbers of different types of output streams |
| 4524 | that can be configured and used simultaneously by a camera device |
| 4525 | for any processed (but not-stalling) formats. |
| 4526 | </description> |
| 4527 | <range> |
| 4528 | &gt;= 3 |
| 4529 | for FULL mode devices (`android.info.supportedHardwareLevel == FULL`); |
| 4530 | &gt;= 2 for LIMITED mode devices (`android.info.supportedHardwareLevel == LIMITED`). |
| 4531 | </range> |
| 4532 | <details> |
| 4533 | This value contains the max number of output simultaneous |
| 4534 | streams for any processed (but not-stalling) formats. |
| 4535 | |
| 4536 | This lists the upper bound of the number of output streams supported by |
| 4537 | the camera device. Using more streams simultaneously may require more hardware and |
| 4538 | CPU resources that will consume more power. The image format for this kind of an output stream can |
| 4539 | be any non-`RAW` and supported format provided by android.scaler.streamConfigurationMap. |
| 4540 | |
| 4541 | Processed (but not-stalling) is defined as any non-RAW format without a stall duration. |
| 4542 | Typically: |
| 4543 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4544 | * {@link android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888 YUV_420_888} |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 4545 | * {@link android.graphics.ImageFormat#NV21 NV21} |
| 4546 | * {@link android.graphics.ImageFormat#YV12 YV12} |
| 4547 | * Implementation-defined formats, i.e. {@link |
| 4548 | android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class)} |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 4549 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 4550 | For full guarantees, query {@link |
| 4551 | android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration} with a |
| 4552 | processed format -- it will return 0 for a non-stalling stream. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4553 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4554 | LEGACY devices will support at least 2 processing/non-stalling streams. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 4555 | </details> |
| 4556 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 4557 | <entry name="maxNumOutputProcStalling" type="int32" visibility="java_public" synthetic="true" |
| 4558 | hwlevel="legacy"> |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 4559 | <description>The maximum numbers of different types of output streams |
| 4560 | that can be configured and used simultaneously by a camera device |
| 4561 | for any processed (and stalling) formats. |
| 4562 | </description> |
| 4563 | <range> |
| 4564 | &gt;= 1 |
| 4565 | </range> |
| 4566 | <details> |
| 4567 | This value contains the max number of output simultaneous |
| 4568 | streams for any processed (but not-stalling) formats. |
| 4569 | |
| 4570 | This lists the upper bound of the number of output streams supported by |
| 4571 | the camera device. Using more streams simultaneously may require more hardware and |
| 4572 | CPU resources that will consume more power. The image format for this kind of an output stream can |
| 4573 | be any non-`RAW` and supported format provided by android.scaler.streamConfigurationMap. |
| 4574 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 4575 | A processed and stalling format is defined as any non-RAW format with a stallDurations |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4576 | &gt; 0. Typically only the {@link |
| 4577 | android.graphics.ImageFormat#JPEG|AIMAGE_FORMAT_JPEG JPEG format} is a stalling format. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 4578 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 4579 | For full guarantees, query {@link |
| 4580 | android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration} with a |
| 4581 | 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] | 4582 | |
| 4583 | LEGACY devices will support up to 1 processing/stalling stream. |
Igor Murashkin | 35a108f | 2014-05-27 10:51:25 -0700 | [diff] [blame] | 4584 | </details> |
| 4585 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 4586 | <entry name="maxNumReprocessStreams" type="int32" visibility="system" |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4587 | deprecated="true" container="array"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4588 | <array> |
| 4589 | <size>1</size> |
| 4590 | </array> |
| 4591 | <description>How many reprocessing streams of any type |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4592 | can be allocated at the same time.</description> |
| 4593 | <range>&gt;= 0</range> |
| 4594 | <details> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 4595 | Only used by HAL2.x. |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4596 | |
| 4597 | When set to 0, it means no reprocess stream is supported. |
| 4598 | </details> |
| 4599 | <tag id="HAL2" /> |
| 4600 | </entry> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4601 | <entry name="maxNumInputStreams" type="int32" visibility="java_public" hwlevel="full"> |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4602 | <description> |
| 4603 | The maximum numbers of any type of input streams |
| 4604 | that can be configured and used simultaneously by a camera device. |
| 4605 | </description> |
| 4606 | <range> |
Zhijun He | df726fa | 2014-06-25 08:35:53 -0700 | [diff] [blame] | 4607 | 0 or 1. |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4608 | </range> |
| 4609 | <details>When set to 0, it means no input stream is supported. |
| 4610 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 4611 | The image format for a input stream can be any supported format returned by {@link |
| 4612 | android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}. When using an |
| 4613 | input stream, there must be at least one output stream configured to to receive the |
| 4614 | reprocessed images. |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4615 | |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4616 | When an input stream and some output streams are used in a reprocessing request, |
| 4617 | only the input buffer will be used to produce these output stream buffers, and a |
| 4618 | new sensor image will not be captured. |
| 4619 | |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4620 | For example, for Zero Shutter Lag (ZSL) still capture use case, the input |
Chien-Yu Chen | f8581f6 | 2015-05-12 15:13:00 -0700 | [diff] [blame] | 4621 | stream image format will be PRIVATE, the associated output stream image format |
Zhijun He | 12744b2 | 2014-01-22 15:58:57 -0800 | [diff] [blame] | 4622 | should be JPEG. |
| 4623 | </details> |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4624 | <hal_details> |
| 4625 | For the reprocessing flow and controls, see |
| 4626 | hardware/libhardware/include/hardware/camera3.h Section 10 for more details. |
| 4627 | </hal_details> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 4628 | <tag id="REPROC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4629 | </entry> |
| 4630 | </static> |
| 4631 | <dynamic> |
Igor Murashkin | 757ec24 | 2014-07-25 16:55:18 -0700 | [diff] [blame] | 4632 | <entry name="frameCount" type="int32" visibility="hidden" deprecated="true"> |
Igor Murashkin | 28548d2 | 2013-09-10 15:26:20 -0700 | [diff] [blame] | 4633 | <description>A frame counter set by the framework. This value monotonically |
| 4634 | increases with every new result (that is, each new result has a unique |
| 4635 | frameCount value).</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4636 | <units>count of frames</units> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 4637 | <range>&gt; 0</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 4638 | <details>Reset on release()</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4639 | </entry> |
| 4640 | <clone entry="android.request.id" kind="controls"></clone> |
| 4641 | <clone entry="android.request.metadataMode" |
| 4642 | kind="controls"></clone> |
| 4643 | <clone entry="android.request.outputStreams" |
| 4644 | kind="controls"></clone> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4645 | <entry name="pipelineDepth" type="byte" visibility="public" hwlevel="legacy"> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 4646 | <description>Specifies the number of pipeline stages the frame went |
| 4647 | through from when it was exposed to when the final completed result |
| 4648 | was available to the framework.</description> |
| 4649 | <range>&lt;= android.request.pipelineMaxDepth</range> |
| 4650 | <details>Depending on what settings are used in the request, and |
| 4651 | what streams are configured, the data may undergo less processing, |
| 4652 | and some pipeline stages skipped. |
| 4653 | |
| 4654 | See android.request.pipelineMaxDepth for more details. |
| 4655 | </details> |
| 4656 | <hal_details> |
| 4657 | This value must always represent the accurate count of how many |
| 4658 | pipeline stages were actually used. |
| 4659 | </hal_details> |
| 4660 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 4661 | </dynamic> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 4662 | <static> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4663 | <entry name="pipelineMaxDepth" type="byte" visibility="public" hwlevel="legacy"> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 4664 | <description>Specifies the number of maximum pipeline stages a frame |
| 4665 | has to go through from when it's exposed to when it's available |
| 4666 | to the framework.</description> |
| 4667 | <details>A typical minimum value for this is 2 (one stage to expose, |
| 4668 | one stage to readout) from the sensor. The ISP then usually adds |
| 4669 | its own stages to do custom HW processing. Further stages may be |
| 4670 | added by SW processing. |
| 4671 | |
| 4672 | Depending on what settings are used (e.g. YUV, JPEG) and what |
| 4673 | processing is enabled (e.g. face detection), the actual pipeline |
| 4674 | depth (specified by android.request.pipelineDepth) may be less than |
| 4675 | the max pipeline depth. |
| 4676 | |
| 4677 | A pipeline depth of X stages is equivalent to a pipeline latency of |
| 4678 | X frame intervals. |
| 4679 | |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 4680 | This value will normally be 8 or less, however, for high speed capture session, |
| 4681 | the max pipeline depth will be up to 8 x size of high speed capture request list. |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 4682 | </details> |
| 4683 | <hal_details> |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 4684 | This value should be 4 or less, expect for the high speed recording session, where the |
| 4685 | max batch sizes may be larger than 1. |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 4686 | </hal_details> |
| 4687 | </entry> |
Zhijun He | 452ed11 | 2014-07-17 17:42:56 -0700 | [diff] [blame] | 4688 | <entry name="partialResultCount" type="int32" visibility="public" optional="true"> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4689 | <description>Defines how many sub-components |
Igor Murashkin | 2e29110 | 2014-01-10 14:18:30 -0800 | [diff] [blame] | 4690 | a result will be composed of. |
| 4691 | </description> |
| 4692 | <range>&gt;= 1</range> |
| 4693 | <details>In order to combat the pipeline latency, partial results |
| 4694 | may be delivered to the application layer from the camera device as |
| 4695 | soon as they are available. |
| 4696 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4697 | Optional; defaults to 1. A value of 1 means that partial |
| 4698 | results are not supported, and only the final TotalCaptureResult will |
| 4699 | be produced by the camera device. |
Igor Murashkin | 2e29110 | 2014-01-10 14:18:30 -0800 | [diff] [blame] | 4700 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 4701 | A typical use case for this might be: after requesting an |
| 4702 | auto-focus (AF) lock the new AF state might be available 50% |
| 4703 | of the way through the pipeline. The camera device could |
| 4704 | then immediately dispatch this state via a partial result to |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4705 | the application, and the rest of the metadata via later |
| 4706 | partial results. |
Igor Murashkin | 2e29110 | 2014-01-10 14:18:30 -0800 | [diff] [blame] | 4707 | </details> |
| 4708 | </entry> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4709 | <entry name="availableCapabilities" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 4710 | enum="true" container="array" hwlevel="legacy"> |
Zhijun He | c593aee | 2014-05-29 13:31:49 -0700 | [diff] [blame] | 4711 | <array> |
| 4712 | <size>n</size> |
| 4713 | </array> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4714 | <enum> |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 4715 | <value>BACKWARD_COMPATIBLE |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4716 | <notes>The minimal set of capabilities that every camera |
| 4717 | device (regardless of android.info.supportedHardwareLevel) |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 4718 | supports. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4719 | |
Eino-Ville Talvala | 8f0d2d1 | 2015-04-13 17:28:29 -0700 | [diff] [blame] | 4720 | This capability is listed by all normal devices, and |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 4721 | indicates that the camera device has a feature set |
| 4722 | that's comparable to the baseline requirements for the |
| 4723 | older android.hardware.Camera API. |
Eino-Ville Talvala | 8f0d2d1 | 2015-04-13 17:28:29 -0700 | [diff] [blame] | 4724 | |
| 4725 | Devices with the DEPTH_OUTPUT capability might not list this |
| 4726 | capability, indicating that they support only depth measurement, |
| 4727 | not standard color output. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4728 | </notes> |
| 4729 | </value> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4730 | <value optional="true">MANUAL_SENSOR |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4731 | <notes> |
| 4732 | The camera device can be manually controlled (3A algorithms such |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4733 | as auto-exposure, and auto-focus can be bypassed). |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 4734 | The camera device supports basic manual control of the sensor image |
| 4735 | acquisition related stages. This means the following controls are |
| 4736 | guaranteed to be supported: |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4737 | |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 4738 | * Manual frame duration control |
| 4739 | * android.sensor.frameDuration |
| 4740 | * android.sensor.info.maxFrameDuration |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4741 | * Manual exposure control |
| 4742 | * android.sensor.exposureTime |
| 4743 | * android.sensor.info.exposureTimeRange |
| 4744 | * Manual sensitivity control |
| 4745 | * android.sensor.sensitivity |
| 4746 | * android.sensor.info.sensitivityRange |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4747 | * Manual lens control (if the lens is adjustable) |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4748 | * android.lens.* |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4749 | * Manual flash control (if a flash unit is present) |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4750 | * android.flash.* |
| 4751 | * Manual black level locking |
| 4752 | * android.blackLevel.lock |
Yin-Chia Yeh | e36c5ed | 2015-04-02 14:31:53 -0700 | [diff] [blame] | 4753 | * Auto exposure lock |
| 4754 | * android.control.aeLock |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4755 | |
| 4756 | If any of the above 3A algorithms are enabled, then the camera |
| 4757 | device will accurately report the values applied by 3A in the |
| 4758 | result. |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 4759 | |
| 4760 | A given camera device may also support additional manual sensor controls, |
| 4761 | but this capability only covers the above list of controls. |
Ruben Brunk | 6285c4d | 2014-06-18 17:13:19 -0700 | [diff] [blame] | 4762 | |
| 4763 | If this is supported, android.scaler.streamConfigurationMap will |
| 4764 | additionally return a min frame duration that is greater than |
| 4765 | zero for each supported size-format combination. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4766 | </notes> |
| 4767 | </value> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 4768 | <value optional="true">MANUAL_POST_PROCESSING |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4769 | <notes> |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 4770 | The camera device post-processing stages can be manually controlled. |
| 4771 | The camera device supports basic manual control of the image post-processing |
| 4772 | stages. This means the following controls are guaranteed to be supported: |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4773 | |
| 4774 | * Manual tonemap control |
Yin-Chia Yeh | 993d4c4 | 2015-02-05 13:19:21 -0800 | [diff] [blame] | 4775 | * android.tonemap.curve |
| 4776 | * android.tonemap.mode |
| 4777 | * android.tonemap.maxCurvePoints |
| 4778 | * android.tonemap.gamma |
| 4779 | * android.tonemap.presetCurve |
| 4780 | |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4781 | * Manual white balance control |
| 4782 | * android.colorCorrection.transform |
| 4783 | * android.colorCorrection.gains |
Zhijun He | df726fa | 2014-06-25 08:35:53 -0700 | [diff] [blame] | 4784 | * Manual lens shading map control |
| 4785 | * android.shading.mode |
| 4786 | * android.statistics.lensShadingMapMode |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4787 | * android.statistics.lensShadingMap |
| 4788 | * android.lens.info.shadingMapSize |
Zhijun He | 450e01c | 2014-07-01 18:27:42 -0700 | [diff] [blame] | 4789 | * Manual aberration correction control (if aberration correction is supported) |
Zhijun He | 3377641 | 2014-08-18 10:55:33 -0700 | [diff] [blame] | 4790 | * android.colorCorrection.aberrationMode |
| 4791 | * android.colorCorrection.availableAberrationModes |
Yin-Chia Yeh | e36c5ed | 2015-04-02 14:31:53 -0700 | [diff] [blame] | 4792 | * Auto white balance lock |
| 4793 | * android.control.awbLock |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4794 | |
| 4795 | If auto white balance is enabled, then the camera device |
| 4796 | will accurately report the values applied by AWB in the result. |
| 4797 | |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 4798 | A given camera device may also support additional post-processing |
| 4799 | controls, but this capability only covers the above list of controls. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4800 | </notes> |
| 4801 | </value> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 4802 | <value optional="true">RAW |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 4803 | <notes> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 4804 | The camera device supports outputting RAW buffers and |
| 4805 | metadata for interpreting them. |
| 4806 | |
| 4807 | Devices supporting the RAW capability allow both for |
| 4808 | saving DNG files, and for direct application processing of |
| 4809 | raw sensor images. |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 4810 | |
| 4811 | * RAW_SENSOR is supported as an output format. |
| 4812 | * The maximum available resolution for RAW_SENSOR streams |
| 4813 | will match either the value in |
| 4814 | android.sensor.info.pixelArraySize or |
Eino-Ville Talvala | 0429269 | 2015-11-08 18:58:27 -0800 | [diff] [blame] | 4815 | android.sensor.info.preCorrectionActiveArraySize. |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 4816 | * All DNG-related optional metadata entries are provided |
| 4817 | by the camera device. |
| 4818 | </notes> |
| 4819 | </value> |
Yin-Chia Yeh | 3ba998e | 2016-04-06 11:58:41 -0700 | [diff] [blame] | 4820 | <value optional="true" ndk_hidden="true">PRIVATE_REPROCESSING |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4821 | <notes> |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4822 | The camera device supports the Zero Shutter Lag reprocessing use case. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4823 | |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4824 | * One input stream is supported, that is, `android.request.maxNumInputStreams == 1`. |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 4825 | * {@link android.graphics.ImageFormat#PRIVATE} is supported as an output/input format, |
| 4826 | that is, {@link android.graphics.ImageFormat#PRIVATE} is included in the lists of |
| 4827 | formats returned by {@link |
| 4828 | android.hardware.camera2.params.StreamConfigurationMap#getInputFormats} and {@link |
| 4829 | android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats}. |
| 4830 | * {@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput} |
| 4831 | returns non empty int[] for each supported input format returned by {@link |
| 4832 | android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}. |
| 4833 | * Each size returned by {@link |
| 4834 | android.hardware.camera2.params.StreamConfigurationMap#getInputSizes |
| 4835 | getInputSizes(ImageFormat.PRIVATE)} is also included in {@link |
| 4836 | android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes |
| 4837 | getOutputSizes(ImageFormat.PRIVATE)} |
| 4838 | * Using {@link android.graphics.ImageFormat#PRIVATE} does not cause a frame rate drop |
| 4839 | relative to the sensor's maximum capture rate (at that resolution). |
| 4840 | * {@link android.graphics.ImageFormat#PRIVATE} will be reprocessable into both |
| 4841 | {@link android.graphics.ImageFormat#YUV_420_888} and |
| 4842 | {@link android.graphics.ImageFormat#JPEG} formats. |
Chien-Yu Chen | f8581f6 | 2015-05-12 15:13:00 -0700 | [diff] [blame] | 4843 | * The maximum available resolution for PRIVATE streams |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4844 | (both input/output) will match the maximum available |
| 4845 | resolution of JPEG streams. |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 4846 | * Static metadata android.reprocess.maxCaptureStall. |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4847 | * Only below controls are effective for reprocessing requests and |
| 4848 | will be present in capture results, other controls in reprocess |
| 4849 | requests will be ignored by the camera device. |
| 4850 | * android.jpeg.* |
| 4851 | * android.noiseReduction.mode |
| 4852 | * android.edge.mode |
Eino-Ville Talvala | 073e458 | 2015-07-07 10:40:59 -0700 | [diff] [blame] | 4853 | * android.noiseReduction.availableNoiseReductionModes and |
| 4854 | android.edge.availableEdgeModes will both list ZERO_SHUTTER_LAG as a supported mode. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 4855 | </notes> |
| 4856 | </value> |
Ruben Brunk | a43690a | 2014-11-11 11:47:03 -0800 | [diff] [blame] | 4857 | <value optional="true">READ_SENSOR_SETTINGS |
| 4858 | <notes> |
| 4859 | The camera device supports accurately reporting the sensor settings for many of |
| 4860 | the sensor controls while the built-in 3A algorithm is running. This allows |
| 4861 | reporting of sensor settings even when these settings cannot be manually changed. |
| 4862 | |
| 4863 | The values reported for the following controls are guaranteed to be available |
| 4864 | in the CaptureResult, including when 3A is enabled: |
| 4865 | |
| 4866 | * Exposure control |
| 4867 | * android.sensor.exposureTime |
| 4868 | * Sensitivity control |
| 4869 | * android.sensor.sensitivity |
| 4870 | * Lens controls (if the lens is adjustable) |
| 4871 | * android.lens.focusDistance |
| 4872 | * android.lens.aperture |
| 4873 | |
| 4874 | This capability is a subset of the MANUAL_SENSOR control capability, and will |
| 4875 | always be included if the MANUAL_SENSOR capability is available. |
| 4876 | </notes> |
| 4877 | </value> |
Eino-Ville Talvala | 0f0d795 | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4878 | <value optional="true">BURST_CAPTURE |
| 4879 | <notes> |
Eino-Ville Talvala | a92c2b7 | 2015-06-17 11:32:55 -0700 | [diff] [blame] | 4880 | The camera device supports capturing high-resolution images at >= 20 frames per |
| 4881 | second, in at least the uncompressed YUV format, when post-processing settings are set |
| 4882 | to FAST. Additionally, maximum-resolution images can be captured at >= 10 frames |
| 4883 | per second. Here, 'high resolution' means at least 8 megapixels, or the maximum |
| 4884 | resolution of the device, whichever is smaller. |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4885 | </notes> |
| 4886 | <sdk_notes> |
Eino-Ville Talvala | a92c2b7 | 2015-06-17 11:32:55 -0700 | [diff] [blame] | 4887 | More specifically, this means that a size matching the camera device's active array |
| 4888 | size is listed as a supported size for the {@link |
| 4889 | android.graphics.ImageFormat#YUV_420_888} format in either {@link |
| 4890 | android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes} or {@link |
| 4891 | android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes}, |
| 4892 | with a minimum frame duration for that format and size of either <= 1/20 s, or |
| 4893 | <= 1/10 s, respectively; and the android.control.aeAvailableTargetFpsRanges entry |
| 4894 | lists at least one FPS range where the minimum FPS is >= 1 / minimumFrameDuration |
| 4895 | for the maximum-size YUV_420_888 format. If that maximum size is listed in {@link |
| 4896 | android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes}, |
| 4897 | then the list of resolutions for YUV_420_888 from {@link |
| 4898 | android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes} contains at |
| 4899 | least one resolution >= 8 megapixels, with a minimum frame duration of <= 1/20 |
| 4900 | s. |
Eino-Ville Talvala | 0f0d795 | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4901 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4902 | If the device supports the {@link |
| 4903 | android.graphics.ImageFormat#RAW10|AIMAGE_FORMAT_RAW10}, {@link |
| 4904 | android.graphics.ImageFormat#RAW12|AIMAGE_FORMAT_RAW12}, then those can also be |
| 4905 | captured at the same rate as the maximum-size YUV_420_888 resolution is. |
Yin-Chia Yeh | e36c5ed | 2015-04-02 14:31:53 -0700 | [diff] [blame] | 4906 | |
Eino-Ville Talvala | a92c2b7 | 2015-06-17 11:32:55 -0700 | [diff] [blame] | 4907 | If the device supports the PRIVATE_REPROCESSING capability, then the same guarantees |
| 4908 | as for the YUV_420_888 format also apply to the {@link |
| 4909 | android.graphics.ImageFormat#PRIVATE} format. |
| 4910 | |
| 4911 | In addition, the android.sync.maxLatency field is guaranted to have a value between 0 |
| 4912 | and 4, inclusive. android.control.aeLockAvailable and android.control.awbLockAvailable |
| 4913 | are also guaranteed to be `true` so burst capture with these two locks ON yields |
| 4914 | consistent image output. |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4915 | </sdk_notes> |
| 4916 | <ndk_notes> |
| 4917 | More specifically, this means that at least one output {@link |
| 4918 | android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888} size listed in |
| 4919 | {@link |
| 4920 | android.hardware.camera2.params.StreamConfigurationMap|ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS} |
| 4921 | is larger or equal to the 'high resolution' defined above, and can be captured at at |
| 4922 | least 20 fps. For the largest {@link |
| 4923 | android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888} size listed in |
| 4924 | {@link |
| 4925 | android.hardware.camera2.params.StreamConfigurationMap|ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS}, |
| 4926 | camera device can capture this size for at least 10 frames per second. Also the |
| 4927 | android.control.aeAvailableTargetFpsRanges entry lists at least one FPS range where |
| 4928 | the minimum FPS is >= 1 / minimumFrameDuration for the largest YUV_420_888 size. |
| 4929 | |
| 4930 | If the device supports the {@link |
| 4931 | android.graphics.ImageFormat#RAW10|AIMAGE_FORMAT_RAW10}, {@link |
| 4932 | android.graphics.ImageFormat#RAW12|AIMAGE_FORMAT_RAW12}, then those can also be |
| 4933 | captured at the same rate as the maximum-size YUV_420_888 resolution is. |
| 4934 | |
| 4935 | In addition, the android.sync.maxLatency field is guaranted to have a value between 0 |
| 4936 | and 4, inclusive. android.control.aeLockAvailable and android.control.awbLockAvailable |
| 4937 | are also guaranteed to be `true` so burst capture with these two locks ON yields |
| 4938 | consistent image output. |
| 4939 | </ndk_notes> |
Eino-Ville Talvala | 0f0d795 | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 4940 | </value> |
Yin-Chia Yeh | 3ba998e | 2016-04-06 11:58:41 -0700 | [diff] [blame] | 4941 | <value optional="true" ndk_hidden="true">YUV_REPROCESSING |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4942 | <notes> |
Chien-Yu Chen | 9e48beb | 2015-03-18 18:33:17 -0700 | [diff] [blame] | 4943 | The camera device supports the YUV_420_888 reprocessing use case, similar as |
Chien-Yu Chen | f8581f6 | 2015-05-12 15:13:00 -0700 | [diff] [blame] | 4944 | PRIVATE_REPROCESSING, This capability requires the camera device to support the |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4945 | following: |
| 4946 | |
| 4947 | * One input stream is supported, that is, `android.request.maxNumInputStreams == 1`. |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4948 | * {@link android.graphics.ImageFormat#YUV_420_888} is supported as an output/input |
| 4949 | format, that is, YUV_420_888 is included in the lists of formats returned by {@link |
| 4950 | android.hardware.camera2.params.StreamConfigurationMap#getInputFormats} and {@link |
| 4951 | android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats}. |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 4952 | * {@link |
| 4953 | android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput} |
| 4954 | returns non-empty int[] for each supported input format returned by {@link |
| 4955 | android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}. |
| 4956 | * Each size returned by {@link |
| 4957 | android.hardware.camera2.params.StreamConfigurationMap#getInputSizes |
| 4958 | getInputSizes(YUV_420_888)} is also included in {@link |
| 4959 | android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes |
| 4960 | getOutputSizes(YUV_420_888)} |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4961 | * Using {@link android.graphics.ImageFormat#YUV_420_888} does not cause a frame rate |
| 4962 | drop relative to the sensor's maximum capture rate (at that resolution). |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 4963 | * {@link android.graphics.ImageFormat#YUV_420_888} will be reprocessable into both |
| 4964 | {@link android.graphics.ImageFormat#YUV_420_888} and {@link |
| 4965 | android.graphics.ImageFormat#JPEG} formats. |
| 4966 | * The maximum available resolution for {@link |
| 4967 | android.graphics.ImageFormat#YUV_420_888} streams (both input/output) will match the |
| 4968 | maximum available resolution of {@link android.graphics.ImageFormat#JPEG} streams. |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 4969 | * Static metadata android.reprocess.maxCaptureStall. |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 4970 | * Only the below controls are effective for reprocessing requests and will be present |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4971 | in capture results. The reprocess requests are from the original capture results |
| 4972 | that are associated with the intermediate {@link |
| 4973 | android.graphics.ImageFormat#YUV_420_888} output buffers. All other controls in the |
| 4974 | reprocess requests will be ignored by the camera device. |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4975 | * android.jpeg.* |
| 4976 | * android.noiseReduction.mode |
| 4977 | * android.edge.mode |
| 4978 | * android.reprocess.effectiveExposureFactor |
Eino-Ville Talvala | 073e458 | 2015-07-07 10:40:59 -0700 | [diff] [blame] | 4979 | * android.noiseReduction.availableNoiseReductionModes and |
| 4980 | android.edge.availableEdgeModes will both list ZERO_SHUTTER_LAG as a supported mode. |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 4981 | </notes> |
| 4982 | </value> |
Eino-Ville Talvala | 8f0d2d1 | 2015-04-13 17:28:29 -0700 | [diff] [blame] | 4983 | <value optional="true">DEPTH_OUTPUT |
| 4984 | <notes> |
| 4985 | The camera device can produce depth measurements from its field of view. |
| 4986 | |
| 4987 | This capability requires the camera device to support the following: |
| 4988 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 4989 | * {@link android.graphics.ImageFormat#DEPTH16|AIMAGE_FORMAT_DEPTH16} is supported as |
| 4990 | an output format. |
| 4991 | * {@link |
| 4992 | android.graphics.ImageFormat#DEPTH_POINT_CLOUD|AIMAGE_FORMAT_DEPTH_POINT_CLOUD} is |
| 4993 | optionally supported as an output format. |
| 4994 | * This camera device, and all camera devices with the same android.lens.facing, will |
| 4995 | list the following calibration metadata entries in both {@link |
| 4996 | android.hardware.camera2.CameraCharacteristics|ACameraManager_getCameraCharacteristics} |
| 4997 | and {@link |
| 4998 | android.hardware.camera2.CaptureResult|ACameraCaptureSession_captureCallback_result}: |
Eino-Ville Talvala | 8f0d2d1 | 2015-04-13 17:28:29 -0700 | [diff] [blame] | 4999 | - android.lens.poseTranslation |
| 5000 | - android.lens.poseRotation |
| 5001 | - android.lens.intrinsicCalibration |
| 5002 | - android.lens.radialDistortion |
| 5003 | * The android.depth.depthIsExclusive entry is listed by this device. |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 5004 | * As of Android P, the android.lens.poseReference entry is listed by this device. |
Eino-Ville Talvala | 8f0d2d1 | 2015-04-13 17:28:29 -0700 | [diff] [blame] | 5005 | * A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support |
| 5006 | normal YUV_420_888, JPEG, and PRIV-format outputs. It only has to support the DEPTH16 |
| 5007 | format. |
| 5008 | |
| 5009 | Generally, depth output operates at a slower frame rate than standard color capture, |
| 5010 | so the DEPTH16 and DEPTH_POINT_CLOUD formats will commonly have a stall duration that |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 5011 | should be accounted for (see {@link |
| 5012 | android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration|ACAMERA_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS}). |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 5013 | On a device that supports both depth and color-based output, to enable smooth preview, |
| 5014 | using a repeating burst is recommended, where a depth-output target is only included |
| 5015 | once every N frames, where N is the ratio between preview output rate and depth output |
Eino-Ville Talvala | 8f0d2d1 | 2015-04-13 17:28:29 -0700 | [diff] [blame] | 5016 | rate, including depth stall time. |
| 5017 | </notes> |
| 5018 | </value> |
Yin-Chia Yeh | 3ba998e | 2016-04-06 11:58:41 -0700 | [diff] [blame] | 5019 | <value optional="true" ndk_hidden="true">CONSTRAINED_HIGH_SPEED_VIDEO |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 5020 | <notes> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 5021 | The device supports constrained high speed video recording (frame rate >=120fps) use |
| 5022 | case. The camera device will support high speed capture session created by {@link |
| 5023 | android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}, which |
| 5024 | only accepts high speed request lists created by {@link |
| 5025 | android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList}. |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 5026 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 5027 | A camera device can still support high speed video streaming by advertising the high |
| 5028 | speed FPS ranges in android.control.aeAvailableTargetFpsRanges. For this case, all |
| 5029 | normal capture request per frame control and synchronization requirements will apply |
| 5030 | to the high speed fps ranges, the same as all other fps ranges. This capability |
| 5031 | describes the capability of a specialized operating mode with many limitations (see |
| 5032 | below), which is only targeted at high speed video recording. |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 5033 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 5034 | The supported high speed video sizes and fps ranges are specified in {@link |
| 5035 | android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges}. |
| 5036 | To get desired output frame rates, the application is only allowed to select video |
| 5037 | size and FPS range combinations provided by {@link |
| 5038 | android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes}. The |
| 5039 | fps range can be controlled via android.control.aeTargetFpsRange. |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 5040 | |
| 5041 | In this capability, the camera device will override aeMode, awbMode, and afMode to |
Zhijun He | 1a71d0d | 2015-06-16 19:44:18 -0700 | [diff] [blame] | 5042 | ON, AUTO, and CONTINUOUS_VIDEO, respectively. All post-processing block mode |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 5043 | controls will be overridden to be FAST. Therefore, no manual control of capture |
| 5044 | and post-processing parameters is possible. All other controls operate the |
| 5045 | same as when android.control.mode == AUTO. This means that all other |
| 5046 | android.control.* fields continue to work, such as |
| 5047 | |
| 5048 | * android.control.aeTargetFpsRange |
| 5049 | * android.control.aeExposureCompensation |
| 5050 | * android.control.aeLock |
| 5051 | * android.control.awbLock |
| 5052 | * android.control.effectMode |
| 5053 | * android.control.aeRegions |
| 5054 | * android.control.afRegions |
| 5055 | * android.control.awbRegions |
| 5056 | * android.control.afTrigger |
| 5057 | * android.control.aePrecaptureTrigger |
| 5058 | |
| 5059 | Outside of android.control.*, the following controls will work: |
| 5060 | |
| 5061 | * android.flash.mode (TORCH mode only, automatic flash for still capture will not |
| 5062 | work since aeMode is ON) |
| 5063 | * android.lens.opticalStabilizationMode (if it is supported) |
| 5064 | * android.scaler.cropRegion |
| 5065 | * android.statistics.faceDetectMode (if it is supported) |
| 5066 | |
| 5067 | For high speed recording use case, the actual maximum supported frame rate may |
| 5068 | be lower than what camera can output, depending on the destination Surfaces for |
| 5069 | the image data. For example, if the destination surface is from video encoder, |
| 5070 | the application need check if the video encoder is capable of supporting the |
| 5071 | high frame rate for a given video size, or it will end up with lower recording |
| 5072 | frame rate. If the destination surface is from preview window, the actual preview frame |
| 5073 | rate will be bounded by the screen refresh rate. |
| 5074 | |
| 5075 | The camera device will only support up to 2 high speed simultaneous output surfaces |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 5076 | (preview and recording surfaces) in this mode. Above controls will be effective only |
| 5077 | if all of below conditions are true: |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 5078 | |
| 5079 | * The application creates a camera capture session with no more than 2 surfaces via |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 5080 | {@link |
| 5081 | android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}. The |
| 5082 | targeted surfaces must be preview surface (either from {@link |
| 5083 | android.view.SurfaceView} or {@link android.graphics.SurfaceTexture}) or recording |
| 5084 | surface(either from {@link android.media.MediaRecorder#getSurface} or {@link |
| 5085 | android.media.MediaCodec#createInputSurface}). |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 5086 | * The stream sizes are selected from the sizes reported by |
| 5087 | {@link android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoSizes}. |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 5088 | * The FPS ranges are selected from {@link |
| 5089 | android.hardware.camera2.params.StreamConfigurationMap#getHighSpeedVideoFpsRanges}. |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 5090 | |
Eino-Ville Talvala | f55c1a8 | 2015-06-30 13:32:09 -0700 | [diff] [blame] | 5091 | When above conditions are NOT satistied, |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 5092 | {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession} |
Eino-Ville Talvala | f55c1a8 | 2015-06-30 13:32:09 -0700 | [diff] [blame] | 5093 | will fail. |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 5094 | |
| 5095 | Switching to a FPS range that has different maximum FPS may trigger some camera device |
| 5096 | reconfigurations, which may introduce extra latency. It is recommended that |
| 5097 | the application avoids unnecessary maximum target FPS changes as much as possible |
| 5098 | during high speed streaming. |
| 5099 | </notes> |
| 5100 | </value> |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 5101 | <value optional="true" hal_version="3.3" >MOTION_TRACKING |
| 5102 | <notes> |
Eino-Ville Talvala | baf8047 | 2018-02-05 16:26:26 -0800 | [diff] [blame] | 5103 | The camera device supports the MOTION_TRACKING value for |
| 5104 | android.control.captureIntent, which limits maximum exposure time to 20 ms. |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 5105 | |
Eino-Ville Talvala | baf8047 | 2018-02-05 16:26:26 -0800 | [diff] [blame] | 5106 | This limits the motion blur of capture images, resulting in better image tracking |
| 5107 | results for use cases such as image stabilization or augmented reality. |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 5108 | </notes> |
| 5109 | </value> |
Shuzhen Wang | 0144f58 | 2017-11-30 12:03:37 -0800 | [diff] [blame] | 5110 | <value optional="true" hal_version="3.3">LOGICAL_MULTI_CAMERA |
| 5111 | <notes> |
| 5112 | The camera device is a logical camera backed by two or more physical cameras that are |
| 5113 | also exposed to the application. |
| 5114 | |
| 5115 | This capability requires the camera device to support the following: |
| 5116 | |
| 5117 | * This camera device must list the following static metadata entries in {@link |
| 5118 | android.hardware.camera2.CameraCharacteristics}: |
| 5119 | - android.logicalMultiCamera.physicalIds |
| 5120 | - android.logicalMultiCamera.sensorSyncType |
| 5121 | * The underlying physical cameras' static metadata must list the following entries, |
| 5122 | so that the application can correlate pixels from the physical streams: |
| 5123 | - android.lens.poseReference |
| 5124 | - android.lens.poseRotation |
| 5125 | - android.lens.poseTranslation |
| 5126 | - android.lens.intrinsicCalibration |
| 5127 | - android.lens.radialDistortion |
Shuzhen Wang | d24b970 | 2018-01-25 13:23:03 -0800 | [diff] [blame] | 5128 | * The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be |
| 5129 | the same. |
Shuzhen Wang | 0144f58 | 2017-11-30 12:03:37 -0800 | [diff] [blame] | 5130 | * The logical camera device must be LIMITED or higher device. |
| 5131 | |
| 5132 | Both the logical camera device and its underlying physical devices support the |
| 5133 | mandatory stream combinations required for their device levels. |
| 5134 | |
| 5135 | Additionally, for each guaranteed stream combination, the logical camera supports: |
| 5136 | |
Shuzhen Wang | d24b970 | 2018-01-25 13:23:03 -0800 | [diff] [blame] | 5137 | * For each guaranteed stream combination, the logical camera supports replacing one |
| 5138 | logical {@link android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888 YUV_420_888} |
Shuzhen Wang | 0144f58 | 2017-11-30 12:03:37 -0800 | [diff] [blame] | 5139 | or raw stream with two physical streams of the same size and format, each from a |
| 5140 | separate physical camera, given that the size and format are supported by both |
| 5141 | physical cameras. |
Shuzhen Wang | d24b970 | 2018-01-25 13:23:03 -0800 | [diff] [blame] | 5142 | * If the logical camera doesn't advertise RAW capability, but the underlying physical |
| 5143 | cameras do, the logical camera will support guaranteed stream combinations for RAW |
| 5144 | capability, except that the RAW streams will be physical streams, each from a separate |
| 5145 | physical camera. This is usually the case when the physical cameras have different |
| 5146 | sensor sizes. |
Shuzhen Wang | 0144f58 | 2017-11-30 12:03:37 -0800 | [diff] [blame] | 5147 | |
| 5148 | Using physical streams in place of a logical stream of the same size and format will |
| 5149 | not slow down the frame rate of the capture, as long as the minimum frame duration |
| 5150 | of the physical and logical streams are the same. |
| 5151 | </notes> |
| 5152 | </value> |
| 5153 | |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5154 | </enum> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5155 | <description>List of capabilities that this camera device |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5156 | advertises as fully supporting.</description> |
| 5157 | <details> |
| 5158 | A capability is a contract that the camera device makes in order |
| 5159 | to be able to satisfy one or more use cases. |
| 5160 | |
| 5161 | Listing a capability guarantees that the whole set of features |
| 5162 | required to support a common use will all be available. |
| 5163 | |
| 5164 | Using a subset of the functionality provided by an unsupported |
| 5165 | capability may be possible on a specific camera device implementation; |
| 5166 | to do this query each of android.request.availableRequestKeys, |
| 5167 | android.request.availableResultKeys, |
| 5168 | android.request.availableCharacteristicsKeys. |
| 5169 | |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5170 | The following capabilities are guaranteed to be available on |
| 5171 | android.info.supportedHardwareLevel `==` FULL devices: |
| 5172 | |
| 5173 | * MANUAL_SENSOR |
Zhijun He | 5a1276a | 2014-06-02 16:46:03 -0700 | [diff] [blame] | 5174 | * MANUAL_POST_PROCESSING |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5175 | |
| 5176 | Other capabilities may be available on either FULL or LIMITED |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5177 | devices, but the application should query this key to be sure. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5178 | </details> |
| 5179 | <hal_details> |
| 5180 | Additional constraint details per-capability will be available |
| 5181 | in the Compatibility Test Suite. |
| 5182 | |
Eino-Ville Talvala | 3310f82 | 2014-07-09 09:34:05 -0700 | [diff] [blame] | 5183 | Minimum baseline requirements required for the |
| 5184 | BACKWARD_COMPATIBLE capability are not explicitly listed. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5185 | 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] | 5186 | android.hardware.camera2.cts package. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5187 | |
| 5188 | Listed controls that can be either request or result (e.g. |
| 5189 | android.sensor.exposureTime) must be available both in the |
| 5190 | request and the result in order to be considered to be |
| 5191 | capability-compliant. |
| 5192 | |
| 5193 | For example, if the HAL claims to support MANUAL control, |
| 5194 | then exposure time must be configurable via the request _and_ |
| 5195 | the actual exposure applied must be available via |
| 5196 | the result. |
Ruben Brunk | 6285c4d | 2014-06-18 17:13:19 -0700 | [diff] [blame] | 5197 | |
| 5198 | If MANUAL_SENSOR is omitted, the HAL may choose to omit the |
| 5199 | android.scaler.availableMinFrameDurations static property entirely. |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 5200 | |
Chien-Yu Chen | f8581f6 | 2015-05-12 15:13:00 -0700 | [diff] [blame] | 5201 | For PRIVATE_REPROCESSING and YUV_REPROCESSING capabilities, see |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 5202 | hardware/libhardware/include/hardware/camera3.h Section 10 for more information. |
Eino-Ville Talvala | 8f0d2d1 | 2015-04-13 17:28:29 -0700 | [diff] [blame] | 5203 | |
Yin-Chia Yeh | fa2a867 | 2015-04-24 16:52:26 -0700 | [diff] [blame] | 5204 | Devices that support the MANUAL_SENSOR capability must support the |
| 5205 | CAMERA3_TEMPLATE_MANUAL template defined in camera3.h. |
| 5206 | |
Chien-Yu Chen | f8581f6 | 2015-05-12 15:13:00 -0700 | [diff] [blame] | 5207 | Devices that support the PRIVATE_REPROCESSING capability or the |
Yin-Chia Yeh | fa2a867 | 2015-04-24 16:52:26 -0700 | [diff] [blame] | 5208 | YUV_REPROCESSING capability must support the |
| 5209 | CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template defined in camera3.h. |
| 5210 | |
Eino-Ville Talvala | 8f0d2d1 | 2015-04-13 17:28:29 -0700 | [diff] [blame] | 5211 | For DEPTH_OUTPUT, the depth-format keys |
| 5212 | android.depth.availableDepthStreamConfigurations, |
| 5213 | android.depth.availableDepthMinFrameDurations, |
| 5214 | android.depth.availableDepthStallDurations must be available, in |
| 5215 | addition to the other keys explicitly mentioned in the DEPTH_OUTPUT |
| 5216 | enum notes. The entry android.depth.maxDepthSamples must be available |
| 5217 | if the DEPTH_POINT_CLOUD format is supported (HAL pixel format BLOB, dataspace |
| 5218 | DEPTH). |
Shuzhen Wang | 0144f58 | 2017-11-30 12:03:37 -0800 | [diff] [blame] | 5219 | |
| 5220 | For a camera device with LOGICAL_MULTI_CAMERA capability, it should operate in the |
| 5221 | same way as a physical camera device based on its hardware level and capabilities. |
| 5222 | It's recommended that its feature set is superset of that of individual physical cameras. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5223 | </hal_details> |
| 5224 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 5225 | <entry name="availableRequestKeys" type="int32" visibility="ndk_public" |
| 5226 | container="array" hwlevel="legacy"> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5227 | <array> |
| 5228 | <size>n</size> |
| 5229 | </array> |
| 5230 | <description>A list of all keys that the camera device has available |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 5231 | to use with {@link android.hardware.camera2.CaptureRequest|ACaptureRequest}.</description> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5232 | |
| 5233 | <details>Attempting to set a key into a CaptureRequest that is not |
| 5234 | listed here will result in an invalid request and will be rejected |
| 5235 | by the camera device. |
| 5236 | |
| 5237 | This field can be used to query the feature set of a camera device |
| 5238 | at a more granular level than capabilities. This is especially |
| 5239 | important for optional keys that are not listed under any capability |
| 5240 | in android.request.availableCapabilities. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5241 | </details> |
| 5242 | <hal_details> |
Emilian Peev | 3984754 | 2017-09-25 09:17:04 +0100 | [diff] [blame] | 5243 | Vendor tags can be listed here. Vendor tag metadata should also |
| 5244 | use the extensions C api (refer to camera3.h for more details). |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5245 | |
| 5246 | Setting/getting vendor tags will be checked against the metadata |
| 5247 | vendor extensions API and not against this field. |
| 5248 | |
| 5249 | The HAL must not consume any request tags that are not listed either |
| 5250 | here or in the vendor tag list. |
| 5251 | |
| 5252 | The public camera2 API will always make the vendor tags visible |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 5253 | via |
| 5254 | {@link android.hardware.camera2.CameraCharacteristics#getAvailableCaptureRequestKeys}. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5255 | </hal_details> |
| 5256 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 5257 | <entry name="availableResultKeys" type="int32" visibility="ndk_public" |
| 5258 | container="array" hwlevel="legacy"> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5259 | <array> |
| 5260 | <size>n</size> |
| 5261 | </array> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 5262 | <description>A list of all keys that the camera device has available to use with {@link |
| 5263 | android.hardware.camera2.CaptureResult|ACameraCaptureSession_captureCallback_result}. |
| 5264 | </description> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5265 | |
| 5266 | <details>Attempting to get a key from a CaptureResult that is not |
| 5267 | 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] | 5268 | a CaptureResult that is listed here will generally never return a `null` |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5269 | value. |
| 5270 | |
| 5271 | The following keys may return `null` unless they are enabled: |
| 5272 | |
| 5273 | * android.statistics.lensShadingMap (non-null iff android.statistics.lensShadingMapMode == ON) |
| 5274 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5275 | (Those sometimes-null keys will nevertheless be listed here |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5276 | if they are available.) |
| 5277 | |
| 5278 | This field can be used to query the feature set of a camera device |
| 5279 | at a more granular level than capabilities. This is especially |
| 5280 | important for optional keys that are not listed under any capability |
| 5281 | in android.request.availableCapabilities. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5282 | </details> |
| 5283 | <hal_details> |
| 5284 | Tags listed here must always have an entry in the result metadata, |
| 5285 | even if that size is 0 elements. Only array-type tags (e.g. lists, |
| 5286 | matrices, strings) are allowed to have 0 elements. |
| 5287 | |
Emilian Peev | 3984754 | 2017-09-25 09:17:04 +0100 | [diff] [blame] | 5288 | Vendor tags can be listed here. Vendor tag metadata should also |
| 5289 | use the extensions C api (refer to camera3.h for more details). |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5290 | |
| 5291 | Setting/getting vendor tags will be checked against the metadata |
| 5292 | vendor extensions API and not against this field. |
| 5293 | |
| 5294 | The HAL must not produce any result tags that are not listed either |
| 5295 | here or in the vendor tag list. |
| 5296 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 5297 | The public camera2 API will always make the vendor tags visible via {@link |
| 5298 | android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys}. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5299 | </hal_details> |
| 5300 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 5301 | <entry name="availableCharacteristicsKeys" type="int32" visibility="ndk_public" |
| 5302 | container="array" hwlevel="legacy"> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5303 | <array> |
| 5304 | <size>n</size> |
| 5305 | </array> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 5306 | <description>A list of all keys that the camera device has available to use with {@link |
| 5307 | android.hardware.camera2.CameraCharacteristics|ACameraManager_getCameraCharacteristics}. |
| 5308 | </description> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5309 | <details>This entry follows the same rules as |
| 5310 | android.request.availableResultKeys (except that it applies for |
| 5311 | CameraCharacteristics instead of CaptureResult). See above for more |
| 5312 | details. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5313 | </details> |
| 5314 | <hal_details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5315 | 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] | 5316 | even if that size is 0 elements. Only array-type tags (e.g. lists, |
| 5317 | matrices, strings) are allowed to have 0 elements. |
| 5318 | |
Emilian Peev | 3984754 | 2017-09-25 09:17:04 +0100 | [diff] [blame] | 5319 | Vendor tags can listed here. Vendor tag metadata should also use |
| 5320 | the extensions C api (refer to camera3.h for more details). |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5321 | |
| 5322 | Setting/getting vendor tags will be checked against the metadata |
| 5323 | vendor extensions API and not against this field. |
| 5324 | |
| 5325 | The HAL must not have any tags in its static info that are not listed |
| 5326 | either here or in the vendor tag list. |
| 5327 | |
| 5328 | The public camera2 API will always make the vendor tags visible |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 5329 | via {@link android.hardware.camera2.CameraCharacteristics#getKeys}. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 5330 | </hal_details> |
| 5331 | </entry> |
Emilian Peev | b0134d0 | 2017-11-17 13:20:12 +0000 | [diff] [blame] | 5332 | <entry name="availableSessionKeys" type="int32" visibility="ndk_public" |
Emilian Peev | 17324ba | 2018-01-10 13:47:40 +0000 | [diff] [blame] | 5333 | container="array" hwlevel="legacy" hal_version="3.3"> |
Emilian Peev | b0134d0 | 2017-11-17 13:20:12 +0000 | [diff] [blame] | 5334 | <array> |
| 5335 | <size>n</size> |
| 5336 | </array> |
| 5337 | <description>A subset of the available request keys that the camera device |
| 5338 | can pass as part of the capture session initialization.</description> |
| 5339 | |
| 5340 | <details> This is a subset of android.request.availableRequestKeys which |
| 5341 | contains a list of keys that are difficult to apply per-frame and |
| 5342 | can result in unexpected delays when modified during the capture session |
| 5343 | lifetime. Typical examples include parameters that require a |
| 5344 | time-consuming hardware re-configuration or internal camera pipeline |
| 5345 | change. For performance reasons we advise clients to pass their initial |
Chien-Yu Chen | 11f62a5 | 2018-01-11 11:32:52 -0800 | [diff] [blame] | 5346 | values as part of |
Eino-Ville Talvala | 808558e | 2017-12-07 13:12:11 -0800 | [diff] [blame] | 5347 | {@link SessionConfiguration#setSessionParameters|ACameraDevice_createCaptureSessionWithSessionParameters}. |
Emilian Peev | b0134d0 | 2017-11-17 13:20:12 +0000 | [diff] [blame] | 5348 | Once the camera capture session is enabled it is also recommended to avoid |
| 5349 | changing them from their initial values set in |
| 5350 | {@link SessionConfiguration#setSessionParameters|ACameraDevice_createCaptureSessionWithSessionParameters}. |
| 5351 | Control over session parameters can still be exerted in capture requests |
| 5352 | but clients should be aware and expect delays during their application. |
| 5353 | An example usage scenario could look like this: |
| 5354 | |
| 5355 | * The camera client starts by quering the session parameter key list via |
| 5356 | {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys|ACameraManager_getCameraCharacteristics}. |
| 5357 | * Before triggering the capture session create sequence, a capture request |
| 5358 | must be built via |
| 5359 | {@link CameraDevice#createCaptureRequest|ACameraDevice_createCaptureRequest} |
| 5360 | using an appropriate template matching the particular use case. |
| 5361 | * The client should go over the list of session parameters and check |
| 5362 | whether some of the keys listed matches with the parameters that |
| 5363 | they intend to modify as part of the first capture request. |
| 5364 | * If there is no such match, the capture request can be passed |
| 5365 | unmodified to |
| 5366 | {@link SessionConfiguration#setSessionParameters|ACameraDevice_createCaptureSessionWithSessionParameters}. |
| 5367 | * If matches do exist, the client should update the respective values |
| 5368 | and pass the request to |
| 5369 | {@link SessionConfiguration#setSessionParameters|ACameraDevice_createCaptureSessionWithSessionParameters}. |
| 5370 | * After the capture session initialization completes the session parameter |
| 5371 | key list can continue to serve as reference when posting or updating |
| 5372 | further requests. As mentioned above further changes to session |
| 5373 | parameters should ideally be avoided, if updates are necessary |
| 5374 | however clients could expect a delay/glitch during the |
| 5375 | parameter switch. |
| 5376 | |
| 5377 | </details> |
| 5378 | <hal_details> |
| 5379 | Vendor tags can be listed here. Vendor tag metadata should also |
| 5380 | use the extensions C api (refer to |
| 5381 | android.hardware.camera.device.V3_4.StreamConfiguration.sessionParams for more details). |
| 5382 | |
| 5383 | Setting/getting vendor tags will be checked against the metadata |
| 5384 | vendor extensions API and not against this field. |
| 5385 | |
| 5386 | The HAL must not consume any request tags in the session parameters that |
| 5387 | are not listed either here or in the vendor tag list. |
| 5388 | |
| 5389 | The public camera2 API will always make the vendor tags visible |
| 5390 | via |
| 5391 | {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys}. |
| 5392 | </hal_details> |
| 5393 | </entry> |
Emilian Peev | b52eadf | 2018-01-18 19:09:57 +0000 | [diff] [blame] | 5394 | <entry name="availablePhysicalCameraRequestKeys" type="int32" visibility="hidden" |
| 5395 | container="array" hwlevel="limited" hal_version="3.3"> |
| 5396 | <array> |
| 5397 | <size>n</size> |
| 5398 | </array> |
| 5399 | <description>A subset of the available request keys that can be overriden for |
| 5400 | physical devices backing a logical multi-camera.</description> |
| 5401 | <details> |
| 5402 | This is a subset of android.request.availableRequestKeys which contains a list |
| 5403 | of keys that can be overriden using {@link CaptureRequest.Builder#setPhysicalCameraKey}. |
| 5404 | The respective value of such request key can be obtained by calling |
| 5405 | {@link CaptureRequest.Builder#getPhysicalCameraKey}. Capture requests that contain |
| 5406 | individual physical device requests must be built via |
| 5407 | {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}. |
Emilian Peev | b52eadf | 2018-01-18 19:09:57 +0000 | [diff] [blame] | 5408 | </details> |
| 5409 | <hal_details> |
| 5410 | Vendor tags can be listed here. Vendor tag metadata should also |
| 5411 | use the extensions C api (refer to |
| 5412 | android.hardware.camera.device.V3_4.CaptureRequest.physicalCameraSettings for more |
| 5413 | details). |
| 5414 | |
| 5415 | Setting/getting vendor tags will be checked against the metadata |
| 5416 | vendor extensions API and not against this field. |
| 5417 | |
| 5418 | The HAL must not consume any request tags in the session parameters that |
| 5419 | are not listed either here or in the vendor tag list. |
| 5420 | |
Emilian Peev | 62d01d5 | 2018-02-06 16:08:38 +0000 | [diff] [blame] | 5421 | There should be no overlap between this set of keys and the available session keys |
| 5422 | {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys} along |
| 5423 | with any other controls that can have impact on the dual-camera sync. |
| 5424 | |
Emilian Peev | b52eadf | 2018-01-18 19:09:57 +0000 | [diff] [blame] | 5425 | The public camera2 API will always make the vendor tags visible |
| 5426 | via |
| 5427 | {@link android.hardware.camera2.CameraCharacteristics#getAvailablePhysicalCameraRequestKeys}. |
| 5428 | </hal_details> |
| 5429 | </entry> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 5430 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5431 | </section> |
| 5432 | <section name="scaler"> |
| 5433 | <controls> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 5434 | <entry name="cropRegion" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5435 | container="array" typedef="rectangle" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5436 | <array> |
Eino-Ville Talvala | e04ec6e | 2013-04-16 15:35:18 -0700 | [diff] [blame] | 5437 | <size>4</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5438 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5439 | <description>The desired region of the sensor to read out for this capture.</description> |
| 5440 | <units>Pixel coordinates relative to |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5441 | android.sensor.info.activeArraySize</units> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 5442 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5443 | This control can be used to implement digital zoom. |
| 5444 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5445 | The crop region coordinate system is based off |
| 5446 | android.sensor.info.activeArraySize, with `(0, 0)` being the |
| 5447 | top-left corner of the sensor active array. |
| 5448 | |
| 5449 | Output streams use this rectangle to produce their output, |
| 5450 | cropping to a smaller region if necessary to maintain the |
| 5451 | stream's aspect ratio, then scaling the sensor input to |
| 5452 | match the output's configured resolution. |
| 5453 | |
| 5454 | The crop region is applied after the RAW to other color |
| 5455 | space (e.g. YUV) conversion. Since raw streams |
| 5456 | (e.g. RAW16) don't have the conversion stage, they are not |
| 5457 | croppable. The crop region will be ignored by raw streams. |
Zhijun He | 507458b | 2014-05-21 11:11:10 -0700 | [diff] [blame] | 5458 | |
| 5459 | For non-raw streams, any additional per-stream cropping will |
| 5460 | be done to maximize the final pixel area of the stream. |
Eino-Ville Talvala | e04ec6e | 2013-04-16 15:35:18 -0700 | [diff] [blame] | 5461 | |
| 5462 | 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] | 5463 | ratio, then 4:3 streams will use the exact crop |
| 5464 | region. 16:9 streams will further crop vertically |
Eino-Ville Talvala | e04ec6e | 2013-04-16 15:35:18 -0700 | [diff] [blame] | 5465 | (letterbox). |
| 5466 | |
| 5467 | 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] | 5468 | outputs will crop horizontally (pillarbox), and 16:9 |
| 5469 | streams will match exactly. These additional crops will |
Eino-Ville Talvala | e04ec6e | 2013-04-16 15:35:18 -0700 | [diff] [blame] | 5470 | be centered within the crop region. |
| 5471 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5472 | The width and height of the crop region cannot |
| 5473 | be set to be smaller than |
| 5474 | `floor( activeArraySize.width / android.scaler.availableMaxDigitalZoom )` and |
| 5475 | `floor( activeArraySize.height / android.scaler.availableMaxDigitalZoom )`, respectively. |
| 5476 | |
| 5477 | The camera device may adjust the crop region to account |
| 5478 | for rounding and other hardware requirements; the final |
| 5479 | crop region used will be included in the output capture |
| 5480 | result. |
| 5481 | </details> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 5482 | <ndk_details> |
| 5483 | The data representation is int[4], which maps to (left, top, width, height). |
| 5484 | </ndk_details> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5485 | <hal_details> |
Eino-Ville Talvala | e04ec6e | 2013-04-16 15:35:18 -0700 | [diff] [blame] | 5486 | The output streams must maintain square pixels at all |
| 5487 | times, no matter what the relative aspect ratios of the |
| 5488 | crop region and the stream are. Negative values for |
| 5489 | corner are allowed for raw output if full pixel array is |
| 5490 | larger than active pixel array. Width and height may be |
| 5491 | rounded to nearest larger supportable width, especially |
| 5492 | for raw output, where only a few fixed scales may be |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5493 | possible. |
| 5494 | |
Zhijun He | 7defc68 | 2015-05-22 17:04:15 -0700 | [diff] [blame] | 5495 | For a set of output streams configured, if the sensor output is cropped to a smaller |
| 5496 | size than active array size, the HAL need follow below cropping rules: |
| 5497 | |
| 5498 | * The HAL need handle the cropRegion as if the sensor crop size is the effective active |
| 5499 | array size.More specifically, the HAL must transform the request cropRegion from |
| 5500 | android.sensor.info.activeArraySize to the sensor cropped pixel area size in this way: |
| 5501 | 1. Translate the requested cropRegion w.r.t., the left top corner of the sensor |
| 5502 | cropped pixel area by (tx, ty), |
| 5503 | where `tx = sensorCrop.top * (sensorCrop.height / activeArraySize.height)` |
| 5504 | and `tx = sensorCrop.left * (sensorCrop.width / activeArraySize.width)`. The |
| 5505 | (sensorCrop.top, sensorCrop.left) is the coordinate based off the |
| 5506 | android.sensor.info.activeArraySize. |
| 5507 | 2. Scale the width and height of requested cropRegion with scaling factor of |
| 5508 | sensorCrop.width/activeArraySize.width and sensorCrop.height/activeArraySize.height |
| 5509 | respectively. |
| 5510 | Once this new cropRegion is calculated, the HAL must use this region to crop the image |
| 5511 | with regard to the sensor crop size (effective active array size). The HAL still need |
| 5512 | follow the general cropping rule for this new cropRegion and effective active |
| 5513 | array size. |
| 5514 | |
| 5515 | * The HAL must report the cropRegion with regard to android.sensor.info.activeArraySize. |
| 5516 | The HAL need convert the new cropRegion generated above w.r.t., full active array size. |
| 5517 | The reported cropRegion may be slightly different with the requested cropRegion since |
| 5518 | the HAL may adjust the crop region to account for rounding, conversion error, or other |
| 5519 | hardware limitations. |
| 5520 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 5521 | HAL2.x uses only (x, y, width) |
| 5522 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5523 | <tag id="BC" /> |
| 5524 | </entry> |
| 5525 | </controls> |
| 5526 | <static> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 5527 | <entry name="availableFormats" type="int32" |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 5528 | visibility="hidden" deprecated="true" enum="true" |
Eino-Ville Talvala | d4e240a | 2013-08-08 12:56:37 -0700 | [diff] [blame] | 5529 | container="array" typedef="imageFormat"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5530 | <array> |
| 5531 | <size>n</size> |
| 5532 | </array> |
Igor Murashkin | 96bd019 | 2012-11-19 16:49:37 -0800 | [diff] [blame] | 5533 | <enum> |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 5534 | <value optional="true" id="0x20">RAW16 |
| 5535 | <notes> |
| 5536 | RAW16 is a standard, cross-platform format for raw image |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 5537 | buffers with 16-bit pixels. |
| 5538 | |
| 5539 | Buffers of this format are typically expected to have a |
| 5540 | Bayer Color Filter Array (CFA) layout, which is given in |
| 5541 | android.sensor.info.colorFilterArrangement. Sensors with |
| 5542 | CFAs that are not representable by a format in |
| 5543 | android.sensor.info.colorFilterArrangement should not |
| 5544 | use this format. |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 5545 | |
| 5546 | Buffers of this format will also follow the constraints given for |
| 5547 | RAW_OPAQUE buffers, but with relaxed performance constraints. |
| 5548 | |
Ruben Brunk | ae4f9c0 | 2015-06-12 16:43:51 -0700 | [diff] [blame] | 5549 | This format is intended to give users access to the full contents |
| 5550 | of the buffers coming directly from the image sensor prior to any |
| 5551 | cropping or scaling operations, and all coordinate systems for |
| 5552 | metadata used for this format are relative to the size of the |
| 5553 | active region of the image sensor before any geometric distortion |
| 5554 | correction has been applied (i.e. |
| 5555 | android.sensor.info.preCorrectionActiveArraySize). Supported |
| 5556 | dimensions for this format are limited to the full dimensions of |
| 5557 | the sensor (e.g. either android.sensor.info.pixelArraySize or |
| 5558 | android.sensor.info.preCorrectionActiveArraySize will be the |
| 5559 | only supported output size). |
| 5560 | |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 5561 | See android.scaler.availableInputOutputFormatsMap for |
| 5562 | the full set of performance guarantees. |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 5563 | </notes> |
| 5564 | </value> |
| 5565 | <value optional="true" id="0x24">RAW_OPAQUE |
| 5566 | <notes> |
Yin-Chia Yeh | 366da5b | 2015-12-06 21:42:35 -0800 | [diff] [blame] | 5567 | RAW_OPAQUE (or |
| 5568 | {@link android.graphics.ImageFormat#RAW_PRIVATE RAW_PRIVATE} |
| 5569 | as referred in public API) is a format for raw image buffers |
| 5570 | coming from an image sensor. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 5571 | |
| 5572 | The actual structure of buffers of this format is |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 5573 | platform-specific, but must follow several constraints: |
| 5574 | |
| 5575 | 1. No image post-processing operations may have been applied to |
| 5576 | buffers of this type. These buffers contain raw image data coming |
| 5577 | directly from the image sensor. |
| 5578 | 1. If a buffer of this format is passed to the camera device for |
| 5579 | reprocessing, the resulting images will be identical to the images |
| 5580 | produced if the buffer had come directly from the sensor and was |
| 5581 | processed with the same settings. |
| 5582 | |
| 5583 | The intended use for this format is to allow access to the native |
| 5584 | raw format buffers coming directly from the camera sensor without |
| 5585 | any additional conversions or decrease in framerate. |
| 5586 | |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 5587 | See android.scaler.availableInputOutputFormatsMap for the full set of |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 5588 | performance guarantees. |
| 5589 | </notes> |
Igor Murashkin | 96bd019 | 2012-11-19 16:49:37 -0800 | [diff] [blame] | 5590 | </value> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 5591 | <value optional="true" id="0x32315659">YV12 |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 5592 | <notes>YCrCb 4:2:0 Planar</notes> |
Igor Murashkin | 96bd019 | 2012-11-19 16:49:37 -0800 | [diff] [blame] | 5593 | </value> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 5594 | <value optional="true" id="0x11">YCrCb_420_SP |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 5595 | <notes>NV21</notes> |
Igor Murashkin | 96bd019 | 2012-11-19 16:49:37 -0800 | [diff] [blame] | 5596 | </value> |
Zhijun He | c2eebff | 2013-05-16 17:49:35 -0700 | [diff] [blame] | 5597 | <value id="0x22">IMPLEMENTATION_DEFINED |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 5598 | <notes>System internal format, not application-accessible</notes> |
Zhijun He | c2eebff | 2013-05-16 17:49:35 -0700 | [diff] [blame] | 5599 | </value> |
Zhijun He | c2eebff | 2013-05-16 17:49:35 -0700 | [diff] [blame] | 5600 | <value id="0x23">YCbCr_420_888 |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 5601 | <notes>Flexible YUV420 Format</notes> |
Zhijun He | c2eebff | 2013-05-16 17:49:35 -0700 | [diff] [blame] | 5602 | </value> |
Zhijun He | c2eebff | 2013-05-16 17:49:35 -0700 | [diff] [blame] | 5603 | <value id="0x21">BLOB |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 5604 | <notes>JPEG format</notes> |
Igor Murashkin | 96bd019 | 2012-11-19 16:49:37 -0800 | [diff] [blame] | 5605 | </value> |
| 5606 | </enum> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 5607 | <description>The list of image formats that are supported by this |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5608 | camera device for output streams.</description> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 5609 | <details> |
| 5610 | All camera devices will support JPEG and YUV_420_888 formats. |
| 5611 | |
| 5612 | When set to YUV_420_888, application can access the YUV420 data directly. |
| 5613 | </details> |
| 5614 | <hal_details> |
| 5615 | These format values are from HAL_PIXEL_FORMAT_* in |
| 5616 | system/core/include/system/graphics.h. |
| 5617 | |
| 5618 | When IMPLEMENTATION_DEFINED is used, the platform |
| 5619 | gralloc module will select a format based on the usage flags provided |
| 5620 | by the camera HAL device and the other endpoint of the stream. It is |
| 5621 | usually used by preview and recording streams, where the application doesn't |
| 5622 | need access the image data. |
| 5623 | |
| 5624 | YCbCr_420_888 format must be supported by the HAL. When an image stream |
| 5625 | needs CPU/application direct access, this format will be used. |
| 5626 | |
| 5627 | The BLOB format must be supported by the HAL. This is used for the JPEG stream. |
| 5628 | |
Ruben Brunk | 8f48c18 | 2014-02-04 18:27:20 -0800 | [diff] [blame] | 5629 | A RAW_OPAQUE buffer should contain only pixel data. It is strongly |
| 5630 | recommended that any information used by the camera device when |
| 5631 | processing images is fully expressed by the result metadata |
| 5632 | for that image buffer. |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 5633 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5634 | <tag id="BC" /> |
| 5635 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 5636 | <entry name="availableJpegMinDurations" type="int64" visibility="hidden" deprecated="true" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5637 | container="array"> |
| 5638 | <array> |
| 5639 | <size>n</size> |
| 5640 | </array> |
| 5641 | <description>The minimum frame duration that is supported |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 5642 | for each resolution in android.scaler.availableJpegSizes. |
| 5643 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5644 | <units>Nanoseconds</units> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 5645 | <range>TODO: Remove property.</range> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 5646 | <details> |
| 5647 | This corresponds to the minimum steady-state frame duration when only |
| 5648 | that JPEG stream is active and captured in a burst, with all |
| 5649 | processing (typically in android.*.mode) set to FAST. |
| 5650 | |
| 5651 | When multiple streams are configured, the minimum |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 5652 | frame duration will be &gt;= max(individual stream min |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 5653 | durations)</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5654 | <tag id="BC" /> |
| 5655 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 5656 | <entry name="availableJpegSizes" type="int32" visibility="hidden" |
| 5657 | deprecated="true" container="array" typedef="size"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5658 | <array> |
| 5659 | <size>n</size> |
| 5660 | <size>2</size> |
| 5661 | </array> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 5662 | <description>The JPEG resolutions that are supported by this camera device.</description> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 5663 | <range>TODO: Remove property.</range> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 5664 | <details> |
| 5665 | The resolutions are listed as `(width, height)` pairs. All camera devices will support |
| 5666 | sensor maximum resolution (defined by android.sensor.info.activeArraySize). |
| 5667 | </details> |
| 5668 | <hal_details> |
| 5669 | The HAL must include sensor maximum resolution |
| 5670 | (defined by android.sensor.info.activeArraySize), |
| 5671 | and should include half/quarter of sensor maximum resolution. |
| 5672 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5673 | <tag id="BC" /> |
| 5674 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5675 | <entry name="availableMaxDigitalZoom" type="float" visibility="public" |
| 5676 | hwlevel="legacy"> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 5677 | <description>The maximum ratio between both active area width |
| 5678 | and crop region width, and active area height and |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5679 | crop region height, for android.scaler.cropRegion. |
| 5680 | </description> |
| 5681 | <units>Zoom scale factor</units> |
| 5682 | <range>&gt;=1</range> |
| 5683 | <details> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 5684 | This represents the maximum amount of zooming possible by |
| 5685 | the camera device, or equivalently, the minimum cropping |
| 5686 | window size. |
| 5687 | |
| 5688 | Crop regions that have a width or height that is smaller |
| 5689 | than this ratio allows will be rounded up to the minimum |
| 5690 | allowed size by the camera device. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5691 | </details> |
Igor Murashkin | f11a4df | 2013-05-07 10:00:46 -0700 | [diff] [blame] | 5692 | <tag id="BC" /> |
Igor Murashkin | e6b6646 | 2012-11-26 15:26:38 -0800 | [diff] [blame] | 5693 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 5694 | <entry name="availableProcessedMinDurations" type="int64" visibility="hidden" deprecated="true" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5695 | container="array"> |
| 5696 | <array> |
| 5697 | <size>n</size> |
| 5698 | </array> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 5699 | <description>For each available processed output size (defined in |
| 5700 | android.scaler.availableProcessedSizes), this property lists the |
| 5701 | minimum supportable frame duration for that size. |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 5702 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5703 | <units>Nanoseconds</units> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 5704 | <details> |
| 5705 | This should correspond to the frame duration when only that processed |
| 5706 | stream is active, with all processing (typically in android.*.mode) |
| 5707 | set to FAST. |
| 5708 | |
| 5709 | When multiple streams are configured, the minimum frame duration will |
| 5710 | be &gt;= max(individual stream min durations). |
| 5711 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5712 | <tag id="BC" /> |
| 5713 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 5714 | <entry name="availableProcessedSizes" type="int32" visibility="hidden" |
| 5715 | deprecated="true" container="array" typedef="size"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5716 | <array> |
| 5717 | <size>n</size> |
| 5718 | <size>2</size> |
| 5719 | </array> |
| 5720 | <description>The resolutions available for use with |
| 5721 | processed output streams, such as YV12, NV12, and |
| 5722 | platform opaque YUV/RGB streams to the GPU or video |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 5723 | encoders.</description> |
| 5724 | <details> |
| 5725 | The resolutions are listed as `(width, height)` pairs. |
| 5726 | |
| 5727 | For a given use case, the actual maximum supported resolution |
| 5728 | may be lower than what is listed here, depending on the destination |
| 5729 | Surface for the image data. For example, for recording video, |
| 5730 | the video encoder chosen may have a maximum size limit (e.g. 1080p) |
| 5731 | smaller than what the camera (e.g. maximum resolution is 3264x2448) |
| 5732 | can provide. |
| 5733 | |
| 5734 | Please reference the documentation for the image data destination to |
| 5735 | check if it limits the maximum size for image data. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 5736 | </details> |
Zhijun He | b8317e2 | 2014-01-16 09:47:07 -0800 | [diff] [blame] | 5737 | <hal_details> |
| 5738 | For FULL capability devices (`android.info.supportedHardwareLevel == FULL`), |
| 5739 | the HAL must include all JPEG sizes listed in android.scaler.availableJpegSizes |
| 5740 | and each below resolution if it is smaller than or equal to the sensor |
| 5741 | maximum resolution (if they are not listed in JPEG sizes already): |
| 5742 | |
| 5743 | * 240p (320 x 240) |
| 5744 | * 480p (640 x 480) |
| 5745 | * 720p (1280 x 720) |
| 5746 | * 1080p (1920 x 1080) |
| 5747 | |
| 5748 | For LIMITED capability devices (`android.info.supportedHardwareLevel == LIMITED`), |
| 5749 | the HAL only has to list up to the maximum video size supported by the devices. |
| 5750 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5751 | <tag id="BC" /> |
| 5752 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 5753 | <entry name="availableRawMinDurations" type="int64" deprecated="true" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5754 | container="array"> |
| 5755 | <array> |
| 5756 | <size>n</size> |
| 5757 | </array> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 5758 | <description> |
Zhijun He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 5759 | For each available raw output size (defined in |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 5760 | android.scaler.availableRawSizes), this property lists the minimum |
| 5761 | supportable frame duration for that size. |
| 5762 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 5763 | <units>Nanoseconds</units> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 5764 | <details> |
| 5765 | Should correspond to the frame duration when only the raw stream is |
| 5766 | active. |
| 5767 | |
| 5768 | When multiple streams are configured, the minimum |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 5769 | frame duration will be &gt;= max(individual stream min |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 5770 | durations)</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5771 | <tag id="BC" /> |
| 5772 | </entry> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 5773 | <entry name="availableRawSizes" type="int32" deprecated="true" |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 5774 | container="array" typedef="size"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5775 | <array> |
| 5776 | <size>n</size> |
| 5777 | <size>2</size> |
| 5778 | </array> |
| 5779 | <description>The resolutions available for use with raw |
| 5780 | sensor output streams, listed as width, |
| 5781 | height</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5782 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 5783 | </static> |
| 5784 | <dynamic> |
| 5785 | <clone entry="android.scaler.cropRegion" kind="controls"> |
| 5786 | </clone> |
| 5787 | </dynamic> |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5788 | <static> |
Chien-Yu Chen | 9e48beb | 2015-03-18 18:33:17 -0700 | [diff] [blame] | 5789 | <entry name="availableInputOutputFormatsMap" type="int32" visibility="hidden" |
| 5790 | typedef="reprocessFormatsMap"> |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5791 | <description>The mapping of image formats that are supported by this |
| 5792 | camera device for input streams, to their corresponding output formats. |
| 5793 | </description> |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5794 | <details> |
| 5795 | All camera devices with at least 1 |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 5796 | android.request.maxNumInputStreams will have at least one |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5797 | available input format. |
| 5798 | |
| 5799 | The camera device will support the following map of formats, |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 5800 | if its dependent capability (android.request.availableCapabilities) is supported: |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5801 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 5802 | Input Format | Output Format | Capability |
| 5803 | :-------------------------------------------------|:--------------------------------------------------|:---------- |
Chien-Yu Chen | f8581f6 | 2015-05-12 15:13:00 -0700 | [diff] [blame] | 5804 | {@link android.graphics.ImageFormat#PRIVATE} | {@link android.graphics.ImageFormat#JPEG} | PRIVATE_REPROCESSING |
| 5805 | {@link android.graphics.ImageFormat#PRIVATE} | {@link android.graphics.ImageFormat#YUV_420_888} | PRIVATE_REPROCESSING |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 5806 | {@link android.graphics.ImageFormat#YUV_420_888} | {@link android.graphics.ImageFormat#JPEG} | YUV_REPROCESSING |
| 5807 | {@link android.graphics.ImageFormat#YUV_420_888} | {@link android.graphics.ImageFormat#YUV_420_888} | YUV_REPROCESSING |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5808 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 5809 | PRIVATE refers to a device-internal format that is not directly application-visible. A |
Chien-Yu Chen | f8581f6 | 2015-05-12 15:13:00 -0700 | [diff] [blame] | 5810 | PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance} |
| 5811 | with {@link android.graphics.ImageFormat#PRIVATE} as the format. |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 5812 | |
Chien-Yu Chen | f8581f6 | 2015-05-12 15:13:00 -0700 | [diff] [blame] | 5813 | For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 5814 | or output will never hurt maximum frame rate (i.e. {@link |
| 5815 | android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration |
| 5816 | getOutputStallDuration(ImageFormat.PRIVATE, size)} is always 0), |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5817 | |
| 5818 | Attempting to configure an input stream with output streams not |
| 5819 | listed as available in this map is not valid. |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5820 | </details> |
| 5821 | <hal_details> |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 5822 | For the formats, see `system/core/include/system/graphics.h` for a definition |
Chien-Yu Chen | 9e48beb | 2015-03-18 18:33:17 -0700 | [diff] [blame] | 5823 | of the image format enumerations. The PRIVATE format refers to the |
| 5824 | HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED format. The HAL could determine |
| 5825 | the actual format by using the gralloc usage flags. |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 5826 | For ZSL use case in particular, the HAL could choose appropriate format (partially |
| 5827 | processed YUV or RAW based format) by checking the format and GRALLOC_USAGE_HW_CAMERA_ZSL. |
| 5828 | See camera3.h for more details. |
Zhijun He | 3e6b618 | 2014-04-24 11:17:25 -0700 | [diff] [blame] | 5829 | |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5830 | This value is encoded as a variable-size array-of-arrays. |
| 5831 | The inner array always contains `[format, length, ...]` where |
| 5832 | `...` has `length` elements. An inner array is followed by another |
| 5833 | inner array if the total metadata entry size hasn't yet been exceeded. |
| 5834 | |
| 5835 | A code sample to read/write this encoding (with a device that |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 5836 | supports reprocessing IMPLEMENTATION_DEFINED to YUV_420_888, and JPEG, |
| 5837 | and reprocessing YUV_420_888 to YUV_420_888 and JPEG): |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5838 | |
| 5839 | // reading |
| 5840 | int32_t* contents = &entry.i32[0]; |
| 5841 | for (size_t i = 0; i < entry.count; ) { |
| 5842 | int32_t format = contents[i++]; |
| 5843 | int32_t length = contents[i++]; |
| 5844 | int32_t output_formats[length]; |
| 5845 | memcpy(&output_formats[0], &contents[i], |
| 5846 | length * sizeof(int32_t)); |
| 5847 | i += length; |
| 5848 | } |
| 5849 | |
Chien-Yu Chen | f8581f6 | 2015-05-12 15:13:00 -0700 | [diff] [blame] | 5850 | // writing (static example, PRIVATE_REPROCESSING + YUV_REPROCESSING) |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5851 | int32_t[] contents = { |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 5852 | IMPLEMENTATION_DEFINED, 2, YUV_420_888, BLOB, |
| 5853 | YUV_420_888, 2, YUV_420_888, BLOB, |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5854 | }; |
| 5855 | update_camera_metadata_entry(metadata, index, &contents[0], |
| 5856 | sizeof(contents)/sizeof(contents[0]), &updated_entry); |
| 5857 | |
| 5858 | If the HAL claims to support any of the capabilities listed in the |
| 5859 | above details, then it must also support all the input-output |
| 5860 | combinations listed for that capability. It can optionally support |
| 5861 | additional formats if it so chooses. |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5862 | </hal_details> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 5863 | <tag id="REPROC" /> |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 5864 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 5865 | <entry name="availableStreamConfigurations" type="int32" visibility="ndk_public" |
| 5866 | enum="true" container="array" typedef="streamConfiguration" hwlevel="legacy"> |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 5867 | <array> |
| 5868 | <size>n</size> |
| 5869 | <size>4</size> |
| 5870 | </array> |
| 5871 | <enum> |
| 5872 | <value>OUTPUT</value> |
| 5873 | <value>INPUT</value> |
| 5874 | </enum> |
| 5875 | <description>The available stream configurations that this |
| 5876 | camera device supports |
| 5877 | (i.e. format, width, height, output/input stream). |
| 5878 | </description> |
| 5879 | <details> |
| 5880 | The configurations are listed as `(format, width, height, input?)` |
| 5881 | tuples. |
| 5882 | |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 5883 | For a given use case, the actual maximum supported resolution |
| 5884 | may be lower than what is listed here, depending on the destination |
| 5885 | Surface for the image data. For example, for recording video, |
| 5886 | the video encoder chosen may have a maximum size limit (e.g. 1080p) |
| 5887 | smaller than what the camera (e.g. maximum resolution is 3264x2448) |
| 5888 | can provide. |
| 5889 | |
| 5890 | Please reference the documentation for the image data destination to |
| 5891 | check if it limits the maximum size for image data. |
| 5892 | |
| 5893 | Not all output formats may be supported in a configuration with |
| 5894 | an input stream of a particular format. For more details, see |
| 5895 | android.scaler.availableInputOutputFormatsMap. |
| 5896 | |
| 5897 | The following table describes the minimum required output stream |
| 5898 | configurations based on the hardware level |
| 5899 | (android.info.supportedHardwareLevel): |
| 5900 | |
| 5901 | Format | Size | Hardware Level | Notes |
| 5902 | :-------------:|:--------------------------------------------:|:--------------:|:--------------: |
| 5903 | JPEG | android.sensor.info.activeArraySize | Any | |
| 5904 | JPEG | 1920x1080 (1080p) | Any | if 1080p <= activeArraySize |
| 5905 | JPEG | 1280x720 (720) | Any | if 720p <= activeArraySize |
| 5906 | JPEG | 640x480 (480p) | Any | if 480p <= activeArraySize |
| 5907 | JPEG | 320x240 (240p) | Any | if 240p <= activeArraySize |
| 5908 | YUV_420_888 | all output sizes available for JPEG | FULL | |
| 5909 | YUV_420_888 | all output sizes available for JPEG, up to the maximum video size | LIMITED | |
| 5910 | IMPLEMENTATION_DEFINED | same as YUV_420_888 | Any | |
| 5911 | |
| 5912 | Refer to android.request.availableCapabilities for additional |
| 5913 | mandatory stream configurations on a per-capability basis. |
| 5914 | </details> |
| 5915 | <hal_details> |
| 5916 | It is recommended (but not mandatory) to also include half/quarter |
| 5917 | of sensor maximum resolution for JPEG formats (regardless of hardware |
| 5918 | level). |
| 5919 | |
| 5920 | (The following is a rewording of the above required table): |
| 5921 | |
Zhijun He | 5a1276a | 2014-06-02 16:46:03 -0700 | [diff] [blame] | 5922 | For JPEG format, the sizes may be restricted by below conditions: |
| 5923 | |
| 5924 | * The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones |
| 5925 | (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution |
| 5926 | (defined by android.sensor.info.activeArraySize) has an aspect ratio other than these, |
| 5927 | it does not have to be included in the supported JPEG sizes. |
| 5928 | * Some hardware JPEG encoders may have pixel boundary alignment requirements, such as |
| 5929 | the dimensions being a multiple of 16. |
| 5930 | |
| 5931 | Therefore, the maximum JPEG size may be smaller than sensor maximum resolution. |
| 5932 | However, the largest JPEG size must be as close as possible to the sensor maximum |
| 5933 | resolution given above constraints. It is required that after aspect ratio adjustments, |
| 5934 | additional size reduction due to other issues must be less than 3% in area. For example, |
| 5935 | if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect |
| 5936 | ratio 4:3, the JPEG encoder alignment requirement is 16, the maximum JPEG size will be |
| 5937 | 3264x2448. |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 5938 | |
| 5939 | For FULL capability devices (`android.info.supportedHardwareLevel == FULL`), |
| 5940 | the HAL must include all YUV_420_888 sizes that have JPEG sizes listed |
| 5941 | here as output streams. |
| 5942 | |
| 5943 | It must also include each below resolution if it is smaller than or |
| 5944 | equal to the sensor maximum resolution (for both YUV_420_888 and JPEG |
| 5945 | formats), as output streams: |
| 5946 | |
| 5947 | * 240p (320 x 240) |
| 5948 | * 480p (640 x 480) |
| 5949 | * 720p (1280 x 720) |
| 5950 | * 1080p (1920 x 1080) |
| 5951 | |
| 5952 | For LIMITED capability devices |
| 5953 | (`android.info.supportedHardwareLevel == LIMITED`), |
| 5954 | the HAL only has to list up to the maximum video size |
| 5955 | supported by the device. |
| 5956 | |
| 5957 | Regardless of hardware level, every output resolution available for |
| 5958 | YUV_420_888 must also be available for IMPLEMENTATION_DEFINED. |
| 5959 | |
| 5960 | This supercedes the following fields, which are now deprecated: |
| 5961 | |
| 5962 | * availableFormats |
| 5963 | * available[Processed,Raw,Jpeg]Sizes |
| 5964 | </hal_details> |
| 5965 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 5966 | <entry name="availableMinFrameDurations" type="int64" visibility="ndk_public" |
| 5967 | container="array" typedef="streamConfigurationDuration" hwlevel="legacy"> |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 5968 | <array> |
| 5969 | <size>4</size> |
| 5970 | <size>n</size> |
| 5971 | </array> |
| 5972 | <description>This lists the minimum frame duration for each |
| 5973 | format/size combination. |
| 5974 | </description> |
| 5975 | <units>(format, width, height, ns) x n</units> |
| 5976 | <details> |
| 5977 | This should correspond to the frame duration when only that |
| 5978 | stream is active, with all processing (typically in android.*.mode) |
| 5979 | set to either OFF or FAST. |
| 5980 | |
| 5981 | When multiple streams are used in a request, the minimum frame |
| 5982 | duration will be max(individual stream min durations). |
| 5983 | |
| 5984 | The minimum frame duration of a stream (of a particular format, size) |
| 5985 | is the same regardless of whether the stream is input or output. |
| 5986 | |
| 5987 | See android.sensor.frameDuration and |
| 5988 | android.scaler.availableStallDurations for more details about |
| 5989 | calculating the max frame rate. |
| 5990 | </details> |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 5991 | <tag id="V1" /> |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 5992 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 5993 | <entry name="availableStallDurations" type="int64" visibility="ndk_public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 5994 | container="array" typedef="streamConfigurationDuration" hwlevel="legacy"> |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 5995 | <array> |
| 5996 | <size>4</size> |
| 5997 | <size>n</size> |
| 5998 | </array> |
| 5999 | <description>This lists the maximum stall duration for each |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 6000 | output format/size combination. |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 6001 | </description> |
| 6002 | <units>(format, width, height, ns) x n</units> |
| 6003 | <details> |
| 6004 | A stall duration is how much extra time would get added |
| 6005 | to the normal minimum frame duration for a repeating request |
| 6006 | that has streams with non-zero stall. |
| 6007 | |
| 6008 | For example, consider JPEG captures which have the following |
| 6009 | characteristics: |
| 6010 | |
| 6011 | * JPEG streams act like processed YUV streams in requests for which |
| 6012 | they are not included; in requests in which they are directly |
| 6013 | referenced, they act as JPEG streams. This is because supporting a |
| 6014 | JPEG stream requires the underlying YUV data to always be ready for |
| 6015 | use by a JPEG encoder, but the encoder will only be used (and impact |
| 6016 | frame duration) on requests that actually reference a JPEG stream. |
| 6017 | * The JPEG processor can run concurrently to the rest of the camera |
| 6018 | pipeline, but cannot process more than 1 capture at a time. |
| 6019 | |
| 6020 | In other words, using a repeating YUV request would result |
| 6021 | in a steady frame rate (let's say it's 30 FPS). If a single |
| 6022 | JPEG request is submitted periodically, the frame rate will stay |
| 6023 | at 30 FPS (as long as we wait for the previous JPEG to return each |
| 6024 | time). If we try to submit a repeating YUV + JPEG request, then |
| 6025 | the frame rate will drop from 30 FPS. |
| 6026 | |
| 6027 | In general, submitting a new request with a non-0 stall time |
| 6028 | stream will _not_ cause a frame rate drop unless there are still |
| 6029 | outstanding buffers for that stream from previous requests. |
| 6030 | |
| 6031 | Submitting a repeating request with streams (call this `S`) |
| 6032 | is the same as setting the minimum frame duration from |
| 6033 | the normal minimum frame duration corresponding to `S`, added with |
| 6034 | the maximum stall duration for `S`. |
| 6035 | |
| 6036 | If interleaving requests with and without a stall duration, |
| 6037 | a request will stall by the maximum of the remaining times |
| 6038 | for each can-stall stream with outstanding buffers. |
| 6039 | |
| 6040 | This means that a stalling request will not have an exposure start |
| 6041 | until the stall has completed. |
| 6042 | |
| 6043 | This should correspond to the stall duration when only that stream is |
| 6044 | active, with all processing (typically in android.*.mode) set to FAST |
| 6045 | or OFF. Setting any of the processing modes to HIGH_QUALITY |
| 6046 | effectively results in an indeterminate stall duration for all |
| 6047 | streams in a request (the regular stall calculation rules are |
| 6048 | ignored). |
| 6049 | |
| 6050 | The following formats may always have a stall duration: |
| 6051 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6052 | * {@link android.graphics.ImageFormat#JPEG|AIMAGE_FORMAT_JPEG} |
| 6053 | * {@link android.graphics.ImageFormat#RAW_SENSOR|AIMAGE_FORMAT_RAW16} |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 6054 | |
| 6055 | The following formats will never have a stall duration: |
| 6056 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6057 | * {@link android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888} |
| 6058 | * {@link android.graphics.ImageFormat#RAW10|AIMAGE_FORMAT_RAW10} |
| 6059 | * {@link android.graphics.ImageFormat#RAW12|AIMAGE_FORMAT_RAW12} |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 6060 | |
| 6061 | All other formats may or may not have an allowed stall duration on |
| 6062 | a per-capability basis; refer to android.request.availableCapabilities |
| 6063 | for more details. |
| 6064 | |
| 6065 | See android.sensor.frameDuration for more information about |
| 6066 | calculating the max frame rate (absent stalls). |
| 6067 | </details> |
| 6068 | <hal_details> |
| 6069 | If possible, it is recommended that all non-JPEG formats |
Yin-Chia Yeh | f9801f4 | 2015-03-20 16:53:19 -0700 | [diff] [blame] | 6070 | (such as RAW16) should not have a stall duration. RAW10, RAW12, RAW_OPAQUE |
| 6071 | and IMPLEMENTATION_DEFINED must not have stall durations. |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 6072 | </hal_details> |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 6073 | <tag id="V1" /> |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 6074 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 6075 | <entry name="streamConfigurationMap" type="int32" visibility="java_public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6076 | synthetic="true" typedef="streamConfigurationMap" |
| 6077 | hwlevel="legacy"> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 6078 | <description>The available stream configurations that this |
| 6079 | camera device supports; also includes the minimum frame durations |
| 6080 | and the stall durations for each format/size combination. |
| 6081 | </description> |
| 6082 | <details> |
| 6083 | All camera devices will support sensor maximum resolution (defined by |
| 6084 | android.sensor.info.activeArraySize) for the JPEG format. |
| 6085 | |
| 6086 | For a given use case, the actual maximum supported resolution |
| 6087 | may be lower than what is listed here, depending on the destination |
| 6088 | Surface for the image data. For example, for recording video, |
| 6089 | the video encoder chosen may have a maximum size limit (e.g. 1080p) |
| 6090 | smaller than what the camera (e.g. maximum resolution is 3264x2448) |
| 6091 | can provide. |
| 6092 | |
| 6093 | Please reference the documentation for the image data destination to |
| 6094 | check if it limits the maximum size for image data. |
| 6095 | |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 6096 | The following table describes the minimum required output stream |
| 6097 | configurations based on the hardware level |
| 6098 | (android.info.supportedHardwareLevel): |
| 6099 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 6100 | Format | Size | Hardware Level | Notes |
| 6101 | :-------------------------------------------------:|:--------------------------------------------:|:--------------:|:--------------: |
Yin-Chia Yeh | fc57a58 | 2015-07-08 14:07:39 -0700 | [diff] [blame] | 6102 | {@link android.graphics.ImageFormat#JPEG} | android.sensor.info.activeArraySize (*1) | Any | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 6103 | {@link android.graphics.ImageFormat#JPEG} | 1920x1080 (1080p) | Any | if 1080p <= activeArraySize |
Yin-Chia Yeh | fc57a58 | 2015-07-08 14:07:39 -0700 | [diff] [blame] | 6104 | {@link android.graphics.ImageFormat#JPEG} | 1280x720 (720p) | Any | if 720p <= activeArraySize |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 6105 | {@link android.graphics.ImageFormat#JPEG} | 640x480 (480p) | Any | if 480p <= activeArraySize |
| 6106 | {@link android.graphics.ImageFormat#JPEG} | 320x240 (240p) | Any | if 240p <= activeArraySize |
| 6107 | {@link android.graphics.ImageFormat#YUV_420_888} | all output sizes available for JPEG | FULL | |
| 6108 | {@link android.graphics.ImageFormat#YUV_420_888} | all output sizes available for JPEG, up to the maximum video size | LIMITED | |
| 6109 | {@link android.graphics.ImageFormat#PRIVATE} | same as YUV_420_888 | Any | |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 6110 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 6111 | Refer to android.request.availableCapabilities and {@link |
| 6112 | android.hardware.camera2.CameraDevice#createCaptureSession} for additional mandatory |
| 6113 | stream configurations on a per-capability basis. |
Yin-Chia Yeh | fc57a58 | 2015-07-08 14:07:39 -0700 | [diff] [blame] | 6114 | |
| 6115 | *1: For JPEG format, the sizes may be restricted by below conditions: |
| 6116 | |
| 6117 | * The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones |
| 6118 | (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution |
| 6119 | (defined by android.sensor.info.activeArraySize) has an aspect ratio other than these, |
| 6120 | it does not have to be included in the supported JPEG sizes. |
| 6121 | * Some hardware JPEG encoders may have pixel boundary alignment requirements, such as |
| 6122 | the dimensions being a multiple of 16. |
| 6123 | Therefore, the maximum JPEG size may be smaller than sensor maximum resolution. |
| 6124 | However, the largest JPEG size will be as close as possible to the sensor maximum |
| 6125 | resolution given above constraints. It is required that after aspect ratio adjustments, |
| 6126 | additional size reduction due to other issues must be less than 3% in area. For example, |
| 6127 | if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect |
| 6128 | ratio 4:3, and the JPEG encoder alignment requirement is 16, the maximum JPEG size will be |
| 6129 | 3264x2448. |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 6130 | </details> |
| 6131 | <hal_details> |
| 6132 | Do not set this property directly |
| 6133 | (it is synthetic and will not be available at the HAL layer); |
| 6134 | set the android.scaler.availableStreamConfigurations instead. |
| 6135 | |
Igor Murashkin | efff0de | 2014-05-14 17:30:49 -0700 | [diff] [blame] | 6136 | Not all output formats may be supported in a configuration with |
| 6137 | an input stream of a particular format. For more details, see |
| 6138 | android.scaler.availableInputOutputFormatsMap. |
| 6139 | |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 6140 | It is recommended (but not mandatory) to also include half/quarter |
| 6141 | of sensor maximum resolution for JPEG formats (regardless of hardware |
| 6142 | level). |
| 6143 | |
| 6144 | (The following is a rewording of the above required table): |
| 6145 | |
| 6146 | The HAL must include sensor maximum resolution (defined by |
| 6147 | android.sensor.info.activeArraySize). |
| 6148 | |
| 6149 | For FULL capability devices (`android.info.supportedHardwareLevel == FULL`), |
| 6150 | the HAL must include all YUV_420_888 sizes that have JPEG sizes listed |
| 6151 | here as output streams. |
| 6152 | |
| 6153 | It must also include each below resolution if it is smaller than or |
| 6154 | equal to the sensor maximum resolution (for both YUV_420_888 and JPEG |
| 6155 | formats), as output streams: |
| 6156 | |
| 6157 | * 240p (320 x 240) |
| 6158 | * 480p (640 x 480) |
| 6159 | * 720p (1280 x 720) |
| 6160 | * 1080p (1920 x 1080) |
| 6161 | |
| 6162 | For LIMITED capability devices |
| 6163 | (`android.info.supportedHardwareLevel == LIMITED`), |
| 6164 | the HAL only has to list up to the maximum video size |
| 6165 | supported by the device. |
| 6166 | |
| 6167 | Regardless of hardware level, every output resolution available for |
| 6168 | YUV_420_888 must also be available for IMPLEMENTATION_DEFINED. |
| 6169 | |
| 6170 | This supercedes the following fields, which are now deprecated: |
| 6171 | |
| 6172 | * availableFormats |
| 6173 | * available[Processed,Raw,Jpeg]Sizes |
| 6174 | </hal_details> |
| 6175 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6176 | <entry name="croppingType" type="byte" visibility="public" enum="true" |
| 6177 | hwlevel="legacy"> |
Zhijun He | d0f25ca | 2014-05-21 15:29:07 -0700 | [diff] [blame] | 6178 | <enum> |
| 6179 | <value>CENTER_ONLY |
| 6180 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6181 | The camera device only supports centered crop regions. |
Zhijun He | d0f25ca | 2014-05-21 15:29:07 -0700 | [diff] [blame] | 6182 | </notes> |
| 6183 | </value> |
| 6184 | <value>FREEFORM |
| 6185 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6186 | The camera device supports arbitrarily chosen crop regions. |
Zhijun He | d0f25ca | 2014-05-21 15:29:07 -0700 | [diff] [blame] | 6187 | </notes> |
| 6188 | </value> |
| 6189 | </enum> |
| 6190 | <description>The crop type that this camera device supports.</description> |
| 6191 | <details> |
| 6192 | When passing a non-centered crop region (android.scaler.cropRegion) to a camera |
| 6193 | device that only supports CENTER_ONLY cropping, the camera device will move the |
| 6194 | crop region to the center of the sensor active array (android.sensor.info.activeArraySize) |
| 6195 | and keep the crop region width and height unchanged. The camera device will return the |
| 6196 | final used crop region in metadata result android.scaler.cropRegion. |
| 6197 | |
| 6198 | Camera devices that support FREEFORM cropping will support any crop region that |
| 6199 | is inside of the active array. The camera device will apply the same crop region and |
| 6200 | return the final used crop region in capture result metadata android.scaler.cropRegion. |
| 6201 | |
Eino-Ville Talvala | 593b821 | 2015-06-30 16:33:57 -0700 | [diff] [blame] | 6202 | LEGACY capability devices will only support CENTER_ONLY cropping. |
Zhijun He | d0f25ca | 2014-05-21 15:29:07 -0700 | [diff] [blame] | 6203 | </details> |
| 6204 | </entry> |
Igor Murashkin | 7f15ddd | 2014-02-04 18:02:27 -0800 | [diff] [blame] | 6205 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6206 | </section> |
| 6207 | <section name="sensor"> |
| 6208 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6209 | <entry name="exposureTime" type="int64" visibility="public" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6210 | <description>Duration each pixel is exposed to |
Zhijun He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 6211 | light.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6212 | <units>Nanoseconds</units> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6213 | <range>android.sensor.info.exposureTimeRange</range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6214 | <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] | 6215 | duration exposed to the nearest possible value (rather than expose longer). |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6216 | The final exposure time used will be available in the output capture result. |
| 6217 | |
| 6218 | This control is only effective if android.control.aeMode or android.control.mode is set to |
| 6219 | OFF; otherwise the auto-exposure algorithm will override this value. |
Zhijun He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 6220 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6221 | <tag id="V1" /> |
| 6222 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6223 | <entry name="frameDuration" type="int64" visibility="public" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6224 | <description>Duration from start of frame exposure to |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 6225 | start of next frame exposure.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6226 | <units>Nanoseconds</units> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6227 | <range>See android.sensor.info.maxFrameDuration, {@link |
| 6228 | android.hardware.camera2.params.StreamConfigurationMap|ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}. |
| 6229 | The duration is capped to `max(duration, exposureTime + overhead)`.</range> |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 6230 | <details> |
| 6231 | The maximum frame rate that can be supported by a camera subsystem is |
| 6232 | a function of many factors: |
| 6233 | |
| 6234 | * Requested resolutions of output image streams |
| 6235 | * Availability of binning / skipping modes on the imager |
| 6236 | * The bandwidth of the imager interface |
| 6237 | * The bandwidth of the various ISP processing blocks |
| 6238 | |
| 6239 | Since these factors can vary greatly between different ISPs and |
| 6240 | sensors, the camera abstraction tries to represent the bandwidth |
| 6241 | restrictions with as simple a model as possible. |
| 6242 | |
| 6243 | The model presented has the following characteristics: |
| 6244 | |
| 6245 | * The image sensor is always configured to output the smallest |
| 6246 | resolution possible given the application's requested output stream |
| 6247 | sizes. The smallest resolution is defined as being at least as large |
| 6248 | as the largest requested output stream size; the camera pipeline must |
| 6249 | never digitally upsample sensor data when the crop region covers the |
| 6250 | whole sensor. In general, this means that if only small output stream |
| 6251 | resolutions are configured, the sensor can provide a higher frame |
| 6252 | rate. |
| 6253 | * Since any request may use any or all the currently configured |
| 6254 | output streams, the sensor and ISP must be configured to support |
| 6255 | scaling a single capture to all the streams at the same time. This |
| 6256 | means the camera pipeline must be ready to produce the largest |
| 6257 | requested output size without any delay. Therefore, the overall |
| 6258 | frame rate of a given configured stream set is governed only by the |
| 6259 | largest requested stream resolution. |
| 6260 | * Using more than one output stream in a request does not affect the |
| 6261 | frame duration. |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 6262 | * Certain format-streams may need to do additional background processing |
| 6263 | before data is consumed/produced by that stream. These processors |
| 6264 | can run concurrently to the rest of the camera pipeline, but |
| 6265 | cannot process more than 1 capture at a time. |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 6266 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6267 | The necessary information for the application, given the model above, is provided via |
| 6268 | {@link |
| 6269 | android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration|ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}. |
| 6270 | These are used to determine the maximum frame rate / minimum frame duration that is |
| 6271 | possible for a given stream configuration. |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 6272 | |
| 6273 | Specifically, the application can use the following rules to |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 6274 | determine the minimum frame duration it can request from the camera |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 6275 | device: |
| 6276 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6277 | 1. Let the set of currently configured input/output streams be called `S`. |
| 6278 | 1. Find the minimum frame durations for each stream in `S`, by looking it up in {@link |
| 6279 | android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration|ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS} |
| 6280 | (with its respective size/format). Let this set of frame durations be called `F`. |
| 6281 | 1. For any given request `R`, the minimum frame duration allowed for `R` is the maximum |
| 6282 | out of all values in `F`. Let the streams used in `R` be called `S_r`. |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 6283 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 6284 | If none of the streams in `S_r` have a stall time (listed in {@link |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6285 | android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration|ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS} |
| 6286 | using its respective size/format), then the frame duration in `F` determines the steady |
| 6287 | state frame rate that the application will get if it uses `R` as a repeating request. Let |
| 6288 | this special kind of request be called `Rsimple`. |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 6289 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6290 | A repeating request `Rsimple` can be _occasionally_ interleaved by a single capture of a |
| 6291 | new request `Rstall` (which has at least one in-use stream with a non-0 stall time) and if |
| 6292 | `Rstall` has the same minimum frame duration this will not cause a frame rate loss if all |
| 6293 | buffers from the previous `Rstall` have already been delivered. |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 6294 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6295 | For more details about stalling, see {@link |
| 6296 | android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration|ACAMERA_SCALER_AVAILABLE_STALL_DURATIONS}. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6297 | |
| 6298 | This control is only effective if android.control.aeMode or android.control.mode is set to |
| 6299 | OFF; otherwise the auto-exposure algorithm will override this value. |
Igor Murashkin | 10f4e0f | 2014-01-13 17:22:58 -0800 | [diff] [blame] | 6300 | </details> |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 6301 | <hal_details> |
| 6302 | For more details about stalling, see |
| 6303 | android.scaler.availableStallDurations. |
| 6304 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6305 | <tag id="V1" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6306 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6307 | <entry name="sensitivity" type="int32" visibility="public" hwlevel="full"> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6308 | <description>The amount of gain applied to sensor data |
| 6309 | before processing.</description> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6310 | <units>ISO arithmetic units</units> |
| 6311 | <range>android.sensor.info.sensitivityRange</range> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6312 | <details> |
| 6313 | The sensitivity is the standard ISO sensitivity value, |
| 6314 | as defined in ISO 12232:2006. |
| 6315 | |
| 6316 | The sensitivity must be within android.sensor.info.sensitivityRange, and |
| 6317 | if if it less than android.sensor.maxAnalogSensitivity, the camera device |
| 6318 | is guaranteed to use only analog amplification for applying the gain. |
| 6319 | |
| 6320 | If the camera device cannot apply the exact sensitivity |
| 6321 | requested, it will reduce the gain to the nearest supported |
| 6322 | value. The final sensitivity used will be available in the |
| 6323 | output capture result. |
Yin-Chia Yeh | 2003c8d | 2016-01-18 19:14:55 -0800 | [diff] [blame] | 6324 | |
| 6325 | This control is only effective if android.control.aeMode or android.control.mode is set to |
| 6326 | OFF; otherwise the auto-exposure algorithm will override this value. |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6327 | </details> |
| 6328 | <hal_details>ISO 12232:2006 REI method is acceptable.</hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6329 | <tag id="V1" /> |
| 6330 | </entry> |
| 6331 | </controls> |
| 6332 | <static> |
| 6333 | <namespace name="info"> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 6334 | <entry name="activeArraySize" type="int32" visibility="public" |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6335 | type_notes="Four ints defining the active pixel rectangle" |
Ruben Brunk | 40c0fdb | 2015-06-11 18:23:41 -0700 | [diff] [blame] | 6336 | container="array" typedef="rectangle" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6337 | <array> |
| 6338 | <size>4</size> |
| 6339 | </array> |
Ruben Brunk | 40c0fdb | 2015-06-11 18:23:41 -0700 | [diff] [blame] | 6340 | <description> |
| 6341 | The area of the image sensor which corresponds to active pixels after any geometric |
| 6342 | distortion correction has been applied. |
| 6343 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6344 | <units>Pixel coordinates on the image sensor</units> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6345 | <details> |
Ruben Brunk | 40c0fdb | 2015-06-11 18:23:41 -0700 | [diff] [blame] | 6346 | This is the rectangle representing the size of the active region of the sensor (i.e. |
| 6347 | the region that actually receives light from the scene) after any geometric correction |
| 6348 | has been applied, and should be treated as the maximum size in pixels of any of the |
| 6349 | image output formats aside from the raw formats. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6350 | |
Ruben Brunk | 40c0fdb | 2015-06-11 18:23:41 -0700 | [diff] [blame] | 6351 | This rectangle is defined relative to the full pixel array; (0,0) is the top-left of |
| 6352 | the full pixel array, and the size of the full pixel array is given by |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6353 | android.sensor.info.pixelArraySize. |
| 6354 | |
Ruben Brunk | 40c0fdb | 2015-06-11 18:23:41 -0700 | [diff] [blame] | 6355 | The coordinate system for most other keys that list pixel coordinates, including |
| 6356 | android.scaler.cropRegion, is defined relative to the active array rectangle given in |
| 6357 | this field, with `(0, 0)` being the top-left of this rectangle. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6358 | |
| 6359 | The active array may be smaller than the full pixel array, since the full array may |
Ruben Brunk | 40c0fdb | 2015-06-11 18:23:41 -0700 | [diff] [blame] | 6360 | include black calibration pixels or other inactive regions, and geometric correction |
| 6361 | resulting in scaling or cropping may have been applied. |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6362 | </details> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6363 | <ndk_details> |
| 6364 | The data representation is `int[4]`, which maps to `(left, top, width, height)`. |
| 6365 | </ndk_details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6366 | <hal_details> |
| 6367 | This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be |
| 6368 | &gt;= `(0,0)`. |
| 6369 | The `(width, height)` must be &lt;= `android.sensor.info.pixelArraySize`. |
| 6370 | </hal_details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6371 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6372 | </entry> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6373 | <entry name="sensitivityRange" type="int32" visibility="public" |
| 6374 | type_notes="Range of supported sensitivities" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6375 | container="array" typedef="rangeInt" |
| 6376 | hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6377 | <array> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 6378 | <size>2</size> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6379 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6380 | <description>Range of sensitivities for android.sensor.sensitivity supported by this |
| 6381 | camera device.</description> |
Eino-Ville Talvala | d77b234 | 2014-09-25 10:27:48 -0700 | [diff] [blame] | 6382 | <range>Min <= 100, Max &gt;= 800</range> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6383 | <details> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6384 | The values are the standard ISO sensitivity values, |
| 6385 | as defined in ISO 12232:2006. |
| 6386 | </details> |
| 6387 | |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6388 | <tag id="BC" /> |
| 6389 | <tag id="V1" /> |
| 6390 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6391 | <entry name="colorFilterArrangement" type="byte" visibility="public" enum="true" |
| 6392 | hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6393 | <enum> |
| 6394 | <value>RGGB</value> |
| 6395 | <value>GRBG</value> |
| 6396 | <value>GBRG</value> |
| 6397 | <value>BGGR</value> |
| 6398 | <value>RGB |
| 6399 | <notes>Sensor is not Bayer; output has 3 16-bit |
| 6400 | values for each pixel, instead of just 1 16-bit value |
| 6401 | per pixel.</notes></value> |
| 6402 | </enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6403 | <description>The arrangement of color filters on sensor; |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6404 | represents the colors in the top-left 2x2 section of |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 6405 | the sensor, in reading order.</description> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6406 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6407 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 6408 | <entry name="exposureTimeRange" type="int64" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6409 | type_notes="nanoseconds" container="array" typedef="rangeLong" |
| 6410 | hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6411 | <array> |
| 6412 | <size>2</size> |
| 6413 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6414 | <description>The range of image exposure times for android.sensor.exposureTime supported |
| 6415 | by this camera device. |
| 6416 | </description> |
| 6417 | <units>Nanoseconds</units> |
| 6418 | <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] | 6419 | capability devices (android.info.supportedHardwareLevel == FULL), |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6420 | the maximum exposure time will be greater than 100ms.</range> |
Zhijun He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 6421 | <hal_details>For FULL capability devices (android.info.supportedHardwareLevel == FULL), |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6422 | The maximum of the range SHOULD be at least 1 second (1e9), MUST be at least |
| 6423 | 100ms. |
| 6424 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6425 | <tag id="V1" /> |
| 6426 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6427 | <entry name="maxFrameDuration" type="int64" visibility="public" |
| 6428 | hwlevel="full"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6429 | <description>The maximum possible frame duration (minimum frame rate) for |
| 6430 | android.sensor.frameDuration that is supported this camera device.</description> |
| 6431 | <units>Nanoseconds</units> |
Zhijun He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 6432 | <range>For FULL capability devices |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6433 | (android.info.supportedHardwareLevel == FULL), at least 100ms. |
Zhijun He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 6434 | </range> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6435 | <details>Attempting to use frame durations beyond the maximum will result in the frame |
| 6436 | duration being clipped to the maximum. See that control for a full definition of frame |
| 6437 | durations. |
Igor Murashkin | 061c600 | 2014-01-27 16:00:26 -0800 | [diff] [blame] | 6438 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 6439 | Refer to {@link |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6440 | android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration|ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS} |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 6441 | for the minimum frame duration values. |
Igor Murashkin | 061c600 | 2014-01-27 16:00:26 -0800 | [diff] [blame] | 6442 | </details> |
| 6443 | <hal_details> |
Zhijun He | 7a8aea6 | 2014-03-18 13:37:23 -0700 | [diff] [blame] | 6444 | For FULL capability devices (android.info.supportedHardwareLevel == FULL), |
| 6445 | The maximum of the range SHOULD be at least |
| 6446 | 1 second (1e9), MUST be at least 100ms (100e6). |
Igor Murashkin | 061c600 | 2014-01-27 16:00:26 -0800 | [diff] [blame] | 6447 | |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 6448 | android.sensor.info.maxFrameDuration must be greater or |
| 6449 | equal to the android.sensor.info.exposureTimeRange max |
| 6450 | value (since exposure time overrides frame duration). |
Igor Murashkin | aa6bd6f | 2014-02-07 14:31:31 -0800 | [diff] [blame] | 6451 | |
| 6452 | Available minimum frame durations for JPEG must be no greater |
| 6453 | than that of the YUV_420_888/IMPLEMENTATION_DEFINED |
| 6454 | minimum frame durations (for that respective size). |
| 6455 | |
| 6456 | Since JPEG processing is considered offline and can take longer than |
| 6457 | a single uncompressed capture, refer to |
| 6458 | android.scaler.availableStallDurations |
| 6459 | for details about encoding this scenario. |
Igor Murashkin | 061c600 | 2014-01-27 16:00:26 -0800 | [diff] [blame] | 6460 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6461 | <tag id="V1" /> |
| 6462 | </entry> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 6463 | <entry name="physicalSize" type="float" visibility="public" |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6464 | type_notes="width x height" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6465 | container="array" typedef="sizeF" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6466 | <array> |
| 6467 | <size>2</size> |
| 6468 | </array> |
| 6469 | <description>The physical dimensions of the full pixel |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6470 | array.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6471 | <units>Millimeters</units> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6472 | <details>This is the physical size of the sensor pixel |
| 6473 | array defined by android.sensor.info.pixelArraySize. |
| 6474 | </details> |
| 6475 | <hal_details>Needed for FOV calculation for old API</hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6476 | <tag id="V1" /> |
| 6477 | <tag id="BC" /> |
| 6478 | </entry> |
Ruben Brunk | cd05eed | 2014-01-31 12:38:46 -0800 | [diff] [blame] | 6479 | <entry name="pixelArraySize" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6480 | container="array" typedef="size" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6481 | <array> |
| 6482 | <size>2</size> |
| 6483 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6484 | <description>Dimensions of the full pixel array, possibly |
Zhijun He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 6485 | including black calibration pixels.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6486 | <units>Pixels</units> |
Ruben Brunk | 40c0fdb | 2015-06-11 18:23:41 -0700 | [diff] [blame] | 6487 | <details>The pixel count of the full pixel array of the image sensor, which covers |
| 6488 | android.sensor.info.physicalSize area. This represents the full pixel dimensions of |
| 6489 | the raw buffers produced by this sensor. |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6490 | |
Ruben Brunk | 40c0fdb | 2015-06-11 18:23:41 -0700 | [diff] [blame] | 6491 | If a camera device supports raw sensor formats, either this or |
| 6492 | android.sensor.info.preCorrectionActiveArraySize is the maximum dimensions for the raw |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6493 | output formats listed in {@link |
| 6494 | android.hardware.camera2.params.StreamConfigurationMap|ACAMERA_SCALER_AVAILABLE_STREAM_CONFIGURATIONS} |
| 6495 | (this depends on whether or not the image sensor returns buffers containing pixels that |
| 6496 | are not part of the active array region for blacklevel calibration or other purposes). |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6497 | |
| 6498 | Some parts of the full pixel array may not receive light from the scene, |
Ruben Brunk | 40c0fdb | 2015-06-11 18:23:41 -0700 | [diff] [blame] | 6499 | or be otherwise inactive. The android.sensor.info.preCorrectionActiveArraySize key |
| 6500 | defines the rectangle of active pixels that will be included in processed image |
| 6501 | formats. |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 6502 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6503 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6504 | <tag id="BC" /> |
| 6505 | </entry> |
Ruben Brunk | 92dd85b | 2014-02-10 19:16:56 -0800 | [diff] [blame] | 6506 | <entry name="whiteLevel" type="int32" visibility="public"> |
| 6507 | <description> |
| 6508 | Maximum raw value output by sensor. |
| 6509 | </description> |
Ruben Brunk | d9d1213 | 2014-03-18 14:37:04 -0700 | [diff] [blame] | 6510 | <range>&gt; 255 (8-bit output)</range> |
Ruben Brunk | 92dd85b | 2014-02-10 19:16:56 -0800 | [diff] [blame] | 6511 | <details> |
| 6512 | This specifies the fully-saturated encoding level for the raw |
| 6513 | sample values from the sensor. This is typically caused by the |
| 6514 | sensor becoming highly non-linear or clipping. The minimum for |
| 6515 | each channel is specified by the offset in the |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6516 | android.sensor.blackLevelPattern key. |
Ruben Brunk | 92dd85b | 2014-02-10 19:16:56 -0800 | [diff] [blame] | 6517 | |
| 6518 | The white level is typically determined either by sensor bit depth |
Ruben Brunk | d9d1213 | 2014-03-18 14:37:04 -0700 | [diff] [blame] | 6519 | (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] | 6520 | becomes too non-linear to be useful. The default value for this is |
| 6521 | maximum representable value for a 16-bit raw sample (2^16 - 1). |
Zhijun He | d363a12 | 2015-11-12 17:27:27 -0800 | [diff] [blame] | 6522 | |
| 6523 | The white level values of captured images may vary for different |
| 6524 | capture settings (e.g., android.sensor.sensitivity). This key |
| 6525 | represents a coarse approximation for such case. It is recommended |
| 6526 | to use android.sensor.dynamicWhiteLevel for captures when supported |
| 6527 | by the camera device, which provides more accurate white level values. |
Ruben Brunk | 92dd85b | 2014-02-10 19:16:56 -0800 | [diff] [blame] | 6528 | </details> |
Ruben Brunk | d9d1213 | 2014-03-18 14:37:04 -0700 | [diff] [blame] | 6529 | <hal_details> |
| 6530 | The full bit depth of the sensor must be available in the raw data, |
| 6531 | so the value for linear sensors should not be significantly lower |
| 6532 | than maximum raw value supported, i.e. 2^(sensor bits per pixel). |
| 6533 | </hal_details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6534 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6535 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6536 | <entry name="timestampSource" type="byte" visibility="public" |
| 6537 | enum="true" hwlevel="legacy"> |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 6538 | <enum> |
Eino-Ville Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 6539 | <value>UNKNOWN |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 6540 | <notes> |
| 6541 | Timestamps from android.sensor.timestamp are in nanoseconds and monotonic, |
| 6542 | but can not be compared to timestamps from other subsystems |
| 6543 | (e.g. accelerometer, gyro etc.), or other instances of the same or different |
| 6544 | camera devices in the same system. Timestamps between streams and results for |
| 6545 | a single camera instance are comparable, and the timestamps for all buffers |
| 6546 | and the result metadata generated by a single capture are identical. |
| 6547 | </notes> |
| 6548 | </value> |
Eino-Ville Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 6549 | <value>REALTIME |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 6550 | <notes> |
| 6551 | Timestamps from android.sensor.timestamp are in the same timebase as |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 6552 | {@link android.os.SystemClock#elapsedRealtimeNanos}, |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 6553 | and they can be compared to other timestamps using that base. |
| 6554 | </notes> |
| 6555 | </value> |
| 6556 | </enum> |
Eino-Ville Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 6557 | <description>The time base source for sensor capture start timestamps.</description> |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 6558 | <details> |
Eino-Ville Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 6559 | The timestamps provided for captures are always in nanoseconds and monotonic, but |
| 6560 | may not based on a time source that can be compared to other system time sources. |
| 6561 | |
| 6562 | This characteristic defines the source for the timestamps, and therefore whether they |
| 6563 | can be compared against other system time sources/timestamps. |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 6564 | </details> |
Yin-Chia Yeh | de687b9 | 2016-06-06 14:25:11 -0700 | [diff] [blame] | 6565 | <hal_details> |
| 6566 | For camera devices implement UNKNOWN, the camera framework expects that the timestamp |
| 6567 | source to be SYSTEM_TIME_MONOTONIC. For camera devices implement REALTIME, the camera |
| 6568 | framework expects that the timestamp source to be SYSTEM_TIME_BOOTTIME. See |
| 6569 | system/core/include/utils/Timers.h for the definition of SYSTEM_TIME_MONOTONIC and |
| 6570 | SYSTEM_TIME_BOOTTIME. Note that HAL must follow above expectation; otherwise video |
| 6571 | recording might suffer unexpected behavior. |
| 6572 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6573 | Also, camera devices which implement REALTIME must pass the ITS sensor fusion test which |
Yin-Chia Yeh | de687b9 | 2016-06-06 14:25:11 -0700 | [diff] [blame] | 6574 | tests the alignment between camera timestamps and gyro sensor timestamps. |
| 6575 | </hal_details> |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 6576 | <tag id="V1" /> |
| 6577 | </entry> |
Yin-Chia Yeh | d7dcb74 | 2015-02-04 10:04:37 -0800 | [diff] [blame] | 6578 | <entry name="lensShadingApplied" type="byte" visibility="public" enum="true" |
| 6579 | typedef="boolean"> |
| 6580 | <enum> |
| 6581 | <value>FALSE</value> |
| 6582 | <value>TRUE</value> |
| 6583 | </enum> |
| 6584 | <description>Whether the RAW images output from this camera device are subject to |
| 6585 | lens shading correction.</description> |
| 6586 | <details> |
| 6587 | If TRUE, all images produced by the camera device in the RAW image formats will |
| 6588 | have lens shading correction already applied to it. If FALSE, the images will |
| 6589 | not be adjusted for lens shading correction. |
| 6590 | See android.request.maxNumOutputRaw for a list of RAW image formats. |
| 6591 | |
| 6592 | This key will be `null` for all devices do not report this information. |
| 6593 | Devices with RAW capability will always report this information in this key. |
| 6594 | </details> |
| 6595 | </entry> |
Ruben Brunk | 9319294 | 2015-07-01 11:32:39 -0700 | [diff] [blame] | 6596 | <entry name="preCorrectionActiveArraySize" type="int32" visibility="public" |
| 6597 | type_notes="Four ints defining the active pixel rectangle" container="array" |
| 6598 | typedef="rectangle" hwlevel="legacy"> |
| 6599 | <array> |
| 6600 | <size>4</size> |
| 6601 | </array> |
| 6602 | <description> |
| 6603 | The area of the image sensor which corresponds to active pixels prior to the |
| 6604 | application of any geometric distortion correction. |
| 6605 | </description> |
| 6606 | <units>Pixel coordinates on the image sensor</units> |
| 6607 | <details> |
| 6608 | This is the rectangle representing the size of the active region of the sensor (i.e. |
| 6609 | the region that actually receives light from the scene) before any geometric correction |
| 6610 | has been applied, and should be treated as the active region rectangle for any of the |
| 6611 | raw formats. All metadata associated with raw processing (e.g. the lens shading |
| 6612 | correction map, and radial distortion fields) treats the top, left of this rectangle as |
| 6613 | the origin, (0,0). |
| 6614 | |
| 6615 | The size of this region determines the maximum field of view and the maximum number of |
| 6616 | pixels that an image from this sensor can contain, prior to the application of |
| 6617 | geometric distortion correction. The effective maximum pixel dimensions of a |
| 6618 | post-distortion-corrected image is given by the android.sensor.info.activeArraySize |
| 6619 | field, and the effective maximum field of view for a post-distortion-corrected image |
| 6620 | can be calculated by applying the geometric distortion correction fields to this |
| 6621 | rectangle, and cropping to the rectangle given in android.sensor.info.activeArraySize. |
| 6622 | |
| 6623 | E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the |
| 6624 | dimensions in android.sensor.info.activeArraySize given the position of a pixel, |
| 6625 | (x', y'), in the raw pixel array with dimensions give in |
| 6626 | android.sensor.info.pixelArraySize: |
| 6627 | |
| 6628 | 1. Choose a pixel (x', y') within the active array region of the raw buffer given in |
| 6629 | android.sensor.info.preCorrectionActiveArraySize, otherwise this pixel is considered |
| 6630 | to be outside of the FOV, and will not be shown in the processed output image. |
| 6631 | 1. Apply geometric distortion correction to get the post-distortion pixel coordinate, |
| 6632 | (x_i, y_i). When applying geometric correction metadata, note that metadata for raw |
| 6633 | buffers is defined relative to the top, left of the |
| 6634 | android.sensor.info.preCorrectionActiveArraySize rectangle. |
| 6635 | 1. If the resulting corrected pixel coordinate is within the region given in |
| 6636 | android.sensor.info.activeArraySize, then the position of this pixel in the |
| 6637 | processed output image buffer is `(x_i - activeArray.left, y_i - activeArray.top)`, |
| 6638 | when the top, left coordinate of that buffer is treated as (0, 0). |
| 6639 | |
| 6640 | Thus, for pixel x',y' = (25, 25) on a sensor where android.sensor.info.pixelArraySize |
| 6641 | is (100,100), android.sensor.info.preCorrectionActiveArraySize is (10, 10, 100, 100), |
| 6642 | android.sensor.info.activeArraySize is (20, 20, 80, 80), and the geometric distortion |
| 6643 | correction doesn't change the pixel coordinate, the resulting pixel selected in |
| 6644 | pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer |
| 6645 | with dimensions given in android.sensor.info.pixelArraySize, and would be (5, 5) |
| 6646 | relative to the top,left of post-processed YUV output buffer with dimensions given in |
| 6647 | android.sensor.info.activeArraySize. |
| 6648 | |
| 6649 | The currently supported fields that correct for geometric distortion are: |
| 6650 | |
| 6651 | 1. android.lens.radialDistortion. |
| 6652 | |
| 6653 | If all of the geometric distortion fields are no-ops, this rectangle will be the same |
| 6654 | as the post-distortion-corrected rectangle given in |
| 6655 | android.sensor.info.activeArraySize. |
| 6656 | |
| 6657 | This rectangle is defined relative to the full pixel array; (0,0) is the top-left of |
| 6658 | the full pixel array, and the size of the full pixel array is given by |
| 6659 | android.sensor.info.pixelArraySize. |
| 6660 | |
| 6661 | The pre-correction active array may be smaller than the full pixel array, since the |
| 6662 | full array may include black calibration pixels or other inactive regions. |
| 6663 | </details> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 6664 | <ndk_details> |
| 6665 | The data representation is `int[4]`, which maps to `(left, top, width, height)`. |
| 6666 | </ndk_details> |
Ruben Brunk | 9319294 | 2015-07-01 11:32:39 -0700 | [diff] [blame] | 6667 | <hal_details> |
| 6668 | This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be |
| 6669 | &gt;= `(0,0)`. |
| 6670 | The `(width, height)` must be &lt;= `android.sensor.info.pixelArraySize`. |
| 6671 | |
| 6672 | If omitted by the HAL implementation, the camera framework will assume that this is |
| 6673 | the same as the post-correction active array region given in |
| 6674 | android.sensor.info.activeArraySize. |
| 6675 | </hal_details> |
| 6676 | <tag id="RAW" /> |
| 6677 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6678 | </namespace> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6679 | <entry name="referenceIlluminant1" type="byte" visibility="public" |
| 6680 | enum="true"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6681 | <enum> |
| 6682 | <value id="1">DAYLIGHT</value> |
| 6683 | <value id="2">FLUORESCENT</value> |
| 6684 | <value id="3">TUNGSTEN |
| 6685 | <notes>Incandescent light</notes> |
| 6686 | </value> |
| 6687 | <value id="4">FLASH</value> |
| 6688 | <value id="9">FINE_WEATHER</value> |
| 6689 | <value id="10">CLOUDY_WEATHER</value> |
| 6690 | <value id="11">SHADE</value> |
| 6691 | <value id="12">DAYLIGHT_FLUORESCENT |
| 6692 | <notes>D 5700 - 7100K</notes> |
| 6693 | </value> |
| 6694 | <value id="13">DAY_WHITE_FLUORESCENT |
| 6695 | <notes>N 4600 - 5400K</notes> |
| 6696 | </value> |
| 6697 | <value id="14">COOL_WHITE_FLUORESCENT |
| 6698 | <notes>W 3900 - 4500K</notes> |
| 6699 | </value> |
| 6700 | <value id="15">WHITE_FLUORESCENT |
| 6701 | <notes>WW 3200 - 3700K</notes> |
| 6702 | </value> |
| 6703 | <value id="17">STANDARD_A</value> |
| 6704 | <value id="18">STANDARD_B</value> |
| 6705 | <value id="19">STANDARD_C</value> |
| 6706 | <value id="20">D55</value> |
| 6707 | <value id="21">D65</value> |
| 6708 | <value id="22">D75</value> |
| 6709 | <value id="23">D50</value> |
| 6710 | <value id="24">ISO_STUDIO_TUNGSTEN</value> |
| 6711 | </enum> |
| 6712 | <description> |
| 6713 | The standard reference illuminant used as the scene light source when |
| 6714 | calculating the android.sensor.colorTransform1, |
| 6715 | android.sensor.calibrationTransform1, and |
| 6716 | android.sensor.forwardMatrix1 matrices. |
| 6717 | </description> |
| 6718 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6719 | The values in this key correspond to the values defined for the |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6720 | EXIF LightSource tag. These illuminants are standard light sources |
| 6721 | that are often used calibrating camera devices. |
| 6722 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6723 | If this key is present, then android.sensor.colorTransform1, |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6724 | android.sensor.calibrationTransform1, and |
| 6725 | android.sensor.forwardMatrix1 will also be present. |
| 6726 | |
| 6727 | Some devices may choose to provide a second set of calibration |
| 6728 | information for improved quality, including |
| 6729 | android.sensor.referenceIlluminant2 and its corresponding matrices. |
| 6730 | </details> |
| 6731 | <hal_details> |
| 6732 | The first reference illuminant (android.sensor.referenceIlluminant1) |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6733 | and corresponding matrices must be present to support the RAW capability |
| 6734 | and DNG output. |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6735 | |
| 6736 | When producing raw images with a color profile that has only been |
| 6737 | calibrated against a single light source, it is valid to omit |
| 6738 | android.sensor.referenceIlluminant2 along with the |
| 6739 | android.sensor.colorTransform2, android.sensor.calibrationTransform2, |
| 6740 | and android.sensor.forwardMatrix2 matrices. |
| 6741 | |
| 6742 | If only android.sensor.referenceIlluminant1 is included, it should be |
| 6743 | chosen so that it is representative of typical scene lighting. In |
| 6744 | general, D50 or DAYLIGHT will be chosen for this case. |
| 6745 | |
| 6746 | If both android.sensor.referenceIlluminant1 and |
| 6747 | android.sensor.referenceIlluminant2 are included, they should be |
| 6748 | chosen to represent the typical range of scene lighting conditions. |
| 6749 | In general, low color temperature illuminant such as Standard-A will |
| 6750 | be chosen for the first reference illuminant and a higher color |
| 6751 | temperature illuminant such as D65 will be chosen for the second |
| 6752 | reference illuminant. |
| 6753 | </hal_details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6754 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6755 | </entry> |
| 6756 | <entry name="referenceIlluminant2" type="byte" visibility="public"> |
| 6757 | <description> |
| 6758 | The standard reference illuminant used as the scene light source when |
| 6759 | calculating the android.sensor.colorTransform2, |
| 6760 | android.sensor.calibrationTransform2, and |
| 6761 | android.sensor.forwardMatrix2 matrices. |
| 6762 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6763 | <range>Any value listed in android.sensor.referenceIlluminant1</range> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6764 | <details> |
| 6765 | See android.sensor.referenceIlluminant1 for more details. |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6766 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6767 | If this key is present, then android.sensor.colorTransform2, |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6768 | android.sensor.calibrationTransform2, and |
| 6769 | android.sensor.forwardMatrix2 will also be present. |
| 6770 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6771 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6772 | </entry> |
| 6773 | <entry name="calibrationTransform1" type="rational" |
| 6774 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 6775 | type_notes="3x3 matrix in row-major-order" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6776 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6777 | <array> |
| 6778 | <size>3</size> |
| 6779 | <size>3</size> |
| 6780 | </array> |
| 6781 | <description> |
| 6782 | A per-device calibration transform matrix that maps from the |
| 6783 | reference sensor colorspace to the actual device sensor colorspace. |
| 6784 | </description> |
| 6785 | <details> |
| 6786 | This matrix is used to correct for per-device variations in the |
| 6787 | sensor colorspace, and is used for processing raw buffer data. |
| 6788 | |
| 6789 | The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 6790 | contains a per-device calibration transform that maps colors |
| 6791 | from reference sensor color space (i.e. the "golden module" |
| 6792 | colorspace) into this camera device's native sensor color |
| 6793 | space under the first reference illuminant |
| 6794 | (android.sensor.referenceIlluminant1). |
| 6795 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6796 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6797 | </entry> |
| 6798 | <entry name="calibrationTransform2" type="rational" |
| 6799 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 6800 | type_notes="3x3 matrix in row-major-order" container="array" |
| 6801 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6802 | <array> |
| 6803 | <size>3</size> |
| 6804 | <size>3</size> |
| 6805 | </array> |
| 6806 | <description> |
| 6807 | A per-device calibration transform matrix that maps from the |
| 6808 | reference sensor colorspace to the actual device sensor colorspace |
| 6809 | (this is the colorspace of the raw buffer data). |
| 6810 | </description> |
| 6811 | <details> |
| 6812 | This matrix is used to correct for per-device variations in the |
| 6813 | sensor colorspace, and is used for processing raw buffer data. |
| 6814 | |
| 6815 | The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 6816 | contains a per-device calibration transform that maps colors |
| 6817 | from reference sensor color space (i.e. the "golden module" |
| 6818 | colorspace) into this camera device's native sensor color |
| 6819 | space under the second reference illuminant |
| 6820 | (android.sensor.referenceIlluminant2). |
| 6821 | |
| 6822 | This matrix will only be present if the second reference |
| 6823 | illuminant is present. |
| 6824 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6825 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6826 | </entry> |
| 6827 | <entry name="colorTransform1" type="rational" |
| 6828 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 6829 | type_notes="3x3 matrix in row-major-order" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6830 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6831 | <array> |
| 6832 | <size>3</size> |
| 6833 | <size>3</size> |
| 6834 | </array> |
| 6835 | <description> |
| 6836 | A matrix that transforms color values from CIE XYZ color space to |
| 6837 | reference sensor color space. |
| 6838 | </description> |
| 6839 | <details> |
| 6840 | This matrix is used to convert from the standard CIE XYZ color |
| 6841 | space to the reference sensor colorspace, and is used when processing |
| 6842 | raw buffer data. |
| 6843 | |
| 6844 | The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 6845 | contains a color transform matrix that maps colors from the CIE |
| 6846 | XYZ color space to the reference sensor color space (i.e. the |
| 6847 | "golden module" colorspace) under the first reference illuminant |
| 6848 | (android.sensor.referenceIlluminant1). |
| 6849 | |
| 6850 | The white points chosen in both the reference sensor color space |
| 6851 | and the CIE XYZ colorspace when calculating this transform will |
| 6852 | match the standard white point for the first reference illuminant |
| 6853 | (i.e. no chromatic adaptation will be applied by this transform). |
| 6854 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6855 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6856 | </entry> |
| 6857 | <entry name="colorTransform2" type="rational" |
| 6858 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 6859 | type_notes="3x3 matrix in row-major-order" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6860 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6861 | <array> |
| 6862 | <size>3</size> |
| 6863 | <size>3</size> |
| 6864 | </array> |
| 6865 | <description> |
| 6866 | A matrix that transforms color values from CIE XYZ color space to |
| 6867 | reference sensor color space. |
| 6868 | </description> |
| 6869 | <details> |
| 6870 | This matrix is used to convert from the standard CIE XYZ color |
| 6871 | space to the reference sensor colorspace, and is used when processing |
| 6872 | raw buffer data. |
| 6873 | |
| 6874 | The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 6875 | contains a color transform matrix that maps colors from the CIE |
| 6876 | XYZ color space to the reference sensor color space (i.e. the |
| 6877 | "golden module" colorspace) under the second reference illuminant |
| 6878 | (android.sensor.referenceIlluminant2). |
| 6879 | |
| 6880 | The white points chosen in both the reference sensor color space |
| 6881 | and the CIE XYZ colorspace when calculating this transform will |
| 6882 | match the standard white point for the second reference illuminant |
| 6883 | (i.e. no chromatic adaptation will be applied by this transform). |
| 6884 | |
| 6885 | This matrix will only be present if the second reference |
| 6886 | illuminant is present. |
| 6887 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6888 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6889 | </entry> |
| 6890 | <entry name="forwardMatrix1" type="rational" |
| 6891 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 6892 | type_notes="3x3 matrix in row-major-order" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6893 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6894 | <array> |
| 6895 | <size>3</size> |
| 6896 | <size>3</size> |
| 6897 | </array> |
| 6898 | <description> |
| 6899 | A matrix that transforms white balanced camera colors from the reference |
| 6900 | sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint. |
| 6901 | </description> |
| 6902 | <details> |
| 6903 | This matrix is used to convert to the standard CIE XYZ colorspace, and |
| 6904 | is used when processing raw buffer data. |
| 6905 | |
| 6906 | This matrix is expressed as a 3x3 matrix in row-major-order, and contains |
| 6907 | a color transform matrix that maps white balanced colors from the |
| 6908 | reference sensor color space to the CIE XYZ color space with a D50 white |
| 6909 | point. |
| 6910 | |
| 6911 | Under the first reference illuminant (android.sensor.referenceIlluminant1) |
| 6912 | this matrix is chosen so that the standard white point for this reference |
| 6913 | illuminant in the reference sensor colorspace is mapped to D50 in the |
| 6914 | CIE XYZ colorspace. |
| 6915 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6916 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6917 | </entry> |
| 6918 | <entry name="forwardMatrix2" type="rational" |
| 6919 | visibility="public" optional="true" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 6920 | type_notes="3x3 matrix in row-major-order" container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6921 | typedef="colorSpaceTransform"> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6922 | <array> |
| 6923 | <size>3</size> |
| 6924 | <size>3</size> |
| 6925 | </array> |
| 6926 | <description> |
| 6927 | A matrix that transforms white balanced camera colors from the reference |
| 6928 | sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint. |
| 6929 | </description> |
| 6930 | <details> |
| 6931 | This matrix is used to convert to the standard CIE XYZ colorspace, and |
| 6932 | is used when processing raw buffer data. |
| 6933 | |
| 6934 | This matrix is expressed as a 3x3 matrix in row-major-order, and contains |
| 6935 | a color transform matrix that maps white balanced colors from the |
| 6936 | reference sensor color space to the CIE XYZ color space with a D50 white |
| 6937 | point. |
| 6938 | |
| 6939 | Under the second reference illuminant (android.sensor.referenceIlluminant2) |
| 6940 | this matrix is chosen so that the standard white point for this reference |
| 6941 | illuminant in the reference sensor colorspace is mapped to D50 in the |
| 6942 | CIE XYZ colorspace. |
| 6943 | |
| 6944 | This matrix will only be present if the second reference |
| 6945 | illuminant is present. |
| 6946 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6947 | <tag id="RAW" /> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 6948 | </entry> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6949 | <entry name="baseGainFactor" type="rational" |
Alex Ray | ef40ad6 | 2013-10-01 17:52:33 -0700 | [diff] [blame] | 6950 | optional="true"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6951 | <description>Gain factor from electrons to raw units when |
| 6952 | ISO=100</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 6953 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6954 | </entry> |
Ruben Brunk | 24bdaaf | 2014-01-31 14:11:20 -0800 | [diff] [blame] | 6955 | <entry name="blackLevelPattern" type="int32" visibility="public" |
Ruben Brunk | cc09de1 | 2014-06-05 13:20:47 -0700 | [diff] [blame] | 6956 | optional="true" type_notes="2x2 raw count block" container="array" |
| 6957 | typedef="blackLevelPattern"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6958 | <array> |
| 6959 | <size>4</size> |
| 6960 | </array> |
Ruben Brunk | 24bdaaf | 2014-01-31 14:11:20 -0800 | [diff] [blame] | 6961 | <description> |
| 6962 | A fixed black level offset for each of the color filter arrangement |
| 6963 | (CFA) mosaic channels. |
| 6964 | </description> |
| 6965 | <range>&gt;= 0 for each.</range> |
| 6966 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 6967 | 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] | 6968 | channels in the camera sensor. The maximal value output by the |
| 6969 | sensor is represented by the value in android.sensor.info.whiteLevel. |
Ruben Brunk | 24bdaaf | 2014-01-31 14:11:20 -0800 | [diff] [blame] | 6970 | |
Ruben Brunk | cc09de1 | 2014-06-05 13:20:47 -0700 | [diff] [blame] | 6971 | 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] | 6972 | layout key (see android.sensor.info.colorFilterArrangement), i.e. the |
Ruben Brunk | cc09de1 | 2014-06-05 13:20:47 -0700 | [diff] [blame] | 6973 | nth value given corresponds to the black level offset for the nth |
| 6974 | color channel listed in the CFA. |
Zhijun He | d363a12 | 2015-11-12 17:27:27 -0800 | [diff] [blame] | 6975 | |
| 6976 | The black level values of captured images may vary for different |
| 6977 | capture settings (e.g., android.sensor.sensitivity). This key |
| 6978 | represents a coarse approximation for such case. It is recommended to |
| 6979 | use android.sensor.dynamicBlackLevel or use pixels from |
| 6980 | android.sensor.opticalBlackRegions directly for captures when |
| 6981 | supported by the camera device, which provides more accurate black |
| 6982 | level values. For raw capture in particular, it is recommended to use |
| 6983 | pixels from android.sensor.opticalBlackRegions to calculate black |
| 6984 | level values for each frame. |
Ruben Brunk | cc09de1 | 2014-06-05 13:20:47 -0700 | [diff] [blame] | 6985 | </details> |
| 6986 | <hal_details> |
Ruben Brunk | 24bdaaf | 2014-01-31 14:11:20 -0800 | [diff] [blame] | 6987 | The values are given in row-column scan order, with the first value |
| 6988 | corresponding to the element of the CFA in row=0, column=0. |
Ruben Brunk | cc09de1 | 2014-06-05 13:20:47 -0700 | [diff] [blame] | 6989 | </hal_details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 6990 | <tag id="RAW" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6991 | </entry> |
Alex Ray | ef40ad6 | 2013-10-01 17:52:33 -0700 | [diff] [blame] | 6992 | <entry name="maxAnalogSensitivity" type="int32" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 6993 | optional="true" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6994 | <description>Maximum sensitivity that is implemented |
Zhijun He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 6995 | purely through analog gain.</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 6996 | <details>For android.sensor.sensitivity values less than or |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 6997 | equal to this, all applied gain must be analog. For |
Zhijun He | bdc94c4 | 2014-01-21 18:28:30 -0800 | [diff] [blame] | 6998 | values above this, the gain applied can be a mix of analog and |
| 6999 | digital.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7000 | <tag id="V1" /> |
Alex Ray | ef40ad6 | 2013-10-01 17:52:33 -0700 | [diff] [blame] | 7001 | <tag id="FULL" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7002 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7003 | <entry name="orientation" type="int32" visibility="public" |
| 7004 | hwlevel="legacy"> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7005 | <description>Clockwise angle through which the output image needs to be rotated to be |
| 7006 | upright on the device screen in its native orientation. |
| 7007 | </description> |
| 7008 | <units>Degrees of clockwise rotation; always a multiple of |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7009 | 90</units> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7010 | <range>0, 90, 180, 270</range> |
| 7011 | <details> |
| 7012 | Also defines the direction of rolling shutter readout, which is from top to bottom in |
| 7013 | the sensor's coordinate system. |
| 7014 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7015 | <tag id="BC" /> |
| 7016 | </entry> |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 7017 | <entry name="profileHueSatMapDimensions" type="int32" |
Zhijun He | d0f482a | 2014-05-06 16:18:04 -0700 | [diff] [blame] | 7018 | visibility="system" optional="true" |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 7019 | type_notes="Number of samples for hue, saturation, and value" |
| 7020 | container="array"> |
| 7021 | <array> |
| 7022 | <size>3</size> |
| 7023 | </array> |
| 7024 | <description> |
| 7025 | The number of input samples for each dimension of |
| 7026 | android.sensor.profileHueSatMap. |
| 7027 | </description> |
| 7028 | <range> |
| 7029 | Hue &gt;= 1, |
| 7030 | Saturation &gt;= 2, |
| 7031 | Value &gt;= 1 |
| 7032 | </range> |
| 7033 | <details> |
| 7034 | The number of input samples for the hue, saturation, and value |
| 7035 | dimension of android.sensor.profileHueSatMap. The order of the |
| 7036 | dimensions given is hue, saturation, value; where hue is the 0th |
| 7037 | element. |
| 7038 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 7039 | <tag id="RAW" /> |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 7040 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7041 | </static> |
| 7042 | <dynamic> |
| 7043 | <clone entry="android.sensor.exposureTime" kind="controls"> |
| 7044 | </clone> |
| 7045 | <clone entry="android.sensor.frameDuration" |
| 7046 | kind="controls"></clone> |
| 7047 | <clone entry="android.sensor.sensitivity" kind="controls"> |
| 7048 | </clone> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7049 | <entry name="timestamp" type="int64" visibility="public" |
| 7050 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7051 | <description>Time at start of exposure of first |
Zhijun He | cc5cfdc | 2014-06-11 10:44:53 -0700 | [diff] [blame] | 7052 | row of the image sensor active array, in nanoseconds.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7053 | <units>Nanoseconds</units> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 7054 | <range>&gt; 0</range> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 7055 | <details>The timestamps are also included in all image |
| 7056 | buffers produced for the same capture, and will be identical |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 7057 | on all the outputs. |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 7058 | |
Eino-Ville Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 7059 | When android.sensor.info.timestampSource `==` UNKNOWN, |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 7060 | the timestamps measure time since an unspecified starting point, |
| 7061 | and are monotonically increasing. They can be compared with the |
| 7062 | timestamps for other captures from the same camera device, but are |
| 7063 | not guaranteed to be comparable to any other time source. |
| 7064 | |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 7065 | When android.sensor.info.timestampSource `==` REALTIME, the |
| 7066 | timestamps measure time in the same timebase as {@link |
| 7067 | android.os.SystemClock#elapsedRealtimeNanos}, and they can |
| 7068 | be compared to other timestamps from other subsystems that |
| 7069 | are using that base. |
Chien-Yu Chen | c61e164 | 2015-05-29 11:36:53 -0700 | [diff] [blame] | 7070 | |
| 7071 | For reprocessing, the timestamp will match the start of exposure of |
| 7072 | the input image, i.e. {@link CaptureResult#SENSOR_TIMESTAMP the |
| 7073 | timestamp} in the TotalCaptureResult that was used to create the |
| 7074 | reprocess capture request. |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 7075 | </details> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 7076 | <hal_details> |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 7077 | All timestamps must be in reference to the kernel's |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 7078 | CLOCK_BOOTTIME monotonic clock, which properly accounts for |
| 7079 | time spent asleep. This allows for synchronization with |
| 7080 | sensors that continue to operate while the system is |
| 7081 | otherwise asleep. |
| 7082 | |
Eino-Ville Talvala | 122906c | 2014-07-28 12:49:25 -0700 | [diff] [blame] | 7083 | If android.sensor.info.timestampSource `==` REALTIME, |
Zhijun He | 91449c8 | 2014-06-12 10:43:32 -0700 | [diff] [blame] | 7084 | The timestamp must be synchronized with the timestamps from other |
| 7085 | sensor subsystems that are using the same timebase. |
Chien-Yu Chen | c61e164 | 2015-05-29 11:36:53 -0700 | [diff] [blame] | 7086 | |
| 7087 | For reprocessing, the input image's start of exposure can be looked up |
| 7088 | with android.sensor.timestamp from the metadata included in the |
| 7089 | capture request. |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 7090 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7091 | <tag id="BC" /> |
| 7092 | </entry> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7093 | <entry name="temperature" type="float" |
Alex Ray | ef40ad6 | 2013-10-01 17:52:33 -0700 | [diff] [blame] | 7094 | optional="true"> |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 7095 | <description>The temperature of the sensor, sampled at the time |
| 7096 | exposure began for this frame. |
| 7097 | |
| 7098 | The thermal diode being queried should be inside the sensor PCB, or |
| 7099 | somewhere close to it. |
| 7100 | </description> |
| 7101 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7102 | <units>Celsius</units> |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 7103 | <range>Optional. This value is missing if no temperature is available.</range> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7104 | <tag id="FUTURE" /> |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 7105 | </entry> |
Ruben Brunk | 7b9e9bc | 2014-02-06 18:37:48 -0800 | [diff] [blame] | 7106 | <entry name="neutralColorPoint" type="rational" visibility="public" |
| 7107 | optional="true" container="array"> |
| 7108 | <array> |
| 7109 | <size>3</size> |
| 7110 | </array> |
| 7111 | <description> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 7112 | The estimated camera neutral color in the native sensor colorspace at |
| 7113 | the time of capture. |
Ruben Brunk | 7b9e9bc | 2014-02-06 18:37:48 -0800 | [diff] [blame] | 7114 | </description> |
| 7115 | <details> |
Ruben Brunk | 7db06e2 | 2014-04-15 17:43:56 -0700 | [diff] [blame] | 7116 | This value gives the neutral color point encoded as an RGB value in the |
| 7117 | native sensor color space. The neutral color point indicates the |
| 7118 | currently estimated white point of the scene illumination. It can be |
| 7119 | used to interpolate between the provided color transforms when |
| 7120 | processing raw sensor data. |
| 7121 | |
Ruben Brunk | 7b9e9bc | 2014-02-06 18:37:48 -0800 | [diff] [blame] | 7122 | The order of the values is R, G, B; where R is in the lowest index. |
| 7123 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 7124 | <tag id="RAW" /> |
Ruben Brunk | 7b9e9bc | 2014-02-06 18:37:48 -0800 | [diff] [blame] | 7125 | </entry> |
Ruben Brunk | 6a424ff | 2014-07-23 15:13:16 -0700 | [diff] [blame] | 7126 | <entry name="noiseProfile" type="double" visibility="public" |
| 7127 | optional="true" type_notes="Pairs of noise model coefficients" |
| 7128 | container="array" typedef="pairDoubleDouble"> |
| 7129 | <array> |
| 7130 | <size>2</size> |
| 7131 | <size>CFA Channels</size> |
| 7132 | </array> |
| 7133 | <description> |
| 7134 | Noise model coefficients for each CFA mosaic channel. |
| 7135 | </description> |
| 7136 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7137 | This key contains two noise model coefficients for each CFA channel |
Ruben Brunk | 6a424ff | 2014-07-23 15:13:16 -0700 | [diff] [blame] | 7138 | corresponding to the sensor amplification (S) and sensor readout |
| 7139 | 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] | 7140 | in the same order as channels listed for the CFA layout key |
Ruben Brunk | 6a424ff | 2014-07-23 15:13:16 -0700 | [diff] [blame] | 7141 | (see android.sensor.info.colorFilterArrangement). This is |
| 7142 | represented as an array of Pair&lt;Double, Double&gt;, where |
| 7143 | the first member of the Pair at index n is the S coefficient and the |
| 7144 | second member is the O coefficient for the nth color channel in the CFA. |
| 7145 | |
| 7146 | These coefficients are used in a two parameter noise model to describe |
| 7147 | the amount of noise present in the image for each CFA channel. The |
| 7148 | noise model used here is: |
| 7149 | |
| 7150 | N(x) = sqrt(Sx + O) |
| 7151 | |
| 7152 | Where x represents the recorded signal of a CFA channel normalized to |
| 7153 | the range [0, 1], and S and O are the noise model coeffiecients for |
| 7154 | that channel. |
| 7155 | |
| 7156 | A more detailed description of the noise model can be found in the |
| 7157 | Adobe DNG specification for the NoiseProfile tag. |
| 7158 | </details> |
| 7159 | <hal_details> |
| 7160 | For a CFA layout of RGGB, the list of coefficients would be given as |
| 7161 | an array of doubles S0,O0,S1,O1,..., where S0 and O0 are the coefficients |
| 7162 | for the red channel, S1 and O1 are the coefficients for the first green |
| 7163 | channel, etc. |
| 7164 | </hal_details> |
| 7165 | <tag id="RAW" /> |
| 7166 | </entry> |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 7167 | <entry name="profileHueSatMap" type="float" |
Zhijun He | d0f482a | 2014-05-06 16:18:04 -0700 | [diff] [blame] | 7168 | visibility="system" optional="true" |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 7169 | type_notes="Mapping for hue, saturation, and value" |
| 7170 | container="array"> |
| 7171 | <array> |
| 7172 | <size>hue_samples</size> |
| 7173 | <size>saturation_samples</size> |
| 7174 | <size>value_samples</size> |
| 7175 | <size>3</size> |
| 7176 | </array> |
| 7177 | <description> |
| 7178 | A mapping containing a hue shift, saturation scale, and value scale |
| 7179 | for each pixel. |
| 7180 | </description> |
| 7181 | <units> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7182 | The hue shift is given in degrees; saturation and value scale factors are |
| 7183 | unitless and are between 0 and 1 inclusive |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 7184 | </units> |
| 7185 | <details> |
| 7186 | hue_samples, saturation_samples, and value_samples are given in |
| 7187 | android.sensor.profileHueSatMapDimensions. |
| 7188 | |
| 7189 | Each entry of this map contains three floats corresponding to the |
| 7190 | hue shift, saturation scale, and value scale, respectively; where the |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7191 | 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] | 7192 | in nested loop order, with the value divisions in the outer loop, the |
| 7193 | hue divisions in the middle loop, and the saturation divisions in the |
| 7194 | inner loop. All zero input saturation entries are required to have a |
| 7195 | value scale factor of 1.0. |
| 7196 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 7197 | <tag id="RAW" /> |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 7198 | </entry> |
| 7199 | <entry name="profileToneCurve" type="float" |
Zhijun He | d0f482a | 2014-05-06 16:18:04 -0700 | [diff] [blame] | 7200 | visibility="system" optional="true" |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 7201 | type_notes="Samples defining a spline for a tone-mapping curve" |
| 7202 | container="array"> |
| 7203 | <array> |
| 7204 | <size>samples</size> |
| 7205 | <size>2</size> |
| 7206 | </array> |
| 7207 | <description> |
| 7208 | A list of x,y samples defining a tone-mapping curve for gamma adjustment. |
| 7209 | </description> |
| 7210 | <range> |
| 7211 | Each sample has an input range of `[0, 1]` and an output range of |
| 7212 | `[0, 1]`. The first sample is required to be `(0, 0)`, and the last |
| 7213 | sample is required to be `(1, 1)`. |
| 7214 | </range> |
| 7215 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7216 | This key contains a default tone curve that can be applied while |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 7217 | processing the image as a starting point for user adjustments. |
| 7218 | The curve is specified as a list of value pairs in linear gamma. |
| 7219 | The curve is interpolated using a cubic spline. |
| 7220 | </details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 7221 | <tag id="RAW" /> |
Ruben Brunk | 2bebe31 | 2014-02-06 13:04:38 -0800 | [diff] [blame] | 7222 | </entry> |
Ruben Brunk | 6a5fd11 | 2014-02-11 17:55:32 -0800 | [diff] [blame] | 7223 | <entry name="greenSplit" type="float" visibility="public" optional="true"> |
| 7224 | <description> |
| 7225 | The worst-case divergence between Bayer green channels. |
| 7226 | </description> |
| 7227 | <range> |
| 7228 | &gt;= 0 |
| 7229 | </range> |
| 7230 | <details> |
| 7231 | This value is an estimate of the worst case split between the |
| 7232 | Bayer green channels in the red and blue rows in the sensor color |
| 7233 | filter array. |
| 7234 | |
| 7235 | The green split is calculated as follows: |
| 7236 | |
Ruben Brunk | d9d1213 | 2014-03-18 14:37:04 -0700 | [diff] [blame] | 7237 | 1. A 5x5 pixel (or larger) window W within the active sensor array is |
| 7238 | chosen. The term 'pixel' here is taken to mean a group of 4 Bayer |
| 7239 | mosaic channels (R, Gr, Gb, B). The location and size of the window |
| 7240 | chosen is implementation defined, and should be chosen to provide a |
| 7241 | green split estimate that is both representative of the entire image |
| 7242 | for this camera sensor, and can be calculated quickly. |
Ruben Brunk | 6a5fd11 | 2014-02-11 17:55:32 -0800 | [diff] [blame] | 7243 | 1. The arithmetic mean of the green channels from the red |
| 7244 | rows (mean_Gr) within W is computed. |
| 7245 | 1. The arithmetic mean of the green channels from the blue |
| 7246 | rows (mean_Gb) within W is computed. |
| 7247 | 1. The maximum ratio R of the two means is computed as follows: |
| 7248 | `R = max((mean_Gr + 1)/(mean_Gb + 1), (mean_Gb + 1)/(mean_Gr + 1))` |
| 7249 | |
| 7250 | The ratio R is the green split divergence reported for this property, |
| 7251 | which represents how much the green channels differ in the mosaic |
| 7252 | pattern. This value is typically used to determine the treatment of |
| 7253 | the green mosaic channels when demosaicing. |
| 7254 | |
| 7255 | The green split value can be roughly interpreted as follows: |
| 7256 | |
| 7257 | * R &lt; 1.03 is a negligible split (&lt;3% divergence). |
| 7258 | * 1.20 &lt;= R &gt;= 1.03 will require some software |
| 7259 | correction to avoid demosaic errors (3-20% divergence). |
| 7260 | * R &gt; 1.20 will require strong software correction to produce |
| 7261 | a usuable image (&gt;20% divergence). |
| 7262 | </details> |
Ruben Brunk | d9d1213 | 2014-03-18 14:37:04 -0700 | [diff] [blame] | 7263 | <hal_details> |
| 7264 | The green split given may be a static value based on prior |
| 7265 | characterization of the camera sensor using the green split |
| 7266 | calculation method given here over a large, representative, sample |
| 7267 | set of images. Other methods of calculation that produce equivalent |
| 7268 | results, and can be interpreted in the same manner, may be used. |
| 7269 | </hal_details> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 7270 | <tag id="RAW" /> |
Ruben Brunk | 6a5fd11 | 2014-02-11 17:55:32 -0800 | [diff] [blame] | 7271 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7272 | </dynamic> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 7273 | <controls> |
| 7274 | <entry name="testPatternData" type="int32" visibility="public" optional="true" container="array"> |
| 7275 | <array> |
| 7276 | <size>4</size> |
| 7277 | </array> |
| 7278 | <description> |
| 7279 | A pixel `[R, G_even, G_odd, B]` that supplies the test pattern |
| 7280 | when android.sensor.testPatternMode is SOLID_COLOR. |
| 7281 | </description> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 7282 | <details> |
| 7283 | Each color channel is treated as an unsigned 32-bit integer. |
| 7284 | The camera device then uses the most significant X bits |
| 7285 | that correspond to how many bits are in its Bayer raw sensor |
| 7286 | output. |
| 7287 | |
| 7288 | For example, a sensor with RAW10 Bayer output would use the |
| 7289 | 10 most significant bits from each color channel. |
| 7290 | </details> |
| 7291 | <hal_details> |
| 7292 | </hal_details> |
| 7293 | </entry> |
| 7294 | <entry name="testPatternMode" type="int32" visibility="public" optional="true" |
| 7295 | enum="true"> |
| 7296 | <enum> |
| 7297 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7298 | <notes>No test pattern mode is used, and the camera |
| 7299 | device returns captures from the image sensor. |
| 7300 | |
| 7301 | This is the default if the key is not set.</notes> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 7302 | </value> |
| 7303 | <value>SOLID_COLOR |
| 7304 | <notes> |
| 7305 | Each pixel in `[R, G_even, G_odd, B]` is replaced by its |
| 7306 | respective color channel provided in |
| 7307 | android.sensor.testPatternData. |
| 7308 | |
| 7309 | For example: |
| 7310 | |
| 7311 | android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0] |
| 7312 | |
| 7313 | All green pixels are 100% green. All red/blue pixels are black. |
| 7314 | |
| 7315 | android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0] |
| 7316 | |
| 7317 | All red pixels are 100% red. Only the odd green pixels |
| 7318 | are 100% green. All blue pixels are 100% black. |
| 7319 | </notes> |
| 7320 | </value> |
| 7321 | <value>COLOR_BARS |
| 7322 | <notes> |
| 7323 | All pixel data is replaced with an 8-bar color pattern. |
| 7324 | |
| 7325 | The vertical bars (left-to-right) are as follows: |
| 7326 | |
| 7327 | * 100% white |
| 7328 | * yellow |
| 7329 | * cyan |
| 7330 | * green |
| 7331 | * magenta |
| 7332 | * red |
| 7333 | * blue |
| 7334 | * black |
| 7335 | |
| 7336 | In general the image would look like the following: |
| 7337 | |
| 7338 | W Y C G M R B K |
| 7339 | W Y C G M R B K |
| 7340 | W Y C G M R B K |
| 7341 | W Y C G M R B K |
| 7342 | W Y C G M R B K |
| 7343 | . . . . . . . . |
| 7344 | . . . . . . . . |
| 7345 | . . . . . . . . |
| 7346 | |
| 7347 | (B = Blue, K = Black) |
| 7348 | |
| 7349 | Each bar should take up 1/8 of the sensor pixel array width. |
| 7350 | When this is not possible, the bar size should be rounded |
| 7351 | down to the nearest integer and the pattern can repeat |
| 7352 | on the right side. |
| 7353 | |
| 7354 | Each bar's height must always take up the full sensor |
| 7355 | pixel array height. |
| 7356 | |
| 7357 | Each pixel in this test pattern must be set to either |
| 7358 | 0% intensity or 100% intensity. |
| 7359 | </notes> |
| 7360 | </value> |
| 7361 | <value>COLOR_BARS_FADE_TO_GRAY |
| 7362 | <notes> |
| 7363 | The test pattern is similar to COLOR_BARS, except that |
| 7364 | each bar should start at its specified color at the top, |
| 7365 | and fade to gray at the bottom. |
| 7366 | |
| 7367 | Furthermore each bar is further subdivided into a left and |
| 7368 | right half. The left half should have a smooth gradient, |
| 7369 | and the right half should have a quantized gradient. |
| 7370 | |
| 7371 | In particular, the right half's should consist of blocks of the |
| 7372 | same color for 1/16th active sensor pixel array width. |
| 7373 | |
| 7374 | The least significant bits in the quantized gradient should |
| 7375 | be copied from the most significant bits of the smooth gradient. |
| 7376 | |
| 7377 | The height of each bar should always be a multiple of 128. |
| 7378 | When this is not the case, the pattern should repeat at the bottom |
| 7379 | of the image. |
| 7380 | </notes> |
| 7381 | </value> |
| 7382 | <value>PN9 |
| 7383 | <notes> |
| 7384 | All pixel data is replaced by a pseudo-random sequence |
| 7385 | generated from a PN9 512-bit sequence (typically implemented |
| 7386 | in hardware with a linear feedback shift register). |
| 7387 | |
| 7388 | The generator should be reset at the beginning of each frame, |
| 7389 | and thus each subsequent raw frame with this test pattern should |
| 7390 | be exactly the same as the last. |
| 7391 | </notes> |
| 7392 | </value> |
| 7393 | <value id="256">CUSTOM1 |
| 7394 | <notes>The first custom test pattern. All custom patterns that are |
| 7395 | available only on this camera device are at least this numeric |
| 7396 | value. |
| 7397 | |
| 7398 | All of the custom test patterns will be static |
| 7399 | (that is the raw image must not vary from frame to frame). |
| 7400 | </notes> |
| 7401 | </value> |
| 7402 | </enum> |
| 7403 | <description>When enabled, the sensor sends a test pattern instead of |
| 7404 | doing a real exposure from the camera. |
| 7405 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7406 | <range>android.sensor.availableTestPatternModes</range> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 7407 | <details> |
| 7408 | When a test pattern is enabled, all manual sensor controls specified |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7409 | by android.sensor.* will be ignored. All other controls should |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 7410 | work as normal. |
| 7411 | |
| 7412 | For example, if manual flash is enabled, flash firing should still |
| 7413 | occur (and that the test pattern remain unmodified, since the flash |
| 7414 | would not actually affect it). |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7415 | |
| 7416 | Defaults to OFF. |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 7417 | </details> |
| 7418 | <hal_details> |
| 7419 | All test patterns are specified in the Bayer domain. |
| 7420 | |
| 7421 | The HAL may choose to substitute test patterns from the sensor |
| 7422 | with test patterns from on-device memory. In that case, it should be |
| 7423 | indistinguishable to the ISP whether the data came from the |
| 7424 | sensor interconnect bus (such as CSI2) or memory. |
| 7425 | </hal_details> |
| 7426 | </entry> |
| 7427 | </controls> |
| 7428 | <dynamic> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 7429 | <clone entry="android.sensor.testPatternData" kind="controls"> |
| 7430 | </clone> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 7431 | <clone entry="android.sensor.testPatternMode" kind="controls"> |
| 7432 | </clone> |
| 7433 | </dynamic> |
| 7434 | <static> |
Zhijun He | 29a973d | 2014-03-27 23:54:16 -0700 | [diff] [blame] | 7435 | <entry name="availableTestPatternModes" type="int32" visibility="public" optional="true" |
| 7436 | type_notes="list of enums" container="array"> |
| 7437 | <array> |
| 7438 | <size>n</size> |
| 7439 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7440 | <description>List of sensor test pattern modes for android.sensor.testPatternMode |
| 7441 | supported by this camera device. |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 7442 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7443 | <range>Any value listed in android.sensor.testPatternMode</range> |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 7444 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7445 | Defaults to OFF, and always includes OFF if defined. |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 7446 | </details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7447 | <hal_details> |
| 7448 | All custom modes must be >= CUSTOM1. |
| 7449 | </hal_details> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 7450 | </entry> |
Igor Murashkin | a46e02f | 2014-01-09 17:43:38 -0800 | [diff] [blame] | 7451 | </static> |
Zhijun He | cc5cfdc | 2014-06-11 10:44:53 -0700 | [diff] [blame] | 7452 | <dynamic> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7453 | <entry name="rollingShutterSkew" type="int64" visibility="public" hwlevel="limited"> |
Zhijun He | cc5cfdc | 2014-06-11 10:44:53 -0700 | [diff] [blame] | 7454 | <description>Duration between the start of first row exposure |
| 7455 | and the start of last row exposure.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7456 | <units>Nanoseconds</units> |
Zhijun He | cc5cfdc | 2014-06-11 10:44:53 -0700 | [diff] [blame] | 7457 | <range> &gt;= 0 and &lt; |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 7458 | {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration}.</range> |
Zhijun He | cc5cfdc | 2014-06-11 10:44:53 -0700 | [diff] [blame] | 7459 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7460 | This is the exposure time skew between the first and last |
| 7461 | row exposure start times. The first row and the last row are |
| 7462 | the first and last rows inside of the |
| 7463 | android.sensor.info.activeArraySize. |
Zhijun He | cc5cfdc | 2014-06-11 10:44:53 -0700 | [diff] [blame] | 7464 | |
| 7465 | For typical camera sensors that use rolling shutters, this is also equivalent |
| 7466 | to the frame readout time. |
| 7467 | </details> |
| 7468 | <hal_details> |
| 7469 | The HAL must report `0` if the sensor is using global shutter, where all pixels begin |
| 7470 | exposure at the same time. |
| 7471 | </hal_details> |
| 7472 | <tag id="V1" /> |
| 7473 | </entry> |
| 7474 | </dynamic> |
Zhijun He | d363a12 | 2015-11-12 17:27:27 -0800 | [diff] [blame] | 7475 | <static> |
| 7476 | <entry name="opticalBlackRegions" type="int32" visibility="public" optional="true" |
| 7477 | container="array" typedef="rectangle"> |
| 7478 | <array> |
| 7479 | <size>4</size> |
| 7480 | <size>num_regions</size> |
| 7481 | </array> |
| 7482 | <description>List of disjoint rectangles indicating the sensor |
| 7483 | optically shielded black pixel regions. |
| 7484 | </description> |
| 7485 | <details> |
| 7486 | In most camera sensors, the active array is surrounded by some |
| 7487 | optically shielded pixel areas. By blocking light, these pixels |
| 7488 | provides a reliable black reference for black level compensation |
| 7489 | in active array region. |
| 7490 | |
| 7491 | This key provides a list of disjoint rectangles specifying the |
| 7492 | regions of optically shielded (with metal shield) black pixel |
| 7493 | regions if the camera device is capable of reading out these black |
| 7494 | pixels in the output raw images. In comparison to the fixed black |
| 7495 | level values reported by android.sensor.blackLevelPattern, this key |
| 7496 | may provide a more accurate way for the application to calculate |
| 7497 | black level of each captured raw images. |
| 7498 | |
| 7499 | When this key is reported, the android.sensor.dynamicBlackLevel and |
| 7500 | android.sensor.dynamicWhiteLevel will also be reported. |
| 7501 | </details> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 7502 | <ndk_details> |
| 7503 | The data representation is `int[4]`, which maps to `(left, top, width, height)`. |
| 7504 | </ndk_details> |
Zhijun He | d363a12 | 2015-11-12 17:27:27 -0800 | [diff] [blame] | 7505 | <hal_details> |
| 7506 | This array contains (xmin, ymin, width, height). The (xmin, ymin) |
| 7507 | must be &gt;= (0,0) and &lt;= |
| 7508 | android.sensor.info.pixelArraySize. The (width, height) must be |
| 7509 | &lt;= android.sensor.info.pixelArraySize. Each region must be |
| 7510 | outside the region reported by |
| 7511 | android.sensor.info.preCorrectionActiveArraySize. |
| 7512 | |
| 7513 | The HAL must report minimal number of disjoint regions for the |
| 7514 | optically shielded back pixel regions. For example, if a region can |
| 7515 | be covered by one rectangle, the HAL must not split this region into |
| 7516 | multiple rectangles. |
| 7517 | </hal_details> |
| 7518 | </entry> |
| 7519 | </static> |
| 7520 | <dynamic> |
Zhijun He | 88f2ffd | 2015-11-24 14:24:52 -0800 | [diff] [blame] | 7521 | <entry name="dynamicBlackLevel" type="float" visibility="public" |
| 7522 | optional="true" type_notes="2x2 raw count block" container="array"> |
Zhijun He | d363a12 | 2015-11-12 17:27:27 -0800 | [diff] [blame] | 7523 | <array> |
| 7524 | <size>4</size> |
| 7525 | </array> |
| 7526 | <description> |
| 7527 | A per-frame dynamic black level offset for each of the color filter |
| 7528 | arrangement (CFA) mosaic channels. |
| 7529 | </description> |
| 7530 | <range>&gt;= 0 for each.</range> |
| 7531 | <details> |
| 7532 | Camera sensor black levels may vary dramatically for different |
| 7533 | capture settings (e.g. android.sensor.sensitivity). The fixed black |
| 7534 | level reported by android.sensor.blackLevelPattern may be too |
| 7535 | inaccurate to represent the actual value on a per-frame basis. The |
| 7536 | camera device internal pipeline relies on reliable black level values |
| 7537 | to process the raw images appropriately. To get the best image |
| 7538 | quality, the camera device may choose to estimate the per frame black |
| 7539 | level values either based on optically shielded black regions |
| 7540 | (android.sensor.opticalBlackRegions) or its internal model. |
| 7541 | |
| 7542 | This key reports the camera device estimated per-frame zero light |
| 7543 | value for each of the CFA mosaic channels in the camera sensor. The |
| 7544 | android.sensor.blackLevelPattern may only represent a coarse |
| 7545 | approximation of the actual black level values. This value is the |
| 7546 | black level used in camera device internal image processing pipeline |
| 7547 | and generally more accurate than the fixed black level values. |
| 7548 | However, since they are estimated values by the camera device, they |
| 7549 | may not be as accurate as the black level values calculated from the |
| 7550 | optical black pixels reported by android.sensor.opticalBlackRegions. |
| 7551 | |
| 7552 | The values are given in the same order as channels listed for the CFA |
| 7553 | layout key (see android.sensor.info.colorFilterArrangement), i.e. the |
| 7554 | nth value given corresponds to the black level offset for the nth |
| 7555 | color channel listed in the CFA. |
| 7556 | |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 7557 | This key will be available if android.sensor.opticalBlackRegions is available or the |
| 7558 | camera device advertises this key via {@link |
| 7559 | android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys|ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}. |
Zhijun He | d363a12 | 2015-11-12 17:27:27 -0800 | [diff] [blame] | 7560 | </details> |
| 7561 | <hal_details> |
| 7562 | The values are given in row-column scan order, with the first value |
| 7563 | corresponding to the element of the CFA in row=0, column=0. |
| 7564 | </hal_details> |
| 7565 | <tag id="RAW" /> |
| 7566 | </entry> |
Zhijun He | 88f2ffd | 2015-11-24 14:24:52 -0800 | [diff] [blame] | 7567 | <entry name="dynamicWhiteLevel" type="int32" visibility="public" |
| 7568 | optional="true" > |
Zhijun He | d363a12 | 2015-11-12 17:27:27 -0800 | [diff] [blame] | 7569 | <description> |
| 7570 | Maximum raw value output by sensor for this frame. |
| 7571 | </description> |
| 7572 | <range> &gt;= 0</range> |
| 7573 | <details> |
Eino-Ville Talvala | 1f883d4 | 2016-04-04 10:47:43 -0700 | [diff] [blame] | 7574 | Since the android.sensor.blackLevelPattern may change for different |
Zhijun He | d363a12 | 2015-11-12 17:27:27 -0800 | [diff] [blame] | 7575 | capture settings (e.g., android.sensor.sensitivity), the white |
| 7576 | level will change accordingly. This key is similar to |
| 7577 | android.sensor.info.whiteLevel, but specifies the camera device |
| 7578 | estimated white level for each frame. |
| 7579 | |
| 7580 | This key will be available if android.sensor.opticalBlackRegions is |
| 7581 | available or the camera device advertises this key via |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 7582 | {@link android.hardware.camera2.CameraCharacteristics#getAvailableCaptureRequestKeys|ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}. |
Zhijun He | d363a12 | 2015-11-12 17:27:27 -0800 | [diff] [blame] | 7583 | </details> |
| 7584 | <hal_details> |
| 7585 | The full bit depth of the sensor must be available in the raw data, |
| 7586 | so the value for linear sensors should not be significantly lower |
| 7587 | than maximum raw value supported, i.e. 2^(sensor bits per pixel). |
| 7588 | </hal_details> |
| 7589 | <tag id="RAW" /> |
| 7590 | </entry> |
| 7591 | </dynamic> |
Yin-Chia Yeh | 366da5b | 2015-12-06 21:42:35 -0800 | [diff] [blame] | 7592 | <static> |
| 7593 | <entry name="opaqueRawSize" type="int32" visibility="system" container="array"> |
| 7594 | <array> |
| 7595 | <size>n</size> |
| 7596 | <size>3</size> |
| 7597 | </array> |
| 7598 | <description>Size in bytes for all the listed opaque RAW buffer sizes</description> |
| 7599 | <range>Must be large enough to fit the opaque RAW of corresponding size produced by |
| 7600 | the camera</range> |
| 7601 | <details> |
| 7602 | This configurations are listed as `(width, height, size_in_bytes)` tuples. |
| 7603 | This is used for sizing the gralloc buffers for opaque RAW buffers. |
| 7604 | All RAW_OPAQUE output stream configuration listed in |
| 7605 | android.scaler.availableStreamConfigurations will have a corresponding tuple in |
| 7606 | this key. |
| 7607 | </details> |
| 7608 | <hal_details> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 7609 | This key is added in legacy HAL3.4. |
| 7610 | |
| 7611 | For legacy HAL3.4 or above: devices advertising RAW_OPAQUE format output must list this |
| 7612 | key. For legacy HAL3.3 or earlier devices: if RAW_OPAQUE ouput is advertised, camera |
| 7613 | framework will derive this key by assuming each pixel takes two bytes and no padding bytes |
| 7614 | between rows. |
Yin-Chia Yeh | 366da5b | 2015-12-06 21:42:35 -0800 | [diff] [blame] | 7615 | </hal_details> |
| 7616 | </entry> |
| 7617 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7618 | </section> |
| 7619 | <section name="shading"> |
| 7620 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7621 | <entry name="mode" type="byte" visibility="public" enum="true" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7622 | <enum> |
| 7623 | <value>OFF |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7624 | <notes>No lens shading correction is applied.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7625 | <value>FAST |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7626 | <notes>Apply lens shading corrections, without slowing |
| 7627 | frame rate relative to sensor raw output</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7628 | <value>HIGH_QUALITY |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7629 | <notes>Apply high-quality lens shading correction, at the |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 7630 | cost of possibly reduced frame rate.</notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7631 | </enum> |
| 7632 | <description>Quality of lens shading correction applied |
Zhijun He | 2f86a21 | 2014-01-15 10:34:02 -0800 | [diff] [blame] | 7633 | to the image data.</description> |
Yin-Chia Yeh | d7dcb74 | 2015-02-04 10:04:37 -0800 | [diff] [blame] | 7634 | <range>android.shading.availableModes</range> |
Zhijun He | 2f86a21 | 2014-01-15 10:34:02 -0800 | [diff] [blame] | 7635 | <details> |
| 7636 | When set to OFF mode, no lens shading correction will be applied by the |
| 7637 | camera device, and an identity lens shading map data will be provided |
| 7638 | if `android.statistics.lensShadingMapMode == ON`. For example, for lens |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7639 | shading map with size of `[ 4, 3 ]`, |
| 7640 | the output android.statistics.lensShadingCorrectionMap for this case will be an identity |
| 7641 | map shown below: |
Zhijun He | 2f86a21 | 2014-01-15 10:34:02 -0800 | [diff] [blame] | 7642 | |
| 7643 | [ 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] | 7644 | 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, |
| 7645 | 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, |
| 7646 | 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, |
| 7647 | 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, |
| 7648 | 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] | 7649 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7650 | When set to other modes, lens shading correction will be applied by the camera |
| 7651 | device. Applications can request lens shading map data by setting |
| 7652 | android.statistics.lensShadingMapMode to ON, and then the camera device will provide lens |
| 7653 | shading map data in android.statistics.lensShadingCorrectionMap; the returned shading map |
| 7654 | 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] | 7655 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7656 | The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore |
| 7657 | the reliability of the map data may be affected by the AE and AWB algorithms. When AE and |
| 7658 | AWB are in AUTO modes(android.control.aeMode `!=` OFF and android.control.awbMode `!=` |
| 7659 | OFF), to get best results, it is recommended that the applications wait for the AE and AWB |
| 7660 | to be converged before using the returned shading map data. |
Zhijun He | 2f86a21 | 2014-01-15 10:34:02 -0800 | [diff] [blame] | 7661 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7662 | </entry> |
| 7663 | <entry name="strength" type="byte"> |
| 7664 | <description>Control the amount of shading correction |
| 7665 | applied to the images</description> |
| 7666 | <units>unitless: 1-10; 10 is full shading |
| 7667 | compensation</units> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7668 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7669 | </entry> |
| 7670 | </controls> |
| 7671 | <dynamic> |
| 7672 | <clone entry="android.shading.mode" kind="controls"> |
| 7673 | </clone> |
| 7674 | </dynamic> |
Yin-Chia Yeh | d7dcb74 | 2015-02-04 10:04:37 -0800 | [diff] [blame] | 7675 | <static> |
| 7676 | <entry name="availableModes" type="byte" visibility="public" |
| 7677 | type_notes="List of enums (android.shading.mode)." container="array" |
| 7678 | typedef="enumList" hwlevel="legacy"> |
| 7679 | <array> |
| 7680 | <size>n</size> |
| 7681 | </array> |
| 7682 | <description> |
| 7683 | List of lens shading modes for android.shading.mode that are supported by this camera device. |
| 7684 | </description> |
| 7685 | <range>Any value listed in android.shading.mode</range> |
| 7686 | <details> |
| 7687 | This list contains lens shading modes that can be set for the camera device. |
| 7688 | Camera devices that support the MANUAL_POST_PROCESSING capability will always |
| 7689 | list OFF and FAST mode. This includes all FULL level devices. |
| 7690 | LEGACY devices will always only support FAST mode. |
| 7691 | </details> |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 7692 | <hal_details> |
| 7693 | HAL must support both FAST and HIGH_QUALITY if lens shading correction control is |
| 7694 | available on the camera device, but the underlying implementation can be the same for |
| 7695 | both modes. That is, if the highest quality implementation on the camera device does not |
| 7696 | slow down capture rate, then FAST and HIGH_QUALITY will generate the same output. |
| 7697 | </hal_details> |
Yin-Chia Yeh | d7dcb74 | 2015-02-04 10:04:37 -0800 | [diff] [blame] | 7698 | </entry> |
| 7699 | </static> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7700 | </section> |
| 7701 | <section name="statistics"> |
| 7702 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7703 | <entry name="faceDetectMode" type="byte" visibility="public" enum="true" |
| 7704 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7705 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7706 | <value>OFF |
| 7707 | <notes>Do not include face detection statistics in capture |
| 7708 | results.</notes></value> |
| 7709 | <value optional="true">SIMPLE |
| 7710 | <notes>Return face rectangle and confidence values only. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7711 | </notes></value> |
| 7712 | <value optional="true">FULL |
| 7713 | <notes>Return all face |
| 7714 | metadata. |
| 7715 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7716 | 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] | 7717 | </notes></value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7718 | </enum> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7719 | <description>Operating mode for the face detector |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 7720 | unit.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7721 | <range>android.statistics.info.availableFaceDetectModes</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 7722 | <details>Whether face detection is enabled, and whether it |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 7723 | should output just the basic fields or the full set of |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7724 | fields.</details> |
| 7725 | <hal_details> |
| 7726 | SIMPLE mode must fill in android.statistics.faceRectangles and |
| 7727 | android.statistics.faceScores. |
| 7728 | FULL mode must also fill in android.statistics.faceIds, and |
| 7729 | android.statistics.faceLandmarks. |
| 7730 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7731 | <tag id="BC" /> |
| 7732 | </entry> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 7733 | <entry name="histogramMode" type="byte" enum="true" typedef="boolean"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7734 | <enum> |
| 7735 | <value>OFF</value> |
| 7736 | <value>ON</value> |
| 7737 | </enum> |
| 7738 | <description>Operating mode for histogram |
| 7739 | generation</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7740 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7741 | </entry> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 7742 | <entry name="sharpnessMapMode" type="byte" enum="true" typedef="boolean"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7743 | <enum> |
| 7744 | <value>OFF</value> |
| 7745 | <value>ON</value> |
| 7746 | </enum> |
| 7747 | <description>Operating mode for sharpness map |
| 7748 | generation</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7749 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7750 | </entry> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7751 | <entry name="hotPixelMapMode" type="byte" visibility="public" enum="true" |
| 7752 | typedef="boolean"> |
| 7753 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7754 | <value>OFF |
| 7755 | <notes>Hot pixel map production is disabled. |
| 7756 | </notes></value> |
| 7757 | <value>ON |
| 7758 | <notes>Hot pixel map production is enabled. |
| 7759 | </notes></value> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7760 | </enum> |
| 7761 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7762 | Operating mode for hot pixel map generation. |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7763 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7764 | <range>android.statistics.info.availableHotPixelMapModes</range> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7765 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7766 | If set to `true`, a hot pixel map is returned in android.statistics.hotPixelMap. |
| 7767 | If set to `false`, no hot pixel map will be returned. |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7768 | </details> |
| 7769 | <tag id="V1" /> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 7770 | <tag id="RAW" /> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7771 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7772 | </controls> |
| 7773 | <static> |
| 7774 | <namespace name="info"> |
| 7775 | <entry name="availableFaceDetectModes" type="byte" |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 7776 | visibility="public" |
| 7777 | type_notes="List of enums from android.statistics.faceDetectMode" |
Eino-Ville Talvala | aebc8c2 | 2014-05-27 10:50:30 -0700 | [diff] [blame] | 7778 | container="array" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7779 | typedef="enumList" |
| 7780 | hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7781 | <array> |
| 7782 | <size>n</size> |
| 7783 | </array> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7784 | <description>List of face detection modes for android.statistics.faceDetectMode that are |
| 7785 | supported by this camera device. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7786 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7787 | <range>Any value listed in android.statistics.faceDetectMode</range> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7788 | <details>OFF is always supported. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 7789 | </details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7790 | </entry> |
| 7791 | <entry name="histogramBucketCount" type="int32"> |
| 7792 | <description>Number of histogram buckets |
| 7793 | supported</description> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 7794 | <range>&gt;= 64</range> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7795 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7796 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7797 | <entry name="maxFaceCount" type="int32" visibility="public" hwlevel="legacy"> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7798 | <description>The maximum number of simultaneously detectable |
| 7799 | faces.</description> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7800 | <range>0 for cameras without available face detection; otherwise: |
| 7801 | `>=4` for LIMITED or FULL hwlevel devices or |
| 7802 | `>0` for LEGACY devices.</range> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7803 | <tag id="BC" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7804 | </entry> |
| 7805 | <entry name="maxHistogramCount" type="int32"> |
| 7806 | <description>Maximum value possible for a histogram |
| 7807 | bucket</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7808 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7809 | </entry> |
| 7810 | <entry name="maxSharpnessMapValue" type="int32"> |
| 7811 | <description>Maximum value possible for a sharpness map |
| 7812 | region.</description> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7813 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7814 | </entry> |
| 7815 | <entry name="sharpnessMapSize" type="int32" |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 7816 | type_notes="width x height" container="array" typedef="size"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7817 | <array> |
| 7818 | <size>2</size> |
| 7819 | </array> |
| 7820 | <description>Dimensions of the sharpness |
| 7821 | map</description> |
| 7822 | <range>Must be at least 32 x 32</range> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7823 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7824 | </entry> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7825 | <entry name="availableHotPixelMapModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7826 | type_notes="list of enums" container="array" typedef="boolean"> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7827 | <array> |
| 7828 | <size>n</size> |
| 7829 | </array> |
| 7830 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7831 | List of hot pixel map output modes for android.statistics.hotPixelMapMode that are |
| 7832 | supported by this camera device. |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7833 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7834 | <range>Any value listed in android.statistics.hotPixelMapMode</range> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7835 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7836 | If no hotpixel map output is available for this camera device, this will contain only |
| 7837 | `false`. |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7838 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7839 | ON is always supported on devices with the RAW capability. |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7840 | </details> |
| 7841 | <tag id="V1" /> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 7842 | <tag id="RAW" /> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 7843 | </entry> |
Yin-Chia Yeh | d7dcb74 | 2015-02-04 10:04:37 -0800 | [diff] [blame] | 7844 | <entry name="availableLensShadingMapModes" type="byte" visibility="public" |
Yin-Chia Yeh | de1da61 | 2015-05-22 16:36:25 -0700 | [diff] [blame] | 7845 | type_notes="list of enums" container="array" typedef="enumList"> |
Yin-Chia Yeh | d7dcb74 | 2015-02-04 10:04:37 -0800 | [diff] [blame] | 7846 | <array> |
| 7847 | <size>n</size> |
| 7848 | </array> |
| 7849 | <description> |
| 7850 | List of lens shading map output modes for android.statistics.lensShadingMapMode that |
| 7851 | are supported by this camera device. |
| 7852 | </description> |
| 7853 | <range>Any value listed in android.statistics.lensShadingMapMode</range> |
| 7854 | <details> |
| 7855 | If no lens shading map output is available for this camera device, this key will |
| 7856 | contain only OFF. |
| 7857 | |
| 7858 | ON is always supported on devices with the RAW capability. |
| 7859 | LEGACY mode devices will always only support OFF. |
| 7860 | </details> |
| 7861 | </entry> |
Chien-Yu Chen | 2560d4f | 2018-01-12 17:38:00 -0800 | [diff] [blame] | 7862 | <entry name="availableOisDataModes" type="byte" visibility="public" |
| 7863 | type_notes="list of enums" container="array" typedef="enumList" hal_version="3.3"> |
| 7864 | <array> |
| 7865 | <size>n</size> |
| 7866 | </array> |
| 7867 | <description> |
| 7868 | List of OIS data output modes for android.statistics.oisDataMode that |
| 7869 | are supported by this camera device. |
| 7870 | </description> |
| 7871 | <range>Any value listed in android.statistics.oisDataMode</range> |
| 7872 | <details> |
| 7873 | If no OIS data output is available for this camera device, this key will |
| 7874 | contain only OFF. |
| 7875 | </details> |
| 7876 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7877 | </namespace> |
| 7878 | </static> |
| 7879 | <dynamic> |
| 7880 | <clone entry="android.statistics.faceDetectMode" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7881 | kind="controls"></clone> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 7882 | <entry name="faceIds" type="int32" visibility="ndk_public" |
| 7883 | container="array" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7884 | <array> |
| 7885 | <size>n</size> |
| 7886 | </array> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7887 | <description>List of unique IDs for detected faces.</description> |
| 7888 | <details> |
| 7889 | Each detected face is given a unique ID that is valid for as long as the face is visible |
| 7890 | to the camera device. A face that leaves the field of view and later returns may be |
| 7891 | assigned a new ID. |
| 7892 | |
| 7893 | Only available if android.statistics.faceDetectMode == FULL</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7894 | <tag id="BC" /> |
| 7895 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 7896 | <entry name="faceLandmarks" type="int32" visibility="ndk_public" |
| 7897 | type_notes="(leftEyeX, leftEyeY, rightEyeX, rightEyeY, mouthX, mouthY)" |
| 7898 | container="array" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7899 | <array> |
| 7900 | <size>n</size> |
| 7901 | <size>6</size> |
| 7902 | </array> |
| 7903 | <description>List of landmarks for detected |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7904 | faces.</description> |
| 7905 | <details> |
| 7906 | The coordinate system is that of android.sensor.info.activeArraySize, with |
| 7907 | `(0, 0)` being the top-left pixel of the active array. |
| 7908 | |
| 7909 | Only available if android.statistics.faceDetectMode == FULL</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7910 | <tag id="BC" /> |
| 7911 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 7912 | <entry name="faceRectangles" type="int32" visibility="ndk_public" |
| 7913 | type_notes="(xmin, ymin, xmax, ymax). (0,0) is top-left of active pixel area" |
| 7914 | container="array" typedef="rectangle" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7915 | <array> |
| 7916 | <size>n</size> |
| 7917 | <size>4</size> |
| 7918 | </array> |
| 7919 | <description>List of the bounding rectangles for detected |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7920 | faces.</description> |
| 7921 | <details> |
| 7922 | The coordinate system is that of android.sensor.info.activeArraySize, with |
| 7923 | `(0, 0)` being the top-left pixel of the active array. |
| 7924 | |
| 7925 | Only available if android.statistics.faceDetectMode != OFF</details> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 7926 | <ndk_details> |
| 7927 | The data representation is `int[4]`, which maps to `(left, top, width, height)`. |
| 7928 | </ndk_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7929 | <tag id="BC" /> |
| 7930 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 7931 | <entry name="faceScores" type="byte" visibility="ndk_public" |
| 7932 | container="array" hwlevel="legacy"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7933 | <array> |
| 7934 | <size>n</size> |
| 7935 | </array> |
| 7936 | <description>List of the face confidence scores for |
| 7937 | detected faces</description> |
Zhijun He | 59ccb1e | 2013-10-02 14:06:15 -0700 | [diff] [blame] | 7938 | <range>1-100</range> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 7939 | <details>Only available if android.statistics.faceDetectMode != OFF. |
| 7940 | </details> |
| 7941 | <hal_details> |
| 7942 | The value should be meaningful (for example, setting 100 at |
| 7943 | all times is illegal).</hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7944 | <tag id="BC" /> |
| 7945 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 7946 | <entry name="faces" type="int32" visibility="java_public" synthetic="true" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7947 | container="array" typedef="face" hwlevel="legacy"> |
Igor Murashkin | efff0de | 2014-05-14 17:30:49 -0700 | [diff] [blame] | 7948 | <array> |
| 7949 | <size>n</size> |
| 7950 | </array> |
| 7951 | <description>List of the faces detected through camera face detection |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 7952 | in this capture.</description> |
Igor Murashkin | efff0de | 2014-05-14 17:30:49 -0700 | [diff] [blame] | 7953 | <details> |
| 7954 | Only available if android.statistics.faceDetectMode `!=` OFF. |
| 7955 | </details> |
| 7956 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7957 | <entry name="histogram" type="int32" |
| 7958 | type_notes="count of pixels for each color channel that fall into each histogram bucket, scaled to be between 0 and maxHistogramCount" |
| 7959 | container="array"> |
| 7960 | <array> |
| 7961 | <size>n</size> |
| 7962 | <size>3</size> |
| 7963 | </array> |
| 7964 | <description>A 3-channel histogram based on the raw |
| 7965 | sensor data</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 7966 | <details>The k'th bucket (0-based) covers the input range |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7967 | (with w = android.sensor.info.whiteLevel) of [ k * w/N, |
| 7968 | (k + 1) * w / N ). If only a monochrome sharpness map is |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 7969 | supported, all channels should have the same data</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7970 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7971 | </entry> |
| 7972 | <clone entry="android.statistics.histogramMode" |
| 7973 | kind="controls"></clone> |
| 7974 | <entry name="sharpnessMap" type="int32" |
| 7975 | type_notes="estimated sharpness for each region of the input image. Normalized to be between 0 and maxSharpnessMapValue. Higher values mean sharper (better focused)" |
| 7976 | container="array"> |
| 7977 | <array> |
| 7978 | <size>n</size> |
| 7979 | <size>m</size> |
| 7980 | <size>3</size> |
| 7981 | </array> |
| 7982 | <description>A 3-channel sharpness map, based on the raw |
| 7983 | sensor data</description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 7984 | <details>If only a monochrome sharpness map is supported, |
| 7985 | all channels should have the same data</details> |
Zhijun He | 66e62a4 | 2014-05-23 11:02:34 -0700 | [diff] [blame] | 7986 | <tag id="FUTURE" /> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 7987 | </entry> |
| 7988 | <clone entry="android.statistics.sharpnessMapMode" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7989 | kind="controls"></clone> |
Eino-Ville Talvala | d089ee6 | 2016-06-02 14:15:56 -0700 | [diff] [blame] | 7990 | <entry name="lensShadingCorrectionMap" type="byte" visibility="java_public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 7991 | typedef="lensShadingMap" hwlevel="full"> |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 7992 | <description>The shading map is a low-resolution floating-point map |
| 7993 | that lists the coefficients used to correct for vignetting, for each |
| 7994 | Bayer color channel.</description> |
| 7995 | <range>Each gain factor is &gt;= 1</range> |
Eino-Ville Talvala | d089ee6 | 2016-06-02 14:15:56 -0700 | [diff] [blame] | 7996 | <details> |
| 7997 | The map provided here is the same map that is used by the camera device to |
| 7998 | correct both color shading and vignetting for output non-RAW images. |
| 7999 | |
| 8000 | When there is no lens shading correction applied to RAW |
| 8001 | output images (android.sensor.info.lensShadingApplied `==` |
| 8002 | false), this map is the complete lens shading correction |
| 8003 | map; when there is some lens shading correction applied to |
| 8004 | the RAW output image (android.sensor.info.lensShadingApplied |
| 8005 | `==` true), this map reports the remaining lens shading |
| 8006 | correction map that needs to be applied to get shading |
| 8007 | corrected images that match the camera device's output for |
| 8008 | non-RAW formats. |
| 8009 | |
| 8010 | For a complete shading correction map, the least shaded |
| 8011 | section of the image will have a gain factor of 1; all |
| 8012 | other sections will have gains above 1. |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 8013 | |
| 8014 | When android.colorCorrection.mode = TRANSFORM_MATRIX, the map |
Eino-Ville Talvala | d089ee6 | 2016-06-02 14:15:56 -0700 | [diff] [blame] | 8015 | will take into account the colorCorrection settings. |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 8016 | |
| 8017 | The shading map is for the entire active pixel array, and is not |
| 8018 | affected by the crop region specified in the request. Each shading map |
| 8019 | entry is the value of the shading compensation map over a specific |
| 8020 | pixel on the sensor. Specifically, with a (N x M) resolution shading |
| 8021 | map, and an active pixel array size (W x H), shading map entry |
| 8022 | (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at |
| 8023 | pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels. |
| 8024 | The map is assumed to be bilinearly interpolated between the sample points. |
| 8025 | |
| 8026 | The channel order is [R, Geven, Godd, B], where Geven is the green |
| 8027 | channel for the even rows of a Bayer pattern, and Godd is the odd rows. |
| 8028 | The shading map is stored in a fully interleaved format. |
| 8029 | |
Eino-Ville Talvala | d089ee6 | 2016-06-02 14:15:56 -0700 | [diff] [blame] | 8030 | The shading map will generally have on the order of 30-40 rows and columns, |
| 8031 | and will be smaller than 64x64. |
Ruben Brunk | 9c766ad | 2014-05-27 18:52:49 -0700 | [diff] [blame] | 8032 | |
| 8033 | As an example, given a very small map defined as: |
| 8034 | |
| 8035 | width,height = [ 4, 3 ] |
| 8036 | values = |
| 8037 | [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2, |
| 8038 | 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3, |
| 8039 | 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0, |
| 8040 | 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2, |
| 8041 | 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2, |
| 8042 | 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ] |
| 8043 | |
| 8044 | The low-resolution scaling map images for each channel are |
| 8045 | (displayed using nearest-neighbor interpolation): |
| 8046 | |
| 8047 | ![Red lens shading map](android.statistics.lensShadingMap/red_shading.png) |
| 8048 | ![Green (even rows) lens shading map](android.statistics.lensShadingMap/green_e_shading.png) |
| 8049 | ![Green (odd rows) lens shading map](android.statistics.lensShadingMap/green_o_shading.png) |
| 8050 | ![Blue lens shading map](android.statistics.lensShadingMap/blue_shading.png) |
| 8051 | |
| 8052 | As a visualization only, inverting the full-color map to recover an |
| 8053 | image of a gray wall (using bicubic interpolation for visual quality) as captured by the sensor gives: |
| 8054 | |
| 8055 | ![Image of a uniform white wall (inverse shading map)](android.statistics.lensShadingMap/inv_shading.png) |
| 8056 | </details> |
| 8057 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 8058 | <entry name="lensShadingMap" type="float" visibility="ndk_public" |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8059 | 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] | 8060 | container="array" hwlevel="full"> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8061 | <array> |
| 8062 | <size>4</size> |
| 8063 | <size>n</size> |
| 8064 | <size>m</size> |
| 8065 | </array> |
Igor Murashkin | 1dd4ecb | 2013-12-11 13:31:00 -0800 | [diff] [blame] | 8066 | <description>The shading map is a low-resolution floating-point map |
Zhijun He | 5f92cff | 2016-04-12 23:08:17 -0700 | [diff] [blame] | 8067 | that lists the coefficients used to correct for vignetting and color shading, |
| 8068 | for each Bayer color channel of RAW image data.</description> |
Igor Murashkin | 6cb7c2c | 2014-01-10 15:12:40 -0800 | [diff] [blame] | 8069 | <range>Each gain factor is &gt;= 1</range> |
Zhijun He | 5f92cff | 2016-04-12 23:08:17 -0700 | [diff] [blame] | 8070 | <details> |
Eino-Ville Talvala | d089ee6 | 2016-06-02 14:15:56 -0700 | [diff] [blame] | 8071 | The map provided here is the same map that is used by the camera device to |
| 8072 | correct both color shading and vignetting for output non-RAW images. |
Zhijun He | 5f92cff | 2016-04-12 23:08:17 -0700 | [diff] [blame] | 8073 | |
Eino-Ville Talvala | d089ee6 | 2016-06-02 14:15:56 -0700 | [diff] [blame] | 8074 | When there is no lens shading correction applied to RAW |
| 8075 | output images (android.sensor.info.lensShadingApplied `==` |
| 8076 | false), this map is the complete lens shading correction |
| 8077 | map; when there is some lens shading correction applied to |
| 8078 | the RAW output image (android.sensor.info.lensShadingApplied |
| 8079 | `==` true), this map reports the remaining lens shading |
| 8080 | correction map that needs to be applied to get shading |
| 8081 | corrected images that match the camera device's output for |
| 8082 | non-RAW formats. |
Zhijun He | 5f92cff | 2016-04-12 23:08:17 -0700 | [diff] [blame] | 8083 | |
Eino-Ville Talvala | d089ee6 | 2016-06-02 14:15:56 -0700 | [diff] [blame] | 8084 | For a complete shading correction map, the least shaded |
| 8085 | section of the image will have a gain factor of 1; all |
| 8086 | other sections will have gains above 1. |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 8087 | |
| 8088 | When android.colorCorrection.mode = TRANSFORM_MATRIX, the map |
Eino-Ville Talvala | d089ee6 | 2016-06-02 14:15:56 -0700 | [diff] [blame] | 8089 | will take into account the colorCorrection settings. |
Igor Murashkin | 1dd4ecb | 2013-12-11 13:31:00 -0800 | [diff] [blame] | 8090 | |
| 8091 | The shading map is for the entire active pixel array, and is not |
| 8092 | affected by the crop region specified in the request. Each shading map |
| 8093 | entry is the value of the shading compensation map over a specific |
| 8094 | pixel on the sensor. Specifically, with a (N x M) resolution shading |
| 8095 | map, and an active pixel array size (W x H), shading map entry |
| 8096 | (x,y) ϵ (0 ... N-1, 0 ... M-1) is the value of the shading map at |
| 8097 | pixel ( ((W-1)/(N-1)) * x, ((H-1)/(M-1)) * y) for the four color channels. |
| 8098 | The map is assumed to be bilinearly interpolated between the sample points. |
| 8099 | |
| 8100 | The channel order is [R, Geven, Godd, B], where Geven is the green |
| 8101 | channel for the even rows of a Bayer pattern, and Godd is the odd rows. |
| 8102 | The shading map is stored in a fully interleaved format, and its size |
| 8103 | is provided in the camera static metadata by android.lens.info.shadingMapSize. |
| 8104 | |
Eino-Ville Talvala | d089ee6 | 2016-06-02 14:15:56 -0700 | [diff] [blame] | 8105 | The shading map will generally have on the order of 30-40 rows and columns, |
| 8106 | and will be smaller than 64x64. |
Igor Murashkin | 1dd4ecb | 2013-12-11 13:31:00 -0800 | [diff] [blame] | 8107 | |
| 8108 | As an example, given a very small map defined as: |
| 8109 | |
| 8110 | android.lens.info.shadingMapSize = [ 4, 3 ] |
| 8111 | android.statistics.lensShadingMap = |
| 8112 | [ 1.3, 1.2, 1.15, 1.2, 1.2, 1.2, 1.15, 1.2, |
| 8113 | 1.1, 1.2, 1.2, 1.2, 1.3, 1.2, 1.3, 1.3, |
| 8114 | 1.2, 1.2, 1.25, 1.1, 1.1, 1.1, 1.1, 1.0, |
| 8115 | 1.0, 1.0, 1.0, 1.0, 1.2, 1.3, 1.25, 1.2, |
| 8116 | 1.3, 1.2, 1.2, 1.3, 1.2, 1.15, 1.1, 1.2, |
| 8117 | 1.2, 1.1, 1.0, 1.2, 1.3, 1.15, 1.2, 1.3 ] |
| 8118 | |
| 8119 | The low-resolution scaling map images for each channel are |
| 8120 | (displayed using nearest-neighbor interpolation): |
| 8121 | |
| 8122 | ![Red lens shading map](android.statistics.lensShadingMap/red_shading.png) |
| 8123 | ![Green (even rows) lens shading map](android.statistics.lensShadingMap/green_e_shading.png) |
| 8124 | ![Green (odd rows) lens shading map](android.statistics.lensShadingMap/green_o_shading.png) |
| 8125 | ![Blue lens shading map](android.statistics.lensShadingMap/blue_shading.png) |
| 8126 | |
| 8127 | As a visualization only, inverting the full-color map to recover an |
Yin-Chia Yeh | d7dcb74 | 2015-02-04 10:04:37 -0800 | [diff] [blame] | 8128 | image of a gray wall (using bicubic interpolation for visual quality) |
| 8129 | as captured by the sensor gives: |
Igor Murashkin | 1dd4ecb | 2013-12-11 13:31:00 -0800 | [diff] [blame] | 8130 | |
| 8131 | ![Image of a uniform white wall (inverse shading map)](android.statistics.lensShadingMap/inv_shading.png) |
Yin-Chia Yeh | d7dcb74 | 2015-02-04 10:04:37 -0800 | [diff] [blame] | 8132 | |
| 8133 | Note that the RAW image data might be subject to lens shading |
| 8134 | correction not reported on this map. Query |
| 8135 | android.sensor.info.lensShadingApplied to see if RAW image data has subject |
| 8136 | to lens shading correction. If android.sensor.info.lensShadingApplied |
| 8137 | is TRUE, the RAW image data is subject to partial or full lens shading |
| 8138 | correction. In the case full lens shading correction is applied to RAW |
| 8139 | images, the gain factor map reported in this key will contain all 1.0 gains. |
| 8140 | In other words, the map reported in this key is the remaining lens shading |
| 8141 | that needs to be applied on the RAW image to get images without lens shading |
| 8142 | artifacts. See android.request.maxNumOutputRaw for a list of RAW image |
| 8143 | formats. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 8144 | </details> |
Zhijun He | 46f82f0 | 2014-05-20 18:22:18 -0700 | [diff] [blame] | 8145 | <hal_details> |
| 8146 | The lens shading map calculation may depend on exposure and white balance statistics. |
| 8147 | When AE and AWB are in AUTO modes |
| 8148 | (android.control.aeMode `!=` OFF and android.control.awbMode `!=` OFF), the HAL |
| 8149 | may have all the information it need to generate most accurate lens shading map. When |
| 8150 | AE or AWB are in manual mode |
| 8151 | (android.control.aeMode `==` OFF or android.control.awbMode `==` OFF), the shading map |
| 8152 | may be adversely impacted by manual exposure or white balance parameters. To avoid |
| 8153 | generating unreliable shading map data, the HAL may choose to lock the shading map with |
| 8154 | the latest known good map generated when the AE and AWB are in AUTO modes. |
| 8155 | </hal_details> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8156 | </entry> |
Igor Murashkin | 0fe2f13 | 2014-01-13 16:59:47 -0800 | [diff] [blame] | 8157 | <entry name="predictedColorGains" type="float" |
| 8158 | visibility="hidden" |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 8159 | deprecated="true" |
Igor Murashkin | 0fe2f13 | 2014-01-13 16:59:47 -0800 | [diff] [blame] | 8160 | optional="true" |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8161 | type_notes="A 1D array of floats for 4 color channel gains" |
| 8162 | container="array"> |
| 8163 | <array> |
| 8164 | <size>4</size> |
| 8165 | </array> |
| 8166 | <description>The best-fit color channel gains calculated |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 8167 | by the camera device's statistics units for the current output frame. |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8168 | </description> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 8169 | <details> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8170 | This may be different than the gains used for this frame, |
| 8171 | since statistics processing on data from a new frame |
| 8172 | typically completes after the transform has already been |
| 8173 | applied to that frame. |
| 8174 | |
| 8175 | The 4 channel gains are defined in Bayer domain, |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 8176 | see android.colorCorrection.gains for details. |
| 8177 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 8178 | 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] | 8179 | regardless of the android.control.* current values. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 8180 | </details> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8181 | </entry> |
Igor Murashkin | 0fe2f13 | 2014-01-13 16:59:47 -0800 | [diff] [blame] | 8182 | <entry name="predictedColorTransform" type="rational" |
| 8183 | visibility="hidden" |
Igor Murashkin | 6c936c1 | 2014-05-13 14:51:49 -0700 | [diff] [blame] | 8184 | deprecated="true" |
Igor Murashkin | 0fe2f13 | 2014-01-13 16:59:47 -0800 | [diff] [blame] | 8185 | optional="true" |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8186 | type_notes="3x3 rational matrix in row-major order" |
| 8187 | container="array"> |
| 8188 | <array> |
| 8189 | <size>3</size> |
| 8190 | <size>3</size> |
| 8191 | </array> |
| 8192 | <description>The best-fit color transform matrix estimate |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 8193 | calculated by the camera device's statistics units for the current |
| 8194 | output frame.</description> |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 8195 | <details>The camera device will provide the estimate from its |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8196 | statistics unit on the white balance transforms to use |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 8197 | for the next frame. These are the values the camera device believes |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8198 | are the best fit for the current output frame. This may |
| 8199 | be different than the transform used for this frame, since |
| 8200 | statistics processing on data from a new frame typically |
| 8201 | completes after the transform has already been applied to |
| 8202 | that frame. |
| 8203 | |
| 8204 | These estimates must be provided for all frames, even if |
| 8205 | capture settings and color transforms are set by the application. |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 8206 | |
Eino-Ville Talvala | 68dbc6f | 2014-06-06 14:35:41 -0700 | [diff] [blame] | 8207 | 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] | 8208 | regardless of the android.control.* current values. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 8209 | </details> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8210 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8211 | <entry name="sceneFlicker" type="byte" visibility="public" enum="true" |
| 8212 | hwlevel="full"> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8213 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 8214 | <value>NONE |
| 8215 | <notes>The camera device does not detect any flickering illumination |
| 8216 | in the current scene.</notes></value> |
| 8217 | <value>50HZ |
| 8218 | <notes>The camera device detects illumination flickering at 50Hz |
| 8219 | in the current scene.</notes></value> |
| 8220 | <value>60HZ |
| 8221 | <notes>The camera device detects illumination flickering at 60Hz |
| 8222 | in the current scene.</notes></value> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8223 | </enum> |
Zhijun He | b8512c5 | 2014-02-03 11:46:58 -0800 | [diff] [blame] | 8224 | <description>The camera device estimated scene illumination lighting |
| 8225 | frequency.</description> |
| 8226 | <details> |
| 8227 | Many light sources, such as most fluorescent lights, flicker at a rate |
| 8228 | that depends on the local utility power standards. This flicker must be |
| 8229 | accounted for by auto-exposure routines to avoid artifacts in captured images. |
| 8230 | The camera device uses this entry to tell the application what the scene |
| 8231 | illuminant frequency is. |
| 8232 | |
| 8233 | When manual exposure control is enabled |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 8234 | (`android.control.aeMode == OFF` or `android.control.mode == |
| 8235 | OFF`), the android.control.aeAntibandingMode doesn't perform |
| 8236 | antibanding, and the application can ensure it selects |
| 8237 | exposure times that do not cause banding issues by looking |
| 8238 | into this metadata field. See |
| 8239 | android.control.aeAntibandingMode for more details. |
Zhijun He | b8512c5 | 2014-02-03 11:46:58 -0800 | [diff] [blame] | 8240 | |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 8241 | Reports NONE if there doesn't appear to be flickering illumination. |
Zhijun He | b8512c5 | 2014-02-03 11:46:58 -0800 | [diff] [blame] | 8242 | </details> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8243 | </entry> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 8244 | <clone entry="android.statistics.hotPixelMapMode" kind="controls"> |
| 8245 | </clone> |
| 8246 | <entry name="hotPixelMap" type="int32" visibility="public" |
| 8247 | type_notes="list of coordinates based on android.sensor.pixelArraySize" |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 8248 | container="array" typedef="point"> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 8249 | <array> |
| 8250 | <size>2</size> |
| 8251 | <size>n</size> |
| 8252 | </array> |
| 8253 | <description> |
| 8254 | List of `(x, y)` coordinates of hot/defective pixels on the sensor. |
| 8255 | </description> |
| 8256 | <range> |
| 8257 | n <= number of pixels on the sensor. |
| 8258 | The `(x, y)` coordinates must be bounded by |
| 8259 | android.sensor.info.pixelArraySize. |
| 8260 | </range> |
| 8261 | <details> |
| 8262 | A coordinate `(x, y)` must lie between `(0, 0)`, and |
| 8263 | `(width - 1, height - 1)` (inclusive), which are the top-left and |
| 8264 | bottom-right of the pixel array, respectively. The width and |
| 8265 | height dimensions are given in android.sensor.info.pixelArraySize. |
| 8266 | This may include hot pixels that lie outside of the active array |
| 8267 | bounds given by android.sensor.info.activeArraySize. |
| 8268 | </details> |
| 8269 | <hal_details> |
| 8270 | A hotpixel map contains the coordinates of pixels on the camera |
| 8271 | sensor that do report valid values (usually due to defects in |
| 8272 | the camera sensor). This includes pixels that are stuck at certain |
| 8273 | values, or have a response that does not accuractly encode the |
| 8274 | incoming light from the scene. |
| 8275 | |
| 8276 | To avoid performance issues, there should be significantly fewer hot |
| 8277 | pixels than actual pixels on the camera sensor. |
| 8278 | </hal_details> |
| 8279 | <tag id="V1" /> |
Eino-Ville Talvala | 9a7f3d8 | 2014-07-15 10:43:01 -0700 | [diff] [blame] | 8280 | <tag id="RAW" /> |
Ruben Brunk | 49e4f91 | 2014-03-04 14:09:44 -0800 | [diff] [blame] | 8281 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8282 | </dynamic> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8283 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8284 | <entry name="lensShadingMapMode" type="byte" visibility="public" enum="true" hwlevel="full"> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8285 | <enum> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 8286 | <value>OFF |
| 8287 | <notes>Do not include a lens shading map in the capture result.</notes></value> |
| 8288 | <value>ON |
| 8289 | <notes>Include a lens shading map in the capture result.</notes></value> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8290 | </enum> |
Zhijun He | 25b8ac5 | 2014-02-24 09:49:37 -0800 | [diff] [blame] | 8291 | <description>Whether the camera device will output the lens |
| 8292 | shading map in output result metadata.</description> |
Yin-Chia Yeh | d7dcb74 | 2015-02-04 10:04:37 -0800 | [diff] [blame] | 8293 | <range>android.statistics.info.availableLensShadingMapModes</range> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 8294 | <details>When set to ON, |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 8295 | android.statistics.lensShadingMap will be provided in |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8296 | the output result metadata. |
| 8297 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 8298 | ON is always supported on devices with the RAW capability. |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8299 | </details> |
| 8300 | <tag id="RAW" /> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 8301 | </entry> |
| 8302 | </controls> |
Zhijun He | 602d370 | 2014-05-02 17:38:15 -0700 | [diff] [blame] | 8303 | <dynamic> |
| 8304 | <clone entry="android.statistics.lensShadingMapMode" kind="controls"> |
| 8305 | </clone> |
| 8306 | </dynamic> |
Chien-Yu Chen | 2560d4f | 2018-01-12 17:38:00 -0800 | [diff] [blame] | 8307 | <controls> |
| 8308 | <entry name="oisDataMode" type="byte" visibility="public" enum="true" hal_version="3.3"> |
| 8309 | <enum> |
| 8310 | <value>OFF |
| 8311 | <notes>Do not include OIS data in the capture result.</notes></value> |
| 8312 | <value>ON |
Chien-Yu Chen | a5cfee9 | 2018-02-15 12:34:30 -0800 | [diff] [blame^] | 8313 | <notes>Include OIS data in the capture result.</notes> |
| 8314 | <sdk_notes>android.statistics.oisSamples provides OIS sample data in the |
| 8315 | output result metadata. |
| 8316 | </sdk_notes> |
| 8317 | <ndk_notes>android.statistics.oisTimestamps, android.statistics.oisXShifts, |
| 8318 | and android.statistics.oisYShifts provide OIS data in the output result metadata. |
| 8319 | </ndk_notes> |
| 8320 | </value> |
Chien-Yu Chen | 2560d4f | 2018-01-12 17:38:00 -0800 | [diff] [blame] | 8321 | </enum> |
Eino-Ville Talvala | baf8047 | 2018-02-05 16:26:26 -0800 | [diff] [blame] | 8322 | <description>A control for selecting whether OIS position information is included in output |
Chien-Yu Chen | 2560d4f | 2018-01-12 17:38:00 -0800 | [diff] [blame] | 8323 | result metadata.</description> |
| 8324 | <range>android.Statistics.info.availableOisDataModes</range> |
Chien-Yu Chen | 2560d4f | 2018-01-12 17:38:00 -0800 | [diff] [blame] | 8325 | </entry> |
| 8326 | </controls> |
| 8327 | <dynamic> |
| 8328 | <clone entry="android.statistics.oisDataMode" kind="controls"> |
| 8329 | </clone> |
Chien-Yu Chen | a5cfee9 | 2018-02-15 12:34:30 -0800 | [diff] [blame^] | 8330 | <entry name="oisTimestamps" type="int64" visibility="ndk_public" container="array" hal_version="3.3"> |
Chien-Yu Chen | 2560d4f | 2018-01-12 17:38:00 -0800 | [diff] [blame] | 8331 | <array> |
| 8332 | <size>n</size> |
| 8333 | </array> |
| 8334 | <description> |
| 8335 | An array of timestamps of OIS samples, in nanoseconds. |
| 8336 | </description> |
| 8337 | <units>nanoseconds</units> |
| 8338 | <details> |
| 8339 | The array contains the timestamps of OIS samples. The timestamps are in the same |
| 8340 | timebase as and comparable to android.sensor.timestamp. |
| 8341 | </details> |
| 8342 | </entry> |
Chien-Yu Chen | a5cfee9 | 2018-02-15 12:34:30 -0800 | [diff] [blame^] | 8343 | <entry name="oisXShifts" type="float" visibility="ndk_public" container="array" hal_version="3.3"> |
Chien-Yu Chen | 2560d4f | 2018-01-12 17:38:00 -0800 | [diff] [blame] | 8344 | <array> |
| 8345 | <size>n</size> |
| 8346 | </array> |
| 8347 | <description> |
| 8348 | An array of shifts of OIS samples, in x direction. |
| 8349 | </description> |
| 8350 | <units>Pixels in active array.</units> |
| 8351 | <details> |
| 8352 | The array contains the amount of shifts in x direction, in pixels, based on OIS samples. |
| 8353 | A positive value is a shift from left to right in active array coordinate system. For |
Chien-Yu Chen | a5cfee9 | 2018-02-15 12:34:30 -0800 | [diff] [blame^] | 8354 | example, if the optical center is (1000, 500) in active array coordinates, a shift of |
Chien-Yu Chen | 2560d4f | 2018-01-12 17:38:00 -0800 | [diff] [blame] | 8355 | (3, 0) puts the new optical center at (1003, 500). |
| 8356 | |
| 8357 | The number of shifts must match the number of timestamps in |
| 8358 | android.statistics.oisTimestamps. |
| 8359 | </details> |
| 8360 | </entry> |
Chien-Yu Chen | a5cfee9 | 2018-02-15 12:34:30 -0800 | [diff] [blame^] | 8361 | <entry name="oisYShifts" type="float" visibility="ndk_public" container="array" hal_version="3.3"> |
Chien-Yu Chen | 2560d4f | 2018-01-12 17:38:00 -0800 | [diff] [blame] | 8362 | <array> |
| 8363 | <size>n</size> |
| 8364 | </array> |
| 8365 | <description> |
| 8366 | An array of shifts of OIS samples, in y direction. |
| 8367 | </description> |
| 8368 | <units>Pixels in active array.</units> |
| 8369 | <details> |
| 8370 | The array contains the amount of shifts in y direction, in pixels, based on OIS samples. |
| 8371 | A positive value is a shift from top to bottom in active array coordinate system. For |
Chien-Yu Chen | a5cfee9 | 2018-02-15 12:34:30 -0800 | [diff] [blame^] | 8372 | example, if the optical center is (1000, 500) in active array coordinates, a shift of |
Chien-Yu Chen | 2560d4f | 2018-01-12 17:38:00 -0800 | [diff] [blame] | 8373 | (0, 5) puts the new optical center at (1000, 505). |
| 8374 | |
| 8375 | The number of shifts must match the number of timestamps in |
| 8376 | android.statistics.oisTimestamps. |
| 8377 | </details> |
| 8378 | </entry> |
Chien-Yu Chen | a5cfee9 | 2018-02-15 12:34:30 -0800 | [diff] [blame^] | 8379 | <entry name="oisSamples" type="float" visibility="java_public" synthetic="true" |
| 8380 | container="array" typedef="oisSample" hal_version="3.3"> |
| 8381 | <array> |
| 8382 | <size>n</size> |
| 8383 | </array> |
| 8384 | <description> |
| 8385 | An array of OIS samples. |
| 8386 | </description> |
| 8387 | <details> |
| 8388 | Each OIS sample contains the timestamp and the amount of shifts in x and y direction, |
| 8389 | in pixels, of the OIS sample. |
| 8390 | |
| 8391 | A positive value for a shift in x direction is a shift from left to right in active array |
| 8392 | coordinate system. For example, if the optical center is (1000, 500) in active array |
| 8393 | coordinates, a shift of (3, 0) puts the new optical center at (1003, 500). |
| 8394 | |
| 8395 | A positive value for a shift in y direction is a shift from top to bottom in active array |
| 8396 | coordinate system. For example, if the optical center is (1000, 500) in active array |
| 8397 | coordinates, a shift of (0, 5) puts the new optical center at (1000, 505). |
| 8398 | </details> |
| 8399 | </entry> |
Chien-Yu Chen | 2560d4f | 2018-01-12 17:38:00 -0800 | [diff] [blame] | 8400 | </dynamic> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8401 | </section> |
| 8402 | <section name="tonemap"> |
| 8403 | <controls> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 8404 | <entry name="curveBlue" type="float" visibility="ndk_public" |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 8405 | 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] | 8406 | container="array" hwlevel="full"> |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 8407 | <array> |
| 8408 | <size>n</size> |
| 8409 | <size>2</size> |
| 8410 | </array> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8411 | <description>Tonemapping / contrast / gamma curve for the blue |
| 8412 | channel, to use when android.tonemap.mode is |
| 8413 | CONTRAST_CURVE.</description> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8414 | <details>See android.tonemap.curveRed for more details.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8415 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 8416 | <entry name="curveGreen" type="float" visibility="ndk_public" |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 8417 | 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] | 8418 | container="array" hwlevel="full"> |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 8419 | <array> |
| 8420 | <size>n</size> |
| 8421 | <size>2</size> |
| 8422 | </array> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8423 | <description>Tonemapping / contrast / gamma curve for the green |
| 8424 | channel, to use when android.tonemap.mode is |
| 8425 | CONTRAST_CURVE.</description> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8426 | <details>See android.tonemap.curveRed for more details.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8427 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 8428 | <entry name="curveRed" type="float" visibility="ndk_public" |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 8429 | 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] | 8430 | container="array" hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8431 | <array> |
| 8432 | <size>n</size> |
| 8433 | <size>2</size> |
| 8434 | </array> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8435 | <description>Tonemapping / contrast / gamma curve for the red |
| 8436 | channel, to use when android.tonemap.mode is |
| 8437 | CONTRAST_CURVE.</description> |
| 8438 | <range>0-1 on both input and output coordinates, normalized |
| 8439 | as a floating-point value such that 0 == black and 1 == white. |
| 8440 | </range> |
| 8441 | <details> |
| 8442 | Each channel's curve is defined by an array of control points: |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 8443 | |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8444 | android.tonemap.curveRed = |
| 8445 | [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ] |
Zhijun He | 6ebd25a | 2014-02-15 21:21:30 -0800 | [diff] [blame] | 8446 | 2 <= N <= android.tonemap.maxCurvePoints |
Zhijun He | 704d128 | 2013-08-19 15:26:33 -0700 | [diff] [blame] | 8447 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 8448 | These are sorted in order of increasing `Pin`; it is |
| 8449 | 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] | 8450 | define a complete mapping. For input values between control points, |
| 8451 | the camera device must linearly interpolate between the control |
| 8452 | points. |
| 8453 | |
| 8454 | Each curve can have an independent number of points, and the number |
| 8455 | of points can be less than max (that is, the request doesn't have to |
| 8456 | always provide a curve with number of points equivalent to |
| 8457 | android.tonemap.maxCurvePoints). |
| 8458 | |
| 8459 | A few examples, and their corresponding graphical mappings; these |
| 8460 | only specify the red channel and the precision is limited to 4 |
| 8461 | digits, for conciseness. |
| 8462 | |
| 8463 | Linear mapping: |
| 8464 | |
| 8465 | android.tonemap.curveRed = [ 0, 0, 1.0, 1.0 ] |
| 8466 | |
| 8467 | ![Linear mapping curve](android.tonemap.curveRed/linear_tonemap.png) |
| 8468 | |
| 8469 | Invert mapping: |
| 8470 | |
| 8471 | android.tonemap.curveRed = [ 0, 1.0, 1.0, 0 ] |
| 8472 | |
| 8473 | ![Inverting mapping curve](android.tonemap.curveRed/inverse_tonemap.png) |
| 8474 | |
| 8475 | Gamma 1/2.2 mapping, with 16 control points: |
| 8476 | |
| 8477 | android.tonemap.curveRed = [ |
| 8478 | 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812, |
| 8479 | 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072, |
| 8480 | 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685, |
| 8481 | 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ] |
| 8482 | |
| 8483 | ![Gamma = 1/2.2 tonemapping curve](android.tonemap.curveRed/gamma_tonemap.png) |
| 8484 | |
| 8485 | Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points: |
| 8486 | |
| 8487 | android.tonemap.curveRed = [ |
| 8488 | 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845, |
| 8489 | 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130, |
| 8490 | 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721, |
| 8491 | 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ] |
| 8492 | |
| 8493 | ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png) |
| 8494 | </details> |
| 8495 | <hal_details> |
| 8496 | For good quality of mapping, at least 128 control points are |
| 8497 | preferred. |
| 8498 | |
| 8499 | A typical use case of this would be a gamma-1/2.2 curve, with as many |
| 8500 | control points used as are available. |
| 8501 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8502 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 8503 | <entry name="curve" type="float" visibility="java_public" synthetic="true" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8504 | typedef="tonemapCurve" |
| 8505 | hwlevel="full"> |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 8506 | <description>Tonemapping / contrast / gamma curve to use when android.tonemap.mode |
| 8507 | is CONTRAST_CURVE.</description> |
| 8508 | <details> |
| 8509 | The tonemapCurve consist of three curves for each of red, green, and blue |
| 8510 | channels respectively. The following example uses the red channel as an |
| 8511 | example. The same logic applies to green and blue channel. |
| 8512 | Each channel's curve is defined by an array of control points: |
| 8513 | |
| 8514 | curveRed = |
| 8515 | [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ] |
| 8516 | 2 <= N <= android.tonemap.maxCurvePoints |
| 8517 | |
| 8518 | These are sorted in order of increasing `Pin`; it is always |
| 8519 | guaranteed that input values 0.0 and 1.0 are included in the list to |
| 8520 | define a complete mapping. For input values between control points, |
| 8521 | the camera device must linearly interpolate between the control |
| 8522 | points. |
| 8523 | |
| 8524 | Each curve can have an independent number of points, and the number |
| 8525 | of points can be less than max (that is, the request doesn't have to |
| 8526 | always provide a curve with number of points equivalent to |
| 8527 | android.tonemap.maxCurvePoints). |
| 8528 | |
| 8529 | A few examples, and their corresponding graphical mappings; these |
| 8530 | only specify the red channel and the precision is limited to 4 |
| 8531 | digits, for conciseness. |
| 8532 | |
| 8533 | Linear mapping: |
| 8534 | |
| 8535 | curveRed = [ (0, 0), (1.0, 1.0) ] |
| 8536 | |
| 8537 | ![Linear mapping curve](android.tonemap.curveRed/linear_tonemap.png) |
| 8538 | |
| 8539 | Invert mapping: |
| 8540 | |
| 8541 | curveRed = [ (0, 1.0), (1.0, 0) ] |
| 8542 | |
| 8543 | ![Inverting mapping curve](android.tonemap.curveRed/inverse_tonemap.png) |
| 8544 | |
| 8545 | Gamma 1/2.2 mapping, with 16 control points: |
| 8546 | |
| 8547 | curveRed = [ |
| 8548 | (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812), |
| 8549 | (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072), |
| 8550 | (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685), |
| 8551 | (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ] |
| 8552 | |
| 8553 | ![Gamma = 1/2.2 tonemapping curve](android.tonemap.curveRed/gamma_tonemap.png) |
| 8554 | |
| 8555 | Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points: |
| 8556 | |
| 8557 | curveRed = [ |
| 8558 | (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845), |
| 8559 | (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130), |
| 8560 | (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721), |
| 8561 | (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ] |
| 8562 | |
| 8563 | ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png) |
| 8564 | </details> |
| 8565 | <hal_details> |
| 8566 | This entry is created by the framework from the curveRed, curveGreen and |
| 8567 | curveBlue entries. |
| 8568 | </hal_details> |
| 8569 | </entry> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8570 | <entry name="mode" type="byte" visibility="public" enum="true" |
| 8571 | hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8572 | <enum> |
| 8573 | <value>CONTRAST_CURVE |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8574 | <notes>Use the tone mapping curve specified in |
Eino-Ville Talvala | 7fabc1e | 2014-02-10 12:39:35 -0800 | [diff] [blame] | 8575 | the android.tonemap.curve* entries. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8576 | |
| 8577 | All color enhancement and tonemapping must be disabled, except |
| 8578 | for applying the tonemapping curve specified by |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 8579 | android.tonemap.curve. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8580 | |
| 8581 | Must not slow down frame rate relative to raw |
| 8582 | sensor output. |
| 8583 | </notes> |
| 8584 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8585 | <value>FAST |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8586 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 8587 | Advanced gamma mapping and color enhancement may be applied, without |
| 8588 | reducing frame rate compared to raw sensor output. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8589 | </notes> |
| 8590 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8591 | <value>HIGH_QUALITY |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8592 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 8593 | High-quality gamma mapping and color enhancement will be applied, at |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 8594 | the cost of possibly reduced frame rate compared to raw sensor output. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8595 | </notes> |
| 8596 | </value> |
Yin-Chia Yeh | 993d4c4 | 2015-02-05 13:19:21 -0800 | [diff] [blame] | 8597 | <value>GAMMA_VALUE |
| 8598 | <notes> |
| 8599 | Use the gamma value specified in android.tonemap.gamma to peform |
| 8600 | tonemapping. |
| 8601 | |
| 8602 | All color enhancement and tonemapping must be disabled, except |
| 8603 | for applying the tonemapping curve specified by android.tonemap.gamma. |
| 8604 | |
| 8605 | Must not slow down frame rate relative to raw sensor output. |
| 8606 | </notes> |
| 8607 | </value> |
| 8608 | <value>PRESET_CURVE |
| 8609 | <notes> |
| 8610 | Use the preset tonemapping curve specified in |
| 8611 | android.tonemap.presetCurve to peform tonemapping. |
| 8612 | |
| 8613 | All color enhancement and tonemapping must be disabled, except |
| 8614 | for applying the tonemapping curve specified by |
| 8615 | android.tonemap.presetCurve. |
| 8616 | |
| 8617 | Must not slow down frame rate relative to raw sensor output. |
| 8618 | </notes> |
| 8619 | </value> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8620 | </enum> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8621 | <description>High-level global contrast/gamma/tonemapping control. |
| 8622 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 8623 | <range>android.tonemap.availableToneMapModes</range> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8624 | <details> |
| 8625 | When switching to an application-defined contrast curve by setting |
| 8626 | android.tonemap.mode to CONTRAST_CURVE, the curve is defined |
| 8627 | per-channel with a set of `(in, out)` points that specify the |
| 8628 | mapping from input high-bit-depth pixel value to the output |
| 8629 | low-bit-depth value. Since the actual pixel ranges of both input |
| 8630 | and output may change depending on the camera pipeline, the values |
| 8631 | are specified by normalized floating-point numbers. |
| 8632 | |
| 8633 | More-complex color mapping operations such as 3D color look-up |
| 8634 | tables, selective chroma enhancement, or other non-linear color |
| 8635 | transforms will be disabled when android.tonemap.mode is |
| 8636 | CONTRAST_CURVE. |
| 8637 | |
| 8638 | When using either FAST or HIGH_QUALITY, the camera device will |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 8639 | emit its own tonemap curve in android.tonemap.curve. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8640 | These values are always available, and as close as possible to the |
| 8641 | actually used nonlinear/nonglobal transforms. |
| 8642 | |
Zhijun He | 46f82f0 | 2014-05-20 18:22:18 -0700 | [diff] [blame] | 8643 | 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] | 8644 | provided curve in FAST or HIGH_QUALITY, the image's tonemap will be |
| 8645 | roughly the same.</details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8646 | </entry> |
| 8647 | </controls> |
| 8648 | <static> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8649 | <entry name="maxCurvePoints" type="int32" visibility="public" |
| 8650 | hwlevel="full"> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8651 | <description>Maximum number of supported points in the |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 8652 | tonemap curve that can be used for android.tonemap.curve. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8653 | </description> |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8654 | <details> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 8655 | If the actual number of points provided by the application (in android.tonemap.curve*) is |
| 8656 | less than this maximum, the camera device will resample the curve to its internal |
| 8657 | representation, using linear interpolation. |
Igor Murashkin | 94e06c4 | 2014-01-13 16:51:17 -0800 | [diff] [blame] | 8658 | |
| 8659 | The output curves in the result metadata may have a different number |
| 8660 | of points than the input curves, and will represent the actual |
| 8661 | hardware curves used as closely as possible when linearly interpolated. |
| 8662 | </details> |
| 8663 | <hal_details> |
| 8664 | This value must be at least 64. This should be at least 128. |
| 8665 | </hal_details> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8666 | </entry> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 8667 | <entry name="availableToneMapModes" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8668 | type_notes="list of enums" container="array" typedef="enumList" hwlevel="full"> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 8669 | <array> |
| 8670 | <size>n</size> |
| 8671 | </array> |
| 8672 | <description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 8673 | List of tonemapping modes for android.tonemap.mode that are supported by this camera |
| 8674 | device. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 8675 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 8676 | <range>Any value listed in android.tonemap.mode</range> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 8677 | <details> |
Yin-Chia Yeh | 993d4c4 | 2015-02-05 13:19:21 -0800 | [diff] [blame] | 8678 | Camera devices that support the MANUAL_POST_PROCESSING capability will always contain |
| 8679 | at least one of below mode combinations: |
| 8680 | |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 8681 | * CONTRAST_CURVE, FAST and HIGH_QUALITY |
| 8682 | * GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY |
Yin-Chia Yeh | 993d4c4 | 2015-02-05 13:19:21 -0800 | [diff] [blame] | 8683 | |
| 8684 | This includes all FULL level devices. |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 8685 | </details> |
Yin-Chia Yeh | 7bdefd3 | 2015-04-02 14:00:40 -0700 | [diff] [blame] | 8686 | <hal_details> |
| 8687 | HAL must support both FAST and HIGH_QUALITY if automatic tonemap control is available |
| 8688 | on the camera device, but the underlying implementation can be the same for both modes. |
| 8689 | That is, if the highest quality implementation on the camera device does not slow down |
| 8690 | capture rate, then FAST and HIGH_QUALITY will generate the same output. |
| 8691 | </hal_details> |
Ruben Brunk | d14f716 | 2014-03-04 15:01:25 -0800 | [diff] [blame] | 8692 | </entry> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8693 | </static> |
| 8694 | <dynamic> |
| 8695 | <clone entry="android.tonemap.curveBlue" kind="controls"> |
| 8696 | </clone> |
| 8697 | <clone entry="android.tonemap.curveGreen" kind="controls"> |
| 8698 | </clone> |
| 8699 | <clone entry="android.tonemap.curveRed" kind="controls"> |
| 8700 | </clone> |
Yin-Chia Yeh | 0a5f269 | 2014-05-27 09:48:07 -0700 | [diff] [blame] | 8701 | <clone entry="android.tonemap.curve" kind="controls"> |
| 8702 | </clone> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8703 | <clone entry="android.tonemap.mode" kind="controls"> |
| 8704 | </clone> |
| 8705 | </dynamic> |
Yin-Chia Yeh | 3417b29 | 2015-02-20 15:34:14 -0800 | [diff] [blame] | 8706 | <controls> |
| 8707 | <entry name="gamma" type="float" visibility="public"> |
| 8708 | <description> Tonemapping curve to use when android.tonemap.mode is |
| 8709 | GAMMA_VALUE |
| 8710 | </description> |
| 8711 | <details> |
| 8712 | The tonemap curve will be defined the following formula: |
| 8713 | * OUT = pow(IN, 1.0 / gamma) |
| 8714 | where IN and OUT is the input pixel value scaled to range [0.0, 1.0], |
| 8715 | pow is the power function and gamma is the gamma value specified by this |
| 8716 | key. |
| 8717 | |
| 8718 | The same curve will be applied to all color channels. The camera device |
| 8719 | may clip the input gamma value to its supported range. The actual applied |
| 8720 | value will be returned in capture result. |
| 8721 | |
| 8722 | The valid range of gamma value varies on different devices, but values |
| 8723 | within [1.0, 5.0] are guaranteed not to be clipped. |
| 8724 | </details> |
| 8725 | </entry> |
| 8726 | <entry name="presetCurve" type="byte" visibility="public" enum="true"> |
| 8727 | <enum> |
| 8728 | <value>SRGB |
| 8729 | <notes>Tonemapping curve is defined by sRGB</notes> |
| 8730 | </value> |
| 8731 | <value>REC709 |
| 8732 | <notes>Tonemapping curve is defined by ITU-R BT.709</notes> |
| 8733 | </value> |
| 8734 | </enum> |
| 8735 | <description> Tonemapping curve to use when android.tonemap.mode is |
| 8736 | PRESET_CURVE |
| 8737 | </description> |
| 8738 | <details> |
| 8739 | The tonemap curve will be defined by specified standard. |
| 8740 | |
| 8741 | sRGB (approximated by 16 control points): |
| 8742 | |
| 8743 | ![sRGB tonemapping curve](android.tonemap.curveRed/srgb_tonemap.png) |
| 8744 | |
| 8745 | Rec. 709 (approximated by 16 control points): |
| 8746 | |
| 8747 | ![Rec. 709 tonemapping curve](android.tonemap.curveRed/rec709_tonemap.png) |
| 8748 | |
| 8749 | Note that above figures show a 16 control points approximation of preset |
| 8750 | curves. Camera devices may apply a different approximation to the curve. |
| 8751 | </details> |
| 8752 | </entry> |
| 8753 | </controls> |
Yin-Chia Yeh | 3a52b8f | 2015-05-05 23:49:07 -0700 | [diff] [blame] | 8754 | <dynamic> |
| 8755 | <clone entry="android.tonemap.gamma" kind="controls"> |
| 8756 | </clone> |
| 8757 | <clone entry="android.tonemap.presetCurve" kind="controls"> |
| 8758 | </clone> |
| 8759 | </dynamic> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 8760 | </section> |
Igor Murashkin | c469f7d | 2013-04-23 14:31:02 -0700 | [diff] [blame] | 8761 | <section name="led"> |
| 8762 | <controls> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8763 | <entry name="transmit" type="byte" visibility="hidden" optional="true" |
| 8764 | enum="true" typedef="boolean"> |
Igor Murashkin | c469f7d | 2013-04-23 14:31:02 -0700 | [diff] [blame] | 8765 | <enum> |
| 8766 | <value>OFF</value> |
| 8767 | <value>ON</value> |
| 8768 | </enum> |
| 8769 | <description>This LED is nominally used to indicate to the user |
| 8770 | that the camera is powered on and may be streaming images back to the |
| 8771 | Application Processor. In certain rare circumstances, the OS may |
| 8772 | disable this when video is processed locally and not transmitted to |
| 8773 | any untrusted applications. |
| 8774 | |
| 8775 | In particular, the LED *must* always be on when the data could be |
| 8776 | transmitted off the device. The LED *should* always be on whenever |
| 8777 | data is stored locally on the device. |
| 8778 | |
| 8779 | The LED *may* be off if a trusted application is using the data that |
| 8780 | doesn't violate the above rules. |
| 8781 | </description> |
| 8782 | </entry> |
| 8783 | </controls> |
| 8784 | <dynamic> |
| 8785 | <clone entry="android.led.transmit" kind="controls"></clone> |
| 8786 | </dynamic> |
| 8787 | <static> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8788 | <entry name="availableLeds" type="byte" visibility="hidden" optional="true" |
| 8789 | enum="true" |
| 8790 | container="array"> |
Igor Murashkin | c469f7d | 2013-04-23 14:31:02 -0700 | [diff] [blame] | 8791 | <array> |
| 8792 | <size>n</size> |
| 8793 | </array> |
| 8794 | <enum> |
| 8795 | <value>TRANSMIT |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 8796 | <notes>android.led.transmit control is used.</notes> |
Igor Murashkin | c469f7d | 2013-04-23 14:31:02 -0700 | [diff] [blame] | 8797 | </value> |
| 8798 | </enum> |
| 8799 | <description>A list of camera LEDs that are available on this system. |
| 8800 | </description> |
| 8801 | </entry> |
| 8802 | </static> |
| 8803 | </section> |
Igor Murashkin | 38b8cae | 2013-05-23 16:38:59 -0700 | [diff] [blame] | 8804 | <section name="info"> |
| 8805 | <static> |
Eino-Ville Talvala | f384f0a | 2013-07-12 17:02:27 -0700 | [diff] [blame] | 8806 | <entry name="supportedHardwareLevel" type="byte" visibility="public" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8807 | enum="true" hwlevel="legacy"> |
Igor Murashkin | 38b8cae | 2013-05-23 16:38:59 -0700 | [diff] [blame] | 8808 | <enum> |
Ruben Brunk | 31b50c2 | 2014-07-02 00:13:46 +0000 | [diff] [blame] | 8809 | <value> |
| 8810 | LIMITED |
| 8811 | <notes> |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8812 | This camera device does not have enough capabilities to qualify as a `FULL` device or |
| 8813 | better. |
| 8814 | |
| 8815 | Only the stream configurations listed in the `LEGACY` and `LIMITED` tables in the |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 8816 | {@link android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8817 | createCaptureSession} documentation are guaranteed to be supported. |
| 8818 | |
| 8819 | All `LIMITED` devices support the `BACKWARDS_COMPATIBLE` capability, indicating basic |
| 8820 | support for color image capture. The only exception is that the device may |
| 8821 | alternatively support only the `DEPTH_OUTPUT` capability, if it can only output depth |
| 8822 | measurements and not color images. |
| 8823 | |
| 8824 | `LIMITED` devices and above require the use of android.control.aePrecaptureTrigger |
| 8825 | to lock exposure metering (and calculate flash power, for cameras with flash) before |
| 8826 | capturing a high-quality still image. |
| 8827 | |
| 8828 | A `LIMITED` device that only lists the `BACKWARDS_COMPATIBLE` capability is only |
| 8829 | required to support full-automatic operation and post-processing (`OFF` is not |
| 8830 | supported for android.control.aeMode, android.control.afMode, or |
| 8831 | android.control.awbMode) |
| 8832 | |
| 8833 | Additional capabilities may optionally be supported by a `LIMITED`-level device, and |
| 8834 | can be checked for in android.request.availableCapabilities. |
Ruben Brunk | 31b50c2 | 2014-07-02 00:13:46 +0000 | [diff] [blame] | 8835 | </notes> |
| 8836 | </value> |
| 8837 | <value> |
| 8838 | FULL |
| 8839 | <notes> |
| 8840 | This camera device is capable of supporting advanced imaging applications. |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8841 | |
| 8842 | The stream configurations listed in the `FULL`, `LEGACY` and `LIMITED` tables in the |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 8843 | {@link android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8844 | createCaptureSession} documentation are guaranteed to be supported. |
| 8845 | |
| 8846 | A `FULL` device will support below capabilities: |
| 8847 | |
| 8848 | * `BURST_CAPTURE` capability (android.request.availableCapabilities contains |
| 8849 | `BURST_CAPTURE`) |
| 8850 | * Per frame control (android.sync.maxLatency `==` PER_FRAME_CONTROL) |
| 8851 | * Manual sensor control (android.request.availableCapabilities contains `MANUAL_SENSOR`) |
| 8852 | * Manual post-processing control (android.request.availableCapabilities contains |
| 8853 | `MANUAL_POST_PROCESSING`) |
| 8854 | * The required exposure time range defined in android.sensor.info.exposureTimeRange |
| 8855 | * The required maxFrameDuration defined in android.sensor.info.maxFrameDuration |
| 8856 | |
| 8857 | Note: |
| 8858 | Pre-API level 23, FULL devices also supported arbitrary cropping region |
| 8859 | (android.scaler.croppingType `== FREEFORM`); this requirement was relaxed in API level |
| 8860 | 23, and `FULL` devices may only support `CENTERED` cropping. |
Ruben Brunk | 31b50c2 | 2014-07-02 00:13:46 +0000 | [diff] [blame] | 8861 | </notes> |
| 8862 | </value> |
| 8863 | <value> |
| 8864 | LEGACY |
| 8865 | <notes> |
| 8866 | This camera device is running in backward compatibility mode. |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8867 | |
| 8868 | Only the stream configurations listed in the `LEGACY` table in the {@link |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 8869 | android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession |
| 8870 | createCaptureSession} documentation are supported. |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8871 | |
| 8872 | A `LEGACY` device does not support per-frame control, manual sensor control, manual |
| 8873 | post-processing, arbitrary cropping regions, and has relaxed performance constraints. |
| 8874 | No additional capabilities beyond `BACKWARD_COMPATIBLE` will ever be listed by a |
| 8875 | `LEGACY` device in android.request.availableCapabilities. |
| 8876 | |
| 8877 | In addition, the android.control.aePrecaptureTrigger is not functional on `LEGACY` |
| 8878 | devices. Instead, every request that includes a JPEG-format output target is treated |
| 8879 | as triggering a still capture, internally executing a precapture trigger. This may |
| 8880 | fire the flash for flash power metering during precapture, and then fire the flash |
| 8881 | for the final capture, if a flash is available on the device and the AE mode is set to |
| 8882 | enable the flash. |
| 8883 | </notes> |
| 8884 | </value> |
| 8885 | <value> |
| 8886 | 3 |
| 8887 | <notes> |
| 8888 | This camera device is capable of YUV reprocessing and RAW data capture, in addition to |
| 8889 | FULL-level capabilities. |
| 8890 | |
| 8891 | The stream configurations listed in the `LEVEL_3`, `RAW`, `FULL`, `LEGACY` and |
| 8892 | `LIMITED` tables in the {@link |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 8893 | android.hardware.camera2.CameraDevice#createCaptureSession|ACameraDevice_createCaptureSession |
| 8894 | createCaptureSession} documentation are guaranteed to be supported. |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8895 | |
| 8896 | The following additional capabilities are guaranteed to be supported: |
| 8897 | |
| 8898 | * `YUV_REPROCESSING` capability (android.request.availableCapabilities contains |
| 8899 | `YUV_REPROCESSING`) |
| 8900 | * `RAW` capability (android.request.availableCapabilities contains |
| 8901 | `RAW`) |
Ruben Brunk | 31b50c2 | 2014-07-02 00:13:46 +0000 | [diff] [blame] | 8902 | </notes> |
| 8903 | </value> |
Yin-Chia Yeh | eef3922 | 2018-01-19 11:32:19 -0800 | [diff] [blame] | 8904 | <value hal_version="3.3"> |
| 8905 | EXTERNAL |
| 8906 | <notes> |
| 8907 | This camera device is backed by an external camera connected to this Android device. |
| 8908 | |
| 8909 | The device has capability identical to a LIMITED level device, with the following |
| 8910 | exceptions: |
| 8911 | |
| 8912 | * The device may not report lens/sensor related information such as |
| 8913 | - android.lens.focalLength |
| 8914 | - android.lens.info.hyperfocalDistance |
| 8915 | - android.sensor.info.physicalSize |
| 8916 | - android.sensor.info.whiteLevel |
| 8917 | - android.sensor.blackLevelPattern |
| 8918 | - android.sensor.info.colorFilterArrangement |
| 8919 | - android.sensor.rollingShutterSkew |
| 8920 | * The device will report 0 for android.sensor.orientation |
| 8921 | * The device has less guarantee on stable framerate, as the framerate partly depends |
| 8922 | on the external camera being used. |
| 8923 | </notes> |
| 8924 | </value> |
Igor Murashkin | 38b8cae | 2013-05-23 16:38:59 -0700 | [diff] [blame] | 8925 | </enum> |
| 8926 | <description> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 8927 | Generally classifies the overall set of the camera device functionality. |
| 8928 | </description> |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 8929 | <details> |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8930 | The supported hardware level is a high-level description of the camera device's |
| 8931 | capabilities, summarizing several capabilities into one field. Each level adds additional |
| 8932 | features to the previous one, and is always a strict superset of the previous level. |
| 8933 | The ordering is `LEGACY < LIMITED < FULL < LEVEL_3`. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 8934 | |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8935 | Starting from `LEVEL_3`, the level enumerations are guaranteed to be in increasing |
| 8936 | numerical value as well. To check if a given device is at least at a given hardware level, |
| 8937 | the following code snippet can be used: |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 8938 | |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8939 | // Returns true if the device supports the required hardware level, or better. |
| 8940 | boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) { |
| 8941 | int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL); |
| 8942 | if (deviceLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY) { |
| 8943 | return requiredLevel == deviceLevel; |
| 8944 | } |
| 8945 | // deviceLevel is not LEGACY, can use numerical sort |
| 8946 | return requiredLevel <= deviceLevel; |
| 8947 | } |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 8948 | |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8949 | At a high level, the levels are: |
| 8950 | |
| 8951 | * `LEGACY` devices operate in a backwards-compatibility mode for older |
| 8952 | Android devices, and have very limited capabilities. |
| 8953 | * `LIMITED` devices represent the |
| 8954 | baseline feature set, and may also include additional capabilities that are |
| 8955 | subsets of `FULL`. |
| 8956 | * `FULL` devices additionally support per-frame manual control of sensor, flash, lens and |
| 8957 | post-processing settings, and image capture at a high rate. |
| 8958 | * `LEVEL_3` devices additionally support YUV reprocessing and RAW image capture, along |
| 8959 | with additional output stream configurations. |
| 8960 | |
| 8961 | See the individual level enums for full descriptions of the supported capabilities. The |
| 8962 | android.request.availableCapabilities entry describes the device's capabilities at a |
| 8963 | finer-grain level, if needed. In addition, many controls have their available settings or |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 8964 | ranges defined in individual entries from {@link |
| 8965 | android.hardware.camera2.CameraCharacteristics|ACameraManager_getCameraCharacteristics}. |
Ruben Brunk | 31b50c2 | 2014-07-02 00:13:46 +0000 | [diff] [blame] | 8966 | |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 8967 | Some features are not part of any particular hardware level or capability and must be |
| 8968 | queried separately. These include: |
| 8969 | |
| 8970 | * Calibrated timestamps (android.sensor.info.timestampSource `==` REALTIME) |
| 8971 | * Precision lens control (android.lens.info.focusDistanceCalibration `==` CALIBRATED) |
| 8972 | * Face detection (android.statistics.info.availableFaceDetectModes) |
| 8973 | * Optical or electrical image stabilization |
| 8974 | (android.lens.info.availableOpticalStabilization, |
| 8975 | android.control.availableVideoStabilizationModes) |
| 8976 | |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 8977 | </details> |
| 8978 | <hal_details> |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 8979 | A camera HALv3 device can implement one of three possible operational modes; LIMITED, |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8980 | FULL, and LEVEL_3. |
| 8981 | |
| 8982 | FULL support or better is expected from new higher-end devices. Limited |
| 8983 | mode has hardware requirements roughly in line with those for a camera HAL device v1 |
| 8984 | implementation, and is expected from older or inexpensive devices. Each level is a strict |
| 8985 | superset of the previous level, and they share the same essential operational flow. |
Igor Murashkin | 38b8cae | 2013-05-23 16:38:59 -0700 | [diff] [blame] | 8986 | |
| 8987 | For full details refer to "S3. Operational Modes" in camera3.h |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 8988 | |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 8989 | Camera HAL3+ must not implement LEGACY mode. It is there for backwards compatibility in |
Eino-Ville Talvala | 0d40495 | 2017-11-10 15:13:04 -0800 | [diff] [blame] | 8990 | the `android.hardware.camera2` user-facing API only on legacy HALv1 devices, and is |
| 8991 | implemented by the camera framework code. |
Yin-Chia Yeh | eef3922 | 2018-01-19 11:32:19 -0800 | [diff] [blame] | 8992 | |
| 8993 | EXTERNAL level devices have lower peformance bar in CTS since the peformance might depend |
| 8994 | on the external camera being used and is not fully controlled by the device manufacturer. |
| 8995 | The ITS test suite is exempted for the same reason. |
Igor Murashkin | 57d570d | 2014-02-06 15:35:37 -0800 | [diff] [blame] | 8996 | </hal_details> |
Igor Murashkin | 38b8cae | 2013-05-23 16:38:59 -0700 | [diff] [blame] | 8997 | </entry> |
Chien-Yu Chen | 218925a | 2018-01-03 12:04:48 -0800 | [diff] [blame] | 8998 | <entry name="version" type="byte" visibility="public" typedef="string" hal_version="3.3"> |
| 8999 | <description> |
| 9000 | A short string for manufacturer version information about the camera device, such as |
| 9001 | ISP hardware, sensors, etc. |
| 9002 | </description> |
| 9003 | <details> |
| 9004 | This can be used in {@link android.media.ExifInterface#TAG_IMAGE_DESCRIPTION TAG_IMAGE_DESCRIPTION} |
| 9005 | in jpeg EXIF. This key may be absent if no version information is available on the |
| 9006 | device. |
| 9007 | </details> |
| 9008 | <hal_details> |
| 9009 | The string must consist of only alphanumeric characters, punctuation, and |
| 9010 | whitespace, i.e. it must match regular expression "[\p{Alnum}\p{Punct}\p{Space}]*". |
| 9011 | It must not exceed 256 characters. |
| 9012 | </hal_details> |
| 9013 | </entry> |
Igor Murashkin | 38b8cae | 2013-05-23 16:38:59 -0700 | [diff] [blame] | 9014 | </static> |
| 9015 | </section> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 9016 | <section name="blackLevel"> |
| 9017 | <controls> |
Igor Murashkin | b8dc881 | 2013-07-17 16:29:34 -0700 | [diff] [blame] | 9018 | <entry name="lock" type="byte" visibility="public" enum="true" |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 9019 | typedef="boolean" hwlevel="full"> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 9020 | <enum> |
| 9021 | <value>OFF</value> |
| 9022 | <value>ON</value> |
| 9023 | </enum> |
| 9024 | <description> Whether black-level compensation is locked |
Eino-Ville Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 9025 | to its current values, or is free to vary.</description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 9026 | <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] | 9027 | compensation will not change until the lock is set to |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 9028 | `false` (OFF). |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 9029 | |
| 9030 | Since changes to certain capture parameters (such as |
| 9031 | exposure time) may require resetting of black level |
Eino-Ville Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 9032 | compensation, the camera device must report whether setting |
| 9033 | the black level lock was successful in the output result |
Igor Murashkin | 656aa5a | 2013-08-13 14:23:39 -0700 | [diff] [blame] | 9034 | metadata. |
| 9035 | |
Igor Murashkin | 8aa2a11 | 2013-12-09 12:06:17 -0800 | [diff] [blame] | 9036 | For example, if a sequence of requests is as follows: |
| 9037 | |
| 9038 | * Request 1: Exposure = 10ms, Black level lock = OFF |
| 9039 | * Request 2: Exposure = 10ms, Black level lock = ON |
| 9040 | * Request 3: Exposure = 10ms, Black level lock = ON |
| 9041 | * Request 4: Exposure = 20ms, Black level lock = ON |
| 9042 | * Request 5: Exposure = 20ms, Black level lock = ON |
| 9043 | * Request 6: Exposure = 20ms, Black level lock = ON |
| 9044 | |
Eino-Ville Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 9045 | And the exposure change in Request 4 requires the camera |
| 9046 | device to reset the black level offsets, then the output |
| 9047 | result metadata is expected to be: |
Igor Murashkin | 8aa2a11 | 2013-12-09 12:06:17 -0800 | [diff] [blame] | 9048 | |
| 9049 | * Result 1: Exposure = 10ms, Black level lock = OFF |
| 9050 | * Result 2: Exposure = 10ms, Black level lock = ON |
| 9051 | * Result 3: Exposure = 10ms, Black level lock = ON |
| 9052 | * Result 4: Exposure = 20ms, Black level lock = OFF |
| 9053 | * Result 5: Exposure = 20ms, Black level lock = ON |
| 9054 | * Result 6: Exposure = 20ms, Black level lock = ON |
| 9055 | |
Eino-Ville Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 9056 | This indicates to the application that on frame 4, black |
| 9057 | levels were reset due to exposure value changes, and pixel |
| 9058 | values may not be consistent across captures. |
Igor Murashkin | 8aa2a11 | 2013-12-09 12:06:17 -0800 | [diff] [blame] | 9059 | |
Eino-Ville Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 9060 | The camera device will maintain the lock to the extent |
| 9061 | possible, only overriding the lock to OFF when changes to |
| 9062 | other request parameters require a black level recalculation |
| 9063 | or reset. |
| 9064 | </details> |
| 9065 | <hal_details> |
| 9066 | If for some reason black level locking is no longer possible |
| 9067 | (for example, the analog gain has changed, which forces |
| 9068 | black level offsets to be recalculated), then the HAL must |
| 9069 | override this request (and it must report 'OFF' when this |
| 9070 | does happen) until the next capture for which locking is |
| 9071 | possible again.</hal_details> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 9072 | <tag id="HAL2" /> |
| 9073 | </entry> |
| 9074 | </controls> |
| 9075 | <dynamic> |
| 9076 | <clone entry="android.blackLevel.lock" |
Igor Murashkin | 8aa2a11 | 2013-12-09 12:06:17 -0800 | [diff] [blame] | 9077 | kind="controls"> |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 9078 | <details> |
Eino-Ville Talvala | 7796cfe | 2013-12-26 13:16:54 -0800 | [diff] [blame] | 9079 | Whether the black level offset was locked for this frame. Should be |
| 9080 | ON if android.blackLevel.lock was ON in the capture request, unless |
| 9081 | a change in other capture settings forced the camera device to |
| 9082 | perform a black level reset. |
Eino-Ville Talvala | a5b73c2 | 2013-12-27 13:50:19 -0800 | [diff] [blame] | 9083 | </details> |
Igor Murashkin | 8aa2a11 | 2013-12-09 12:06:17 -0800 | [diff] [blame] | 9084 | </clone> |
Zhijun He | 69fc0ea | 2013-07-17 09:42:58 -0700 | [diff] [blame] | 9085 | </dynamic> |
| 9086 | </section> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9087 | <section name="sync"> |
| 9088 | <dynamic> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 9089 | <entry name="frameNumber" type="int64" visibility="ndk_public" |
| 9090 | enum="true" hwlevel="legacy"> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9091 | <enum> |
| 9092 | <value id="-1">CONVERGING |
| 9093 | <notes> |
| 9094 | The current result is not yet fully synchronized to any request. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 9095 | |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9096 | Synchronization is in progress, and reading metadata from this |
| 9097 | result may include a mix of data that have taken effect since the |
| 9098 | last synchronization time. |
| 9099 | |
| 9100 | In some future result, within android.sync.maxLatency frames, |
| 9101 | this value will update to the actual frame number frame number |
| 9102 | the result is guaranteed to be synchronized to (as long as the |
| 9103 | request settings remain constant). |
| 9104 | </notes> |
| 9105 | </value> |
| 9106 | <value id="-2">UNKNOWN |
| 9107 | <notes> |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 9108 | The current result's synchronization status is unknown. |
| 9109 | |
| 9110 | The result may have already converged, or it may be in |
| 9111 | progress. Reading from this result may include some mix |
| 9112 | of settings from past requests. |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9113 | |
| 9114 | After a settings change, the new settings will eventually all |
| 9115 | take effect for the output buffers and results. However, this |
| 9116 | value will not change when that happens. Altering settings |
| 9117 | rapidly may provide outcomes using mixes of settings from recent |
| 9118 | requests. |
| 9119 | |
| 9120 | This value is intended primarily for backwards compatibility with |
| 9121 | the older camera implementations (for android.hardware.Camera). |
| 9122 | </notes> |
| 9123 | </value> |
| 9124 | </enum> |
| 9125 | <description>The frame number corresponding to the last request |
| 9126 | with which the output result (metadata + buffers) has been fully |
| 9127 | synchronized.</description> |
| 9128 | <range>Either a non-negative value corresponding to a |
| 9129 | `frame_number`, or one of the two enums (CONVERGING / UNKNOWN). |
| 9130 | </range> |
| 9131 | <details> |
| 9132 | When a request is submitted to the camera device, there is usually a |
| 9133 | delay of several frames before the controls get applied. A camera |
| 9134 | device may either choose to account for this delay by implementing a |
| 9135 | pipeline and carefully submit well-timed atomic control updates, or |
| 9136 | it may start streaming control changes that span over several frame |
| 9137 | boundaries. |
| 9138 | |
| 9139 | In the latter case, whenever a request's settings change relative to |
| 9140 | the previous submitted request, the full set of changes may take |
| 9141 | multiple frame durations to fully take effect. Some settings may |
| 9142 | take effect sooner (in less frame durations) than others. |
| 9143 | |
| 9144 | While a set of control changes are being propagated, this value |
| 9145 | will be CONVERGING. |
| 9146 | |
| 9147 | Once it is fully known that a set of control changes have been |
| 9148 | finished propagating, and the resulting updated control settings |
| 9149 | have been read back by the camera device, this value will be set |
| 9150 | to a non-negative frame number (corresponding to the request to |
| 9151 | which the results have synchronized to). |
| 9152 | |
| 9153 | Older camera device implementations may not have a way to detect |
| 9154 | when all camera controls have been applied, and will always set this |
| 9155 | value to UNKNOWN. |
| 9156 | |
| 9157 | FULL capability devices will always have this value set to the |
| 9158 | frame number of the request corresponding to this result. |
| 9159 | |
| 9160 | _Further details_: |
| 9161 | |
| 9162 | * Whenever a request differs from the last request, any future |
| 9163 | results not yet returned may have this value set to CONVERGING (this |
| 9164 | could include any in-progress captures not yet returned by the camera |
| 9165 | device, for more details see pipeline considerations below). |
| 9166 | * Submitting a series of multiple requests that differ from the |
| 9167 | previous request (e.g. r1, r2, r3 s.t. r1 != r2 != r3) |
| 9168 | moves the new synchronization frame to the last non-repeating |
| 9169 | request (using the smallest frame number from the contiguous list of |
| 9170 | repeating requests). |
| 9171 | * Submitting the same request repeatedly will not change this value |
| 9172 | to CONVERGING, if it was already a non-negative value. |
| 9173 | * When this value changes to non-negative, that means that all of the |
| 9174 | metadata controls from the request have been applied, all of the |
| 9175 | metadata controls from the camera device have been read to the |
| 9176 | updated values (into the result), and all of the graphics buffers |
| 9177 | corresponding to this result are also synchronized to the request. |
| 9178 | |
| 9179 | _Pipeline considerations_: |
| 9180 | |
| 9181 | Submitting a request with updated controls relative to the previously |
| 9182 | submitted requests may also invalidate the synchronization state |
| 9183 | of all the results corresponding to currently in-flight requests. |
| 9184 | |
| 9185 | In other words, results for this current request and up to |
| 9186 | android.request.pipelineMaxDepth prior requests may have their |
| 9187 | android.sync.frameNumber change to CONVERGING. |
| 9188 | </details> |
| 9189 | <hal_details> |
| 9190 | Using UNKNOWN here is illegal unless android.sync.maxLatency |
| 9191 | is also UNKNOWN. |
| 9192 | |
| 9193 | FULL capability devices should simply set this value to the |
| 9194 | `frame_number` of the request this result corresponds to. |
| 9195 | </hal_details> |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 9196 | <tag id="V1" /> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9197 | </entry> |
| 9198 | </dynamic> |
| 9199 | <static> |
Igor Murashkin | ca25627 | 2014-10-02 15:27:09 -0700 | [diff] [blame] | 9200 | <entry name="maxLatency" type="int32" visibility="public" enum="true" |
| 9201 | hwlevel="legacy"> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9202 | <enum> |
| 9203 | <value id="0">PER_FRAME_CONTROL |
| 9204 | <notes> |
| 9205 | Every frame has the requests immediately applied. |
Eino-Ville Talvala | b432916 | 2014-06-09 14:23:02 -0700 | [diff] [blame] | 9206 | |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9207 | Changing controls over multiple requests one after another will |
| 9208 | produce results that have those controls applied atomically |
| 9209 | each frame. |
| 9210 | |
| 9211 | All FULL capability devices will have this as their maxLatency. |
| 9212 | </notes> |
| 9213 | </value> |
| 9214 | <value id="-1">UNKNOWN |
| 9215 | <notes> |
| 9216 | Each new frame has some subset (potentially the entire set) |
| 9217 | of the past requests applied to the camera settings. |
| 9218 | |
| 9219 | By submitting a series of identical requests, the camera device |
| 9220 | will eventually have the camera settings applied, but it is |
| 9221 | unknown when that exact point will be. |
Igor Murashkin | 757ec24 | 2014-07-25 16:55:18 -0700 | [diff] [blame] | 9222 | |
| 9223 | All LEGACY capability devices will have this as their maxLatency. |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9224 | </notes> |
| 9225 | </value> |
| 9226 | </enum> |
| 9227 | <description> |
| 9228 | The maximum number of frames that can occur after a request |
| 9229 | (different than the previous) has been submitted, and before the |
Chien-Yu Chen | 5f568ff | 2015-06-26 11:25:45 -0700 | [diff] [blame] | 9230 | result's state becomes synchronized. |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9231 | </description> |
Eino-Ville Talvala | 567167a | 2014-10-02 18:27:34 -0700 | [diff] [blame] | 9232 | <units>Frame counts</units> |
| 9233 | <range>A positive value, PER_FRAME_CONTROL, or UNKNOWN.</range> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9234 | <details> |
| 9235 | This defines the maximum distance (in number of metadata results), |
Chien-Yu Chen | 5f568ff | 2015-06-26 11:25:45 -0700 | [diff] [blame] | 9236 | between the frame number of the request that has new controls to apply |
| 9237 | and the frame number of the result that has all the controls applied. |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9238 | |
| 9239 | In other words this acts as an upper boundary for how many frames |
| 9240 | must occur before the camera device knows for a fact that the new |
| 9241 | submitted camera settings have been applied in outgoing frames. |
Chien-Yu Chen | 5f568ff | 2015-06-26 11:25:45 -0700 | [diff] [blame] | 9242 | </details> |
| 9243 | <hal_details> |
| 9244 | For example if maxLatency was 2, |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9245 | |
| 9246 | initial request = X (repeating) |
| 9247 | request1 = X |
| 9248 | request2 = Y |
| 9249 | request3 = Y |
| 9250 | request4 = Y |
| 9251 | |
| 9252 | where requestN has frameNumber N, and the first of the repeating |
| 9253 | initial request's has frameNumber F (and F < 1). |
| 9254 | |
| 9255 | initial result = X' + { android.sync.frameNumber == F } |
| 9256 | result1 = X' + { android.sync.frameNumber == F } |
| 9257 | result2 = X' + { android.sync.frameNumber == CONVERGING } |
| 9258 | result3 = X' + { android.sync.frameNumber == CONVERGING } |
| 9259 | result4 = X' + { android.sync.frameNumber == 2 } |
| 9260 | |
| 9261 | where resultN has frameNumber N. |
| 9262 | |
| 9263 | Since `result4` has a `frameNumber == 4` and |
| 9264 | `android.sync.frameNumber == 2`, the distance is clearly |
| 9265 | `4 - 2 = 2`. |
Chien-Yu Chen | 5f568ff | 2015-06-26 11:25:45 -0700 | [diff] [blame] | 9266 | |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9267 | Use `frame_count` from camera3_request_t instead of |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 9268 | android.request.frameCount or |
Eino-Ville Talvala | ea3b268 | 2016-01-21 12:23:56 -0800 | [diff] [blame] | 9269 | `{@link android.hardware.camera2.CaptureResult#getFrameNumber}`. |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9270 | |
| 9271 | LIMITED devices are strongly encouraged to use a non-negative |
| 9272 | value. If UNKNOWN is used here then app developers do not have a way |
| 9273 | to know when sensor settings have been applied. |
| 9274 | </hal_details> |
Zhijun He | 5fb671c | 2014-05-21 17:51:05 -0700 | [diff] [blame] | 9275 | <tag id="V1" /> |
Igor Murashkin | 5c1fc68 | 2014-01-16 17:51:36 -0800 | [diff] [blame] | 9276 | </entry> |
| 9277 | </static> |
| 9278 | </section> |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 9279 | <section name="reprocess"> |
| 9280 | <controls> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 9281 | <entry name="effectiveExposureFactor" type="float" visibility="java_public" hwlevel="limited"> |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 9282 | <description> |
| 9283 | The amount of exposure time increase factor applied to the original output |
| 9284 | frame by the application processing before sending for reprocessing. |
| 9285 | </description> |
| 9286 | <units>Relative exposure time increase factor.</units> |
| 9287 | <range> &gt;= 1.0</range> |
| 9288 | <details> |
| 9289 | This is optional, and will be supported if the camera device supports YUV_REPROCESSING |
| 9290 | capability (android.request.availableCapabilities contains YUV_REPROCESSING). |
| 9291 | |
| 9292 | For some YUV reprocessing use cases, the application may choose to filter the original |
| 9293 | output frames to effectively reduce the noise to the same level as a frame that was |
| 9294 | captured with longer exposure time. To be more specific, assuming the original captured |
| 9295 | images were captured with a sensitivity of S and an exposure time of T, the model in |
| 9296 | the camera device is that the amount of noise in the image would be approximately what |
| 9297 | would be expected if the original capture parameters had been a sensitivity of |
| 9298 | S/effectiveExposureFactor and an exposure time of T*effectiveExposureFactor, rather |
| 9299 | than S and T respectively. If the captured images were processed by the application |
| 9300 | before being sent for reprocessing, then the application may have used image processing |
| 9301 | algorithms and/or multi-frame image fusion to reduce the noise in the |
| 9302 | application-processed images (input images). By using the effectiveExposureFactor |
| 9303 | control, the application can communicate to the camera device the actual noise level |
| 9304 | improvement in the application-processed image. With this information, the camera |
| 9305 | device can select appropriate noise reduction and edge enhancement parameters to avoid |
| 9306 | excessive noise reduction (android.noiseReduction.mode) and insufficient edge |
| 9307 | enhancement (android.edge.mode) being applied to the reprocessed frames. |
| 9308 | |
| 9309 | For example, for multi-frame image fusion use case, the application may fuse |
| 9310 | multiple output frames together to a final frame for reprocessing. When N image are |
| 9311 | fused into 1 image for reprocessing, the exposure time increase factor could be up to |
| 9312 | square root of N (based on a simple photon shot noise model). The camera device will |
| 9313 | adjust the reprocessing noise reduction and edge enhancement parameters accordingly to |
| 9314 | produce the best quality images. |
| 9315 | |
| 9316 | This is relative factor, 1.0 indicates the application hasn't processed the input |
| 9317 | buffer in a way that affects its effective exposure time. |
| 9318 | |
| 9319 | This control is only effective for YUV reprocessing capture request. For noise |
| 9320 | reduction reprocessing, it is only effective when `android.noiseReduction.mode != OFF`. |
| 9321 | Similarly, for edge enhancement reprocessing, it is only effective when |
| 9322 | `android.edge.mode != OFF`. |
| 9323 | </details> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 9324 | <tag id="REPROC" /> |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 9325 | </entry> |
| 9326 | </controls> |
| 9327 | <dynamic> |
| 9328 | <clone entry="android.reprocess.effectiveExposureFactor" kind="controls"> |
| 9329 | </clone> |
| 9330 | </dynamic> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 9331 | <static> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 9332 | <entry name="maxCaptureStall" type="int32" visibility="java_public" hwlevel="limited"> |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 9333 | <description> |
| 9334 | The maximal camera capture pipeline stall (in unit of frame count) introduced by a |
| 9335 | reprocess capture request. |
| 9336 | </description> |
| 9337 | <units>Number of frames.</units> |
| 9338 | <range> &lt;= 4</range> |
| 9339 | <details> |
| 9340 | The key describes the maximal interference that one reprocess (input) request |
| 9341 | can introduce to the camera simultaneous streaming of regular (output) capture |
| 9342 | requests, including repeating requests. |
| 9343 | |
| 9344 | When a reprocessing capture request is submitted while a camera output repeating request |
| 9345 | (e.g. preview) is being served by the camera device, it may preempt the camera capture |
| 9346 | pipeline for at least one frame duration so that the camera device is unable to process |
| 9347 | the following capture request in time for the next sensor start of exposure boundary. |
| 9348 | When this happens, the application may observe a capture time gap (longer than one frame |
| 9349 | duration) between adjacent capture output frames, which usually exhibits as preview |
| 9350 | glitch if the repeating request output targets include a preview surface. This key gives |
| 9351 | the worst-case number of frame stall introduced by one reprocess request with any kind of |
| 9352 | formats/sizes combination. |
| 9353 | |
| 9354 | If this key reports 0, it means a reprocess request doesn't introduce any glitch to the |
| 9355 | ongoing camera repeating request outputs, as if this reprocess request is never issued. |
| 9356 | |
Chien-Yu Chen | f8581f6 | 2015-05-12 15:13:00 -0700 | [diff] [blame] | 9357 | This key is supported if the camera device supports PRIVATE or YUV reprocessing ( |
| 9358 | i.e. android.request.availableCapabilities contains PRIVATE_REPROCESSING or |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 9359 | YUV_REPROCESSING). |
| 9360 | </details> |
| 9361 | <tag id="REPROC" /> |
| 9362 | </entry> |
| 9363 | </static> |
Zhijun He | 41d6f04 | 2015-01-15 18:17:24 -0800 | [diff] [blame] | 9364 | </section> |
Eino-Ville Talvala | a166f50 | 2015-02-23 15:51:58 -0800 | [diff] [blame] | 9365 | <section name="depth"> |
| 9366 | <static> |
| 9367 | <entry name="maxDepthSamples" type="int32" visibility="system" hwlevel="limited"> |
| 9368 | <description>Maximum number of points that a depth point cloud may contain. |
| 9369 | </description> |
| 9370 | <details> |
Eino-Ville Talvala | ddda2bb | 2015-04-16 13:49:52 -0700 | [diff] [blame] | 9371 | If a camera device supports outputting depth range data in the form of a depth point |
| 9372 | cloud ({@link android.graphics.ImageFormat#DEPTH_POINT_CLOUD}), this is the maximum |
| 9373 | number of points an output buffer may contain. |
Eino-Ville Talvala | a166f50 | 2015-02-23 15:51:58 -0800 | [diff] [blame] | 9374 | |
| 9375 | Any given buffer may contain between 0 and maxDepthSamples points, inclusive. |
| 9376 | If output in the depth point cloud format is not supported, this entry will |
| 9377 | not be defined. |
| 9378 | </details> |
| 9379 | <tag id="DEPTH" /> |
| 9380 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 9381 | <entry name="availableDepthStreamConfigurations" type="int32" visibility="ndk_public" |
| 9382 | enum="true" container="array" typedef="streamConfiguration" hwlevel="limited"> |
Eino-Ville Talvala | a166f50 | 2015-02-23 15:51:58 -0800 | [diff] [blame] | 9383 | <array> |
| 9384 | <size>n</size> |
| 9385 | <size>4</size> |
| 9386 | </array> |
| 9387 | <enum> |
| 9388 | <value>OUTPUT</value> |
| 9389 | <value>INPUT</value> |
| 9390 | </enum> |
| 9391 | <description>The available depth dataspace stream |
| 9392 | configurations that this camera device supports |
| 9393 | (i.e. format, width, height, output/input stream). |
| 9394 | </description> |
| 9395 | <details> |
| 9396 | These are output stream configurations for use with |
| 9397 | dataSpace HAL_DATASPACE_DEPTH. The configurations are |
| 9398 | listed as `(format, width, height, input?)` tuples. |
| 9399 | |
| 9400 | Only devices that support depth output for at least |
| 9401 | the HAL_PIXEL_FORMAT_Y16 dense depth map may include |
| 9402 | this entry. |
| 9403 | |
| 9404 | A device that also supports the HAL_PIXEL_FORMAT_BLOB |
| 9405 | sparse depth point cloud must report a single entry for |
| 9406 | the format in this list as `(HAL_PIXEL_FORMAT_BLOB, |
| 9407 | android.depth.maxDepthSamples, 1, OUTPUT)` in addition to |
| 9408 | the entries for HAL_PIXEL_FORMAT_Y16. |
| 9409 | </details> |
| 9410 | <tag id="DEPTH" /> |
| 9411 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 9412 | <entry name="availableDepthMinFrameDurations" type="int64" visibility="ndk_public" |
| 9413 | container="array" typedef="streamConfigurationDuration" hwlevel="limited"> |
Eino-Ville Talvala | a166f50 | 2015-02-23 15:51:58 -0800 | [diff] [blame] | 9414 | <array> |
| 9415 | <size>4</size> |
| 9416 | <size>n</size> |
| 9417 | </array> |
| 9418 | <description>This lists the minimum frame duration for each |
| 9419 | format/size combination for depth output formats. |
| 9420 | </description> |
| 9421 | <units>(format, width, height, ns) x n</units> |
| 9422 | <details> |
| 9423 | This should correspond to the frame duration when only that |
| 9424 | stream is active, with all processing (typically in android.*.mode) |
| 9425 | set to either OFF or FAST. |
| 9426 | |
| 9427 | When multiple streams are used in a request, the minimum frame |
| 9428 | duration will be max(individual stream min durations). |
| 9429 | |
| 9430 | The minimum frame duration of a stream (of a particular format, size) |
| 9431 | is the same regardless of whether the stream is input or output. |
| 9432 | |
| 9433 | See android.sensor.frameDuration and |
| 9434 | android.scaler.availableStallDurations for more details about |
| 9435 | calculating the max frame rate. |
Eino-Ville Talvala | a166f50 | 2015-02-23 15:51:58 -0800 | [diff] [blame] | 9436 | </details> |
| 9437 | <tag id="DEPTH" /> |
| 9438 | </entry> |
Yin-Chia Yeh | c6c2416 | 2016-04-02 16:30:30 -0700 | [diff] [blame] | 9439 | <entry name="availableDepthStallDurations" type="int64" visibility="ndk_public" |
Eino-Ville Talvala | a166f50 | 2015-02-23 15:51:58 -0800 | [diff] [blame] | 9440 | container="array" typedef="streamConfigurationDuration" hwlevel="limited"> |
| 9441 | <array> |
| 9442 | <size>4</size> |
| 9443 | <size>n</size> |
| 9444 | </array> |
| 9445 | <description>This lists the maximum stall duration for each |
Zhijun He | 5137915 | 2015-04-24 17:59:50 -0700 | [diff] [blame] | 9446 | output format/size combination for depth streams. |
Eino-Ville Talvala | a166f50 | 2015-02-23 15:51:58 -0800 | [diff] [blame] | 9447 | </description> |
| 9448 | <units>(format, width, height, ns) x n</units> |
| 9449 | <details> |
| 9450 | A stall duration is how much extra time would get added |
| 9451 | to the normal minimum frame duration for a repeating request |
| 9452 | that has streams with non-zero stall. |
| 9453 | |
| 9454 | This functions similarly to |
| 9455 | android.scaler.availableStallDurations for depth |
| 9456 | streams. |
| 9457 | |
| 9458 | All depth output stream formats may have a nonzero stall |
| 9459 | duration. |
| 9460 | </details> |
| 9461 | <tag id="DEPTH" /> |
| 9462 | </entry> |
Eino-Ville Talvala | 8f0d2d1 | 2015-04-13 17:28:29 -0700 | [diff] [blame] | 9463 | <entry name="depthIsExclusive" type="byte" visibility="public" |
| 9464 | enum="true" typedef="boolean" hwlevel="limited"> |
| 9465 | <enum> |
| 9466 | <value>FALSE</value> |
| 9467 | <value>TRUE</value> |
| 9468 | </enum> |
| 9469 | <description>Indicates whether a capture request may target both a |
| 9470 | DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as |
| 9471 | YUV_420_888, JPEG, or RAW) simultaneously. |
| 9472 | </description> |
| 9473 | <details> |
| 9474 | If TRUE, including both depth and color outputs in a single |
| 9475 | capture request is not supported. An application must interleave color |
| 9476 | and depth requests. If FALSE, a single request can target both types |
| 9477 | of output. |
| 9478 | |
| 9479 | Typically, this restriction exists on camera devices that |
| 9480 | need to emit a specific pattern or wavelength of light to |
| 9481 | measure depth values, which causes the color image to be |
| 9482 | corrupted during depth measurement. |
| 9483 | </details> |
| 9484 | </entry> |
Eino-Ville Talvala | a166f50 | 2015-02-23 15:51:58 -0800 | [diff] [blame] | 9485 | </static> |
| 9486 | </section> |
Shuzhen Wang | 0144f58 | 2017-11-30 12:03:37 -0800 | [diff] [blame] | 9487 | <section name="logicalMultiCamera"> |
| 9488 | <static> |
| 9489 | <entry name="physicalIds" type="byte" visibility="hidden" |
| 9490 | container="array" hwlevel="limited" hal_version="3.3"> |
| 9491 | <array> |
| 9492 | <size>n</size> |
| 9493 | </array> |
| 9494 | <description>String containing the ids of the underlying physical cameras. |
| 9495 | </description> |
| 9496 | <units>UTF-8 null-terminated string</units> |
| 9497 | <details> |
| 9498 | For a logical camera, this is concatenation of all underlying physical camera ids. |
| 9499 | The null terminator for physical camera id must be preserved so that the whole string |
| 9500 | can be tokenized using '\0' to generate list of physical camera ids. |
| 9501 | |
| 9502 | For example, if the physical camera ids of the logical camera are "2" and "3", the |
| 9503 | value of this tag will be ['2', '\0', '3', '\0']. |
| 9504 | |
| 9505 | The number of physical camera ids must be no less than 2. |
| 9506 | </details> |
| 9507 | <tag id="LOGICALCAMERA" /> |
| 9508 | </entry> |
| 9509 | <entry name="sensorSyncType" type="byte" visibility="public" |
| 9510 | enum="true" hwlevel="limited" hal_version="3.3"> |
| 9511 | <enum> |
| 9512 | <value>APPROXIMATE |
| 9513 | <notes> |
| 9514 | A software mechanism is used to synchronize between the physical cameras. As a result, |
| 9515 | the timestamp of an image from a physical stream is only an approximation of the |
| 9516 | image sensor start-of-exposure time. |
| 9517 | </notes> |
| 9518 | </value> |
| 9519 | <value>CALIBRATED |
| 9520 | <notes> |
| 9521 | The camera device supports frame timestamp synchronization at the hardware level, |
| 9522 | and the timestamp of a physical stream image accurately reflects its |
| 9523 | start-of-exposure time. |
| 9524 | </notes> |
| 9525 | </value> |
| 9526 | </enum> |
| 9527 | <description>The accuracy of frame timestamp synchronization between physical cameras</description> |
| 9528 | <details> |
| 9529 | The accuracy of the frame timestamp synchronization determines the physical cameras' |
| 9530 | ability to start exposure at the same time. If the sensorSyncType is CALIBRATED, |
| 9531 | the physical camera sensors usually run in master-slave mode so that their shutter |
| 9532 | time is synchronized. For APPROXIMATE sensorSyncType, the camera sensors usually run in |
| 9533 | master-master mode, and there could be offset between their start of exposure. |
| 9534 | |
| 9535 | In both cases, all images generated for a particular capture request still carry the same |
| 9536 | timestamps, so that they can be used to look up the matching frame number and |
| 9537 | onCaptureStarted callback. |
| 9538 | </details> |
| 9539 | <tag id="LOGICALCAMERA" /> |
| 9540 | </entry> |
| 9541 | </static> |
| 9542 | </section> |
Igor Murashkin | 77b63ca | 2012-11-09 16:15:02 -0800 | [diff] [blame] | 9543 | </namespace> |
| 9544 | </metadata> |