Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 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 | |
Eino-Ville Talvala | 2f1a2e4 | 2013-07-25 17:12:05 -0700 | [diff] [blame] | 17 | package android.hardware.camera2; |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 18 | |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 19 | import android.annotation.NonNull; |
| 20 | import android.annotation.Nullable; |
Mathew Inwood | 5132cc1 | 2018-08-08 15:50:55 +0100 | [diff] [blame] | 21 | import android.annotation.UnsupportedAppUsage; |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 22 | import android.hardware.camera2.impl.CameraMetadataNative; |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 23 | import android.hardware.camera2.impl.PublicKey; |
| 24 | import android.hardware.camera2.impl.SyntheticKey; |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 25 | import android.hardware.camera2.params.SessionConfiguration; |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 26 | import android.hardware.camera2.utils.ArrayUtils; |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 27 | import android.hardware.camera2.utils.TypeReference; |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 28 | import android.util.Rational; |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 29 | |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 30 | import java.util.Arrays; |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 31 | import java.util.Collections; |
Shuzhen Wang | bde1397 | 2018-03-19 10:30:45 -0700 | [diff] [blame] | 32 | import java.util.HashSet; |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 33 | import java.util.List; |
Shuzhen Wang | bde1397 | 2018-03-19 10:30:45 -0700 | [diff] [blame] | 34 | import java.util.Set; |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 35 | |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 36 | /** |
| 37 | * <p>The properties describing a |
| 38 | * {@link CameraDevice CameraDevice}.</p> |
| 39 | * |
| 40 | * <p>These properties are fixed for a given CameraDevice, and can be queried |
| 41 | * through the {@link CameraManager CameraManager} |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 42 | * interface with {@link CameraManager#getCameraCharacteristics}.</p> |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 43 | * |
Ruben Brunk | f967a54 | 2014-04-28 16:31:11 -0700 | [diff] [blame] | 44 | * <p>{@link CameraCharacteristics} objects are immutable.</p> |
| 45 | * |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 46 | * @see CameraDevice |
| 47 | * @see CameraManager |
| 48 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 49 | public final class CameraCharacteristics extends CameraMetadata<CameraCharacteristics.Key<?>> { |
| 50 | |
| 51 | /** |
| 52 | * A {@code Key} is used to do camera characteristics field lookups with |
| 53 | * {@link CameraCharacteristics#get}. |
| 54 | * |
| 55 | * <p>For example, to get the stream configuration map: |
| 56 | * <code><pre> |
| 57 | * StreamConfigurationMap map = cameraCharacteristics.get( |
| 58 | * CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP); |
| 59 | * </pre></code> |
| 60 | * </p> |
| 61 | * |
| 62 | * <p>To enumerate over all possible keys for {@link CameraCharacteristics}, see |
| 63 | * {@link CameraCharacteristics#getKeys()}.</p> |
| 64 | * |
| 65 | * @see CameraCharacteristics#get |
| 66 | * @see CameraCharacteristics#getKeys() |
| 67 | */ |
| 68 | public static final class Key<T> { |
| 69 | private final CameraMetadataNative.Key<T> mKey; |
| 70 | |
| 71 | /** |
| 72 | * Visible for testing and vendor extensions only. |
| 73 | * |
| 74 | * @hide |
| 75 | */ |
Mathew Inwood | 5132cc1 | 2018-08-08 15:50:55 +0100 | [diff] [blame] | 76 | @UnsupportedAppUsage |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 77 | public Key(String name, Class<T> type, long vendorId) { |
| 78 | mKey = new CameraMetadataNative.Key<T>(name, type, vendorId); |
| 79 | } |
| 80 | |
| 81 | /** |
| 82 | * Visible for testing and vendor extensions only. |
| 83 | * |
| 84 | * @hide |
| 85 | */ |
Justin Yun | f01e40c | 2018-05-18 20:39:45 +0900 | [diff] [blame] | 86 | public Key(String name, String fallbackName, Class<T> type) { |
| 87 | mKey = new CameraMetadataNative.Key<T>(name, fallbackName, type); |
| 88 | } |
| 89 | |
| 90 | /** |
| 91 | * Visible for testing and vendor extensions only. |
| 92 | * |
| 93 | * @hide |
| 94 | */ |
Mathew Inwood | 5132cc1 | 2018-08-08 15:50:55 +0100 | [diff] [blame] | 95 | @UnsupportedAppUsage |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 96 | public Key(String name, Class<T> type) { |
| 97 | mKey = new CameraMetadataNative.Key<T>(name, type); |
| 98 | } |
| 99 | |
| 100 | /** |
| 101 | * Visible for testing and vendor extensions only. |
| 102 | * |
| 103 | * @hide |
| 104 | */ |
Mathew Inwood | 5132cc1 | 2018-08-08 15:50:55 +0100 | [diff] [blame] | 105 | @UnsupportedAppUsage |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 106 | public Key(String name, TypeReference<T> typeReference) { |
| 107 | mKey = new CameraMetadataNative.Key<T>(name, typeReference); |
| 108 | } |
| 109 | |
| 110 | /** |
| 111 | * Return a camelCase, period separated name formatted like: |
| 112 | * {@code "root.section[.subsections].name"}. |
| 113 | * |
| 114 | * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."}; |
| 115 | * keys that are device/platform-specific are prefixed with {@code "com."}.</p> |
| 116 | * |
| 117 | * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would |
| 118 | * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device |
| 119 | * specific key might look like {@code "com.google.nexus.data.private"}.</p> |
| 120 | * |
| 121 | * @return String representation of the key name |
| 122 | */ |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 123 | @NonNull |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 124 | public String getName() { |
| 125 | return mKey.getName(); |
| 126 | } |
| 127 | |
| 128 | /** |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 129 | * Return vendor tag id. |
| 130 | * |
| 131 | * @hide |
| 132 | */ |
| 133 | public long getVendorId() { |
| 134 | return mKey.getVendorId(); |
| 135 | } |
| 136 | |
| 137 | /** |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 138 | * {@inheritDoc} |
| 139 | */ |
| 140 | @Override |
| 141 | public final int hashCode() { |
| 142 | return mKey.hashCode(); |
| 143 | } |
| 144 | |
| 145 | /** |
| 146 | * {@inheritDoc} |
| 147 | */ |
| 148 | @SuppressWarnings("unchecked") |
| 149 | @Override |
| 150 | public final boolean equals(Object o) { |
| 151 | return o instanceof Key && ((Key<T>)o).mKey.equals(mKey); |
| 152 | } |
| 153 | |
| 154 | /** |
Chien-Yu Chen | 12a8385 | 2015-07-07 12:17:22 -0700 | [diff] [blame] | 155 | * Return this {@link Key} as a string representation. |
| 156 | * |
| 157 | * <p>{@code "CameraCharacteristics.Key(%s)"}, where {@code %s} represents |
| 158 | * the name of this key as returned by {@link #getName}.</p> |
| 159 | * |
| 160 | * @return string representation of {@link Key} |
| 161 | */ |
| 162 | @NonNull |
| 163 | @Override |
| 164 | public String toString() { |
| 165 | return String.format("CameraCharacteristics.Key(%s)", mKey.getName()); |
| 166 | } |
| 167 | |
| 168 | /** |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 169 | * Visible for CameraMetadataNative implementation only; do not use. |
| 170 | * |
| 171 | * TODO: Make this private or remove it altogether. |
| 172 | * |
| 173 | * @hide |
| 174 | */ |
Mathew Inwood | 5132cc1 | 2018-08-08 15:50:55 +0100 | [diff] [blame] | 175 | @UnsupportedAppUsage |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 176 | public CameraMetadataNative.Key<T> getNativeKey() { |
| 177 | return mKey; |
| 178 | } |
| 179 | |
| 180 | @SuppressWarnings({ |
| 181 | "unused", "unchecked" |
| 182 | }) |
| 183 | private Key(CameraMetadataNative.Key<?> nativeKey) { |
| 184 | mKey = (CameraMetadataNative.Key<T>) nativeKey; |
| 185 | } |
| 186 | } |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 187 | |
Mathew Inwood | 5132cc1 | 2018-08-08 15:50:55 +0100 | [diff] [blame] | 188 | @UnsupportedAppUsage |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 189 | private final CameraMetadataNative mProperties; |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 190 | private List<CameraCharacteristics.Key<?>> mKeys; |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 191 | private List<CaptureRequest.Key<?>> mAvailableRequestKeys; |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 192 | private List<CaptureRequest.Key<?>> mAvailableSessionKeys; |
Emilian Peev | 2100ae7 | 2018-01-12 16:56:25 +0000 | [diff] [blame] | 193 | private List<CaptureRequest.Key<?>> mAvailablePhysicalRequestKeys; |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 194 | private List<CaptureResult.Key<?>> mAvailableResultKeys; |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 195 | |
| 196 | /** |
| 197 | * Takes ownership of the passed-in properties object |
| 198 | * @hide |
| 199 | */ |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 200 | public CameraCharacteristics(CameraMetadataNative properties) { |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 201 | mProperties = CameraMetadataNative.move(properties); |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 202 | setNativeInstance(mProperties); |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 203 | } |
| 204 | |
Ruben Brunk | f967a54 | 2014-04-28 16:31:11 -0700 | [diff] [blame] | 205 | /** |
| 206 | * Returns a copy of the underlying {@link CameraMetadataNative}. |
| 207 | * @hide |
| 208 | */ |
| 209 | public CameraMetadataNative getNativeCopy() { |
| 210 | return new CameraMetadataNative(mProperties); |
| 211 | } |
| 212 | |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 213 | /** |
| 214 | * Get a camera characteristics field value. |
| 215 | * |
| 216 | * <p>The field definitions can be |
| 217 | * found in {@link CameraCharacteristics}.</p> |
| 218 | * |
| 219 | * <p>Querying the value for the same key more than once will return a value |
| 220 | * which is equal to the previous queried value.</p> |
| 221 | * |
| 222 | * @throws IllegalArgumentException if the key was not valid |
| 223 | * |
| 224 | * @param key The characteristics field to read. |
| 225 | * @return The value of that key, or {@code null} if the field is not set. |
| 226 | */ |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 227 | @Nullable |
Eino-Ville Talvala | 70c2207 | 2013-08-27 12:09:04 -0700 | [diff] [blame] | 228 | public <T> T get(Key<T> key) { |
| 229 | return mProperties.get(key); |
| 230 | } |
| 231 | |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 232 | /** |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 233 | * {@inheritDoc} |
| 234 | * @hide |
| 235 | */ |
| 236 | @SuppressWarnings("unchecked") |
| 237 | @Override |
| 238 | protected <T> T getProtected(Key<?> key) { |
| 239 | return (T) mProperties.get(key); |
| 240 | } |
| 241 | |
| 242 | /** |
| 243 | * {@inheritDoc} |
| 244 | * @hide |
| 245 | */ |
| 246 | @SuppressWarnings("unchecked") |
| 247 | @Override |
| 248 | protected Class<Key<?>> getKeyClass() { |
| 249 | Object thisClass = Key.class; |
| 250 | return (Class<Key<?>>)thisClass; |
| 251 | } |
| 252 | |
| 253 | /** |
| 254 | * {@inheritDoc} |
| 255 | */ |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 256 | @NonNull |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 257 | @Override |
| 258 | public List<Key<?>> getKeys() { |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 259 | // List of keys is immutable; cache the results after we calculate them |
| 260 | if (mKeys != null) { |
| 261 | return mKeys; |
| 262 | } |
| 263 | |
| 264 | int[] filterTags = get(REQUEST_AVAILABLE_CHARACTERISTICS_KEYS); |
| 265 | if (filterTags == null) { |
| 266 | throw new AssertionError("android.request.availableCharacteristicsKeys must be non-null" |
| 267 | + " in the characteristics"); |
| 268 | } |
| 269 | |
| 270 | mKeys = Collections.unmodifiableList( |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 271 | getKeys(getClass(), getKeyClass(), this, filterTags)); |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 272 | return mKeys; |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 273 | } |
| 274 | |
| 275 | /** |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 276 | * <p>Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that the |
| 277 | * camera device can pass as part of the capture session initialization.</p> |
| 278 | * |
| 279 | * <p>This list includes keys that are difficult to apply per-frame and |
| 280 | * can result in unexpected delays when modified during the capture session |
| 281 | * lifetime. Typical examples include parameters that require a |
| 282 | * time-consuming hardware re-configuration or internal camera pipeline |
| 283 | * change. For performance reasons we suggest clients to pass their initial |
| 284 | * values as part of {@link SessionConfiguration#setSessionParameters}. Once |
| 285 | * the camera capture session is enabled it is also recommended to avoid |
| 286 | * changing them from their initial values set in |
| 287 | * {@link SessionConfiguration#setSessionParameters }. |
| 288 | * Control over session parameters can still be exerted in capture requests |
| 289 | * but clients should be aware and expect delays during their application. |
| 290 | * An example usage scenario could look like this:</p> |
| 291 | * <ul> |
| 292 | * <li>The camera client starts by quering the session parameter key list via |
| 293 | * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li> |
| 294 | * <li>Before triggering the capture session create sequence, a capture request |
| 295 | * must be built via {@link CameraDevice#createCaptureRequest } using an |
| 296 | * appropriate template matching the particular use case.</li> |
| 297 | * <li>The client should go over the list of session parameters and check |
| 298 | * whether some of the keys listed matches with the parameters that |
| 299 | * they intend to modify as part of the first capture request.</li> |
| 300 | * <li>If there is no such match, the capture request can be passed |
| 301 | * unmodified to {@link SessionConfiguration#setSessionParameters }.</li> |
| 302 | * <li>If matches do exist, the client should update the respective values |
| 303 | * and pass the request to {@link SessionConfiguration#setSessionParameters }.</li> |
| 304 | * <li>After the capture session initialization completes the session parameter |
| 305 | * key list can continue to serve as reference when posting or updating |
| 306 | * further requests. As mentioned above further changes to session |
| 307 | * parameters should ideally be avoided, if updates are necessary |
| 308 | * however clients could expect a delay/glitch during the |
| 309 | * parameter switch.</li> |
| 310 | * </ul> |
| 311 | * |
| 312 | * <p>The list returned is not modifiable, so any attempts to modify it will throw |
| 313 | * a {@code UnsupportedOperationException}.</p> |
| 314 | * |
| 315 | * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> |
| 316 | * |
| 317 | * @return List of keys that can be passed during capture session initialization. In case the |
| 318 | * camera device doesn't support such keys the list can be null. |
| 319 | */ |
| 320 | @SuppressWarnings({"unchecked"}) |
| 321 | public List<CaptureRequest.Key<?>> getAvailableSessionKeys() { |
| 322 | if (mAvailableSessionKeys == null) { |
| 323 | Object crKey = CaptureRequest.Key.class; |
| 324 | Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey; |
| 325 | |
| 326 | int[] filterTags = get(REQUEST_AVAILABLE_SESSION_KEYS); |
| 327 | if (filterTags == null) { |
| 328 | return null; |
| 329 | } |
| 330 | mAvailableSessionKeys = |
| 331 | getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags); |
| 332 | } |
| 333 | return mAvailableSessionKeys; |
| 334 | } |
| 335 | |
| 336 | /** |
Emilian Peev | 2100ae7 | 2018-01-12 16:56:25 +0000 | [diff] [blame] | 337 | * <p>Returns a subset of {@link #getAvailableCaptureRequestKeys} keys that can |
| 338 | * be overriden for physical devices backing a logical multi-camera.</p> |
| 339 | * |
| 340 | * <p>This is a subset of android.request.availableRequestKeys which contains a list |
| 341 | * of keys that can be overriden using {@link CaptureRequest.Builder#setPhysicalCameraKey }. |
| 342 | * The respective value of such request key can be obtained by calling |
| 343 | * {@link CaptureRequest.Builder#getPhysicalCameraKey }. Capture requests that contain |
| 344 | * individual physical device requests must be built via |
| 345 | * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}. |
| 346 | * Such extended capture requests can be passed only to |
| 347 | * {@link CameraCaptureSession#capture } or {@link CameraCaptureSession#captureBurst } and |
| 348 | * not to {@link CameraCaptureSession#setRepeatingRequest } or |
| 349 | * {@link CameraCaptureSession#setRepeatingBurst }.</p> |
| 350 | * |
| 351 | * <p>The list returned is not modifiable, so any attempts to modify it will throw |
| 352 | * a {@code UnsupportedOperationException}.</p> |
| 353 | * |
| 354 | * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> |
| 355 | * |
| 356 | * @return List of keys that can be overriden in individual physical device requests. |
| 357 | * In case the camera device doesn't support such keys the list can be null. |
| 358 | */ |
| 359 | @SuppressWarnings({"unchecked"}) |
| 360 | public List<CaptureRequest.Key<?>> getAvailablePhysicalCameraRequestKeys() { |
Emilian Peev | f60f4fb | 2018-02-08 17:40:48 +0000 | [diff] [blame] | 361 | if (mAvailablePhysicalRequestKeys == null) { |
Emilian Peev | 2100ae7 | 2018-01-12 16:56:25 +0000 | [diff] [blame] | 362 | Object crKey = CaptureRequest.Key.class; |
| 363 | Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey; |
| 364 | |
| 365 | int[] filterTags = get(REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS); |
| 366 | if (filterTags == null) { |
| 367 | return null; |
| 368 | } |
| 369 | mAvailablePhysicalRequestKeys = |
| 370 | getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags); |
| 371 | } |
| 372 | return mAvailablePhysicalRequestKeys; |
| 373 | } |
| 374 | |
| 375 | /** |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 376 | * Returns the list of keys supported by this {@link CameraDevice} for querying |
| 377 | * with a {@link CaptureRequest}. |
| 378 | * |
| 379 | * <p>The list returned is not modifiable, so any attempts to modify it will throw |
| 380 | * a {@code UnsupportedOperationException}.</p> |
| 381 | * |
| 382 | * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> |
| 383 | * |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 384 | * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 385 | * {@link #getKeys()} instead.</p> |
| 386 | * |
| 387 | * @return List of keys supported by this CameraDevice for CaptureRequests. |
| 388 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 389 | @SuppressWarnings({"unchecked"}) |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 390 | @NonNull |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 391 | public List<CaptureRequest.Key<?>> getAvailableCaptureRequestKeys() { |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 392 | if (mAvailableRequestKeys == null) { |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 393 | Object crKey = CaptureRequest.Key.class; |
| 394 | Class<CaptureRequest.Key<?>> crKeyTyped = (Class<CaptureRequest.Key<?>>)crKey; |
| 395 | |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 396 | int[] filterTags = get(REQUEST_AVAILABLE_REQUEST_KEYS); |
| 397 | if (filterTags == null) { |
| 398 | throw new AssertionError("android.request.availableRequestKeys must be non-null " |
| 399 | + "in the characteristics"); |
| 400 | } |
| 401 | mAvailableRequestKeys = |
| 402 | getAvailableKeyList(CaptureRequest.class, crKeyTyped, filterTags); |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 403 | } |
| 404 | return mAvailableRequestKeys; |
| 405 | } |
| 406 | |
| 407 | /** |
| 408 | * Returns the list of keys supported by this {@link CameraDevice} for querying |
| 409 | * with a {@link CaptureResult}. |
| 410 | * |
| 411 | * <p>The list returned is not modifiable, so any attempts to modify it will throw |
| 412 | * a {@code UnsupportedOperationException}.</p> |
| 413 | * |
| 414 | * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> |
| 415 | * |
Igor Murashkin | 68f4006 | 2013-09-10 12:15:54 -0700 | [diff] [blame] | 416 | * <p>Note that there is no {@code getAvailableCameraCharacteristicsKeys()} -- use |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 417 | * {@link #getKeys()} instead.</p> |
| 418 | * |
| 419 | * @return List of keys supported by this CameraDevice for CaptureResults. |
| 420 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 421 | @SuppressWarnings({"unchecked"}) |
Eino-Ville Talvala | 8b90557 | 2015-05-14 15:43:01 -0700 | [diff] [blame] | 422 | @NonNull |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 423 | public List<CaptureResult.Key<?>> getAvailableCaptureResultKeys() { |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 424 | if (mAvailableResultKeys == null) { |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 425 | Object crKey = CaptureResult.Key.class; |
| 426 | Class<CaptureResult.Key<?>> crKeyTyped = (Class<CaptureResult.Key<?>>)crKey; |
| 427 | |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 428 | int[] filterTags = get(REQUEST_AVAILABLE_RESULT_KEYS); |
| 429 | if (filterTags == null) { |
| 430 | throw new AssertionError("android.request.availableResultKeys must be non-null " |
| 431 | + "in the characteristics"); |
| 432 | } |
| 433 | mAvailableResultKeys = getAvailableKeyList(CaptureResult.class, crKeyTyped, filterTags); |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 434 | } |
| 435 | return mAvailableResultKeys; |
| 436 | } |
| 437 | |
| 438 | /** |
| 439 | * Returns the list of keys supported by this {@link CameraDevice} by metadataClass. |
| 440 | * |
| 441 | * <p>The list returned is not modifiable, so any attempts to modify it will throw |
| 442 | * a {@code UnsupportedOperationException}.</p> |
| 443 | * |
| 444 | * <p>Each key is only listed once in the list. The order of the keys is undefined.</p> |
| 445 | * |
| 446 | * @param metadataClass The subclass of CameraMetadata that you want to get the keys for. |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 447 | * @param keyClass The class of the metadata key, e.g. CaptureRequest.Key.class |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 448 | * |
| 449 | * @return List of keys supported by this CameraDevice for metadataClass. |
| 450 | * |
| 451 | * @throws IllegalArgumentException if metadataClass is not a subclass of CameraMetadata |
| 452 | */ |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 453 | private <TKey> List<TKey> |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 454 | getAvailableKeyList(Class<?> metadataClass, Class<TKey> keyClass, int[] filterTags) { |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 455 | |
| 456 | if (metadataClass.equals(CameraMetadata.class)) { |
| 457 | throw new AssertionError( |
| 458 | "metadataClass must be a strict subclass of CameraMetadata"); |
| 459 | } else if (!CameraMetadata.class.isAssignableFrom(metadataClass)) { |
| 460 | throw new AssertionError( |
| 461 | "metadataClass must be a subclass of CameraMetadata"); |
| 462 | } |
| 463 | |
Emilian Peev | de62d84 | 2017-03-23 19:20:40 +0000 | [diff] [blame] | 464 | List<TKey> staticKeyList = getKeys( |
Igor Murashkin | cc542a4 | 2014-06-25 11:52:23 -0700 | [diff] [blame] | 465 | metadataClass, keyClass, /*instance*/null, filterTags); |
Igor Murashkin | d6d6515 | 2014-05-19 16:31:02 -0700 | [diff] [blame] | 466 | return Collections.unmodifiableList(staticKeyList); |
Igor Murashkin | 7a36a0f | 2013-09-10 18:13:09 -0700 | [diff] [blame] | 467 | } |
| 468 | |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 469 | /** |
Shuzhen Wang | bde1397 | 2018-03-19 10:30:45 -0700 | [diff] [blame] | 470 | * Returns the set of physical camera ids that this logical {@link CameraDevice} is |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 471 | * made up of. |
| 472 | * |
| 473 | * <p>A camera device is a logical camera if it has |
| 474 | * REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA capability. If the camera device |
Shuzhen Wang | bde1397 | 2018-03-19 10:30:45 -0700 | [diff] [blame] | 475 | * doesn't have the capability, the return value will be an empty set. </p> |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 476 | * |
Shuzhen Wang | bde1397 | 2018-03-19 10:30:45 -0700 | [diff] [blame] | 477 | * <p>The set returned is not modifiable, so any attempts to modify it will throw |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 478 | * a {@code UnsupportedOperationException}.</p> |
| 479 | * |
Shuzhen Wang | bde1397 | 2018-03-19 10:30:45 -0700 | [diff] [blame] | 480 | * @return Set of physical camera ids for this logical camera device. |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 481 | */ |
| 482 | @NonNull |
Shuzhen Wang | bde1397 | 2018-03-19 10:30:45 -0700 | [diff] [blame] | 483 | public Set<String> getPhysicalCameraIds() { |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 484 | int[] availableCapabilities = get(REQUEST_AVAILABLE_CAPABILITIES); |
| 485 | if (availableCapabilities == null) { |
| 486 | throw new AssertionError("android.request.availableCapabilities must be non-null " |
| 487 | + "in the characteristics"); |
| 488 | } |
| 489 | |
| 490 | if (!ArrayUtils.contains(availableCapabilities, |
| 491 | REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA)) { |
Shuzhen Wang | bde1397 | 2018-03-19 10:30:45 -0700 | [diff] [blame] | 492 | return Collections.emptySet(); |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 493 | } |
| 494 | byte[] physicalCamIds = get(LOGICAL_MULTI_CAMERA_PHYSICAL_IDS); |
| 495 | |
| 496 | String physicalCamIdString = null; |
| 497 | try { |
| 498 | physicalCamIdString = new String(physicalCamIds, "UTF-8"); |
| 499 | } catch (java.io.UnsupportedEncodingException e) { |
| 500 | throw new AssertionError("android.logicalCam.physicalIds must be UTF-8 string"); |
| 501 | } |
Shuzhen Wang | bde1397 | 2018-03-19 10:30:45 -0700 | [diff] [blame] | 502 | String[] physicalCameraIdArray = physicalCamIdString.split("\0"); |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 503 | |
Shuzhen Wang | bde1397 | 2018-03-19 10:30:45 -0700 | [diff] [blame] | 504 | return Collections.unmodifiableSet(new HashSet<String>(Arrays.asList(physicalCameraIdArray))); |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 505 | } |
| 506 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 507 | /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ |
| 508 | * The key entries below this point are generated from metadata |
| 509 | * definitions in /system/media/camera/docs. Do not modify by hand or |
| 510 | * modify the comment blocks at the start or end. |
| 511 | *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 512 | |
| 513 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 514 | * <p>List of aberration correction modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode} that are |
| 515 | * supported by this camera device.</p> |
| 516 | * <p>This key lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}. If no |
| 517 | * aberration correction modes are available for a device, this list will solely include |
Yin-Chia Yeh | 941aac0 | 2015-01-06 10:32:47 -0800 | [diff] [blame] | 518 | * OFF mode. All camera devices will support either OFF or FAST mode.</p> |
| 519 | * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always list |
| 520 | * OFF mode. This includes all FULL level devices.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 521 | * <p>LEGACY devices will always only support FAST mode.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 522 | * <p><b>Range of valid values:</b><br> |
| 523 | * Any value listed in {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE android.colorCorrection.aberrationMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 524 | * <p>This key is available on all devices.</p> |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 525 | * |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 526 | * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_MODE |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 527 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 528 | @PublicKey |
Zhijun He | 9e4e439 | 2014-08-18 11:12:32 -0700 | [diff] [blame] | 529 | public static final Key<int[]> COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES = |
| 530 | new Key<int[]>("android.colorCorrection.availableAberrationModes", int[].class); |
Zhijun He | a05e59d | 2014-07-08 18:27:47 -0700 | [diff] [blame] | 531 | |
| 532 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 533 | * <p>List of auto-exposure antibanding modes for {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} that are |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 534 | * supported by this camera device.</p> |
| 535 | * <p>Not all of the auto-exposure anti-banding modes may be |
| 536 | * supported by a given camera device. This field lists the |
| 537 | * valid anti-banding modes that the application may request |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 538 | * for this camera device with the |
Yin-Chia Yeh | 7b2cae6 | 2014-11-25 11:54:18 -0800 | [diff] [blame] | 539 | * {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode} control.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 540 | * <p><b>Range of valid values:</b><br> |
| 541 | * Any value listed in {@link CaptureRequest#CONTROL_AE_ANTIBANDING_MODE android.control.aeAntibandingMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 542 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 543 | * |
| 544 | * @see CaptureRequest#CONTROL_AE_ANTIBANDING_MODE |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 545 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 546 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 547 | public static final Key<int[]> CONTROL_AE_AVAILABLE_ANTIBANDING_MODES = |
| 548 | new Key<int[]>("android.control.aeAvailableAntibandingModes", int[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 549 | |
| 550 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 551 | * <p>List of auto-exposure modes for {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} that are supported by this camera |
| 552 | * device.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 553 | * <p>Not all the auto-exposure modes may be supported by a |
| 554 | * given camera device, especially if no flash unit is |
| 555 | * available. This entry lists the valid modes for |
| 556 | * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} for this camera device.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 557 | * <p>All camera devices support ON, and all camera devices with flash |
| 558 | * units support ON_AUTO_FLASH and ON_ALWAYS_FLASH.</p> |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 559 | * <p>FULL mode camera devices always support OFF mode, |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 560 | * which enables application control of camera exposure time, |
| 561 | * sensitivity, and frame duration.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 562 | * <p>LEGACY mode camera devices never support OFF mode. |
| 563 | * LIMITED mode devices support OFF if they support the MANUAL_SENSOR |
| 564 | * capability.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 565 | * <p><b>Range of valid values:</b><br> |
| 566 | * Any value listed in {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 567 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 568 | * |
| 569 | * @see CaptureRequest#CONTROL_AE_MODE |
| 570 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 571 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 572 | public static final Key<int[]> CONTROL_AE_AVAILABLE_MODES = |
| 573 | new Key<int[]>("android.control.aeAvailableModes", int[].class); |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 574 | |
| 575 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 576 | * <p>List of frame rate ranges for {@link CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE android.control.aeTargetFpsRange} supported by |
| 577 | * this camera device.</p> |
Yin-Chia Yeh | 5855162 | 2015-05-21 11:27:06 -0700 | [diff] [blame] | 578 | * <p>For devices at the LEGACY level or above:</p> |
| 579 | * <ul> |
Yin-Chia Yeh | 5fdf0a1 | 2015-11-20 15:39:36 -0800 | [diff] [blame] | 580 | * <li> |
| 581 | * <p>For constant-framerate recording, for each normal |
| 582 | * {@link android.media.CamcorderProfile CamcorderProfile}, that is, a |
Yin-Chia Yeh | 5855162 | 2015-05-21 11:27:06 -0700 | [diff] [blame] | 583 | * {@link android.media.CamcorderProfile CamcorderProfile} that has |
| 584 | * {@link android.media.CamcorderProfile#quality quality} in |
| 585 | * the range [{@link android.media.CamcorderProfile#QUALITY_LOW QUALITY_LOW}, |
| 586 | * {@link android.media.CamcorderProfile#QUALITY_2160P QUALITY_2160P}], if the profile is |
| 587 | * supported by the device and has |
| 588 | * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code>, this list will |
Yin-Chia Yeh | 5fdf0a1 | 2015-11-20 15:39:36 -0800 | [diff] [blame] | 589 | * always include (<code>x</code>,<code>x</code>).</p> |
| 590 | * </li> |
| 591 | * <li> |
| 592 | * <p>Also, a camera device must either not support any |
| 593 | * {@link android.media.CamcorderProfile CamcorderProfile}, |
| 594 | * or support at least one |
| 595 | * normal {@link android.media.CamcorderProfile CamcorderProfile} that has |
| 596 | * {@link android.media.CamcorderProfile#videoFrameRate videoFrameRate} <code>x</code> >= 24.</p> |
| 597 | * </li> |
Yin-Chia Yeh | 5855162 | 2015-05-21 11:27:06 -0700 | [diff] [blame] | 598 | * </ul> |
| 599 | * <p>For devices at the LIMITED level or above:</p> |
| 600 | * <ul> |
| 601 | * <li>For YUV_420_888 burst capture use case, this list will always include (<code>min</code>, <code>max</code>) |
| 602 | * and (<code>max</code>, <code>max</code>) where <code>min</code> <= 15 and <code>max</code> = the maximum output frame rate of the |
| 603 | * maximum YUV_420_888 output size.</li> |
| 604 | * </ul> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 605 | * <p><b>Units</b>: Frames per second (FPS)</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 606 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 607 | * |
| 608 | * @see CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 609 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 610 | @PublicKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 611 | public static final Key<android.util.Range<Integer>[]> CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES = |
| 612 | new Key<android.util.Range<Integer>[]>("android.control.aeAvailableTargetFpsRanges", new TypeReference<android.util.Range<Integer>[]>() {{ }}); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 613 | |
| 614 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 615 | * <p>Maximum and minimum exposure compensation values for |
| 616 | * {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}, in counts of {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep}, |
| 617 | * that are supported by this camera device.</p> |
| 618 | * <p><b>Range of valid values:</b><br></p> |
Zhijun He | f1745ce | 2015-02-04 13:55:14 -0800 | [diff] [blame] | 619 | * <p>Range [0,0] indicates that exposure compensation is not supported.</p> |
| 620 | * <p>For LIMITED and FULL devices, range must follow below requirements if exposure |
| 621 | * compensation is supported (<code>range != [0, 0]</code>):</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 622 | * <p><code>Min.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} <= -2 EV</code></p> |
| 623 | * <p><code>Max.exposure compensation * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} >= 2 EV</code></p> |
Zhijun He | f1745ce | 2015-02-04 13:55:14 -0800 | [diff] [blame] | 624 | * <p>LEGACY devices may support a smaller range than this.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 625 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 626 | * |
| 627 | * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 628 | * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 629 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 630 | @PublicKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 631 | public static final Key<android.util.Range<Integer>> CONTROL_AE_COMPENSATION_RANGE = |
| 632 | new Key<android.util.Range<Integer>>("android.control.aeCompensationRange", new TypeReference<android.util.Range<Integer>>() {{ }}); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 633 | |
| 634 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 635 | * <p>Smallest step by which the exposure compensation |
| 636 | * can be changed.</p> |
| 637 | * <p>This is the unit for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation}. For example, if this key has |
| 638 | * a value of <code>1/2</code>, then a setting of <code>-2</code> for {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} means |
| 639 | * that the target EV offset for the auto-exposure routine is -1 EV.</p> |
| 640 | * <p>One unit of EV compensation changes the brightness of the captured image by a factor |
| 641 | * of two. +1 EV doubles the image brightness, while -1 EV halves the image brightness.</p> |
| 642 | * <p><b>Units</b>: Exposure Value (EV)</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 643 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 644 | * |
| 645 | * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 646 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 647 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 648 | public static final Key<Rational> CONTROL_AE_COMPENSATION_STEP = |
| 649 | new Key<Rational>("android.control.aeCompensationStep", Rational.class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 650 | |
| 651 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 652 | * <p>List of auto-focus (AF) modes for {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} that are |
| 653 | * supported by this camera device.</p> |
Zhijun He | 78146ec | 2014-01-14 18:12:13 -0800 | [diff] [blame] | 654 | * <p>Not all the auto-focus modes may be supported by a |
| 655 | * given camera device. This entry lists the valid modes for |
| 656 | * {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} for this camera device.</p> |
Ruben Brunk | 6f38709 | 2014-09-22 16:13:54 -0700 | [diff] [blame] | 657 | * <p>All LIMITED and FULL mode camera devices will support OFF mode, and all |
| 658 | * camera devices with adjustable focuser units |
| 659 | * (<code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0</code>) will support AUTO mode.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 660 | * <p>LEGACY devices will support OFF mode only if they support |
| 661 | * focusing to infinity (by also setting {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} to |
| 662 | * <code>0.0f</code>).</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 663 | * <p><b>Range of valid values:</b><br> |
| 664 | * Any value listed in {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 665 | * <p>This key is available on all devices.</p> |
Zhijun He | 78146ec | 2014-01-14 18:12:13 -0800 | [diff] [blame] | 666 | * |
| 667 | * @see CaptureRequest#CONTROL_AF_MODE |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 668 | * @see CaptureRequest#LENS_FOCUS_DISTANCE |
Zhijun He | 78146ec | 2014-01-14 18:12:13 -0800 | [diff] [blame] | 669 | * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 670 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 671 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 672 | public static final Key<int[]> CONTROL_AF_AVAILABLE_MODES = |
| 673 | new Key<int[]>("android.control.afAvailableModes", int[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 674 | |
| 675 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 676 | * <p>List of color effects for {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode} that are supported by this camera |
| 677 | * device.</p> |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 678 | * <p>This list contains the color effect modes that can be applied to |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 679 | * images produced by the camera device. |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 680 | * Implementations are not expected to be consistent across all devices. |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 681 | * If no color effect modes are available for a device, this will only list |
| 682 | * OFF.</p> |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 683 | * <p>A color effect will only be applied if |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 684 | * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF. OFF is always included in this list.</p> |
| 685 | * <p>This control has no effect on the operation of other control routines such |
| 686 | * as auto-exposure, white balance, or focus.</p> |
| 687 | * <p><b>Range of valid values:</b><br> |
| 688 | * Any value listed in {@link CaptureRequest#CONTROL_EFFECT_MODE android.control.effectMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 689 | * <p>This key is available on all devices.</p> |
Ruben Brunk | 5f1dcfe | 2014-01-17 16:42:51 -0800 | [diff] [blame] | 690 | * |
| 691 | * @see CaptureRequest#CONTROL_EFFECT_MODE |
| 692 | * @see CaptureRequest#CONTROL_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 693 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 694 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 695 | public static final Key<int[]> CONTROL_AVAILABLE_EFFECTS = |
| 696 | new Key<int[]>("android.control.availableEffects", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 697 | |
| 698 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 699 | * <p>List of scene modes for {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} that are supported by this camera |
| 700 | * device.</p> |
Ruben Brunk | 8237d34 | 2014-01-17 15:33:02 -0800 | [diff] [blame] | 701 | * <p>This list contains scene modes that can be set for the camera device. |
| 702 | * Only scene modes that have been fully implemented for the |
| 703 | * camera device may be included here. Implementations are not expected |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 704 | * to be consistent across all devices.</p> |
| 705 | * <p>If no scene modes are supported by the camera device, this |
| 706 | * will be set to DISABLED. Otherwise DISABLED will not be listed.</p> |
| 707 | * <p>FACE_PRIORITY is always listed if face detection is |
| 708 | * supported (i.e.<code>{@link CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT android.statistics.info.maxFaceCount} > |
| 709 | * 0</code>).</p> |
| 710 | * <p><b>Range of valid values:</b><br> |
| 711 | * Any value listed in {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 712 | * <p>This key is available on all devices.</p> |
Ruben Brunk | 8237d34 | 2014-01-17 15:33:02 -0800 | [diff] [blame] | 713 | * |
| 714 | * @see CaptureRequest#CONTROL_SCENE_MODE |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 715 | * @see CameraCharacteristics#STATISTICS_INFO_MAX_FACE_COUNT |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 716 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 717 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 718 | public static final Key<int[]> CONTROL_AVAILABLE_SCENE_MODES = |
| 719 | new Key<int[]>("android.control.availableSceneModes", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 720 | |
| 721 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 722 | * <p>List of video stabilization modes for {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} |
| 723 | * that are supported by this camera device.</p> |
| 724 | * <p>OFF will always be listed.</p> |
| 725 | * <p><b>Range of valid values:</b><br> |
| 726 | * Any value listed in {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 727 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 728 | * |
| 729 | * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 730 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 731 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 732 | public static final Key<int[]> CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES = |
| 733 | new Key<int[]>("android.control.availableVideoStabilizationModes", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 734 | |
| 735 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 736 | * <p>List of auto-white-balance modes for {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} that are supported by this |
| 737 | * camera device.</p> |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 738 | * <p>Not all the auto-white-balance modes may be supported by a |
| 739 | * given camera device. This entry lists the valid modes for |
| 740 | * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} for this camera device.</p> |
| 741 | * <p>All camera devices will support ON mode.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 742 | * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always support OFF |
| 743 | * mode, which enables application control of white balance, by using |
| 744 | * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} and {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}({@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} must be set to TRANSFORM_MATRIX). This includes all FULL |
| 745 | * mode camera devices.</p> |
| 746 | * <p><b>Range of valid values:</b><br> |
| 747 | * Any value listed in {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 748 | * <p>This key is available on all devices.</p> |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 749 | * |
Zhijun He | 399f05d | 2014-01-15 11:31:30 -0800 | [diff] [blame] | 750 | * @see CaptureRequest#COLOR_CORRECTION_GAINS |
Eino-Ville Talvala | 265b34c | 2014-01-16 16:18:52 -0800 | [diff] [blame] | 751 | * @see CaptureRequest#COLOR_CORRECTION_MODE |
| 752 | * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM |
| 753 | * @see CaptureRequest#CONTROL_AWB_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 754 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 755 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 756 | public static final Key<int[]> CONTROL_AWB_AVAILABLE_MODES = |
| 757 | new Key<int[]>("android.control.awbAvailableModes", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 758 | |
| 759 | /** |
Ruben Brunk | 90bc34e | 2014-02-03 17:54:24 -0800 | [diff] [blame] | 760 | * <p>List of the maximum number of regions that can be used for metering in |
| 761 | * auto-exposure (AE), auto-white balance (AWB), and auto-focus (AF); |
| 762 | * this corresponds to the the maximum number of elements in |
| 763 | * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}, {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}, |
| 764 | * and {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 765 | * <p><b>Range of valid values:</b><br></p> |
| 766 | * <p>Value must be >= 0 for each element. For full-capability devices |
| 767 | * this value must be >= 1 for AE and AF. The order of the elements is: |
| 768 | * <code>(AE, AWB, AF)</code>.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 769 | * <p>This key is available on all devices.</p> |
Ruben Brunk | 90bc34e | 2014-02-03 17:54:24 -0800 | [diff] [blame] | 770 | * |
| 771 | * @see CaptureRequest#CONTROL_AE_REGIONS |
| 772 | * @see CaptureRequest#CONTROL_AF_REGIONS |
| 773 | * @see CaptureRequest#CONTROL_AWB_REGIONS |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 774 | * @hide |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 775 | */ |
Ruben Brunk | 90bc34e | 2014-02-03 17:54:24 -0800 | [diff] [blame] | 776 | public static final Key<int[]> CONTROL_MAX_REGIONS = |
| 777 | new Key<int[]>("android.control.maxRegions", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 778 | |
| 779 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 780 | * <p>The maximum number of metering regions that can be used by the auto-exposure (AE) |
| 781 | * routine.</p> |
| 782 | * <p>This corresponds to the the maximum allowed number of elements in |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 783 | * {@link CaptureRequest#CONTROL_AE_REGIONS android.control.aeRegions}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 784 | * <p><b>Range of valid values:</b><br> |
| 785 | * Value will be >= 0. For FULL-capability devices, this |
| 786 | * value will be >= 1.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 787 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 788 | * |
| 789 | * @see CaptureRequest#CONTROL_AE_REGIONS |
| 790 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 791 | @PublicKey |
| 792 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 793 | public static final Key<Integer> CONTROL_MAX_REGIONS_AE = |
| 794 | new Key<Integer>("android.control.maxRegionsAe", int.class); |
| 795 | |
| 796 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 797 | * <p>The maximum number of metering regions that can be used by the auto-white balance (AWB) |
| 798 | * routine.</p> |
| 799 | * <p>This corresponds to the the maximum allowed number of elements in |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 800 | * {@link CaptureRequest#CONTROL_AWB_REGIONS android.control.awbRegions}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 801 | * <p><b>Range of valid values:</b><br> |
| 802 | * Value will be >= 0.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 803 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 804 | * |
| 805 | * @see CaptureRequest#CONTROL_AWB_REGIONS |
| 806 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 807 | @PublicKey |
| 808 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 809 | public static final Key<Integer> CONTROL_MAX_REGIONS_AWB = |
| 810 | new Key<Integer>("android.control.maxRegionsAwb", int.class); |
| 811 | |
| 812 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 813 | * <p>The maximum number of metering regions that can be used by the auto-focus (AF) routine.</p> |
| 814 | * <p>This corresponds to the the maximum allowed number of elements in |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 815 | * {@link CaptureRequest#CONTROL_AF_REGIONS android.control.afRegions}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 816 | * <p><b>Range of valid values:</b><br> |
| 817 | * Value will be >= 0. For FULL-capability devices, this |
| 818 | * value will be >= 1.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 819 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 820 | * |
| 821 | * @see CaptureRequest#CONTROL_AF_REGIONS |
| 822 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 823 | @PublicKey |
| 824 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 825 | public static final Key<Integer> CONTROL_MAX_REGIONS_AF = |
| 826 | new Key<Integer>("android.control.maxRegionsAf", int.class); |
| 827 | |
| 828 | /** |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 829 | * <p>List of available high speed video size, fps range and max batch size configurations |
| 830 | * supported by the camera device, in the format of (width, height, fps_min, fps_max, batch_size_max).</p> |
Zhijun He | 3c1ff68 | 2015-06-23 09:21:43 -0700 | [diff] [blame] | 831 | * <p>When CONSTRAINED_HIGH_SPEED_VIDEO is supported in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}, |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 832 | * this metadata will list the supported high speed video size, fps range and max batch size |
| 833 | * configurations. All the sizes listed in this configuration will be a subset of the sizes |
| 834 | * reported by {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } |
| 835 | * for processed non-stalling formats.</p> |
| 836 | * <p>For the high speed video use case, the application must |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 837 | * select the video size and fps range from this metadata to configure the recording and |
| 838 | * preview streams and setup the recording requests. For example, if the application intends |
| 839 | * to do high speed recording, it can select the maximum size reported by this metadata to |
| 840 | * configure output streams. Once the size is selected, application can filter this metadata |
| 841 | * by selected size and get the supported fps ranges, and use these fps ranges to setup the |
Yin-Chia Yeh | 12da140 | 2014-07-15 10:37:31 -0700 | [diff] [blame] | 842 | * recording requests. Note that for the use case of multiple output streams, application |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 843 | * must select one unique size from this metadata to use (e.g., preview and recording streams |
| 844 | * must have the same size). Otherwise, the high speed capture session creation will fail.</p> |
| 845 | * <p>The min and max fps will be multiple times of 30fps.</p> |
| 846 | * <p>High speed video streaming extends significant performance pressue to camera hardware, |
| 847 | * to achieve efficient high speed streaming, the camera device may have to aggregate |
| 848 | * multiple frames together and send to camera device for processing where the request |
| 849 | * controls are same for all the frames in this batch. Max batch size indicates |
| 850 | * the max possible number of frames the camera device will group together for this high |
| 851 | * speed stream configuration. This max batch size will be used to generate a high speed |
| 852 | * recording request list by |
Eino-Ville Talvala | 639fffe | 2015-06-30 10:34:48 -0700 | [diff] [blame] | 853 | * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList }. |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 854 | * The max batch size for each configuration will satisfy below conditions:</p> |
| 855 | * <ul> |
| 856 | * <li>Each max batch size will be a divisor of its corresponding fps_max / 30. For example, |
| 857 | * if max_fps is 300, max batch size will only be 1, 2, 5, or 10.</li> |
| 858 | * <li>The camera device may choose smaller internal batch size for each configuration, but |
| 859 | * the actual batch size will be a divisor of max batch size. For example, if the max batch |
| 860 | * size is 8, the actual batch size used by camera device will only be 1, 2, 4, or 8.</li> |
| 861 | * <li>The max batch size in each configuration entry must be no larger than 32.</li> |
| 862 | * </ul> |
| 863 | * <p>The camera device doesn't have to support batch mode to achieve high speed video recording, |
| 864 | * in such case, batch_size_max will be reported as 1 in each configuration entry.</p> |
| 865 | * <p>This fps ranges in this configuration list can only be used to create requests |
| 866 | * that are submitted to a high speed camera capture session created by |
| 867 | * {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession }. |
| 868 | * The fps ranges reported in this metadata must not be used to setup capture requests for |
| 869 | * normal capture session, or it will cause request error.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 870 | * <p><b>Range of valid values:</b><br></p> |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 871 | * <p>For each configuration, the fps_max >= 120fps.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 872 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 873 | * <p><b>Limited capability</b> - |
| 874 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 875 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 876 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 877 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Zhijun He | 3c1ff68 | 2015-06-23 09:21:43 -0700 | [diff] [blame] | 878 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 879 | * @hide |
| 880 | */ |
Yin-Chia Yeh | 12da140 | 2014-07-15 10:37:31 -0700 | [diff] [blame] | 881 | public static final Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]> CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS = |
| 882 | new Key<android.hardware.camera2.params.HighSpeedVideoConfiguration[]>("android.control.availableHighSpeedVideoConfigurations", android.hardware.camera2.params.HighSpeedVideoConfiguration[].class); |
Zhijun He | e040418 | 2014-06-26 13:17:09 -0700 | [diff] [blame] | 883 | |
| 884 | /** |
Yin-Chia Yeh | dc0ba09 | 2015-02-20 15:52:06 -0800 | [diff] [blame] | 885 | * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock}</p> |
Yin-Chia Yeh | 7e3e431 | 2015-04-02 14:34:30 -0700 | [diff] [blame] | 886 | * <p>Devices with MANUAL_SENSOR capability or BURST_CAPTURE capability will always |
| 887 | * list <code>true</code>. This includes FULL devices.</p> |
Yin-Chia Yeh | dc0ba09 | 2015-02-20 15:52:06 -0800 | [diff] [blame] | 888 | * <p>This key is available on all devices.</p> |
| 889 | * |
| 890 | * @see CaptureRequest#CONTROL_AE_LOCK |
| 891 | */ |
| 892 | @PublicKey |
| 893 | public static final Key<Boolean> CONTROL_AE_LOCK_AVAILABLE = |
| 894 | new Key<Boolean>("android.control.aeLockAvailable", boolean.class); |
| 895 | |
| 896 | /** |
| 897 | * <p>Whether the camera device supports {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock}</p> |
Yin-Chia Yeh | 7e3e431 | 2015-04-02 14:34:30 -0700 | [diff] [blame] | 898 | * <p>Devices with MANUAL_POST_PROCESSING capability or BURST_CAPTURE capability will |
| 899 | * always list <code>true</code>. This includes FULL devices.</p> |
Yin-Chia Yeh | dc0ba09 | 2015-02-20 15:52:06 -0800 | [diff] [blame] | 900 | * <p>This key is available on all devices.</p> |
| 901 | * |
| 902 | * @see CaptureRequest#CONTROL_AWB_LOCK |
| 903 | */ |
| 904 | @PublicKey |
| 905 | public static final Key<Boolean> CONTROL_AWB_LOCK_AVAILABLE = |
| 906 | new Key<Boolean>("android.control.awbLockAvailable", boolean.class); |
| 907 | |
| 908 | /** |
| 909 | * <p>List of control modes for {@link CaptureRequest#CONTROL_MODE android.control.mode} that are supported by this camera |
| 910 | * device.</p> |
| 911 | * <p>This list contains control modes that can be set for the camera device. |
| 912 | * LEGACY mode devices will always support AUTO mode. LIMITED and FULL |
| 913 | * devices will always support OFF, AUTO modes.</p> |
| 914 | * <p><b>Range of valid values:</b><br> |
| 915 | * Any value listed in {@link CaptureRequest#CONTROL_MODE android.control.mode}</p> |
| 916 | * <p>This key is available on all devices.</p> |
| 917 | * |
| 918 | * @see CaptureRequest#CONTROL_MODE |
| 919 | */ |
| 920 | @PublicKey |
| 921 | public static final Key<int[]> CONTROL_AVAILABLE_MODES = |
| 922 | new Key<int[]>("android.control.availableModes", int[].class); |
| 923 | |
| 924 | /** |
Yin-Chia Yeh | 1ee1a0a | 2016-01-18 19:13:47 -0800 | [diff] [blame] | 925 | * <p>Range of boosts for {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} supported |
| 926 | * by this camera device.</p> |
| 927 | * <p>Devices support post RAW sensitivity boost will advertise |
| 928 | * {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} key for controling |
| 929 | * post RAW sensitivity boost.</p> |
| 930 | * <p>This key will be <code>null</code> for devices that do not support any RAW format |
| 931 | * outputs. For devices that do support RAW format outputs, this key will always |
| 932 | * present, and if a device does not support post RAW sensitivity boost, it will |
| 933 | * list <code>(100, 100)</code> in this key.</p> |
| 934 | * <p><b>Units</b>: ISO arithmetic units, the same as {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</p> |
| 935 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 936 | * |
| 937 | * @see CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST |
| 938 | * @see CaptureRequest#SENSOR_SENSITIVITY |
| 939 | */ |
| 940 | @PublicKey |
| 941 | public static final Key<android.util.Range<Integer>> CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE = |
| 942 | new Key<android.util.Range<Integer>>("android.control.postRawSensitivityBoostRange", new TypeReference<android.util.Range<Integer>>() {{ }}); |
| 943 | |
| 944 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 945 | * <p>List of edge enhancement modes for {@link CaptureRequest#EDGE_MODE android.edge.mode} that are supported by this camera |
| 946 | * device.</p> |
Chien-Yu Chen | 7233391 | 2015-07-08 11:55:19 -0700 | [diff] [blame] | 947 | * <p>Full-capability camera devices must always support OFF; camera devices that support |
| 948 | * YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will |
| 949 | * list FAST.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 950 | * <p><b>Range of valid values:</b><br> |
| 951 | * Any value listed in {@link CaptureRequest#EDGE_MODE android.edge.mode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 952 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 953 | * <p><b>Full capability</b> - |
| 954 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 955 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 956 | * |
| 957 | * @see CaptureRequest#EDGE_MODE |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 958 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 959 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 960 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 961 | public static final Key<int[]> EDGE_AVAILABLE_EDGE_MODES = |
| 962 | new Key<int[]>("android.edge.availableEdgeModes", int[].class); |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 963 | |
| 964 | /** |
Zhijun He | ca1b73a | 2014-02-03 12:39:53 -0800 | [diff] [blame] | 965 | * <p>Whether this camera device has a |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 966 | * flash unit.</p> |
| 967 | * <p>Will be <code>false</code> if no flash is available.</p> |
| 968 | * <p>If there is no flash unit, none of the flash controls do |
| 969 | * anything. |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 970 | * This key is available on all devices.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 971 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 972 | @PublicKey |
Zhijun He | ca1b73a | 2014-02-03 12:39:53 -0800 | [diff] [blame] | 973 | public static final Key<Boolean> FLASH_INFO_AVAILABLE = |
| 974 | new Key<Boolean>("android.flash.info.available", boolean.class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 975 | |
| 976 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 977 | * <p>List of hot pixel correction modes for {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode} that are supported by this |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 978 | * camera device.</p> |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 979 | * <p>FULL mode camera devices will always support FAST.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 980 | * <p><b>Range of valid values:</b><br> |
| 981 | * Any value listed in {@link CaptureRequest#HOT_PIXEL_MODE android.hotPixel.mode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 982 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 983 | * |
| 984 | * @see CaptureRequest#HOT_PIXEL_MODE |
| 985 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 986 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 987 | public static final Key<int[]> HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES = |
| 988 | new Key<int[]>("android.hotPixel.availableHotPixelModes", int[].class); |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 989 | |
| 990 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 991 | * <p>List of JPEG thumbnail sizes for {@link CaptureRequest#JPEG_THUMBNAIL_SIZE android.jpeg.thumbnailSize} supported by this |
| 992 | * camera device.</p> |
| 993 | * <p>This list will include at least one non-zero resolution, plus <code>(0,0)</code> for indicating no |
| 994 | * thumbnail should be generated.</p> |
Zhijun He | 5f2a47f | 2014-01-16 15:44:41 -0800 | [diff] [blame] | 995 | * <p>Below condiditions will be satisfied for this size list:</p> |
Zhijun He | 5a9ff37 | 2013-12-26 11:49:09 -0800 | [diff] [blame] | 996 | * <ul> |
Zhijun He | 5f2a47f | 2014-01-16 15:44:41 -0800 | [diff] [blame] | 997 | * <li>The sizes will be sorted by increasing pixel area (width x height). |
| 998 | * If several resolutions have the same area, they will be sorted by increasing width.</li> |
| 999 | * <li>The aspect ratio of the largest thumbnail size will be same as the |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1000 | * aspect ratio of largest JPEG output size in android.scaler.availableStreamConfigurations. |
Zhijun He | 5a9ff37 | 2013-12-26 11:49:09 -0800 | [diff] [blame] | 1001 | * The largest size is defined as the size that has the largest pixel area |
| 1002 | * in a given size list.</li> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1003 | * <li>Each output JPEG size in android.scaler.availableStreamConfigurations will have at least |
Zhijun He | 5a9ff37 | 2013-12-26 11:49:09 -0800 | [diff] [blame] | 1004 | * one corresponding size that has the same aspect ratio in availableThumbnailSizes, |
| 1005 | * and vice versa.</li> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1006 | * <li>All non-<code>(0, 0)</code> sizes will have non-zero widths and heights. |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1007 | * This key is available on all devices.</li> |
Zhijun He | 5a9ff37 | 2013-12-26 11:49:09 -0800 | [diff] [blame] | 1008 | * </ul> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1009 | * |
| 1010 | * @see CaptureRequest#JPEG_THUMBNAIL_SIZE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1011 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1012 | @PublicKey |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 1013 | public static final Key<android.util.Size[]> JPEG_AVAILABLE_THUMBNAIL_SIZES = |
| 1014 | new Key<android.util.Size[]>("android.jpeg.availableThumbnailSizes", android.util.Size[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1015 | |
| 1016 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1017 | * <p>List of aperture size values for {@link CaptureRequest#LENS_APERTURE android.lens.aperture} that are |
| 1018 | * supported by this camera device.</p> |
| 1019 | * <p>If the camera device doesn't support a variable lens aperture, |
| 1020 | * this list will contain only one value, which is the fixed aperture size.</p> |
| 1021 | * <p>If the camera device supports a variable aperture, the aperture values |
Zhijun He | fb46c64 | 2014-01-14 17:57:23 -0800 | [diff] [blame] | 1022 | * in this list will be sorted in ascending order.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1023 | * <p><b>Units</b>: The aperture f-number</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1024 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1025 | * <p><b>Full capability</b> - |
| 1026 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 1027 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 1028 | * |
| 1029 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1030 | * @see CaptureRequest#LENS_APERTURE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1031 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1032 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1033 | public static final Key<float[]> LENS_INFO_AVAILABLE_APERTURES = |
| 1034 | new Key<float[]>("android.lens.info.availableApertures", float[].class); |
| 1035 | |
| 1036 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1037 | * <p>List of neutral density filter values for |
| 1038 | * {@link CaptureRequest#LENS_FILTER_DENSITY android.lens.filterDensity} that are supported by this camera device.</p> |
| 1039 | * <p>If a neutral density filter is not supported by this camera device, |
| 1040 | * this list will contain only 0. Otherwise, this list will include every |
| 1041 | * filter density supported by the camera device, in ascending order.</p> |
| 1042 | * <p><b>Units</b>: Exposure value (EV)</p> |
| 1043 | * <p><b>Range of valid values:</b><br></p> |
| 1044 | * <p>Values are >= 0</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1045 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1046 | * <p><b>Full capability</b> - |
| 1047 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 1048 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Ruben Brunk | 855bae4 | 2014-01-17 10:30:32 -0800 | [diff] [blame] | 1049 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1050 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 855bae4 | 2014-01-17 10:30:32 -0800 | [diff] [blame] | 1051 | * @see CaptureRequest#LENS_FILTER_DENSITY |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1052 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1053 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1054 | public static final Key<float[]> LENS_INFO_AVAILABLE_FILTER_DENSITIES = |
| 1055 | new Key<float[]>("android.lens.info.availableFilterDensities", float[].class); |
| 1056 | |
| 1057 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1058 | * <p>List of focal lengths for {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength} that are supported by this camera |
| 1059 | * device.</p> |
| 1060 | * <p>If optical zoom is not supported, this list will only contain |
| 1061 | * a single value corresponding to the fixed focal length of the |
| 1062 | * device. Otherwise, this list will include every focal length supported |
| 1063 | * by the camera device, in ascending order.</p> |
| 1064 | * <p><b>Units</b>: Millimeters</p> |
| 1065 | * <p><b>Range of valid values:</b><br></p> |
| 1066 | * <p>Values are > 0</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1067 | * <p>This key is available on all devices.</p> |
Ruben Brunk | a20f4c2 | 2014-01-17 15:21:13 -0800 | [diff] [blame] | 1068 | * |
| 1069 | * @see CaptureRequest#LENS_FOCAL_LENGTH |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1070 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1071 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1072 | public static final Key<float[]> LENS_INFO_AVAILABLE_FOCAL_LENGTHS = |
| 1073 | new Key<float[]>("android.lens.info.availableFocalLengths", float[].class); |
| 1074 | |
| 1075 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1076 | * <p>List of optical image stabilization (OIS) modes for |
| 1077 | * {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode} that are supported by this camera device.</p> |
| 1078 | * <p>If OIS is not supported by a given camera device, this list will |
Ruben Brunk | 00849b3 | 2014-01-17 18:30:23 -0800 | [diff] [blame] | 1079 | * contain only OFF.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1080 | * <p><b>Range of valid values:</b><br> |
| 1081 | * Any value listed in {@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1082 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1083 | * <p><b>Limited capability</b> - |
| 1084 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 1085 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Ruben Brunk | 00849b3 | 2014-01-17 18:30:23 -0800 | [diff] [blame] | 1086 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1087 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 00849b3 | 2014-01-17 18:30:23 -0800 | [diff] [blame] | 1088 | * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1089 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1090 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 1091 | public static final Key<int[]> LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION = |
| 1092 | new Key<int[]>("android.lens.info.availableOpticalStabilization", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1093 | |
| 1094 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1095 | * <p>Hyperfocal distance for this lens.</p> |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1096 | * <p>If the lens is not fixed focus, the camera device will report this |
| 1097 | * field when {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} is APPROXIMATE or CALIBRATED.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1098 | * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> |
| 1099 | * <p><b>Range of valid values:</b><br> |
| 1100 | * If lens is fixed focus, >= 0. If lens has focuser unit, the value is |
| 1101 | * within <code>(0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code></p> |
| 1102 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1103 | * <p><b>Limited capability</b> - |
| 1104 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 1105 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 1106 | * |
| 1107 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 1108 | * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION |
| 1109 | * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE |
| 1110 | */ |
| 1111 | @PublicKey |
| 1112 | public static final Key<Float> LENS_INFO_HYPERFOCAL_DISTANCE = |
| 1113 | new Key<Float>("android.lens.info.hyperfocalDistance", float.class); |
| 1114 | |
| 1115 | /** |
| 1116 | * <p>Shortest distance from frontmost surface |
| 1117 | * of the lens that can be brought into sharp focus.</p> |
| 1118 | * <p>If the lens is fixed-focus, this will be |
| 1119 | * 0.</p> |
| 1120 | * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> |
| 1121 | * <p><b>Range of valid values:</b><br> |
| 1122 | * >= 0</p> |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1123 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1124 | * <p><b>Limited capability</b> - |
| 1125 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 1126 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1127 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1128 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1129 | * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1130 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1131 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1132 | public static final Key<Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE = |
| 1133 | new Key<Float>("android.lens.info.minimumFocusDistance", float.class); |
| 1134 | |
| 1135 | /** |
Igor Murashkin | 7a9b30e | 2013-12-11 13:31:38 -0800 | [diff] [blame] | 1136 | * <p>Dimensions of lens shading map.</p> |
| 1137 | * <p>The map should be on the order of 30-40 rows and columns, and |
| 1138 | * must be smaller than 64x64.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1139 | * <p><b>Range of valid values:</b><br> |
| 1140 | * Both values >= 1</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1141 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1142 | * <p><b>Full capability</b> - |
| 1143 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 1144 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 1145 | * |
| 1146 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 5749368 | 2014-05-27 18:58:08 -0700 | [diff] [blame] | 1147 | * @hide |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1148 | */ |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 1149 | public static final Key<android.util.Size> LENS_INFO_SHADING_MAP_SIZE = |
| 1150 | new Key<android.util.Size>("android.lens.info.shadingMapSize", android.util.Size.class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1151 | |
| 1152 | /** |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1153 | * <p>The lens focus distance calibration quality.</p> |
| 1154 | * <p>The lens focus distance calibration quality determines the reliability of |
| 1155 | * focus related metadata entries, i.e. {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance}, |
| 1156 | * {@link CaptureResult#LENS_FOCUS_RANGE android.lens.focusRange}, {@link CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE android.lens.info.hyperfocalDistance}, and |
| 1157 | * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1158 | * <p>APPROXIMATE and CALIBRATED devices report the focus metadata in |
| 1159 | * units of diopters (1/meter), so <code>0.0f</code> represents focusing at infinity, |
| 1160 | * and increasing positive numbers represent focusing closer and closer |
| 1161 | * to the camera device. The focus distance control also uses diopters |
| 1162 | * on these devices.</p> |
| 1163 | * <p>UNCALIBRATED devices do not use units that are directly comparable |
| 1164 | * to any real physical measurement, but <code>0.0f</code> still represents farthest |
| 1165 | * focus, and {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} represents the |
| 1166 | * nearest focus the device can achieve.</p> |
| 1167 | * <p><b>Possible values:</b> |
| 1168 | * <ul> |
| 1169 | * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED UNCALIBRATED}</li> |
| 1170 | * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE APPROXIMATE}</li> |
| 1171 | * <li>{@link #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED CALIBRATED}</li> |
| 1172 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1173 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1174 | * <p><b>Limited capability</b> - |
| 1175 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 1176 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1177 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1178 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1179 | * @see CaptureRequest#LENS_FOCUS_DISTANCE |
| 1180 | * @see CaptureResult#LENS_FOCUS_RANGE |
| 1181 | * @see CameraCharacteristics#LENS_INFO_HYPERFOCAL_DISTANCE |
| 1182 | * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE |
| 1183 | * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_UNCALIBRATED |
| 1184 | * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_APPROXIMATE |
| 1185 | * @see #LENS_INFO_FOCUS_DISTANCE_CALIBRATION_CALIBRATED |
| 1186 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1187 | @PublicKey |
Zhijun He | ff41393 | 2014-02-07 15:44:30 -0800 | [diff] [blame] | 1188 | public static final Key<Integer> LENS_INFO_FOCUS_DISTANCE_CALIBRATION = |
| 1189 | new Key<Integer>("android.lens.info.focusDistanceCalibration", int.class); |
| 1190 | |
| 1191 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1192 | * <p>Direction the camera faces relative to |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1193 | * device screen.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1194 | * <p><b>Possible values:</b> |
| 1195 | * <ul> |
| 1196 | * <li>{@link #LENS_FACING_FRONT FRONT}</li> |
| 1197 | * <li>{@link #LENS_FACING_BACK BACK}</li> |
Zhijun He | 503e815 | 2015-01-12 15:16:56 -0800 | [diff] [blame] | 1198 | * <li>{@link #LENS_FACING_EXTERNAL EXTERNAL}</li> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1199 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1200 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1201 | * @see #LENS_FACING_FRONT |
| 1202 | * @see #LENS_FACING_BACK |
Zhijun He | 503e815 | 2015-01-12 15:16:56 -0800 | [diff] [blame] | 1203 | * @see #LENS_FACING_EXTERNAL |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1204 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1205 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1206 | public static final Key<Integer> LENS_FACING = |
| 1207 | new Key<Integer>("android.lens.facing", int.class); |
| 1208 | |
| 1209 | /** |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1210 | * <p>The orientation of the camera relative to the sensor |
| 1211 | * coordinate system.</p> |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1212 | * <p>The four coefficients that describe the quaternion |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1213 | * rotation from the Android sensor coordinate system to a |
| 1214 | * camera-aligned coordinate system where the X-axis is |
| 1215 | * aligned with the long side of the image sensor, the Y-axis |
| 1216 | * is aligned with the short side of the image sensor, and |
| 1217 | * the Z-axis is aligned with the optical axis of the sensor.</p> |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1218 | * <p>To convert from the quaternion coefficients <code>(x,y,z,w)</code> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1219 | * to the axis of rotation <code>(a_x, a_y, a_z)</code> and rotation |
| 1220 | * amount <code>theta</code>, the following formulas can be used:</p> |
| 1221 | * <pre><code> theta = 2 * acos(w) |
| 1222 | * a_x = x / sin(theta/2) |
| 1223 | * a_y = y / sin(theta/2) |
| 1224 | * a_z = z / sin(theta/2) |
| 1225 | * </code></pre> |
| 1226 | * <p>To create a 3x3 rotation matrix that applies the rotation |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1227 | * defined by this quaternion, the following matrix can be |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1228 | * used:</p> |
| 1229 | * <pre><code>R = [ 1 - 2y^2 - 2z^2, 2xy - 2zw, 2xz + 2yw, |
| 1230 | * 2xy + 2zw, 1 - 2x^2 - 2z^2, 2yz - 2xw, |
| 1231 | * 2xz - 2yw, 2yz + 2xw, 1 - 2x^2 - 2y^2 ] |
| 1232 | * </code></pre> |
| 1233 | * <p>This matrix can then be used to apply the rotation to a |
| 1234 | * column vector point with</p> |
| 1235 | * <p><code>p' = Rp</code></p> |
| 1236 | * <p>where <code>p</code> is in the device sensor coordinate system, and |
| 1237 | * <code>p'</code> is in the camera-oriented coordinate system.</p> |
| 1238 | * <p><b>Units</b>: |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1239 | * Quaternion coefficients</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1240 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1241 | */ |
| 1242 | @PublicKey |
| 1243 | public static final Key<float[]> LENS_POSE_ROTATION = |
| 1244 | new Key<float[]>("android.lens.poseRotation", float[].class); |
| 1245 | |
| 1246 | /** |
| 1247 | * <p>Position of the camera optical center.</p> |
Eino-Ville Talvala | d3dbfb3 | 2015-05-29 17:17:04 -0700 | [diff] [blame] | 1248 | * <p>The position of the camera device's lens optical center, |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1249 | * as a three-dimensional vector <code>(x,y,z)</code>.</p> |
| 1250 | * <p>Prior to Android P, or when {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is PRIMARY_CAMERA, this position |
| 1251 | * is relative to the optical center of the largest camera device facing in the same |
| 1252 | * direction as this camera, in the {@link android.hardware.SensorEvent Android sensor |
| 1253 | * coordinate axes}. Note that only the axis definitions are shared with the sensor |
| 1254 | * coordinate system, but not the origin.</p> |
| 1255 | * <p>If this device is the largest or only camera device with a given facing, then this |
| 1256 | * position will be <code>(0, 0, 0)</code>; a camera device with a lens optical center located 3 cm |
| 1257 | * from the main sensor along the +X axis (to the right from the user's perspective) will |
Eino-Ville Talvala | 96024af | 2018-08-01 17:23:09 -0700 | [diff] [blame] | 1258 | * report <code>(0.03, 0, 0)</code>. Note that this means that, for many computer vision |
| 1259 | * applications, the position needs to be negated to convert it to a translation from the |
| 1260 | * camera to the origin.</p> |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1261 | * <p>To transform a pixel coordinates between two cameras facing the same direction, first |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1262 | * the source camera {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} must be corrected for. Then the source |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1263 | * camera {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} needs to be applied, followed by the |
| 1264 | * {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the source camera, the translation of the source camera |
| 1265 | * relative to the destination camera, the {@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} of the destination |
| 1266 | * camera, and finally the inverse of {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} of the destination |
| 1267 | * camera. This obtains a radial-distortion-free coordinate in the destination camera pixel |
| 1268 | * coordinates.</p> |
| 1269 | * <p>To compare this against a real image from the destination camera, the destination camera |
| 1270 | * image then needs to be corrected for radial distortion before comparison or sampling.</p> |
| 1271 | * <p>When {@link CameraCharacteristics#LENS_POSE_REFERENCE android.lens.poseReference} is GYROSCOPE, then this position is relative to |
Eino-Ville Talvala | 96024af | 2018-08-01 17:23:09 -0700 | [diff] [blame] | 1272 | * the center of the primary gyroscope on the device. The axis definitions are the same as |
| 1273 | * with PRIMARY_CAMERA.</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1274 | * <p><b>Units</b>: Meters</p> |
| 1275 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1276 | * |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1277 | * @see CameraCharacteristics#LENS_DISTORTION |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1278 | * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1279 | * @see CameraCharacteristics#LENS_POSE_REFERENCE |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1280 | * @see CameraCharacteristics#LENS_POSE_ROTATION |
| 1281 | */ |
| 1282 | @PublicKey |
| 1283 | public static final Key<float[]> LENS_POSE_TRANSLATION = |
| 1284 | new Key<float[]>("android.lens.poseTranslation", float[].class); |
| 1285 | |
| 1286 | /** |
| 1287 | * <p>The parameters for this camera device's intrinsic |
| 1288 | * calibration.</p> |
| 1289 | * <p>The five calibration parameters that describe the |
| 1290 | * transform from camera-centric 3D coordinates to sensor |
| 1291 | * pixel coordinates:</p> |
| 1292 | * <pre><code>[f_x, f_y, c_x, c_y, s] |
| 1293 | * </code></pre> |
| 1294 | * <p>Where <code>f_x</code> and <code>f_y</code> are the horizontal and vertical |
| 1295 | * focal lengths, <code>[c_x, c_y]</code> is the position of the optical |
| 1296 | * axis, and <code>s</code> is a skew parameter for the sensor plane not |
| 1297 | * being aligned with the lens plane.</p> |
| 1298 | * <p>These are typically used within a transformation matrix K:</p> |
| 1299 | * <pre><code>K = [ f_x, s, c_x, |
| 1300 | * 0, f_y, c_y, |
| 1301 | * 0 0, 1 ] |
| 1302 | * </code></pre> |
| 1303 | * <p>which can then be combined with the camera pose rotation |
| 1304 | * <code>R</code> and translation <code>t</code> ({@link CameraCharacteristics#LENS_POSE_ROTATION android.lens.poseRotation} and |
Eino-Ville Talvala | 96024af | 2018-08-01 17:23:09 -0700 | [diff] [blame] | 1305 | * {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}, respectively) to calculate the |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1306 | * complete transform from world coordinates to pixel |
| 1307 | * coordinates:</p> |
Eino-Ville Talvala | 96024af | 2018-08-01 17:23:09 -0700 | [diff] [blame] | 1308 | * <pre><code>P = [ K 0 * [ R -Rt |
| 1309 | * 0 1 ] 0 1 ] |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1310 | * </code></pre> |
Eino-Ville Talvala | 96024af | 2018-08-01 17:23:09 -0700 | [diff] [blame] | 1311 | * <p>(Note the negation of poseTranslation when mapping from camera |
| 1312 | * to world coordinates, and multiplication by the rotation).</p> |
| 1313 | * <p>With <code>p_w</code> being a point in the world coordinate system |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1314 | * and <code>p_s</code> being a point in the camera active pixel array |
| 1315 | * coordinate system, and with the mapping including the |
| 1316 | * homogeneous division by z:</p> |
| 1317 | * <pre><code> p_h = (x_h, y_h, z_h) = P p_w |
| 1318 | * p_s = p_h / z_h |
| 1319 | * </code></pre> |
| 1320 | * <p>so <code>[x_s, y_s]</code> is the pixel coordinates of the world |
| 1321 | * point, <code>z_s = 1</code>, and <code>w_s</code> is a measurement of disparity |
| 1322 | * (depth) in pixel coordinates.</p> |
Eino-Ville Talvala | b8bd8ab | 2015-06-16 11:44:10 -0700 | [diff] [blame] | 1323 | * <p>Note that the coordinate system for this transform is the |
| 1324 | * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} system, |
| 1325 | * where <code>(0,0)</code> is the top-left of the |
| 1326 | * preCorrectionActiveArraySize rectangle. Once the pose and |
| 1327 | * intrinsic calibration transforms have been applied to a |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1328 | * world point, then the {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} |
Eino-Ville Talvala | b8bd8ab | 2015-06-16 11:44:10 -0700 | [diff] [blame] | 1329 | * transform needs to be applied, and the result adjusted to |
| 1330 | * be in the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} coordinate |
| 1331 | * system (where <code>(0, 0)</code> is the top-left of the |
| 1332 | * activeArraySize rectangle), to determine the final pixel |
| 1333 | * coordinate of the world point for processed (non-RAW) |
| 1334 | * output buffers.</p> |
Eino-Ville Talvala | 96024af | 2018-08-01 17:23:09 -0700 | [diff] [blame] | 1335 | * <p>For camera devices, the center of pixel <code>(x,y)</code> is located at |
| 1336 | * coordinate <code>(x + 0.5, y + 0.5)</code>. So on a device with a |
| 1337 | * precorrection active array of size <code>(10,10)</code>, the valid pixel |
| 1338 | * indices go from <code>(0,0)-(9,9)</code>, and an perfectly-built camera would |
| 1339 | * have an optical center at the exact center of the pixel grid, at |
| 1340 | * coordinates <code>(5.0, 5.0)</code>, which is the top-left corner of pixel |
| 1341 | * <code>(5,5)</code>.</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1342 | * <p><b>Units</b>: |
Eino-Ville Talvala | b8bd8ab | 2015-06-16 11:44:10 -0700 | [diff] [blame] | 1343 | * Pixels in the |
| 1344 | * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} |
| 1345 | * coordinate system.</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1346 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1347 | * |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1348 | * @see CameraCharacteristics#LENS_DISTORTION |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1349 | * @see CameraCharacteristics#LENS_POSE_ROTATION |
| 1350 | * @see CameraCharacteristics#LENS_POSE_TRANSLATION |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 1351 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
Eino-Ville Talvala | b8bd8ab | 2015-06-16 11:44:10 -0700 | [diff] [blame] | 1352 | * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1353 | */ |
| 1354 | @PublicKey |
| 1355 | public static final Key<float[]> LENS_INTRINSIC_CALIBRATION = |
| 1356 | new Key<float[]>("android.lens.intrinsicCalibration", float[].class); |
| 1357 | |
| 1358 | /** |
| 1359 | * <p>The correction coefficients to correct for this camera device's |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1360 | * radial and tangential lens distortion.</p> |
Ruben Brunk | 02cd8cb | 2015-06-15 15:33:09 -0700 | [diff] [blame] | 1361 | * <p>Four radial distortion coefficients <code>[kappa_0, kappa_1, kappa_2, |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1362 | * kappa_3]</code> and two tangential distortion coefficients |
| 1363 | * <code>[kappa_4, kappa_5]</code> that can be used to correct the |
| 1364 | * lens's geometric distortion with the mapping equations:</p> |
Ruben Brunk | 02cd8cb | 2015-06-15 15:33:09 -0700 | [diff] [blame] | 1365 | * <pre><code> x_c = x_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1366 | * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 ) |
Ruben Brunk | 02cd8cb | 2015-06-15 15:33:09 -0700 | [diff] [blame] | 1367 | * y_c = y_i * ( kappa_0 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1368 | * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 ) |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1369 | * </code></pre> |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1370 | * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the |
| 1371 | * input image that correspond to the pixel values in the |
| 1372 | * corrected image at the coordinate <code>[x_i, y_i]</code>:</p> |
| 1373 | * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage) |
| 1374 | * </code></pre> |
| 1375 | * <p>The pixel coordinates are defined in a normalized |
| 1376 | * coordinate system related to the |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1377 | * {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} calibration fields. |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1378 | * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> have <code>(0,0)</code> at the |
| 1379 | * lens optical center <code>[c_x, c_y]</code>. The maximum magnitudes |
| 1380 | * of both x and y coordinates are normalized to be 1 at the |
| 1381 | * edge further from the optical center, so the range |
| 1382 | * for both dimensions is <code>-1 <= x <= 1</code>.</p> |
| 1383 | * <p>Finally, <code>r</code> represents the radial distance from the |
| 1384 | * optical center, <code>r^2 = x_i^2 + y_i^2</code>, and its magnitude |
| 1385 | * is therefore no larger than <code>|r| <= sqrt(2)</code>.</p> |
| 1386 | * <p>The distortion model used is the Brown-Conrady model.</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1387 | * <p><b>Units</b>: |
Eino-Ville Talvala | 66c73ba | 2015-05-29 16:11:56 -0700 | [diff] [blame] | 1388 | * Unitless coefficients.</p> |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1389 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Eino-Ville Talvala | abf0b8b | 2015-08-19 16:21:15 -0700 | [diff] [blame] | 1390 | * |
| 1391 | * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1392 | * @deprecated |
| 1393 | * <p>This field was inconsistently defined in terms of its |
| 1394 | * normalization. Use {@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion} instead.</p> |
| 1395 | * |
| 1396 | * @see CameraCharacteristics#LENS_DISTORTION |
| 1397 | |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1398 | */ |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1399 | @Deprecated |
Eino-Ville Talvala | 046a978 | 2015-04-08 20:05:56 +0000 | [diff] [blame] | 1400 | @PublicKey |
| 1401 | public static final Key<float[]> LENS_RADIAL_DISTORTION = |
| 1402 | new Key<float[]>("android.lens.radialDistortion", float[].class); |
| 1403 | |
| 1404 | /** |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1405 | * <p>The origin for {@link CameraCharacteristics#LENS_POSE_TRANSLATION android.lens.poseTranslation}.</p> |
| 1406 | * <p>Different calibration methods and use cases can produce better or worse results |
| 1407 | * depending on the selected coordinate origin.</p> |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1408 | * <p><b>Possible values:</b> |
| 1409 | * <ul> |
| 1410 | * <li>{@link #LENS_POSE_REFERENCE_PRIMARY_CAMERA PRIMARY_CAMERA}</li> |
| 1411 | * <li>{@link #LENS_POSE_REFERENCE_GYROSCOPE GYROSCOPE}</li> |
| 1412 | * </ul></p> |
| 1413 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1414 | * |
| 1415 | * @see CameraCharacteristics#LENS_POSE_TRANSLATION |
| 1416 | * @see #LENS_POSE_REFERENCE_PRIMARY_CAMERA |
| 1417 | * @see #LENS_POSE_REFERENCE_GYROSCOPE |
| 1418 | */ |
| 1419 | @PublicKey |
| 1420 | public static final Key<Integer> LENS_POSE_REFERENCE = |
| 1421 | new Key<Integer>("android.lens.poseReference", int.class); |
| 1422 | |
| 1423 | /** |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1424 | * <p>The correction coefficients to correct for this camera device's |
| 1425 | * radial and tangential lens distortion.</p> |
| 1426 | * <p>Replaces the deprecated {@link CameraCharacteristics#LENS_RADIAL_DISTORTION android.lens.radialDistortion} field, which was |
| 1427 | * inconsistently defined.</p> |
| 1428 | * <p>Three radial distortion coefficients <code>[kappa_1, kappa_2, |
| 1429 | * kappa_3]</code> and two tangential distortion coefficients |
| 1430 | * <code>[kappa_4, kappa_5]</code> that can be used to correct the |
| 1431 | * lens's geometric distortion with the mapping equations:</p> |
| 1432 | * <pre><code> x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + |
| 1433 | * kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 ) |
| 1434 | * y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) + |
| 1435 | * kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 ) |
| 1436 | * </code></pre> |
| 1437 | * <p>Here, <code>[x_c, y_c]</code> are the coordinates to sample in the |
| 1438 | * input image that correspond to the pixel values in the |
| 1439 | * corrected image at the coordinate <code>[x_i, y_i]</code>:</p> |
| 1440 | * <pre><code> correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage) |
| 1441 | * </code></pre> |
| 1442 | * <p>The pixel coordinates are defined in a coordinate system |
| 1443 | * related to the {@link CameraCharacteristics#LENS_INTRINSIC_CALIBRATION android.lens.intrinsicCalibration} |
| 1444 | * calibration fields; see that entry for details of the mapping stages. |
| 1445 | * Both <code>[x_i, y_i]</code> and <code>[x_c, y_c]</code> |
| 1446 | * have <code>(0,0)</code> at the lens optical center <code>[c_x, c_y]</code>, and |
| 1447 | * the range of the coordinates depends on the focal length |
| 1448 | * terms of the intrinsic calibration.</p> |
| 1449 | * <p>Finally, <code>r</code> represents the radial distance from the |
| 1450 | * optical center, <code>r^2 = x_i^2 + y_i^2</code>.</p> |
| 1451 | * <p>The distortion model used is the Brown-Conrady model.</p> |
| 1452 | * <p><b>Units</b>: |
| 1453 | * Unitless coefficients.</p> |
| 1454 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1455 | * |
| 1456 | * @see CameraCharacteristics#LENS_INTRINSIC_CALIBRATION |
| 1457 | * @see CameraCharacteristics#LENS_RADIAL_DISTORTION |
| 1458 | */ |
| 1459 | @PublicKey |
| 1460 | public static final Key<float[]> LENS_DISTORTION = |
| 1461 | new Key<float[]>("android.lens.distortion", float[].class); |
| 1462 | |
| 1463 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1464 | * <p>List of noise reduction modes for {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} that are supported |
| 1465 | * by this camera device.</p> |
| 1466 | * <p>Full-capability camera devices will always support OFF and FAST.</p> |
Chien-Yu Chen | 7233391 | 2015-07-08 11:55:19 -0700 | [diff] [blame] | 1467 | * <p>Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support |
| 1468 | * ZERO_SHUTTER_LAG.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1469 | * <p>Legacy-capability camera devices will only support FAST mode.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1470 | * <p><b>Range of valid values:</b><br> |
| 1471 | * Any value listed in {@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1472 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1473 | * <p><b>Limited capability</b> - |
| 1474 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 1475 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 1476 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1477 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 1478 | * @see CaptureRequest#NOISE_REDUCTION_MODE |
| 1479 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1480 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 1481 | public static final Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES = |
| 1482 | new Key<int[]>("android.noiseReduction.availableNoiseReductionModes", int[].class); |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 1483 | |
| 1484 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1485 | * <p>If set to 1, the HAL will always split result |
Eino-Ville Talvala | 7a31310 | 2013-11-07 14:45:06 -0800 | [diff] [blame] | 1486 | * metadata for a single capture into multiple buffers, |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1487 | * returned using multiple process_capture_result calls.</p> |
| 1488 | * <p>Does not need to be listed in static |
Eino-Ville Talvala | 7a31310 | 2013-11-07 14:45:06 -0800 | [diff] [blame] | 1489 | * metadata. Support for partial results will be reworked in |
| 1490 | * future versions of camera service. This quirk will stop |
| 1491 | * working at that point; DO NOT USE without careful |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1492 | * consideration of future support.</p> |
Igor Murashkin | 3242f4f | 2014-01-15 12:27:41 -0800 | [diff] [blame] | 1493 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1494 | * @deprecated |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1495 | * <p>Not used in HALv3 or newer; replaced by better partials mechanism</p> |
| 1496 | |
Eino-Ville Talvala | 7a31310 | 2013-11-07 14:45:06 -0800 | [diff] [blame] | 1497 | * @hide |
| 1498 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1499 | @Deprecated |
Eino-Ville Talvala | 7a31310 | 2013-11-07 14:45:06 -0800 | [diff] [blame] | 1500 | public static final Key<Byte> QUIRKS_USE_PARTIAL_RESULT = |
| 1501 | new Key<Byte>("android.quirks.usePartialResult", byte.class); |
| 1502 | |
| 1503 | /** |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1504 | * <p>The maximum numbers of different types of output streams |
| 1505 | * that can be configured and used simultaneously by a camera device.</p> |
| 1506 | * <p>This is a 3 element tuple that contains the max number of output simultaneous |
Zhijun He | a4d0a8f | 2014-04-29 12:35:27 -0700 | [diff] [blame] | 1507 | * streams for raw sensor, processed (but not stalling), and processed (and stalling) |
| 1508 | * formats respectively. For example, assuming that JPEG is typically a processed and |
| 1509 | * stalling stream, if max raw sensor format output stream number is 1, max YUV streams |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1510 | * number is 3, and max JPEG stream number is 2, then this tuple should be <code>(1, 3, 2)</code>.</p> |
| 1511 | * <p>This lists the upper bound of the number of output streams supported by |
| 1512 | * the camera device. Using more streams simultaneously may require more hardware and |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1513 | * CPU resources that will consume more power. The image format for an output stream can |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1514 | * be any supported format provided by android.scaler.availableStreamConfigurations. |
| 1515 | * The formats defined in android.scaler.availableStreamConfigurations can be catergorized |
Zhijun He | a4d0a8f | 2014-04-29 12:35:27 -0700 | [diff] [blame] | 1516 | * into the 3 stream types as below:</p> |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1517 | * <ul> |
Zhijun He | a4d0a8f | 2014-04-29 12:35:27 -0700 | [diff] [blame] | 1518 | * <li>Processed (but stalling): any non-RAW format with a stallDurations > 0. |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1519 | * Typically {@link android.graphics.ImageFormat#JPEG JPEG format}.</li> |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 1520 | * <li>Raw formats: {@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}, {@link android.graphics.ImageFormat#RAW10 RAW10}, or |
| 1521 | * {@link android.graphics.ImageFormat#RAW12 RAW12}.</li> |
| 1522 | * <li>Processed (but not-stalling): any non-RAW format without a stall duration. Typically |
| 1523 | * {@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}, |
| 1524 | * {@link android.graphics.ImageFormat#NV21 NV21}, or {@link android.graphics.ImageFormat#YV12 YV12}.</li> |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1525 | * </ul> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1526 | * <p><b>Range of valid values:</b><br></p> |
| 1527 | * <p>For processed (and stalling) format streams, >= 1.</p> |
| 1528 | * <p>For Raw format (either stalling or non-stalling) streams, >= 0.</p> |
| 1529 | * <p>For processed (but not stalling) format streams, >= 3 |
| 1530 | * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>); |
| 1531 | * >= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1532 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1533 | * |
| 1534 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1535 | * @hide |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1536 | */ |
| 1537 | public static final Key<int[]> REQUEST_MAX_NUM_OUTPUT_STREAMS = |
| 1538 | new Key<int[]>("android.request.maxNumOutputStreams", int[].class); |
| 1539 | |
| 1540 | /** |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1541 | * <p>The maximum numbers of different types of output streams |
| 1542 | * that can be configured and used simultaneously by a camera device |
| 1543 | * for any <code>RAW</code> formats.</p> |
| 1544 | * <p>This value contains the max number of output simultaneous |
| 1545 | * streams from the raw sensor.</p> |
| 1546 | * <p>This lists the upper bound of the number of output streams supported by |
| 1547 | * the camera device. Using more streams simultaneously may require more hardware and |
| 1548 | * CPU resources that will consume more power. The image format for this kind of an output stream can |
| 1549 | * be any <code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> |
| 1550 | * <p>In particular, a <code>RAW</code> format is typically one of:</p> |
| 1551 | * <ul> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1552 | * <li>{@link android.graphics.ImageFormat#RAW_SENSOR RAW_SENSOR}</li> |
| 1553 | * <li>{@link android.graphics.ImageFormat#RAW10 RAW10}</li> |
| 1554 | * <li>{@link android.graphics.ImageFormat#RAW12 RAW12}</li> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1555 | * </ul> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1556 | * <p>LEGACY mode devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> LEGACY) |
| 1557 | * never support raw streams.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1558 | * <p><b>Range of valid values:</b><br></p> |
| 1559 | * <p>>= 0</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1560 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1561 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1562 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1563 | * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP |
| 1564 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1565 | @PublicKey |
| 1566 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1567 | public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_RAW = |
| 1568 | new Key<Integer>("android.request.maxNumOutputRaw", int.class); |
| 1569 | |
| 1570 | /** |
| 1571 | * <p>The maximum numbers of different types of output streams |
| 1572 | * that can be configured and used simultaneously by a camera device |
| 1573 | * for any processed (but not-stalling) formats.</p> |
| 1574 | * <p>This value contains the max number of output simultaneous |
| 1575 | * streams for any processed (but not-stalling) formats.</p> |
| 1576 | * <p>This lists the upper bound of the number of output streams supported by |
| 1577 | * the camera device. Using more streams simultaneously may require more hardware and |
| 1578 | * CPU resources that will consume more power. The image format for this kind of an output stream can |
| 1579 | * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> |
| 1580 | * <p>Processed (but not-stalling) is defined as any non-RAW format without a stall duration. |
| 1581 | * Typically:</p> |
| 1582 | * <ul> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1583 | * <li>{@link android.graphics.ImageFormat#YUV_420_888 YUV_420_888}</li> |
| 1584 | * <li>{@link android.graphics.ImageFormat#NV21 NV21}</li> |
| 1585 | * <li>{@link android.graphics.ImageFormat#YV12 YV12}</li> |
| 1586 | * <li>Implementation-defined formats, i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#isOutputSupportedFor(Class) }</li> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1587 | * </ul> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1588 | * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a |
| 1589 | * processed format -- it will return 0 for a non-stalling stream.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1590 | * <p>LEGACY devices will support at least 2 processing/non-stalling streams.</p> |
| 1591 | * <p><b>Range of valid values:</b><br></p> |
| 1592 | * <p>>= 3 |
| 1593 | * for FULL mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL</code>); |
| 1594 | * >= 2 for LIMITED mode devices (<code>{@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == LIMITED</code>).</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1595 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1596 | * |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1597 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1598 | * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP |
| 1599 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1600 | @PublicKey |
| 1601 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1602 | public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC = |
| 1603 | new Key<Integer>("android.request.maxNumOutputProc", int.class); |
| 1604 | |
| 1605 | /** |
| 1606 | * <p>The maximum numbers of different types of output streams |
| 1607 | * that can be configured and used simultaneously by a camera device |
| 1608 | * for any processed (and stalling) formats.</p> |
| 1609 | * <p>This value contains the max number of output simultaneous |
| 1610 | * streams for any processed (but not-stalling) formats.</p> |
| 1611 | * <p>This lists the upper bound of the number of output streams supported by |
| 1612 | * the camera device. Using more streams simultaneously may require more hardware and |
| 1613 | * CPU resources that will consume more power. The image format for this kind of an output stream can |
| 1614 | * be any non-<code>RAW</code> and supported format provided by {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}.</p> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1615 | * <p>A processed and stalling format is defined as any non-RAW format with a stallDurations |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 1616 | * > 0. Typically only the {@link android.graphics.ImageFormat#JPEG JPEG format} is a stalling format.</p> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1617 | * <p>For full guarantees, query {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } with a |
| 1618 | * processed format -- it will return a non-0 value for a stalling stream.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1619 | * <p>LEGACY devices will support up to 1 processing/stalling stream.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1620 | * <p><b>Range of valid values:</b><br></p> |
| 1621 | * <p>>= 1</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1622 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1623 | * |
| 1624 | * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP |
| 1625 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1626 | @PublicKey |
| 1627 | @SyntheticKey |
Igor Murashkin | 78712a8 | 2014-05-27 18:32:18 -0700 | [diff] [blame] | 1628 | public static final Key<Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING = |
| 1629 | new Key<Integer>("android.request.maxNumOutputProcStalling", int.class); |
| 1630 | |
| 1631 | /** |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1632 | * <p>The maximum numbers of any type of input streams |
| 1633 | * that can be configured and used simultaneously by a camera device.</p> |
| 1634 | * <p>When set to 0, it means no input stream is supported.</p> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1635 | * <p>The image format for a input stream can be any supported format returned by {@link android.hardware.camera2.params.StreamConfigurationMap#getInputFormats }. When using an |
| 1636 | * input stream, there must be at least one output stream configured to to receive the |
| 1637 | * reprocessed images.</p> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1638 | * <p>When an input stream and some output streams are used in a reprocessing request, |
| 1639 | * only the input buffer will be used to produce these output stream buffers, and a |
| 1640 | * new sensor image will not be captured.</p> |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1641 | * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 1642 | * stream image format will be PRIVATE, the associated output stream image format |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1643 | * should be JPEG.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1644 | * <p><b>Range of valid values:</b><br></p> |
| 1645 | * <p>0 or 1.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1646 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1647 | * <p><b>Full capability</b> - |
| 1648 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 1649 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 1650 | * |
| 1651 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1652 | */ |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1653 | @PublicKey |
Zhijun He | a5a0cac | 2014-02-05 07:55:44 -0800 | [diff] [blame] | 1654 | public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS = |
| 1655 | new Key<Integer>("android.request.maxNumInputStreams", int.class); |
| 1656 | |
| 1657 | /** |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 1658 | * <p>Specifies the number of maximum pipeline stages a frame |
| 1659 | * has to go through from when it's exposed to when it's available |
| 1660 | * to the framework.</p> |
| 1661 | * <p>A typical minimum value for this is 2 (one stage to expose, |
| 1662 | * one stage to readout) from the sensor. The ISP then usually adds |
| 1663 | * its own stages to do custom HW processing. Further stages may be |
| 1664 | * added by SW processing.</p> |
| 1665 | * <p>Depending on what settings are used (e.g. YUV, JPEG) and what |
| 1666 | * processing is enabled (e.g. face detection), the actual pipeline |
| 1667 | * depth (specified by {@link CaptureResult#REQUEST_PIPELINE_DEPTH android.request.pipelineDepth}) may be less than |
| 1668 | * the max pipeline depth.</p> |
| 1669 | * <p>A pipeline depth of X stages is equivalent to a pipeline latency of |
| 1670 | * X frame intervals.</p> |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 1671 | * <p>This value will normally be 8 or less, however, for high speed capture session, |
| 1672 | * the max pipeline depth will be up to 8 x size of high speed capture request list.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1673 | * <p>This key is available on all devices.</p> |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 1674 | * |
| 1675 | * @see CaptureResult#REQUEST_PIPELINE_DEPTH |
| 1676 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1677 | @PublicKey |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 1678 | public static final Key<Byte> REQUEST_PIPELINE_MAX_DEPTH = |
| 1679 | new Key<Byte>("android.request.pipelineMaxDepth", byte.class); |
| 1680 | |
| 1681 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1682 | * <p>Defines how many sub-components |
Igor Murashkin | 2086b58 | 2014-01-17 18:30:59 -0800 | [diff] [blame] | 1683 | * a result will be composed of.</p> |
| 1684 | * <p>In order to combat the pipeline latency, partial results |
| 1685 | * may be delivered to the application layer from the camera device as |
| 1686 | * soon as they are available.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1687 | * <p>Optional; defaults to 1. A value of 1 means that partial |
| 1688 | * results are not supported, and only the final TotalCaptureResult will |
| 1689 | * be produced by the camera device.</p> |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 1690 | * <p>A typical use case for this might be: after requesting an |
| 1691 | * auto-focus (AF) lock the new AF state might be available 50% |
| 1692 | * of the way through the pipeline. The camera device could |
| 1693 | * then immediately dispatch this state via a partial result to |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1694 | * the application, and the rest of the metadata via later |
| 1695 | * partial results.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1696 | * <p><b>Range of valid values:</b><br> |
| 1697 | * >= 1</p> |
Zhijun He | 1420de4 | 2014-07-17 17:45:54 -0700 | [diff] [blame] | 1698 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 2086b58 | 2014-01-17 18:30:59 -0800 | [diff] [blame] | 1699 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1700 | @PublicKey |
Igor Murashkin | 2086b58 | 2014-01-17 18:30:59 -0800 | [diff] [blame] | 1701 | public static final Key<Integer> REQUEST_PARTIAL_RESULT_COUNT = |
| 1702 | new Key<Integer>("android.request.partialResultCount", int.class); |
| 1703 | |
| 1704 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1705 | * <p>List of capabilities that this camera device |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1706 | * advertises as fully supporting.</p> |
| 1707 | * <p>A capability is a contract that the camera device makes in order |
| 1708 | * to be able to satisfy one or more use cases.</p> |
| 1709 | * <p>Listing a capability guarantees that the whole set of features |
| 1710 | * required to support a common use will all be available.</p> |
| 1711 | * <p>Using a subset of the functionality provided by an unsupported |
| 1712 | * capability may be possible on a specific camera device implementation; |
| 1713 | * to do this query each of android.request.availableRequestKeys, |
| 1714 | * android.request.availableResultKeys, |
| 1715 | * android.request.availableCharacteristicsKeys.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1716 | * <p>The following capabilities are guaranteed to be available on |
| 1717 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL devices:</p> |
| 1718 | * <ul> |
| 1719 | * <li>MANUAL_SENSOR</li> |
Zhijun He | df9b747 | 2014-06-04 13:42:41 -0700 | [diff] [blame] | 1720 | * <li>MANUAL_POST_PROCESSING</li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1721 | * </ul> |
| 1722 | * <p>Other capabilities may be available on either FULL or LIMITED |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1723 | * devices, but the application should query this key to be sure.</p> |
| 1724 | * <p><b>Possible values:</b> |
| 1725 | * <ul> |
| 1726 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE BACKWARD_COMPATIBLE}</li> |
| 1727 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li> |
| 1728 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li> |
| 1729 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li> |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 1730 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING PRIVATE_REPROCESSING}</li> |
Ruben Brunk | 0c22e69 | 2014-11-11 12:00:34 -0800 | [diff] [blame] | 1731 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li> |
Eino-Ville Talvala | 126a746 | 2014-11-04 16:31:01 -0800 | [diff] [blame] | 1732 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1733 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li> |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 1734 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT DEPTH_OUTPUT}</li> |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 1735 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO CONSTRAINED_HIGH_SPEED_VIDEO}</li> |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1736 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING MOTION_TRACKING}</li> |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 1737 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA LOGICAL_MULTI_CAMERA}</li> |
Shuzhen Wang | 51248bf | 2018-03-22 00:04:45 -0700 | [diff] [blame] | 1738 | * <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME MONOCHROME}</li> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1739 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1740 | * <p>This key is available on all devices.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1741 | * |
| 1742 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | 08bc3b0 | 2014-07-09 10:07:36 -0700 | [diff] [blame] | 1743 | * @see #REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1744 | * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR |
Zhijun He | 50f7243 | 2014-05-28 13:52:04 -0700 | [diff] [blame] | 1745 | * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING |
Eino-Ville Talvala | 611fece | 2014-07-10 17:29:38 -0700 | [diff] [blame] | 1746 | * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 1747 | * @see #REQUEST_AVAILABLE_CAPABILITIES_PRIVATE_REPROCESSING |
Ruben Brunk | 0c22e69 | 2014-11-11 12:00:34 -0800 | [diff] [blame] | 1748 | * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS |
Eino-Ville Talvala | 126a746 | 2014-11-04 16:31:01 -0800 | [diff] [blame] | 1749 | * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 1750 | * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 1751 | * @see #REQUEST_AVAILABLE_CAPABILITIES_DEPTH_OUTPUT |
Zhijun He | fab663e | 2015-05-26 19:46:31 -0700 | [diff] [blame] | 1752 | * @see #REQUEST_AVAILABLE_CAPABILITIES_CONSTRAINED_HIGH_SPEED_VIDEO |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1753 | * @see #REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 1754 | * @see #REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA |
Shuzhen Wang | 51248bf | 2018-03-22 00:04:45 -0700 | [diff] [blame] | 1755 | * @see #REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1756 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1757 | @PublicKey |
Zhijun He | 421ddbe | 2014-05-29 13:41:49 -0700 | [diff] [blame] | 1758 | public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES = |
| 1759 | new Key<int[]>("android.request.availableCapabilities", int[].class); |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1760 | |
| 1761 | /** |
| 1762 | * <p>A list of all keys that the camera device has available |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 1763 | * to use with {@link android.hardware.camera2.CaptureRequest }.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1764 | * <p>Attempting to set a key into a CaptureRequest that is not |
| 1765 | * listed here will result in an invalid request and will be rejected |
| 1766 | * by the camera device.</p> |
| 1767 | * <p>This field can be used to query the feature set of a camera device |
| 1768 | * at a more granular level than capabilities. This is especially |
| 1769 | * important for optional keys that are not listed under any capability |
| 1770 | * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1771 | * <p>This key is available on all devices.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1772 | * |
| 1773 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 1774 | * @hide |
| 1775 | */ |
| 1776 | public static final Key<int[]> REQUEST_AVAILABLE_REQUEST_KEYS = |
| 1777 | new Key<int[]>("android.request.availableRequestKeys", int[].class); |
| 1778 | |
| 1779 | /** |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 1780 | * <p>A list of all keys that the camera device has available to use with {@link android.hardware.camera2.CaptureResult }.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1781 | * <p>Attempting to get a key from a CaptureResult that is not |
| 1782 | * listed here will always return a <code>null</code> value. Getting a key from |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1783 | * a CaptureResult that is listed here will generally never return a <code>null</code> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1784 | * value.</p> |
| 1785 | * <p>The following keys may return <code>null</code> unless they are enabled:</p> |
| 1786 | * <ul> |
Ruben Brunk | 5749368 | 2014-05-27 18:58:08 -0700 | [diff] [blame] | 1787 | * <li>android.statistics.lensShadingMap (non-null iff {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON)</li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1788 | * </ul> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1789 | * <p>(Those sometimes-null keys will nevertheless be listed here |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1790 | * if they are available.)</p> |
| 1791 | * <p>This field can be used to query the feature set of a camera device |
| 1792 | * at a more granular level than capabilities. This is especially |
| 1793 | * important for optional keys that are not listed under any capability |
| 1794 | * in {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1795 | * <p>This key is available on all devices.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1796 | * |
| 1797 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1798 | * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE |
| 1799 | * @hide |
| 1800 | */ |
| 1801 | public static final Key<int[]> REQUEST_AVAILABLE_RESULT_KEYS = |
| 1802 | new Key<int[]>("android.request.availableResultKeys", int[].class); |
| 1803 | |
| 1804 | /** |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 1805 | * <p>A list of all keys that the camera device has available to use with {@link android.hardware.camera2.CameraCharacteristics }.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1806 | * <p>This entry follows the same rules as |
| 1807 | * android.request.availableResultKeys (except that it applies for |
| 1808 | * CameraCharacteristics instead of CaptureResult). See above for more |
| 1809 | * details.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1810 | * <p>This key is available on all devices.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 1811 | * @hide |
| 1812 | */ |
| 1813 | public static final Key<int[]> REQUEST_AVAILABLE_CHARACTERISTICS_KEYS = |
| 1814 | new Key<int[]>("android.request.availableCharacteristicsKeys", int[].class); |
| 1815 | |
| 1816 | /** |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 1817 | * <p>A subset of the available request keys that the camera device |
| 1818 | * can pass as part of the capture session initialization.</p> |
| 1819 | * <p>This is a subset of android.request.availableRequestKeys which |
| 1820 | * contains a list of keys that are difficult to apply per-frame and |
| 1821 | * can result in unexpected delays when modified during the capture session |
| 1822 | * lifetime. Typical examples include parameters that require a |
| 1823 | * time-consuming hardware re-configuration or internal camera pipeline |
| 1824 | * change. For performance reasons we advise clients to pass their initial |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 1825 | * values as part of |
Eino-Ville Talvala | ec99efa | 2017-11-29 15:35:42 -0800 | [diff] [blame] | 1826 | * {@link SessionConfiguration#setSessionParameters }. |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 1827 | * Once the camera capture session is enabled it is also recommended to avoid |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 1828 | * changing them from their initial values set in |
| 1829 | * {@link SessionConfiguration#setSessionParameters }. |
| 1830 | * Control over session parameters can still be exerted in capture requests |
| 1831 | * but clients should be aware and expect delays during their application. |
| 1832 | * An example usage scenario could look like this:</p> |
| 1833 | * <ul> |
| 1834 | * <li>The camera client starts by quering the session parameter key list via |
| 1835 | * {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys }.</li> |
| 1836 | * <li>Before triggering the capture session create sequence, a capture request |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 1837 | * must be built via |
| 1838 | * {@link CameraDevice#createCaptureRequest } |
| 1839 | * using an appropriate template matching the particular use case.</li> |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 1840 | * <li>The client should go over the list of session parameters and check |
| 1841 | * whether some of the keys listed matches with the parameters that |
| 1842 | * they intend to modify as part of the first capture request.</li> |
| 1843 | * <li>If there is no such match, the capture request can be passed |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 1844 | * unmodified to |
| 1845 | * {@link SessionConfiguration#setSessionParameters }.</li> |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 1846 | * <li>If matches do exist, the client should update the respective values |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 1847 | * and pass the request to |
| 1848 | * {@link SessionConfiguration#setSessionParameters }.</li> |
Emilian Peev | 75a5570 | 2017-11-07 16:09:59 +0000 | [diff] [blame] | 1849 | * <li>After the capture session initialization completes the session parameter |
| 1850 | * key list can continue to serve as reference when posting or updating |
| 1851 | * further requests. As mentioned above further changes to session |
| 1852 | * parameters should ideally be avoided, if updates are necessary |
| 1853 | * however clients could expect a delay/glitch during the |
| 1854 | * parameter switch.</li> |
| 1855 | * </ul> |
| 1856 | * <p>This key is available on all devices.</p> |
| 1857 | * @hide |
| 1858 | */ |
| 1859 | public static final Key<int[]> REQUEST_AVAILABLE_SESSION_KEYS = |
| 1860 | new Key<int[]>("android.request.availableSessionKeys", int[].class); |
| 1861 | |
| 1862 | /** |
Emilian Peev | 2100ae7 | 2018-01-12 16:56:25 +0000 | [diff] [blame] | 1863 | * <p>A subset of the available request keys that can be overriden for |
| 1864 | * physical devices backing a logical multi-camera.</p> |
| 1865 | * <p>This is a subset of android.request.availableRequestKeys which contains a list |
| 1866 | * of keys that can be overriden using {@link CaptureRequest.Builder#setPhysicalCameraKey }. |
| 1867 | * The respective value of such request key can be obtained by calling |
| 1868 | * {@link CaptureRequest.Builder#getPhysicalCameraKey }. Capture requests that contain |
| 1869 | * individual physical device requests must be built via |
Emilian Peev | f60f4fb | 2018-02-08 17:40:48 +0000 | [diff] [blame] | 1870 | * {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.</p> |
Emilian Peev | 2100ae7 | 2018-01-12 16:56:25 +0000 | [diff] [blame] | 1871 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 1872 | * <p><b>Limited capability</b> - |
| 1873 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 1874 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 1875 | * |
| 1876 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 1877 | * @hide |
| 1878 | */ |
| 1879 | public static final Key<int[]> REQUEST_AVAILABLE_PHYSICAL_CAMERA_REQUEST_KEYS = |
| 1880 | new Key<int[]>("android.request.availablePhysicalCameraRequestKeys", int[].class); |
| 1881 | |
| 1882 | /** |
Zhijun He | f3b16df | 2014-01-17 13:37:59 -0800 | [diff] [blame] | 1883 | * <p>The list of image formats that are supported by this |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 1884 | * camera device for output streams.</p> |
Zhijun He | f3b16df | 2014-01-17 13:37:59 -0800 | [diff] [blame] | 1885 | * <p>All camera devices will support JPEG and YUV_420_888 formats.</p> |
| 1886 | * <p>When set to YUV_420_888, application can access the YUV420 data directly.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1887 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1888 | * @deprecated |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1889 | * <p>Not used in HALv3 or newer</p> |
| 1890 | |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1891 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1892 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1893 | @Deprecated |
Igor Murashkin | b519cc5 | 2013-07-02 11:23:44 -0700 | [diff] [blame] | 1894 | public static final Key<int[]> SCALER_AVAILABLE_FORMATS = |
| 1895 | new Key<int[]>("android.scaler.availableFormats", int[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1896 | |
| 1897 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1898 | * <p>The minimum frame duration that is supported |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1899 | * for each resolution in android.scaler.availableJpegSizes.</p> |
Igor Murashkin | 143aa0b | 2014-01-17 15:02:34 -0800 | [diff] [blame] | 1900 | * <p>This corresponds to the minimum steady-state frame duration when only |
| 1901 | * that JPEG stream is active and captured in a burst, with all |
| 1902 | * processing (typically in android.*.mode) set to FAST.</p> |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1903 | * <p>When multiple streams are configured, the minimum |
| 1904 | * frame duration will be >= max(individual stream min |
| 1905 | * durations)</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1906 | * <p><b>Units</b>: Nanoseconds</p> |
| 1907 | * <p><b>Range of valid values:</b><br> |
| 1908 | * TODO: Remove property.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1909 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1910 | * @deprecated |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1911 | * <p>Not used in HALv3 or newer</p> |
| 1912 | |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1913 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1914 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1915 | @Deprecated |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1916 | public static final Key<long[]> SCALER_AVAILABLE_JPEG_MIN_DURATIONS = |
| 1917 | new Key<long[]>("android.scaler.availableJpegMinDurations", long[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1918 | |
| 1919 | /** |
Zhijun He | f3b16df | 2014-01-17 13:37:59 -0800 | [diff] [blame] | 1920 | * <p>The JPEG resolutions that are supported by this camera device.</p> |
| 1921 | * <p>The resolutions are listed as <code>(width, height)</code> pairs. All camera devices will support |
| 1922 | * sensor maximum resolution (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}).</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1923 | * <p><b>Range of valid values:</b><br> |
| 1924 | * TODO: Remove property.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1925 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Zhijun He | f3b16df | 2014-01-17 13:37:59 -0800 | [diff] [blame] | 1926 | * |
| 1927 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1928 | * @deprecated |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1929 | * <p>Not used in HALv3 or newer</p> |
| 1930 | |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1931 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1932 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1933 | @Deprecated |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 1934 | public static final Key<android.util.Size[]> SCALER_AVAILABLE_JPEG_SIZES = |
| 1935 | new Key<android.util.Size[]>("android.scaler.availableJpegSizes", android.util.Size[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1936 | |
| 1937 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1938 | * <p>The maximum ratio between both active area width |
| 1939 | * and crop region width, and active area height and |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1940 | * crop region height, for {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 1941 | * <p>This represents the maximum amount of zooming possible by |
| 1942 | * the camera device, or equivalently, the minimum cropping |
| 1943 | * window size.</p> |
| 1944 | * <p>Crop regions that have a width or height that is smaller |
| 1945 | * than this ratio allows will be rounded up to the minimum |
| 1946 | * allowed size by the camera device.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1947 | * <p><b>Units</b>: Zoom scale factor</p> |
| 1948 | * <p><b>Range of valid values:</b><br> |
| 1949 | * >=1</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1950 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1951 | * |
| 1952 | * @see CaptureRequest#SCALER_CROP_REGION |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1953 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 1954 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1955 | public static final Key<Float> SCALER_AVAILABLE_MAX_DIGITAL_ZOOM = |
| 1956 | new Key<Float>("android.scaler.availableMaxDigitalZoom", float.class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1957 | |
| 1958 | /** |
Igor Murashkin | 143aa0b | 2014-01-17 15:02:34 -0800 | [diff] [blame] | 1959 | * <p>For each available processed output size (defined in |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1960 | * android.scaler.availableProcessedSizes), this property lists the |
Igor Murashkin | 143aa0b | 2014-01-17 15:02:34 -0800 | [diff] [blame] | 1961 | * minimum supportable frame duration for that size.</p> |
| 1962 | * <p>This should correspond to the frame duration when only that processed |
| 1963 | * stream is active, with all processing (typically in android.*.mode) |
| 1964 | * set to FAST.</p> |
| 1965 | * <p>When multiple streams are configured, the minimum frame duration will |
| 1966 | * be >= max(individual stream min durations).</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 1967 | * <p><b>Units</b>: Nanoseconds</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1968 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1969 | * @deprecated |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1970 | * <p>Not used in HALv3 or newer</p> |
| 1971 | |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1972 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1973 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1974 | @Deprecated |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1975 | public static final Key<long[]> SCALER_AVAILABLE_PROCESSED_MIN_DURATIONS = |
| 1976 | new Key<long[]>("android.scaler.availableProcessedMinDurations", long[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1977 | |
| 1978 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 1979 | * <p>The resolutions available for use with |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 1980 | * processed output streams, such as YV12, NV12, and |
| 1981 | * platform opaque YUV/RGB streams to the GPU or video |
Zhijun He | f3b16df | 2014-01-17 13:37:59 -0800 | [diff] [blame] | 1982 | * encoders.</p> |
| 1983 | * <p>The resolutions are listed as <code>(width, height)</code> pairs.</p> |
| 1984 | * <p>For a given use case, the actual maximum supported resolution |
| 1985 | * may be lower than what is listed here, depending on the destination |
| 1986 | * Surface for the image data. For example, for recording video, |
| 1987 | * the video encoder chosen may have a maximum size limit (e.g. 1080p) |
| 1988 | * smaller than what the camera (e.g. maximum resolution is 3264x2448) |
| 1989 | * can provide.</p> |
| 1990 | * <p>Please reference the documentation for the image data destination to |
| 1991 | * check if it limits the maximum size for image data.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 1992 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1993 | * @deprecated |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 1994 | * <p>Not used in HALv3 or newer</p> |
| 1995 | |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1996 | * @hide |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 1997 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 1998 | @Deprecated |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 1999 | public static final Key<android.util.Size[]> SCALER_AVAILABLE_PROCESSED_SIZES = |
| 2000 | new Key<android.util.Size[]>("android.scaler.availableProcessedSizes", android.util.Size[].class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 2001 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2002 | /** |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 2003 | * <p>The mapping of image formats that are supported by this |
| 2004 | * camera device for input streams, to their corresponding output formats.</p> |
| 2005 | * <p>All camera devices with at least 1 |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 2006 | * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 2007 | * available input format.</p> |
| 2008 | * <p>The camera device will support the following map of formats, |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 2009 | * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p> |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 2010 | * <table> |
| 2011 | * <thead> |
| 2012 | * <tr> |
| 2013 | * <th align="left">Input Format</th> |
| 2014 | * <th align="left">Output Format</th> |
| 2015 | * <th align="left">Capability</th> |
| 2016 | * </tr> |
| 2017 | * </thead> |
| 2018 | * <tbody> |
| 2019 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2020 | * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td> |
| 2021 | * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td> |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 2022 | * <td align="left">PRIVATE_REPROCESSING</td> |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 2023 | * </tr> |
| 2024 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2025 | * <td align="left">{@link android.graphics.ImageFormat#PRIVATE }</td> |
| 2026 | * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 2027 | * <td align="left">PRIVATE_REPROCESSING</td> |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 2028 | * </tr> |
| 2029 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2030 | * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
| 2031 | * <td align="left">{@link android.graphics.ImageFormat#JPEG }</td> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 2032 | * <td align="left">YUV_REPROCESSING</td> |
| 2033 | * </tr> |
| 2034 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2035 | * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
| 2036 | * <td align="left">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 2037 | * <td align="left">YUV_REPROCESSING</td> |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 2038 | * </tr> |
| 2039 | * </tbody> |
| 2040 | * </table> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2041 | * <p>PRIVATE refers to a device-internal format that is not directly application-visible. A |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 2042 | * PRIVATE input surface can be acquired by {@link android.media.ImageReader#newInstance } |
| 2043 | * with {@link android.graphics.ImageFormat#PRIVATE } as the format.</p> |
| 2044 | * <p>For a PRIVATE_REPROCESSING-capable camera device, using the PRIVATE format as either input |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2045 | * or output will never hurt maximum frame rate (i.e. {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration getOutputStallDuration(ImageFormat.PRIVATE, size)} is always 0),</p> |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 2046 | * <p>Attempting to configure an input stream with output streams not |
| 2047 | * listed as available in this map is not valid.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2048 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2049 | * |
Zhijun He | 0e99c22 | 2015-01-29 15:26:05 -0800 | [diff] [blame] | 2050 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 2051 | * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2052 | * @hide |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 2053 | */ |
Chien-Yu Chen | 0a551f1 | 2015-04-03 17:57:35 -0700 | [diff] [blame] | 2054 | public static final Key<android.hardware.camera2.params.ReprocessFormatsMap> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP = |
| 2055 | new Key<android.hardware.camera2.params.ReprocessFormatsMap>("android.scaler.availableInputOutputFormatsMap", android.hardware.camera2.params.ReprocessFormatsMap.class); |
Igor Murashkin | 418f6df | 2014-02-07 18:20:48 -0800 | [diff] [blame] | 2056 | |
| 2057 | /** |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2058 | * <p>The available stream configurations that this |
| 2059 | * camera device supports |
| 2060 | * (i.e. format, width, height, output/input stream).</p> |
| 2061 | * <p>The configurations are listed as <code>(format, width, height, input?)</code> |
| 2062 | * tuples.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2063 | * <p>For a given use case, the actual maximum supported resolution |
| 2064 | * may be lower than what is listed here, depending on the destination |
| 2065 | * Surface for the image data. For example, for recording video, |
| 2066 | * the video encoder chosen may have a maximum size limit (e.g. 1080p) |
| 2067 | * smaller than what the camera (e.g. maximum resolution is 3264x2448) |
| 2068 | * can provide.</p> |
| 2069 | * <p>Please reference the documentation for the image data destination to |
| 2070 | * check if it limits the maximum size for image data.</p> |
| 2071 | * <p>Not all output formats may be supported in a configuration with |
| 2072 | * an input stream of a particular format. For more details, see |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2073 | * android.scaler.availableInputOutputFormatsMap.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2074 | * <p>The following table describes the minimum required output stream |
| 2075 | * configurations based on the hardware level |
| 2076 | * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> |
| 2077 | * <table> |
| 2078 | * <thead> |
| 2079 | * <tr> |
| 2080 | * <th align="center">Format</th> |
| 2081 | * <th align="center">Size</th> |
| 2082 | * <th align="center">Hardware Level</th> |
| 2083 | * <th align="center">Notes</th> |
| 2084 | * </tr> |
| 2085 | * </thead> |
| 2086 | * <tbody> |
| 2087 | * <tr> |
| 2088 | * <td align="center">JPEG</td> |
| 2089 | * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td> |
| 2090 | * <td align="center">Any</td> |
| 2091 | * <td align="center"></td> |
| 2092 | * </tr> |
| 2093 | * <tr> |
| 2094 | * <td align="center">JPEG</td> |
| 2095 | * <td align="center">1920x1080 (1080p)</td> |
| 2096 | * <td align="center">Any</td> |
| 2097 | * <td align="center">if 1080p <= activeArraySize</td> |
| 2098 | * </tr> |
| 2099 | * <tr> |
| 2100 | * <td align="center">JPEG</td> |
| 2101 | * <td align="center">1280x720 (720)</td> |
| 2102 | * <td align="center">Any</td> |
| 2103 | * <td align="center">if 720p <= activeArraySize</td> |
| 2104 | * </tr> |
| 2105 | * <tr> |
| 2106 | * <td align="center">JPEG</td> |
| 2107 | * <td align="center">640x480 (480p)</td> |
| 2108 | * <td align="center">Any</td> |
| 2109 | * <td align="center">if 480p <= activeArraySize</td> |
| 2110 | * </tr> |
| 2111 | * <tr> |
| 2112 | * <td align="center">JPEG</td> |
| 2113 | * <td align="center">320x240 (240p)</td> |
| 2114 | * <td align="center">Any</td> |
| 2115 | * <td align="center">if 240p <= activeArraySize</td> |
| 2116 | * </tr> |
| 2117 | * <tr> |
| 2118 | * <td align="center">YUV_420_888</td> |
| 2119 | * <td align="center">all output sizes available for JPEG</td> |
| 2120 | * <td align="center">FULL</td> |
| 2121 | * <td align="center"></td> |
| 2122 | * </tr> |
| 2123 | * <tr> |
| 2124 | * <td align="center">YUV_420_888</td> |
| 2125 | * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> |
| 2126 | * <td align="center">LIMITED</td> |
| 2127 | * <td align="center"></td> |
| 2128 | * </tr> |
| 2129 | * <tr> |
| 2130 | * <td align="center">IMPLEMENTATION_DEFINED</td> |
| 2131 | * <td align="center">same as YUV_420_888</td> |
| 2132 | * <td align="center">Any</td> |
| 2133 | * <td align="center"></td> |
| 2134 | * </tr> |
| 2135 | * </tbody> |
| 2136 | * </table> |
| 2137 | * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} for additional |
| 2138 | * mandatory stream configurations on a per-capability basis.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2139 | * <p>This key is available on all devices.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2140 | * |
| 2141 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 2142 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2143 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2144 | * @hide |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2145 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2146 | public static final Key<android.hardware.camera2.params.StreamConfiguration[]> SCALER_AVAILABLE_STREAM_CONFIGURATIONS = |
| 2147 | new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.scaler.availableStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2148 | |
| 2149 | /** |
| 2150 | * <p>This lists the minimum frame duration for each |
| 2151 | * format/size combination.</p> |
| 2152 | * <p>This should correspond to the frame duration when only that |
| 2153 | * stream is active, with all processing (typically in android.*.mode) |
| 2154 | * set to either OFF or FAST.</p> |
| 2155 | * <p>When multiple streams are used in a request, the minimum frame |
| 2156 | * duration will be max(individual stream min durations).</p> |
| 2157 | * <p>The minimum frame duration of a stream (of a particular format, size) |
| 2158 | * is the same regardless of whether the stream is input or output.</p> |
| 2159 | * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2160 | * android.scaler.availableStallDurations for more details about |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2161 | * calculating the max frame rate.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2162 | * <p><b>Units</b>: (format, width, height, ns) x n</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2163 | * <p>This key is available on all devices.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2164 | * |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2165 | * @see CaptureRequest#SENSOR_FRAME_DURATION |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2166 | * @hide |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2167 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2168 | public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_MIN_FRAME_DURATIONS = |
| 2169 | new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2170 | |
| 2171 | /** |
| 2172 | * <p>This lists the maximum stall duration for each |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 2173 | * output format/size combination.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2174 | * <p>A stall duration is how much extra time would get added |
| 2175 | * to the normal minimum frame duration for a repeating request |
| 2176 | * that has streams with non-zero stall.</p> |
| 2177 | * <p>For example, consider JPEG captures which have the following |
| 2178 | * characteristics:</p> |
| 2179 | * <ul> |
| 2180 | * <li>JPEG streams act like processed YUV streams in requests for which |
| 2181 | * they are not included; in requests in which they are directly |
| 2182 | * referenced, they act as JPEG streams. This is because supporting a |
| 2183 | * JPEG stream requires the underlying YUV data to always be ready for |
| 2184 | * use by a JPEG encoder, but the encoder will only be used (and impact |
| 2185 | * frame duration) on requests that actually reference a JPEG stream.</li> |
| 2186 | * <li>The JPEG processor can run concurrently to the rest of the camera |
| 2187 | * pipeline, but cannot process more than 1 capture at a time.</li> |
| 2188 | * </ul> |
| 2189 | * <p>In other words, using a repeating YUV request would result |
| 2190 | * in a steady frame rate (let's say it's 30 FPS). If a single |
| 2191 | * JPEG request is submitted periodically, the frame rate will stay |
| 2192 | * at 30 FPS (as long as we wait for the previous JPEG to return each |
| 2193 | * time). If we try to submit a repeating YUV + JPEG request, then |
| 2194 | * the frame rate will drop from 30 FPS.</p> |
| 2195 | * <p>In general, submitting a new request with a non-0 stall time |
| 2196 | * stream will <em>not</em> cause a frame rate drop unless there are still |
| 2197 | * outstanding buffers for that stream from previous requests.</p> |
| 2198 | * <p>Submitting a repeating request with streams (call this <code>S</code>) |
| 2199 | * is the same as setting the minimum frame duration from |
| 2200 | * the normal minimum frame duration corresponding to <code>S</code>, added with |
| 2201 | * the maximum stall duration for <code>S</code>.</p> |
| 2202 | * <p>If interleaving requests with and without a stall duration, |
| 2203 | * a request will stall by the maximum of the remaining times |
| 2204 | * for each can-stall stream with outstanding buffers.</p> |
| 2205 | * <p>This means that a stalling request will not have an exposure start |
| 2206 | * until the stall has completed.</p> |
| 2207 | * <p>This should correspond to the stall duration when only that stream is |
| 2208 | * active, with all processing (typically in android.*.mode) set to FAST |
| 2209 | * or OFF. Setting any of the processing modes to HIGH_QUALITY |
| 2210 | * effectively results in an indeterminate stall duration for all |
| 2211 | * streams in a request (the regular stall calculation rules are |
| 2212 | * ignored).</p> |
| 2213 | * <p>The following formats may always have a stall duration:</p> |
| 2214 | * <ul> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2215 | * <li>{@link android.graphics.ImageFormat#JPEG }</li> |
| 2216 | * <li>{@link android.graphics.ImageFormat#RAW_SENSOR }</li> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2217 | * </ul> |
| 2218 | * <p>The following formats will never have a stall duration:</p> |
| 2219 | * <ul> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2220 | * <li>{@link android.graphics.ImageFormat#YUV_420_888 }</li> |
| 2221 | * <li>{@link android.graphics.ImageFormat#RAW10 }</li> |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 2222 | * <li>{@link android.graphics.ImageFormat#RAW12 }</li> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2223 | * </ul> |
| 2224 | * <p>All other formats may or may not have an allowed stall duration on |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2225 | * a per-capability basis; refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2226 | * for more details.</p> |
| 2227 | * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} for more information about |
| 2228 | * calculating the max frame rate (absent stalls).</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2229 | * <p><b>Units</b>: (format, width, height, ns) x n</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2230 | * <p>This key is available on all devices.</p> |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2231 | * |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2232 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2233 | * @see CaptureRequest#SENSOR_FRAME_DURATION |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2234 | * @hide |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2235 | */ |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2236 | public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> SCALER_AVAILABLE_STALL_DURATIONS = |
| 2237 | new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.scaler.availableStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); |
| 2238 | |
| 2239 | /** |
| 2240 | * <p>The available stream configurations that this |
| 2241 | * camera device supports; also includes the minimum frame durations |
| 2242 | * and the stall durations for each format/size combination.</p> |
| 2243 | * <p>All camera devices will support sensor maximum resolution (defined by |
| 2244 | * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) for the JPEG format.</p> |
| 2245 | * <p>For a given use case, the actual maximum supported resolution |
| 2246 | * may be lower than what is listed here, depending on the destination |
| 2247 | * Surface for the image data. For example, for recording video, |
| 2248 | * the video encoder chosen may have a maximum size limit (e.g. 1080p) |
| 2249 | * smaller than what the camera (e.g. maximum resolution is 3264x2448) |
| 2250 | * can provide.</p> |
| 2251 | * <p>Please reference the documentation for the image data destination to |
| 2252 | * check if it limits the maximum size for image data.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2253 | * <p>The following table describes the minimum required output stream |
| 2254 | * configurations based on the hardware level |
| 2255 | * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p> |
| 2256 | * <table> |
| 2257 | * <thead> |
| 2258 | * <tr> |
| 2259 | * <th align="center">Format</th> |
| 2260 | * <th align="center">Size</th> |
| 2261 | * <th align="center">Hardware Level</th> |
| 2262 | * <th align="center">Notes</th> |
| 2263 | * </tr> |
| 2264 | * </thead> |
| 2265 | * <tbody> |
| 2266 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2267 | * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> |
Yin-Chia Yeh | 5683046 | 2015-07-08 14:26:05 -0700 | [diff] [blame] | 2268 | * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1)</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2269 | * <td align="center">Any</td> |
| 2270 | * <td align="center"></td> |
| 2271 | * </tr> |
| 2272 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2273 | * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2274 | * <td align="center">1920x1080 (1080p)</td> |
| 2275 | * <td align="center">Any</td> |
| 2276 | * <td align="center">if 1080p <= activeArraySize</td> |
| 2277 | * </tr> |
| 2278 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2279 | * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> |
Yin-Chia Yeh | 5683046 | 2015-07-08 14:26:05 -0700 | [diff] [blame] | 2280 | * <td align="center">1280x720 (720p)</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2281 | * <td align="center">Any</td> |
| 2282 | * <td align="center">if 720p <= activeArraySize</td> |
| 2283 | * </tr> |
| 2284 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2285 | * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2286 | * <td align="center">640x480 (480p)</td> |
| 2287 | * <td align="center">Any</td> |
| 2288 | * <td align="center">if 480p <= activeArraySize</td> |
| 2289 | * </tr> |
| 2290 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2291 | * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2292 | * <td align="center">320x240 (240p)</td> |
| 2293 | * <td align="center">Any</td> |
| 2294 | * <td align="center">if 240p <= activeArraySize</td> |
| 2295 | * </tr> |
| 2296 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2297 | * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2298 | * <td align="center">all output sizes available for JPEG</td> |
| 2299 | * <td align="center">FULL</td> |
| 2300 | * <td align="center"></td> |
| 2301 | * </tr> |
| 2302 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2303 | * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2304 | * <td align="center">all output sizes available for JPEG, up to the maximum video size</td> |
| 2305 | * <td align="center">LIMITED</td> |
| 2306 | * <td align="center"></td> |
| 2307 | * </tr> |
| 2308 | * <tr> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2309 | * <td align="center">{@link android.graphics.ImageFormat#PRIVATE }</td> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2310 | * <td align="center">same as YUV_420_888</td> |
| 2311 | * <td align="center">Any</td> |
| 2312 | * <td align="center"></td> |
| 2313 | * </tr> |
| 2314 | * </tbody> |
| 2315 | * </table> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2316 | * <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and {@link android.hardware.camera2.CameraDevice#createCaptureSession } for additional mandatory |
| 2317 | * stream configurations on a per-capability basis.</p> |
Yin-Chia Yeh | 5683046 | 2015-07-08 14:26:05 -0700 | [diff] [blame] | 2318 | * <p>*1: For JPEG format, the sizes may be restricted by below conditions:</p> |
| 2319 | * <ul> |
| 2320 | * <li>The HAL may choose the aspect ratio of each Jpeg size to be one of well known ones |
| 2321 | * (e.g. 4:3, 16:9, 3:2 etc.). If the sensor maximum resolution |
| 2322 | * (defined by {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) has an aspect ratio other than these, |
| 2323 | * it does not have to be included in the supported JPEG sizes.</li> |
| 2324 | * <li>Some hardware JPEG encoders may have pixel boundary alignment requirements, such as |
| 2325 | * the dimensions being a multiple of 16. |
| 2326 | * Therefore, the maximum JPEG size may be smaller than sensor maximum resolution. |
| 2327 | * However, the largest JPEG size will be as close as possible to the sensor maximum |
| 2328 | * resolution given above constraints. It is required that after aspect ratio adjustments, |
| 2329 | * additional size reduction due to other issues must be less than 3% in area. For example, |
| 2330 | * if the sensor maximum resolution is 3280x2464, if the maximum JPEG size has aspect |
| 2331 | * ratio 4:3, and the JPEG encoder alignment requirement is 16, the maximum JPEG size will be |
| 2332 | * 3264x2448.</li> |
| 2333 | * </ul> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2334 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2335 | * |
| 2336 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 2337 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 2338 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
| 2339 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2340 | @PublicKey |
| 2341 | @SyntheticKey |
Igor Murashkin | 9c59517 | 2014-05-12 13:56:20 -0700 | [diff] [blame] | 2342 | public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP = |
| 2343 | new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class); |
Igor Murashkin | a23ffb5 | 2014-02-07 18:52:34 -0800 | [diff] [blame] | 2344 | |
| 2345 | /** |
Zhijun He | 1498615 | 2014-05-22 21:17:37 -0700 | [diff] [blame] | 2346 | * <p>The crop type that this camera device supports.</p> |
| 2347 | * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera |
| 2348 | * device that only supports CENTER_ONLY cropping, the camera device will move the |
| 2349 | * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}) |
| 2350 | * and keep the crop region width and height unchanged. The camera device will return the |
| 2351 | * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> |
| 2352 | * <p>Camera devices that support FREEFORM cropping will support any crop region that |
| 2353 | * is inside of the active array. The camera device will apply the same crop region and |
| 2354 | * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p> |
Eino-Ville Talvala | 81e8928 | 2015-06-30 16:34:24 -0700 | [diff] [blame] | 2355 | * <p>LEGACY capability devices will only support CENTER_ONLY cropping.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2356 | * <p><b>Possible values:</b> |
| 2357 | * <ul> |
| 2358 | * <li>{@link #SCALER_CROPPING_TYPE_CENTER_ONLY CENTER_ONLY}</li> |
| 2359 | * <li>{@link #SCALER_CROPPING_TYPE_FREEFORM FREEFORM}</li> |
| 2360 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2361 | * <p>This key is available on all devices.</p> |
Zhijun He | 1498615 | 2014-05-22 21:17:37 -0700 | [diff] [blame] | 2362 | * |
Zhijun He | 1498615 | 2014-05-22 21:17:37 -0700 | [diff] [blame] | 2363 | * @see CaptureRequest#SCALER_CROP_REGION |
| 2364 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
| 2365 | * @see #SCALER_CROPPING_TYPE_CENTER_ONLY |
| 2366 | * @see #SCALER_CROPPING_TYPE_FREEFORM |
| 2367 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2368 | @PublicKey |
Zhijun He | 1498615 | 2014-05-22 21:17:37 -0700 | [diff] [blame] | 2369 | public static final Key<Integer> SCALER_CROPPING_TYPE = |
| 2370 | new Key<Integer>("android.scaler.croppingType", int.class); |
| 2371 | |
| 2372 | /** |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2373 | * <p>The area of the image sensor which corresponds to active pixels after any geometric |
| 2374 | * distortion correction has been applied.</p> |
| 2375 | * <p>This is the rectangle representing the size of the active region of the sensor (i.e. |
| 2376 | * the region that actually receives light from the scene) after any geometric correction |
| 2377 | * has been applied, and should be treated as the maximum size in pixels of any of the |
| 2378 | * image output formats aside from the raw formats.</p> |
| 2379 | * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of |
| 2380 | * the full pixel array, and the size of the full pixel array is given by |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2381 | * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2382 | * <p>The coordinate system for most other keys that list pixel coordinates, including |
| 2383 | * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, is defined relative to the active array rectangle given in |
| 2384 | * this field, with <code>(0, 0)</code> being the top-left of this rectangle.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2385 | * <p>The active array may be smaller than the full pixel array, since the full array may |
Yin-Chia Yeh | c925656 | 2018-06-15 15:37:08 -0700 | [diff] [blame] | 2386 | * include black calibration pixels or other inactive regions.</p> |
| 2387 | * <p>For devices that do not support {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the active |
| 2388 | * array must be the same as {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</p> |
| 2389 | * <p>For devices that support {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} control, the active array must |
| 2390 | * be enclosed by {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}. The difference between |
| 2391 | * pre-correction active array and active array accounts for scaling or cropping caused |
| 2392 | * by lens geometric distortion correction.</p> |
| 2393 | * <p>In general, application should always refer to active array size for controls like |
| 2394 | * metering regions or crop region. Two exceptions are when the application is dealing with |
| 2395 | * RAW image buffers (RAW_SENSOR, RAW10, RAW12 etc), or when application explicitly set |
| 2396 | * {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} to OFF. In these cases, application should refer |
| 2397 | * to {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2398 | * <p><b>Units</b>: Pixel coordinates on the image sensor</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2399 | * <p>This key is available on all devices.</p> |
| 2400 | * |
Yin-Chia Yeh | c925656 | 2018-06-15 15:37:08 -0700 | [diff] [blame] | 2401 | * @see CaptureRequest#DISTORTION_CORRECTION_MODE |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2402 | * @see CaptureRequest#SCALER_CROP_REGION |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2403 | * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE |
Yin-Chia Yeh | c925656 | 2018-06-15 15:37:08 -0700 | [diff] [blame] | 2404 | * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2405 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2406 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2407 | public static final Key<android.graphics.Rect> SENSOR_INFO_ACTIVE_ARRAY_SIZE = |
| 2408 | new Key<android.graphics.Rect>("android.sensor.info.activeArraySize", android.graphics.Rect.class); |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 2409 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2410 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2411 | * <p>Range of sensitivities for {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} supported by this |
| 2412 | * camera device.</p> |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2413 | * <p>The values are the standard ISO sensitivity values, |
| 2414 | * as defined in ISO 12232:2006.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2415 | * <p><b>Range of valid values:</b><br> |
| 2416 | * Min <= 100, Max >= 800</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2417 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2418 | * <p><b>Full capability</b> - |
| 2419 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2420 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2421 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2422 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2423 | * @see CaptureRequest#SENSOR_SENSITIVITY |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2424 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2425 | @PublicKey |
Ruben Brunk | 5749368 | 2014-05-27 18:58:08 -0700 | [diff] [blame] | 2426 | public static final Key<android.util.Range<Integer>> SENSOR_INFO_SENSITIVITY_RANGE = |
| 2427 | new Key<android.util.Range<Integer>>("android.sensor.info.sensitivityRange", new TypeReference<android.util.Range<Integer>>() {{ }}); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2428 | |
| 2429 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2430 | * <p>The arrangement of color filters on sensor; |
Zhijun He | d178496 | 2014-04-08 17:41:46 -0700 | [diff] [blame] | 2431 | * represents the colors in the top-left 2x2 section of |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 2432 | * the sensor, in reading order.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2433 | * <p><b>Possible values:</b> |
| 2434 | * <ul> |
| 2435 | * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB RGGB}</li> |
| 2436 | * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG GRBG}</li> |
| 2437 | * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG GBRG}</li> |
| 2438 | * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR BGGR}</li> |
| 2439 | * <li>{@link #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB RGB}</li> |
| 2440 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2441 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2442 | * <p><b>Full capability</b> - |
| 2443 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2444 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 2445 | * |
| 2446 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Zhijun He | d178496 | 2014-04-08 17:41:46 -0700 | [diff] [blame] | 2447 | * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB |
| 2448 | * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG |
| 2449 | * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG |
| 2450 | * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR |
| 2451 | * @see #SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB |
| 2452 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2453 | @PublicKey |
Zhijun He | d178496 | 2014-04-08 17:41:46 -0700 | [diff] [blame] | 2454 | public static final Key<Integer> SENSOR_INFO_COLOR_FILTER_ARRANGEMENT = |
| 2455 | new Key<Integer>("android.sensor.info.colorFilterArrangement", int.class); |
| 2456 | |
| 2457 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2458 | * <p>The range of image exposure times for {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} supported |
| 2459 | * by this camera device.</p> |
| 2460 | * <p><b>Units</b>: Nanoseconds</p> |
| 2461 | * <p><b>Range of valid values:</b><br> |
| 2462 | * The minimum exposure time will be less than 100 us. For FULL |
Zhijun He | 28288ca | 2014-06-25 15:49:13 -0700 | [diff] [blame] | 2463 | * capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2464 | * the maximum exposure time will be greater than 100ms.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2465 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2466 | * <p><b>Full capability</b> - |
| 2467 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2468 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Igor Murashkin | 6b7ddc4 | 2014-02-03 14:39:19 -0800 | [diff] [blame] | 2469 | * |
Zhijun He | 28288ca | 2014-06-25 15:49:13 -0700 | [diff] [blame] | 2470 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Igor Murashkin | 6b7ddc4 | 2014-02-03 14:39:19 -0800 | [diff] [blame] | 2471 | * @see CaptureRequest#SENSOR_EXPOSURE_TIME |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2472 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2473 | @PublicKey |
Ruben Brunk | 5749368 | 2014-05-27 18:58:08 -0700 | [diff] [blame] | 2474 | public static final Key<android.util.Range<Long>> SENSOR_INFO_EXPOSURE_TIME_RANGE = |
| 2475 | new Key<android.util.Range<Long>>("android.sensor.info.exposureTimeRange", new TypeReference<android.util.Range<Long>>() {{ }}); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2476 | |
| 2477 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2478 | * <p>The maximum possible frame duration (minimum frame rate) for |
| 2479 | * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} that is supported this camera device.</p> |
| 2480 | * <p>Attempting to use frame durations beyond the maximum will result in the frame |
| 2481 | * duration being clipped to the maximum. See that control for a full definition of frame |
| 2482 | * durations.</p> |
Eino-Ville Talvala | b6eb52f | 2015-04-16 16:39:45 -0700 | [diff] [blame] | 2483 | * <p>Refer to {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration } |
| 2484 | * for the minimum frame duration values.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2485 | * <p><b>Units</b>: Nanoseconds</p> |
| 2486 | * <p><b>Range of valid values:</b><br> |
| 2487 | * For FULL capability devices |
| 2488 | * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), at least 100ms.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2489 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2490 | * <p><b>Full capability</b> - |
| 2491 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2492 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Igor Murashkin | 6b7ddc4 | 2014-02-03 14:39:19 -0800 | [diff] [blame] | 2493 | * |
Zhijun He | 28288ca | 2014-06-25 15:49:13 -0700 | [diff] [blame] | 2494 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2495 | * @see CaptureRequest#SENSOR_FRAME_DURATION |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2496 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2497 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2498 | public static final Key<Long> SENSOR_INFO_MAX_FRAME_DURATION = |
| 2499 | new Key<Long>("android.sensor.info.maxFrameDuration", long.class); |
| 2500 | |
| 2501 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2502 | * <p>The physical dimensions of the full pixel |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2503 | * array.</p> |
| 2504 | * <p>This is the physical size of the sensor pixel |
| 2505 | * array defined by {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2506 | * <p><b>Units</b>: Millimeters</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2507 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2508 | * |
| 2509 | * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2510 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2511 | @PublicKey |
Yin-Chia Yeh | 8490ace | 2014-05-27 10:04:54 -0700 | [diff] [blame] | 2512 | public static final Key<android.util.SizeF> SENSOR_INFO_PHYSICAL_SIZE = |
| 2513 | new Key<android.util.SizeF>("android.sensor.info.physicalSize", android.util.SizeF.class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2514 | |
| 2515 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2516 | * <p>Dimensions of the full pixel array, possibly |
Ruben Brunk | eba1b3a | 2014-02-07 18:23:50 -0800 | [diff] [blame] | 2517 | * including black calibration pixels.</p> |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2518 | * <p>The pixel count of the full pixel array of the image sensor, which covers |
| 2519 | * {@link CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE android.sensor.info.physicalSize} area. This represents the full pixel dimensions of |
| 2520 | * the raw buffers produced by this sensor.</p> |
| 2521 | * <p>If a camera device supports raw sensor formats, either this or |
| 2522 | * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is the maximum dimensions for the raw |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 2523 | * output formats listed in {@link android.hardware.camera2.params.StreamConfigurationMap } |
| 2524 | * (this depends on whether or not the image sensor returns buffers containing pixels that |
| 2525 | * are not part of the active array region for blacklevel calibration or other purposes).</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2526 | * <p>Some parts of the full pixel array may not receive light from the scene, |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2527 | * or be otherwise inactive. The {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} key |
| 2528 | * defines the rectangle of active pixels that will be included in processed image |
| 2529 | * formats.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2530 | * <p><b>Units</b>: Pixels</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2531 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2532 | * |
Eino-Ville Talvala | b67a3b3 | 2014-06-06 13:07:20 -0700 | [diff] [blame] | 2533 | * @see CameraCharacteristics#SENSOR_INFO_PHYSICAL_SIZE |
Ruben Brunk | 224eb3a | 2015-06-15 17:32:06 -0700 | [diff] [blame] | 2534 | * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE |
Ruben Brunk | eba1b3a | 2014-02-07 18:23:50 -0800 | [diff] [blame] | 2535 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2536 | @PublicKey |
Igor Murashkin | 72f9f0a | 2014-05-14 15:46:10 -0700 | [diff] [blame] | 2537 | public static final Key<android.util.Size> SENSOR_INFO_PIXEL_ARRAY_SIZE = |
| 2538 | new Key<android.util.Size>("android.sensor.info.pixelArraySize", android.util.Size.class); |
Ruben Brunk | eba1b3a | 2014-02-07 18:23:50 -0800 | [diff] [blame] | 2539 | |
| 2540 | /** |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2541 | * <p>Maximum raw value output by sensor.</p> |
| 2542 | * <p>This specifies the fully-saturated encoding level for the raw |
| 2543 | * sample values from the sensor. This is typically caused by the |
| 2544 | * sensor becoming highly non-linear or clipping. The minimum for |
| 2545 | * each channel is specified by the offset in the |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2546 | * {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern} key.</p> |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2547 | * <p>The white level is typically determined either by sensor bit depth |
Ruben Brunk | e89b120 | 2014-03-24 17:10:35 -0700 | [diff] [blame] | 2548 | * (8-14 bits is expected), or by the point where the sensor response |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2549 | * becomes too non-linear to be useful. The default value for this is |
| 2550 | * maximum representable value for a 16-bit raw sample (2^16 - 1).</p> |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2551 | * <p>The white level values of captured images may vary for different |
| 2552 | * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key |
| 2553 | * represents a coarse approximation for such case. It is recommended |
| 2554 | * to use {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} for captures when supported |
| 2555 | * by the camera device, which provides more accurate white level values.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2556 | * <p><b>Range of valid values:</b><br> |
| 2557 | * > 255 (8-bit output)</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2558 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2559 | * |
| 2560 | * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2561 | * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL |
| 2562 | * @see CaptureRequest#SENSOR_SENSITIVITY |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2563 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2564 | @PublicKey |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2565 | public static final Key<Integer> SENSOR_INFO_WHITE_LEVEL = |
| 2566 | new Key<Integer>("android.sensor.info.whiteLevel", int.class); |
| 2567 | |
| 2568 | /** |
Eino-Ville Talvala | abd9d3c | 2014-07-28 13:01:52 -0700 | [diff] [blame] | 2569 | * <p>The time base source for sensor capture start timestamps.</p> |
| 2570 | * <p>The timestamps provided for captures are always in nanoseconds and monotonic, but |
| 2571 | * may not based on a time source that can be compared to other system time sources.</p> |
| 2572 | * <p>This characteristic defines the source for the timestamps, and therefore whether they |
| 2573 | * can be compared against other system time sources/timestamps.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2574 | * <p><b>Possible values:</b> |
| 2575 | * <ul> |
| 2576 | * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN UNKNOWN}</li> |
| 2577 | * <li>{@link #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME REALTIME}</li> |
| 2578 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2579 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | abd9d3c | 2014-07-28 13:01:52 -0700 | [diff] [blame] | 2580 | * @see #SENSOR_INFO_TIMESTAMP_SOURCE_UNKNOWN |
| 2581 | * @see #SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME |
Zhijun He | 45fa43a1 | 2014-06-13 18:29:37 -0700 | [diff] [blame] | 2582 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2583 | @PublicKey |
Eino-Ville Talvala | abd9d3c | 2014-07-28 13:01:52 -0700 | [diff] [blame] | 2584 | public static final Key<Integer> SENSOR_INFO_TIMESTAMP_SOURCE = |
| 2585 | new Key<Integer>("android.sensor.info.timestampSource", int.class); |
Zhijun He | 45fa43a1 | 2014-06-13 18:29:37 -0700 | [diff] [blame] | 2586 | |
| 2587 | /** |
Yin-Chia Yeh | e4aa283 | 2015-02-06 15:15:53 -0800 | [diff] [blame] | 2588 | * <p>Whether the RAW images output from this camera device are subject to |
| 2589 | * lens shading correction.</p> |
| 2590 | * <p>If TRUE, all images produced by the camera device in the RAW image formats will |
| 2591 | * have lens shading correction already applied to it. If FALSE, the images will |
| 2592 | * not be adjusted for lens shading correction. |
| 2593 | * See {@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW android.request.maxNumOutputRaw} for a list of RAW image formats.</p> |
| 2594 | * <p>This key will be <code>null</code> for all devices do not report this information. |
| 2595 | * Devices with RAW capability will always report this information in this key.</p> |
| 2596 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2597 | * |
| 2598 | * @see CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_RAW |
| 2599 | */ |
| 2600 | @PublicKey |
| 2601 | public static final Key<Boolean> SENSOR_INFO_LENS_SHADING_APPLIED = |
| 2602 | new Key<Boolean>("android.sensor.info.lensShadingApplied", boolean.class); |
| 2603 | |
| 2604 | /** |
Ruben Brunk | 1b02df4 | 2015-07-01 12:53:45 -0700 | [diff] [blame] | 2605 | * <p>The area of the image sensor which corresponds to active pixels prior to the |
| 2606 | * application of any geometric distortion correction.</p> |
| 2607 | * <p>This is the rectangle representing the size of the active region of the sensor (i.e. |
| 2608 | * the region that actually receives light from the scene) before any geometric correction |
| 2609 | * has been applied, and should be treated as the active region rectangle for any of the |
| 2610 | * raw formats. All metadata associated with raw processing (e.g. the lens shading |
| 2611 | * correction map, and radial distortion fields) treats the top, left of this rectangle as |
| 2612 | * the origin, (0,0).</p> |
| 2613 | * <p>The size of this region determines the maximum field of view and the maximum number of |
| 2614 | * pixels that an image from this sensor can contain, prior to the application of |
| 2615 | * geometric distortion correction. The effective maximum pixel dimensions of a |
| 2616 | * post-distortion-corrected image is given by the {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} |
| 2617 | * field, and the effective maximum field of view for a post-distortion-corrected image |
| 2618 | * can be calculated by applying the geometric distortion correction fields to this |
| 2619 | * rectangle, and cropping to the rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> |
| 2620 | * <p>E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the |
| 2621 | * dimensions in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} given the position of a pixel, |
| 2622 | * (x', y'), in the raw pixel array with dimensions give in |
| 2623 | * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}:</p> |
| 2624 | * <ol> |
| 2625 | * <li>Choose a pixel (x', y') within the active array region of the raw buffer given in |
| 2626 | * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}, otherwise this pixel is considered |
| 2627 | * to be outside of the FOV, and will not be shown in the processed output image.</li> |
| 2628 | * <li>Apply geometric distortion correction to get the post-distortion pixel coordinate, |
| 2629 | * (x_i, y_i). When applying geometric correction metadata, note that metadata for raw |
| 2630 | * buffers is defined relative to the top, left of the |
| 2631 | * {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} rectangle.</li> |
| 2632 | * <li>If the resulting corrected pixel coordinate is within the region given in |
| 2633 | * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, then the position of this pixel in the |
| 2634 | * processed output image buffer is <code>(x_i - activeArray.left, y_i - activeArray.top)</code>, |
| 2635 | * when the top, left coordinate of that buffer is treated as (0, 0).</li> |
| 2636 | * </ol> |
| 2637 | * <p>Thus, for pixel x',y' = (25, 25) on a sensor where {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize} |
| 2638 | * is (100,100), {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize} is (10, 10, 100, 100), |
| 2639 | * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} is (20, 20, 80, 80), and the geometric distortion |
| 2640 | * correction doesn't change the pixel coordinate, the resulting pixel selected in |
| 2641 | * pixel coordinates would be x,y = (25, 25) relative to the top,left of the raw buffer |
| 2642 | * with dimensions given in {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}, and would be (5, 5) |
| 2643 | * relative to the top,left of post-processed YUV output buffer with dimensions given in |
| 2644 | * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> |
| 2645 | * <p>The currently supported fields that correct for geometric distortion are:</p> |
| 2646 | * <ol> |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 2647 | * <li>{@link CameraCharacteristics#LENS_DISTORTION android.lens.distortion}.</li> |
Ruben Brunk | 1b02df4 | 2015-07-01 12:53:45 -0700 | [diff] [blame] | 2648 | * </ol> |
Yin-Chia Yeh | c925656 | 2018-06-15 15:37:08 -0700 | [diff] [blame] | 2649 | * <p>If the camera device doesn't support geometric distortion correction, or all of the |
| 2650 | * geometric distortion fields are no-ops, this rectangle will be the same as the |
| 2651 | * post-distortion-corrected rectangle given in {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p> |
Ruben Brunk | 1b02df4 | 2015-07-01 12:53:45 -0700 | [diff] [blame] | 2652 | * <p>This rectangle is defined relative to the full pixel array; (0,0) is the top-left of |
| 2653 | * the full pixel array, and the size of the full pixel array is given by |
| 2654 | * {@link CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE android.sensor.info.pixelArraySize}.</p> |
| 2655 | * <p>The pre-correction active array may be smaller than the full pixel array, since the |
| 2656 | * full array may include black calibration pixels or other inactive regions.</p> |
| 2657 | * <p><b>Units</b>: Pixel coordinates on the image sensor</p> |
| 2658 | * <p>This key is available on all devices.</p> |
| 2659 | * |
Eino-Ville Talvala | 915f504 | 2018-03-13 19:08:01 -0700 | [diff] [blame] | 2660 | * @see CameraCharacteristics#LENS_DISTORTION |
Ruben Brunk | 1b02df4 | 2015-07-01 12:53:45 -0700 | [diff] [blame] | 2661 | * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE |
| 2662 | * @see CameraCharacteristics#SENSOR_INFO_PIXEL_ARRAY_SIZE |
| 2663 | * @see CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE |
| 2664 | */ |
| 2665 | @PublicKey |
| 2666 | public static final Key<android.graphics.Rect> SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE = |
| 2667 | new Key<android.graphics.Rect>("android.sensor.info.preCorrectionActiveArraySize", android.graphics.Rect.class); |
| 2668 | |
| 2669 | /** |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2670 | * <p>The standard reference illuminant used as the scene light source when |
| 2671 | * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, |
| 2672 | * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and |
| 2673 | * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} matrices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2674 | * <p>The values in this key correspond to the values defined for the |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2675 | * EXIF LightSource tag. These illuminants are standard light sources |
| 2676 | * that are often used calibrating camera devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2677 | * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 android.sensor.colorTransform1}, |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2678 | * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 android.sensor.calibrationTransform1}, and |
| 2679 | * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX1 android.sensor.forwardMatrix1} will also be present.</p> |
| 2680 | * <p>Some devices may choose to provide a second set of calibration |
| 2681 | * information for improved quality, including |
| 2682 | * {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2} and its corresponding matrices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2683 | * <p><b>Possible values:</b> |
| 2684 | * <ul> |
| 2685 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT DAYLIGHT}</li> |
| 2686 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT FLUORESCENT}</li> |
| 2687 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN TUNGSTEN}</li> |
| 2688 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FLASH FLASH}</li> |
| 2689 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER FINE_WEATHER}</li> |
| 2690 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER CLOUDY_WEATHER}</li> |
| 2691 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_SHADE SHADE}</li> |
| 2692 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT DAYLIGHT_FLUORESCENT}</li> |
| 2693 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT DAY_WHITE_FLUORESCENT}</li> |
| 2694 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT COOL_WHITE_FLUORESCENT}</li> |
| 2695 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT WHITE_FLUORESCENT}</li> |
| 2696 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A STANDARD_A}</li> |
| 2697 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B STANDARD_B}</li> |
| 2698 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C STANDARD_C}</li> |
| 2699 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D55 D55}</li> |
| 2700 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D65 D65}</li> |
| 2701 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D75 D75}</li> |
| 2702 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_D50 D50}</li> |
| 2703 | * <li>{@link #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN ISO_STUDIO_TUNGSTEN}</li> |
| 2704 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2705 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2706 | * |
| 2707 | * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM1 |
| 2708 | * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM1 |
| 2709 | * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX1 |
| 2710 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 |
| 2711 | * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT |
| 2712 | * @see #SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT |
| 2713 | * @see #SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN |
| 2714 | * @see #SENSOR_REFERENCE_ILLUMINANT1_FLASH |
| 2715 | * @see #SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER |
| 2716 | * @see #SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER |
| 2717 | * @see #SENSOR_REFERENCE_ILLUMINANT1_SHADE |
| 2718 | * @see #SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT |
| 2719 | * @see #SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT |
| 2720 | * @see #SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT |
| 2721 | * @see #SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT |
| 2722 | * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A |
| 2723 | * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B |
| 2724 | * @see #SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C |
| 2725 | * @see #SENSOR_REFERENCE_ILLUMINANT1_D55 |
| 2726 | * @see #SENSOR_REFERENCE_ILLUMINANT1_D65 |
| 2727 | * @see #SENSOR_REFERENCE_ILLUMINANT1_D75 |
| 2728 | * @see #SENSOR_REFERENCE_ILLUMINANT1_D50 |
| 2729 | * @see #SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN |
| 2730 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2731 | @PublicKey |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2732 | public static final Key<Integer> SENSOR_REFERENCE_ILLUMINANT1 = |
| 2733 | new Key<Integer>("android.sensor.referenceIlluminant1", int.class); |
| 2734 | |
| 2735 | /** |
| 2736 | * <p>The standard reference illuminant used as the scene light source when |
| 2737 | * calculating the {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, |
| 2738 | * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and |
| 2739 | * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} matrices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2740 | * <p>See {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1} for more details.</p> |
| 2741 | * <p>If this key is present, then {@link CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 android.sensor.colorTransform2}, |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2742 | * {@link CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 android.sensor.calibrationTransform2}, and |
| 2743 | * {@link CameraCharacteristics#SENSOR_FORWARD_MATRIX2 android.sensor.forwardMatrix2} will also be present.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2744 | * <p><b>Range of valid values:</b><br> |
| 2745 | * Any value listed in {@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2746 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2747 | * |
| 2748 | * @see CameraCharacteristics#SENSOR_CALIBRATION_TRANSFORM2 |
| 2749 | * @see CameraCharacteristics#SENSOR_COLOR_TRANSFORM2 |
| 2750 | * @see CameraCharacteristics#SENSOR_FORWARD_MATRIX2 |
| 2751 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 2752 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2753 | @PublicKey |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2754 | public static final Key<Byte> SENSOR_REFERENCE_ILLUMINANT2 = |
| 2755 | new Key<Byte>("android.sensor.referenceIlluminant2", byte.class); |
| 2756 | |
| 2757 | /** |
| 2758 | * <p>A per-device calibration transform matrix that maps from the |
| 2759 | * reference sensor colorspace to the actual device sensor colorspace.</p> |
| 2760 | * <p>This matrix is used to correct for per-device variations in the |
| 2761 | * sensor colorspace, and is used for processing raw buffer data.</p> |
| 2762 | * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 2763 | * contains a per-device calibration transform that maps colors |
| 2764 | * from reference sensor color space (i.e. the "golden module" |
| 2765 | * colorspace) into this camera device's native sensor color |
| 2766 | * space under the first reference illuminant |
| 2767 | * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> |
| 2768 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2769 | * |
| 2770 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 2771 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2772 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2773 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM1 = |
| 2774 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2775 | |
| 2776 | /** |
| 2777 | * <p>A per-device calibration transform matrix that maps from the |
| 2778 | * reference sensor colorspace to the actual device sensor colorspace |
| 2779 | * (this is the colorspace of the raw buffer data).</p> |
| 2780 | * <p>This matrix is used to correct for per-device variations in the |
| 2781 | * sensor colorspace, and is used for processing raw buffer data.</p> |
| 2782 | * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 2783 | * contains a per-device calibration transform that maps colors |
| 2784 | * from reference sensor color space (i.e. the "golden module" |
| 2785 | * colorspace) into this camera device's native sensor color |
| 2786 | * space under the second reference illuminant |
| 2787 | * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> |
| 2788 | * <p>This matrix will only be present if the second reference |
| 2789 | * illuminant is present.</p> |
| 2790 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2791 | * |
| 2792 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 |
| 2793 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2794 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2795 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_CALIBRATION_TRANSFORM2 = |
| 2796 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.calibrationTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2797 | |
| 2798 | /** |
| 2799 | * <p>A matrix that transforms color values from CIE XYZ color space to |
| 2800 | * reference sensor color space.</p> |
| 2801 | * <p>This matrix is used to convert from the standard CIE XYZ color |
| 2802 | * space to the reference sensor colorspace, and is used when processing |
| 2803 | * raw buffer data.</p> |
| 2804 | * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 2805 | * contains a color transform matrix that maps colors from the CIE |
| 2806 | * XYZ color space to the reference sensor color space (i.e. the |
| 2807 | * "golden module" colorspace) under the first reference illuminant |
| 2808 | * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}).</p> |
| 2809 | * <p>The white points chosen in both the reference sensor color space |
| 2810 | * and the CIE XYZ colorspace when calculating this transform will |
| 2811 | * match the standard white point for the first reference illuminant |
| 2812 | * (i.e. no chromatic adaptation will be applied by this transform).</p> |
| 2813 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2814 | * |
| 2815 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 2816 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2817 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2818 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM1 = |
| 2819 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform1", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2820 | |
| 2821 | /** |
| 2822 | * <p>A matrix that transforms color values from CIE XYZ color space to |
| 2823 | * reference sensor color space.</p> |
| 2824 | * <p>This matrix is used to convert from the standard CIE XYZ color |
| 2825 | * space to the reference sensor colorspace, and is used when processing |
| 2826 | * raw buffer data.</p> |
| 2827 | * <p>The matrix is expressed as a 3x3 matrix in row-major-order, and |
| 2828 | * contains a color transform matrix that maps colors from the CIE |
| 2829 | * XYZ color space to the reference sensor color space (i.e. the |
| 2830 | * "golden module" colorspace) under the second reference illuminant |
| 2831 | * ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}).</p> |
| 2832 | * <p>The white points chosen in both the reference sensor color space |
| 2833 | * and the CIE XYZ colorspace when calculating this transform will |
| 2834 | * match the standard white point for the second reference illuminant |
| 2835 | * (i.e. no chromatic adaptation will be applied by this transform).</p> |
| 2836 | * <p>This matrix will only be present if the second reference |
| 2837 | * illuminant is present.</p> |
| 2838 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2839 | * |
| 2840 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 |
| 2841 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2842 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2843 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_COLOR_TRANSFORM2 = |
| 2844 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.colorTransform2", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2845 | |
| 2846 | /** |
| 2847 | * <p>A matrix that transforms white balanced camera colors from the reference |
| 2848 | * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> |
| 2849 | * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and |
| 2850 | * is used when processing raw buffer data.</p> |
| 2851 | * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains |
| 2852 | * a color transform matrix that maps white balanced colors from the |
| 2853 | * reference sensor color space to the CIE XYZ color space with a D50 white |
| 2854 | * point.</p> |
| 2855 | * <p>Under the first reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 android.sensor.referenceIlluminant1}) |
| 2856 | * this matrix is chosen so that the standard white point for this reference |
| 2857 | * illuminant in the reference sensor colorspace is mapped to D50 in the |
| 2858 | * CIE XYZ colorspace.</p> |
| 2859 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2860 | * |
| 2861 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT1 |
| 2862 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2863 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2864 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX1 = |
| 2865 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix1", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2866 | |
| 2867 | /** |
| 2868 | * <p>A matrix that transforms white balanced camera colors from the reference |
| 2869 | * sensor colorspace to the CIE XYZ colorspace with a D50 whitepoint.</p> |
| 2870 | * <p>This matrix is used to convert to the standard CIE XYZ colorspace, and |
| 2871 | * is used when processing raw buffer data.</p> |
| 2872 | * <p>This matrix is expressed as a 3x3 matrix in row-major-order, and contains |
| 2873 | * a color transform matrix that maps white balanced colors from the |
| 2874 | * reference sensor color space to the CIE XYZ color space with a D50 white |
| 2875 | * point.</p> |
| 2876 | * <p>Under the second reference illuminant ({@link CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 android.sensor.referenceIlluminant2}) |
| 2877 | * this matrix is chosen so that the standard white point for this reference |
| 2878 | * illuminant in the reference sensor colorspace is mapped to D50 in the |
| 2879 | * CIE XYZ colorspace.</p> |
| 2880 | * <p>This matrix will only be present if the second reference |
| 2881 | * illuminant is present.</p> |
| 2882 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2883 | * |
| 2884 | * @see CameraCharacteristics#SENSOR_REFERENCE_ILLUMINANT2 |
| 2885 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2886 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 2887 | public static final Key<android.hardware.camera2.params.ColorSpaceTransform> SENSOR_FORWARD_MATRIX2 = |
| 2888 | new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.sensor.forwardMatrix2", android.hardware.camera2.params.ColorSpaceTransform.class); |
Ruben Brunk | 7c06236 | 2014-04-15 23:53:53 -0700 | [diff] [blame] | 2889 | |
| 2890 | /** |
Ruben Brunk | 67b4702 | 2014-02-07 15:26:29 -0800 | [diff] [blame] | 2891 | * <p>A fixed black level offset for each of the color filter arrangement |
| 2892 | * (CFA) mosaic channels.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2893 | * <p>This key specifies the zero light value for each of the CFA mosaic |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2894 | * channels in the camera sensor. The maximal value output by the |
| 2895 | * sensor is represented by the value in {@link CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL android.sensor.info.whiteLevel}.</p> |
Ruben Brunk | 52842e7 | 2014-06-05 13:16:45 -0700 | [diff] [blame] | 2896 | * <p>The values are given in the same order as channels listed for the CFA |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2897 | * layout key (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}), i.e. the |
Ruben Brunk | 52842e7 | 2014-06-05 13:16:45 -0700 | [diff] [blame] | 2898 | * nth value given corresponds to the black level offset for the nth |
| 2899 | * color channel listed in the CFA.</p> |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2900 | * <p>The black level values of captured images may vary for different |
| 2901 | * capture settings (e.g., {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}). This key |
| 2902 | * represents a coarse approximation for such case. It is recommended to |
| 2903 | * use {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} or use pixels from |
| 2904 | * {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} directly for captures when |
| 2905 | * supported by the camera device, which provides more accurate black |
| 2906 | * level values. For raw capture in particular, it is recommended to use |
| 2907 | * pixels from {@link CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS android.sensor.opticalBlackRegions} to calculate black |
| 2908 | * level values for each frame.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2909 | * <p><b>Range of valid values:</b><br> |
| 2910 | * >= 0 for each.</p> |
Ruben Brunk | 1ef676f | 2014-02-07 16:08:38 -0800 | [diff] [blame] | 2911 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2912 | * |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2913 | * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL |
Ruben Brunk | 52842e7 | 2014-06-05 13:16:45 -0700 | [diff] [blame] | 2914 | * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT |
Ruben Brunk | e60e2955 | 2014-02-18 10:44:17 -0800 | [diff] [blame] | 2915 | * @see CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2916 | * @see CameraCharacteristics#SENSOR_OPTICAL_BLACK_REGIONS |
| 2917 | * @see CaptureRequest#SENSOR_SENSITIVITY |
Ruben Brunk | 67b4702 | 2014-02-07 15:26:29 -0800 | [diff] [blame] | 2918 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2919 | @PublicKey |
Ruben Brunk | 52842e7 | 2014-06-05 13:16:45 -0700 | [diff] [blame] | 2920 | public static final Key<android.hardware.camera2.params.BlackLevelPattern> SENSOR_BLACK_LEVEL_PATTERN = |
| 2921 | new Key<android.hardware.camera2.params.BlackLevelPattern>("android.sensor.blackLevelPattern", android.hardware.camera2.params.BlackLevelPattern.class); |
Ruben Brunk | 67b4702 | 2014-02-07 15:26:29 -0800 | [diff] [blame] | 2922 | |
| 2923 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 2924 | * <p>Maximum sensitivity that is implemented |
Zhijun He | 153ac10 | 2014-02-03 12:25:12 -0800 | [diff] [blame] | 2925 | * purely through analog gain.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 2926 | * <p>For {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} values less than or |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2927 | * equal to this, all applied gain must be analog. For |
Zhijun He | 153ac10 | 2014-02-03 12:25:12 -0800 | [diff] [blame] | 2928 | * values above this, the gain applied can be a mix of analog and |
| 2929 | * digital.</p> |
Igor Murashkin | 3242f4f | 2014-01-15 12:27:41 -0800 | [diff] [blame] | 2930 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 2931 | * <p><b>Full capability</b> - |
| 2932 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 2933 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Alex Ray | e83c4eb | 2013-10-02 17:14:36 -0700 | [diff] [blame] | 2934 | * |
Eino-Ville Talvala | 0da8bf5 | 2014-01-08 16:18:35 -0800 | [diff] [blame] | 2935 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Eino-Ville Talvala | 265b34c | 2014-01-16 16:18:52 -0800 | [diff] [blame] | 2936 | * @see CaptureRequest#SENSOR_SENSITIVITY |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2937 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2938 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2939 | public static final Key<Integer> SENSOR_MAX_ANALOG_SENSITIVITY = |
| 2940 | new Key<Integer>("android.sensor.maxAnalogSensitivity", int.class); |
| 2941 | |
| 2942 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2943 | * <p>Clockwise angle through which the output image needs to be rotated to be |
| 2944 | * upright on the device screen in its native orientation.</p> |
| 2945 | * <p>Also defines the direction of rolling shutter readout, which is from top to bottom in |
| 2946 | * the sensor's coordinate system.</p> |
| 2947 | * <p><b>Units</b>: Degrees of clockwise rotation; always a multiple of |
| 2948 | * 90</p> |
| 2949 | * <p><b>Range of valid values:</b><br> |
| 2950 | * 0, 90, 180, 270</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 2951 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2952 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2953 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 2954 | public static final Key<Integer> SENSOR_ORIENTATION = |
| 2955 | new Key<Integer>("android.sensor.orientation", int.class); |
| 2956 | |
| 2957 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 2958 | * <p>List of sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} |
| 2959 | * supported by this camera device.</p> |
| 2960 | * <p>Defaults to OFF, and always includes OFF if defined.</p> |
| 2961 | * <p><b>Range of valid values:</b><br> |
| 2962 | * Any value listed in {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}</p> |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 2963 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Eino-Ville Talvala | d8fd679 | 2014-02-10 12:41:04 -0800 | [diff] [blame] | 2964 | * |
| 2965 | * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 2966 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 2967 | @PublicKey |
Zhijun He | a486624 | 2014-03-27 23:51:34 -0700 | [diff] [blame] | 2968 | public static final Key<int[]> SENSOR_AVAILABLE_TEST_PATTERN_MODES = |
| 2969 | new Key<int[]>("android.sensor.availableTestPatternModes", int[].class); |
Igor Murashkin | c127f05 | 2014-01-17 18:06:02 -0800 | [diff] [blame] | 2970 | |
| 2971 | /** |
Zhijun He | cd950b6 | 2015-11-12 17:47:52 -0800 | [diff] [blame] | 2972 | * <p>List of disjoint rectangles indicating the sensor |
| 2973 | * optically shielded black pixel regions.</p> |
| 2974 | * <p>In most camera sensors, the active array is surrounded by some |
| 2975 | * optically shielded pixel areas. By blocking light, these pixels |
| 2976 | * provides a reliable black reference for black level compensation |
| 2977 | * in active array region.</p> |
| 2978 | * <p>This key provides a list of disjoint rectangles specifying the |
| 2979 | * regions of optically shielded (with metal shield) black pixel |
| 2980 | * regions if the camera device is capable of reading out these black |
| 2981 | * pixels in the output raw images. In comparison to the fixed black |
| 2982 | * level values reported by {@link CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN android.sensor.blackLevelPattern}, this key |
| 2983 | * may provide a more accurate way for the application to calculate |
| 2984 | * black level of each captured raw images.</p> |
| 2985 | * <p>When this key is reported, the {@link CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL android.sensor.dynamicBlackLevel} and |
| 2986 | * {@link CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL android.sensor.dynamicWhiteLevel} will also be reported.</p> |
| 2987 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 2988 | * |
| 2989 | * @see CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN |
| 2990 | * @see CaptureResult#SENSOR_DYNAMIC_BLACK_LEVEL |
| 2991 | * @see CaptureResult#SENSOR_DYNAMIC_WHITE_LEVEL |
| 2992 | */ |
| 2993 | @PublicKey |
| 2994 | public static final Key<android.graphics.Rect[]> SENSOR_OPTICAL_BLACK_REGIONS = |
| 2995 | new Key<android.graphics.Rect[]>("android.sensor.opticalBlackRegions", android.graphics.Rect[].class); |
| 2996 | |
| 2997 | /** |
Yin-Chia Yeh | e4aa283 | 2015-02-06 15:15:53 -0800 | [diff] [blame] | 2998 | * <p>List of lens shading modes for {@link CaptureRequest#SHADING_MODE android.shading.mode} that are supported by this camera device.</p> |
| 2999 | * <p>This list contains lens shading modes that can be set for the camera device. |
| 3000 | * Camera devices that support the MANUAL_POST_PROCESSING capability will always |
| 3001 | * list OFF and FAST mode. This includes all FULL level devices. |
| 3002 | * LEGACY devices will always only support FAST mode.</p> |
| 3003 | * <p><b>Range of valid values:</b><br> |
| 3004 | * Any value listed in {@link CaptureRequest#SHADING_MODE android.shading.mode}</p> |
| 3005 | * <p>This key is available on all devices.</p> |
| 3006 | * |
| 3007 | * @see CaptureRequest#SHADING_MODE |
| 3008 | */ |
| 3009 | @PublicKey |
| 3010 | public static final Key<int[]> SHADING_AVAILABLE_MODES = |
| 3011 | new Key<int[]>("android.shading.availableModes", int[].class); |
| 3012 | |
| 3013 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3014 | * <p>List of face detection modes for {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode} that are |
| 3015 | * supported by this camera device.</p> |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 3016 | * <p>OFF is always supported.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3017 | * <p><b>Range of valid values:</b><br> |
| 3018 | * Any value listed in {@link CaptureRequest#STATISTICS_FACE_DETECT_MODE android.statistics.faceDetectMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3019 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3020 | * |
| 3021 | * @see CaptureRequest#STATISTICS_FACE_DETECT_MODE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3022 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 3023 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 3024 | public static final Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES = |
| 3025 | new Key<int[]>("android.statistics.info.availableFaceDetectModes", int[].class); |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3026 | |
| 3027 | /** |
Eino-Ville Talvala | e600d6a | 2014-06-09 14:25:50 -0700 | [diff] [blame] | 3028 | * <p>The maximum number of simultaneously detectable |
| 3029 | * faces.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3030 | * <p><b>Range of valid values:</b><br> |
| 3031 | * 0 for cameras without available face detection; otherwise: |
| 3032 | * <code>>=4</code> for LIMITED or FULL hwlevel devices or |
| 3033 | * <code>>0</code> for LEGACY devices.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3034 | * <p>This key is available on all devices.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3035 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 3036 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3037 | public static final Key<Integer> STATISTICS_INFO_MAX_FACE_COUNT = |
| 3038 | new Key<Integer>("android.statistics.info.maxFaceCount", int.class); |
| 3039 | |
| 3040 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3041 | * <p>List of hot pixel map output modes for {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode} that are |
| 3042 | * supported by this camera device.</p> |
| 3043 | * <p>If no hotpixel map output is available for this camera device, this will contain only |
| 3044 | * <code>false</code>.</p> |
| 3045 | * <p>ON is always supported on devices with the RAW capability.</p> |
| 3046 | * <p><b>Range of valid values:</b><br> |
| 3047 | * Any value listed in {@link CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE android.statistics.hotPixelMapMode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3048 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 3049 | * |
| 3050 | * @see CaptureRequest#STATISTICS_HOT_PIXEL_MAP_MODE |
| 3051 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 3052 | @PublicKey |
Ruben Brunk | 9d454fd | 2014-03-04 14:11:52 -0800 | [diff] [blame] | 3053 | public static final Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES = |
| 3054 | new Key<boolean[]>("android.statistics.info.availableHotPixelMapModes", boolean[].class); |
| 3055 | |
| 3056 | /** |
Yin-Chia Yeh | e4aa283 | 2015-02-06 15:15:53 -0800 | [diff] [blame] | 3057 | * <p>List of lens shading map output modes for {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} that |
| 3058 | * are supported by this camera device.</p> |
| 3059 | * <p>If no lens shading map output is available for this camera device, this key will |
| 3060 | * contain only OFF.</p> |
| 3061 | * <p>ON is always supported on devices with the RAW capability. |
| 3062 | * LEGACY mode devices will always only support OFF.</p> |
| 3063 | * <p><b>Range of valid values:</b><br> |
| 3064 | * Any value listed in {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode}</p> |
| 3065 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3066 | * |
| 3067 | * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE |
| 3068 | */ |
| 3069 | @PublicKey |
Yin-Chia Yeh | 656931d | 2015-05-22 16:37:27 -0700 | [diff] [blame] | 3070 | public static final Key<int[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES = |
| 3071 | new Key<int[]>("android.statistics.info.availableLensShadingMapModes", int[].class); |
Yin-Chia Yeh | e4aa283 | 2015-02-06 15:15:53 -0800 | [diff] [blame] | 3072 | |
| 3073 | /** |
Chien-Yu Chen | c9cf5b9 | 2018-01-18 12:24:40 -0800 | [diff] [blame] | 3074 | * <p>List of OIS data output modes for {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode} that |
| 3075 | * are supported by this camera device.</p> |
| 3076 | * <p>If no OIS data output is available for this camera device, this key will |
| 3077 | * contain only OFF.</p> |
| 3078 | * <p><b>Range of valid values:</b><br> |
| 3079 | * Any value listed in {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode}</p> |
| 3080 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3081 | * |
| 3082 | * @see CaptureRequest#STATISTICS_OIS_DATA_MODE |
| 3083 | */ |
| 3084 | @PublicKey |
| 3085 | public static final Key<int[]> STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES = |
| 3086 | new Key<int[]>("android.statistics.info.availableOisDataModes", int[].class); |
| 3087 | |
| 3088 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 3089 | * <p>Maximum number of supported points in the |
Yin-Chia Yeh | 8490ace | 2014-05-27 10:04:54 -0700 | [diff] [blame] | 3090 | * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3091 | * <p>If the actual number of points provided by the application (in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}*) is |
| 3092 | * less than this maximum, the camera device will resample the curve to its internal |
| 3093 | * representation, using linear interpolation.</p> |
Igor Murashkin | e006093 | 2014-01-17 17:24:11 -0800 | [diff] [blame] | 3094 | * <p>The output curves in the result metadata may have a different number |
| 3095 | * of points than the input curves, and will represent the actual |
| 3096 | * hardware curves used as closely as possible when linearly interpolated.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3097 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3098 | * <p><b>Full capability</b> - |
| 3099 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 3100 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Igor Murashkin | e006093 | 2014-01-17 17:24:11 -0800 | [diff] [blame] | 3101 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3102 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Yin-Chia Yeh | 8490ace | 2014-05-27 10:04:54 -0700 | [diff] [blame] | 3103 | * @see CaptureRequest#TONEMAP_CURVE |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3104 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 3105 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3106 | public static final Key<Integer> TONEMAP_MAX_CURVE_POINTS = |
| 3107 | new Key<Integer>("android.tonemap.maxCurvePoints", int.class); |
| 3108 | |
| 3109 | /** |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3110 | * <p>List of tonemapping modes for {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} that are supported by this camera |
| 3111 | * device.</p> |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 3112 | * <p>Camera devices that support the MANUAL_POST_PROCESSING capability will always contain |
| 3113 | * at least one of below mode combinations:</p> |
| 3114 | * <ul> |
Yin-Chia Yeh | fba08dd | 2015-04-02 14:05:14 -0700 | [diff] [blame] | 3115 | * <li>CONTRAST_CURVE, FAST and HIGH_QUALITY</li> |
| 3116 | * <li>GAMMA_VALUE, PRESET_CURVE, FAST and HIGH_QUALITY</li> |
Yin-Chia Yeh | 956c52b | 2015-02-06 11:23:25 -0800 | [diff] [blame] | 3117 | * </ul> |
| 3118 | * <p>This includes all FULL level devices.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3119 | * <p><b>Range of valid values:</b><br> |
| 3120 | * Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3121 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3122 | * <p><b>Full capability</b> - |
| 3123 | * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the |
| 3124 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 3125 | * |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3126 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 3127 | * @see CaptureRequest#TONEMAP_MODE |
| 3128 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 3129 | @PublicKey |
Eino-Ville Talvala | 2bb91a7 | 2014-05-27 18:16:53 -0700 | [diff] [blame] | 3130 | public static final Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES = |
| 3131 | new Key<int[]>("android.tonemap.availableToneMapModes", int[].class); |
Ruben Brunk | 6dc379c | 2014-03-04 15:04:00 -0800 | [diff] [blame] | 3132 | |
| 3133 | /** |
Igor Murashkin | ace5bf0 | 2013-12-10 17:36:40 -0800 | [diff] [blame] | 3134 | * <p>A list of camera LEDs that are available on this system.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3135 | * <p><b>Possible values:</b> |
| 3136 | * <ul> |
| 3137 | * <li>{@link #LED_AVAILABLE_LEDS_TRANSMIT TRANSMIT}</li> |
| 3138 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3139 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3140 | * @see #LED_AVAILABLE_LEDS_TRANSMIT |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3141 | * @hide |
| 3142 | */ |
| 3143 | public static final Key<int[]> LED_AVAILABLE_LEDS = |
| 3144 | new Key<int[]>("android.led.availableLeds", int[].class); |
| 3145 | |
| 3146 | /** |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 3147 | * <p>Generally classifies the overall set of the camera device functionality.</p> |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 3148 | * <p>The supported hardware level is a high-level description of the camera device's |
| 3149 | * capabilities, summarizing several capabilities into one field. Each level adds additional |
| 3150 | * features to the previous one, and is always a strict superset of the previous level. |
| 3151 | * The ordering is <code>LEGACY < LIMITED < FULL < LEVEL_3</code>.</p> |
| 3152 | * <p>Starting from <code>LEVEL_3</code>, the level enumerations are guaranteed to be in increasing |
| 3153 | * numerical value as well. To check if a given device is at least at a given hardware level, |
| 3154 | * the following code snippet can be used:</p> |
| 3155 | * <pre><code>// Returns true if the device supports the required hardware level, or better. |
| 3156 | * boolean isHardwareLevelSupported(CameraCharacteristics c, int requiredLevel) { |
Yin-Chia Yeh | a8cfb0a | 2018-07-13 13:42:43 -0700 | [diff] [blame] | 3157 | * final int[] sortedHwLevels = { |
| 3158 | * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY, |
| 3159 | * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL, |
| 3160 | * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED, |
| 3161 | * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL, |
| 3162 | * CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_3 |
| 3163 | * }; |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 3164 | * int deviceLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL); |
Yin-Chia Yeh | a8cfb0a | 2018-07-13 13:42:43 -0700 | [diff] [blame] | 3165 | * if (requiredLevel == deviceLevel) { |
| 3166 | * return true; |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 3167 | * } |
Yin-Chia Yeh | a8cfb0a | 2018-07-13 13:42:43 -0700 | [diff] [blame] | 3168 | * |
| 3169 | * for (int sortedlevel : sortedHwLevels) { |
| 3170 | * if (sortedlevel == requiredLevel) { |
| 3171 | * return true; |
| 3172 | * } else if (sortedlevel == deviceLevel) { |
| 3173 | * return false; |
| 3174 | * } |
| 3175 | * } |
| 3176 | * return false; // Should never reach here |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 3177 | * } |
| 3178 | * </code></pre> |
| 3179 | * <p>At a high level, the levels are:</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 3180 | * <ul> |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 3181 | * <li><code>LEGACY</code> devices operate in a backwards-compatibility mode for older |
| 3182 | * Android devices, and have very limited capabilities.</li> |
| 3183 | * <li><code>LIMITED</code> devices represent the |
| 3184 | * baseline feature set, and may also include additional capabilities that are |
| 3185 | * subsets of <code>FULL</code>.</li> |
| 3186 | * <li><code>FULL</code> devices additionally support per-frame manual control of sensor, flash, lens and |
| 3187 | * post-processing settings, and image capture at a high rate.</li> |
| 3188 | * <li><code>LEVEL_3</code> devices additionally support YUV reprocessing and RAW image capture, along |
| 3189 | * with additional output stream configurations.</li> |
Yin-Chia Yeh | a8cfb0a | 2018-07-13 13:42:43 -0700 | [diff] [blame] | 3190 | * <li><code>EXTERNAL</code> devices are similar to <code>LIMITED</code> devices with exceptions like some sensor or |
| 3191 | * lens information not reorted or less stable framerates.</li> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 3192 | * </ul> |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 3193 | * <p>See the individual level enums for full descriptions of the supported capabilities. The |
| 3194 | * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} entry describes the device's capabilities at a |
| 3195 | * finer-grain level, if needed. In addition, many controls have their available settings or |
Eino-Ville Talvala | 9dc7ec1 | 2017-11-10 15:23:00 -0800 | [diff] [blame] | 3196 | * ranges defined in individual entries from {@link android.hardware.camera2.CameraCharacteristics }.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3197 | * <p>Some features are not part of any particular hardware level or capability and must be |
| 3198 | * queried separately. These include:</p> |
| 3199 | * <ul> |
| 3200 | * <li>Calibrated timestamps ({@link CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE android.sensor.info.timestampSource} <code>==</code> REALTIME)</li> |
| 3201 | * <li>Precision lens control ({@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} <code>==</code> CALIBRATED)</li> |
| 3202 | * <li>Face detection ({@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes})</li> |
| 3203 | * <li>Optical or electrical image stabilization |
| 3204 | * ({@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}, |
| 3205 | * {@link CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES android.control.availableVideoStabilizationModes})</li> |
| 3206 | * </ul> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3207 | * <p><b>Possible values:</b> |
| 3208 | * <ul> |
| 3209 | * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li> |
| 3210 | * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li> |
| 3211 | * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li> |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 3212 | * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_3 3}</li> |
Yin-Chia Yeh | 43cea5a | 2018-01-19 11:38:12 -0800 | [diff] [blame] | 3213 | * <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL EXTERNAL}</li> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3214 | * </ul></p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3215 | * <p>This key is available on all devices.</p> |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 3216 | * |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3217 | * @see CameraCharacteristics#CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES |
| 3218 | * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION |
| 3219 | * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION |
Igor Murashkin | e46c0da | 2014-02-07 18:34:37 -0800 | [diff] [blame] | 3220 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3221 | * @see CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE |
| 3222 | * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3223 | * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED |
| 3224 | * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL |
Ruben Brunk | 4a61a86 | 2014-07-01 16:00:26 -0700 | [diff] [blame] | 3225 | * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY |
Eino-Ville Talvala | 7c6d73f | 2016-01-21 13:55:11 -0800 | [diff] [blame] | 3226 | * @see #INFO_SUPPORTED_HARDWARE_LEVEL_3 |
Yin-Chia Yeh | 43cea5a | 2018-01-19 11:38:12 -0800 | [diff] [blame] | 3227 | * @see #INFO_SUPPORTED_HARDWARE_LEVEL_EXTERNAL |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3228 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 3229 | @PublicKey |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3230 | public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL = |
| 3231 | new Key<Integer>("android.info.supportedHardwareLevel", int.class); |
| 3232 | |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 3233 | /** |
Chien-Yu Chen | a1d1d5b | 2018-01-03 12:14:53 -0800 | [diff] [blame] | 3234 | * <p>A short string for manufacturer version information about the camera device, such as |
| 3235 | * ISP hardware, sensors, etc.</p> |
| 3236 | * <p>This can be used in {@link android.media.ExifInterface#TAG_IMAGE_DESCRIPTION TAG_IMAGE_DESCRIPTION} |
| 3237 | * in jpeg EXIF. This key may be absent if no version information is available on the |
| 3238 | * device.</p> |
| 3239 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3240 | */ |
| 3241 | @PublicKey |
| 3242 | public static final Key<String> INFO_VERSION = |
| 3243 | new Key<String>("android.info.version", String.class); |
| 3244 | |
| 3245 | /** |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 3246 | * <p>The maximum number of frames that can occur after a request |
| 3247 | * (different than the previous) has been submitted, and before the |
Chien-Yu Chen | 161a76c | 2015-06-26 11:23:55 -0700 | [diff] [blame] | 3248 | * result's state becomes synchronized.</p> |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 3249 | * <p>This defines the maximum distance (in number of metadata results), |
Chien-Yu Chen | 161a76c | 2015-06-26 11:23:55 -0700 | [diff] [blame] | 3250 | * between the frame number of the request that has new controls to apply |
| 3251 | * and the frame number of the result that has all the controls applied.</p> |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 3252 | * <p>In other words this acts as an upper boundary for how many frames |
| 3253 | * must occur before the camera device knows for a fact that the new |
| 3254 | * submitted camera settings have been applied in outgoing frames.</p> |
Eino-Ville Talvala | fd3e289 | 2014-10-06 10:23:55 -0700 | [diff] [blame] | 3255 | * <p><b>Units</b>: Frame counts</p> |
| 3256 | * <p><b>Possible values:</b> |
| 3257 | * <ul> |
| 3258 | * <li>{@link #SYNC_MAX_LATENCY_PER_FRAME_CONTROL PER_FRAME_CONTROL}</li> |
| 3259 | * <li>{@link #SYNC_MAX_LATENCY_UNKNOWN UNKNOWN}</li> |
| 3260 | * </ul></p> |
| 3261 | * <p><b>Available values for this device:</b><br> |
| 3262 | * A positive value, PER_FRAME_CONTROL, or UNKNOWN.</p> |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3263 | * <p>This key is available on all devices.</p> |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 3264 | * @see #SYNC_MAX_LATENCY_PER_FRAME_CONTROL |
| 3265 | * @see #SYNC_MAX_LATENCY_UNKNOWN |
| 3266 | */ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 3267 | @PublicKey |
Igor Murashkin | 3865a84 | 2014-01-17 18:18:39 -0800 | [diff] [blame] | 3268 | public static final Key<Integer> SYNC_MAX_LATENCY = |
| 3269 | new Key<Integer>("android.sync.maxLatency", int.class); |
| 3270 | |
Eino-Ville Talvala | 24c369e | 2015-02-23 15:55:55 -0800 | [diff] [blame] | 3271 | /** |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 3272 | * <p>The maximal camera capture pipeline stall (in unit of frame count) introduced by a |
| 3273 | * reprocess capture request.</p> |
| 3274 | * <p>The key describes the maximal interference that one reprocess (input) request |
| 3275 | * can introduce to the camera simultaneous streaming of regular (output) capture |
| 3276 | * requests, including repeating requests.</p> |
| 3277 | * <p>When a reprocessing capture request is submitted while a camera output repeating request |
| 3278 | * (e.g. preview) is being served by the camera device, it may preempt the camera capture |
| 3279 | * pipeline for at least one frame duration so that the camera device is unable to process |
| 3280 | * the following capture request in time for the next sensor start of exposure boundary. |
| 3281 | * When this happens, the application may observe a capture time gap (longer than one frame |
| 3282 | * duration) between adjacent capture output frames, which usually exhibits as preview |
| 3283 | * glitch if the repeating request output targets include a preview surface. This key gives |
| 3284 | * the worst-case number of frame stall introduced by one reprocess request with any kind of |
| 3285 | * formats/sizes combination.</p> |
| 3286 | * <p>If this key reports 0, it means a reprocess request doesn't introduce any glitch to the |
| 3287 | * ongoing camera repeating request outputs, as if this reprocess request is never issued.</p> |
Chien-Yu Chen | 8062d31 | 2015-05-12 14:24:10 -0700 | [diff] [blame] | 3288 | * <p>This key is supported if the camera device supports PRIVATE or YUV reprocessing ( |
| 3289 | * i.e. {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains PRIVATE_REPROCESSING or |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 3290 | * YUV_REPROCESSING).</p> |
| 3291 | * <p><b>Units</b>: Number of frames.</p> |
| 3292 | * <p><b>Range of valid values:</b><br> |
| 3293 | * <= 4</p> |
| 3294 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3295 | * <p><b>Limited capability</b> - |
| 3296 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3297 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3298 | * |
| 3299 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3300 | * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES |
| 3301 | */ |
| 3302 | @PublicKey |
| 3303 | public static final Key<Integer> REPROCESS_MAX_CAPTURE_STALL = |
| 3304 | new Key<Integer>("android.reprocess.maxCaptureStall", int.class); |
| 3305 | |
| 3306 | /** |
Eino-Ville Talvala | 24c369e | 2015-02-23 15:55:55 -0800 | [diff] [blame] | 3307 | * <p>The available depth dataspace stream |
| 3308 | * configurations that this camera device supports |
| 3309 | * (i.e. format, width, height, output/input stream).</p> |
| 3310 | * <p>These are output stream configurations for use with |
| 3311 | * dataSpace HAL_DATASPACE_DEPTH. The configurations are |
| 3312 | * listed as <code>(format, width, height, input?)</code> tuples.</p> |
| 3313 | * <p>Only devices that support depth output for at least |
| 3314 | * the HAL_PIXEL_FORMAT_Y16 dense depth map may include |
| 3315 | * this entry.</p> |
| 3316 | * <p>A device that also supports the HAL_PIXEL_FORMAT_BLOB |
| 3317 | * sparse depth point cloud must report a single entry for |
| 3318 | * the format in this list as <code>(HAL_PIXEL_FORMAT_BLOB, |
| 3319 | * android.depth.maxDepthSamples, 1, OUTPUT)</code> in addition to |
| 3320 | * the entries for HAL_PIXEL_FORMAT_Y16.</p> |
| 3321 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3322 | * <p><b>Limited capability</b> - |
| 3323 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3324 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3325 | * |
| 3326 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3327 | * @hide |
| 3328 | */ |
| 3329 | public static final Key<android.hardware.camera2.params.StreamConfiguration[]> DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS = |
| 3330 | new Key<android.hardware.camera2.params.StreamConfiguration[]>("android.depth.availableDepthStreamConfigurations", android.hardware.camera2.params.StreamConfiguration[].class); |
| 3331 | |
| 3332 | /** |
| 3333 | * <p>This lists the minimum frame duration for each |
| 3334 | * format/size combination for depth output formats.</p> |
| 3335 | * <p>This should correspond to the frame duration when only that |
| 3336 | * stream is active, with all processing (typically in android.*.mode) |
| 3337 | * set to either OFF or FAST.</p> |
| 3338 | * <p>When multiple streams are used in a request, the minimum frame |
| 3339 | * duration will be max(individual stream min durations).</p> |
| 3340 | * <p>The minimum frame duration of a stream (of a particular format, size) |
| 3341 | * is the same regardless of whether the stream is input or output.</p> |
| 3342 | * <p>See {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} and |
| 3343 | * android.scaler.availableStallDurations for more details about |
| 3344 | * calculating the max frame rate.</p> |
Eino-Ville Talvala | 24c369e | 2015-02-23 15:55:55 -0800 | [diff] [blame] | 3345 | * <p><b>Units</b>: (format, width, height, ns) x n</p> |
| 3346 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3347 | * <p><b>Limited capability</b> - |
| 3348 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3349 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3350 | * |
| 3351 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3352 | * @see CaptureRequest#SENSOR_FRAME_DURATION |
| 3353 | * @hide |
| 3354 | */ |
| 3355 | public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS = |
| 3356 | new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthMinFrameDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); |
| 3357 | |
| 3358 | /** |
| 3359 | * <p>This lists the maximum stall duration for each |
Zhijun He | 513f7c3 | 2015-04-24 18:23:54 -0700 | [diff] [blame] | 3360 | * output format/size combination for depth streams.</p> |
Eino-Ville Talvala | 24c369e | 2015-02-23 15:55:55 -0800 | [diff] [blame] | 3361 | * <p>A stall duration is how much extra time would get added |
| 3362 | * to the normal minimum frame duration for a repeating request |
| 3363 | * that has streams with non-zero stall.</p> |
| 3364 | * <p>This functions similarly to |
| 3365 | * android.scaler.availableStallDurations for depth |
| 3366 | * streams.</p> |
| 3367 | * <p>All depth output stream formats may have a nonzero stall |
| 3368 | * duration.</p> |
| 3369 | * <p><b>Units</b>: (format, width, height, ns) x n</p> |
| 3370 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3371 | * <p><b>Limited capability</b> - |
| 3372 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3373 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3374 | * |
| 3375 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3376 | * @hide |
| 3377 | */ |
| 3378 | public static final Key<android.hardware.camera2.params.StreamConfigurationDuration[]> DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS = |
| 3379 | new Key<android.hardware.camera2.params.StreamConfigurationDuration[]>("android.depth.availableDepthStallDurations", android.hardware.camera2.params.StreamConfigurationDuration[].class); |
| 3380 | |
Eino-Ville Talvala | 0b7b03b | 2015-04-13 17:29:52 -0700 | [diff] [blame] | 3381 | /** |
| 3382 | * <p>Indicates whether a capture request may target both a |
| 3383 | * DEPTH16 / DEPTH_POINT_CLOUD output, and normal color outputs (such as |
| 3384 | * YUV_420_888, JPEG, or RAW) simultaneously.</p> |
| 3385 | * <p>If TRUE, including both depth and color outputs in a single |
| 3386 | * capture request is not supported. An application must interleave color |
| 3387 | * and depth requests. If FALSE, a single request can target both types |
| 3388 | * of output.</p> |
| 3389 | * <p>Typically, this restriction exists on camera devices that |
| 3390 | * need to emit a specific pattern or wavelength of light to |
| 3391 | * measure depth values, which causes the color image to be |
| 3392 | * corrupted during depth measurement.</p> |
| 3393 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3394 | * <p><b>Limited capability</b> - |
| 3395 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3396 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3397 | * |
| 3398 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3399 | */ |
| 3400 | @PublicKey |
| 3401 | public static final Key<Boolean> DEPTH_DEPTH_IS_EXCLUSIVE = |
| 3402 | new Key<Boolean>("android.depth.depthIsExclusive", boolean.class); |
| 3403 | |
Shuzhen Wang | 23d2938 | 2017-11-26 17:24:56 -0800 | [diff] [blame] | 3404 | /** |
| 3405 | * <p>String containing the ids of the underlying physical cameras.</p> |
| 3406 | * <p>For a logical camera, this is concatenation of all underlying physical camera ids. |
| 3407 | * The null terminator for physical camera id must be preserved so that the whole string |
| 3408 | * can be tokenized using '\0' to generate list of physical camera ids.</p> |
| 3409 | * <p>For example, if the physical camera ids of the logical camera are "2" and "3", the |
| 3410 | * value of this tag will be ['2', '\0', '3', '\0'].</p> |
| 3411 | * <p>The number of physical camera ids must be no less than 2.</p> |
| 3412 | * <p><b>Units</b>: UTF-8 null-terminated string</p> |
| 3413 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3414 | * <p><b>Limited capability</b> - |
| 3415 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3416 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3417 | * |
| 3418 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3419 | * @hide |
| 3420 | */ |
| 3421 | public static final Key<byte[]> LOGICAL_MULTI_CAMERA_PHYSICAL_IDS = |
| 3422 | new Key<byte[]>("android.logicalMultiCamera.physicalIds", byte[].class); |
| 3423 | |
| 3424 | /** |
| 3425 | * <p>The accuracy of frame timestamp synchronization between physical cameras</p> |
| 3426 | * <p>The accuracy of the frame timestamp synchronization determines the physical cameras' |
| 3427 | * ability to start exposure at the same time. If the sensorSyncType is CALIBRATED, |
| 3428 | * the physical camera sensors usually run in master-slave mode so that their shutter |
| 3429 | * time is synchronized. For APPROXIMATE sensorSyncType, the camera sensors usually run in |
| 3430 | * master-master mode, and there could be offset between their start of exposure.</p> |
| 3431 | * <p>In both cases, all images generated for a particular capture request still carry the same |
| 3432 | * timestamps, so that they can be used to look up the matching frame number and |
| 3433 | * onCaptureStarted callback.</p> |
| 3434 | * <p><b>Possible values:</b> |
| 3435 | * <ul> |
| 3436 | * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE APPROXIMATE}</li> |
| 3437 | * <li>{@link #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED CALIBRATED}</li> |
| 3438 | * </ul></p> |
| 3439 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3440 | * <p><b>Limited capability</b> - |
| 3441 | * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the |
| 3442 | * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> |
| 3443 | * |
| 3444 | * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL |
| 3445 | * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_APPROXIMATE |
| 3446 | * @see #LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE_CALIBRATED |
| 3447 | */ |
| 3448 | @PublicKey |
| 3449 | public static final Key<Integer> LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE = |
| 3450 | new Key<Integer>("android.logicalMultiCamera.sensorSyncType", int.class); |
| 3451 | |
Eino-Ville Talvala | 4167072 | 2018-03-13 19:43:07 -0700 | [diff] [blame] | 3452 | /** |
| 3453 | * <p>List of distortion correction modes for {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode} that are |
| 3454 | * supported by this camera device.</p> |
| 3455 | * <p>No device is required to support this API; such devices will always list only 'OFF'. |
| 3456 | * All devices that support this API will list both FAST and HIGH_QUALITY.</p> |
| 3457 | * <p><b>Range of valid values:</b><br> |
| 3458 | * Any value listed in {@link CaptureRequest#DISTORTION_CORRECTION_MODE android.distortionCorrection.mode}</p> |
| 3459 | * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> |
| 3460 | * |
| 3461 | * @see CaptureRequest#DISTORTION_CORRECTION_MODE |
| 3462 | */ |
| 3463 | @PublicKey |
| 3464 | public static final Key<int[]> DISTORTION_CORRECTION_AVAILABLE_MODES = |
| 3465 | new Key<int[]>("android.distortionCorrection.availableModes", int[].class); |
| 3466 | |
Eino-Ville Talvala | 5a32b20c | 2013-08-08 12:38:36 -0700 | [diff] [blame] | 3467 | /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ |
| 3468 | * End generated code |
| 3469 | *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ |
Igor Murashkin | 6c76f58 | 2014-07-15 17:19:49 -0700 | [diff] [blame] | 3470 | |
Igor Murashkin | 4b8cd6b | 2014-10-02 16:00:52 -0700 | [diff] [blame] | 3471 | |
| 3472 | |
Eino-Ville Talvala | b267554 | 2012-12-12 13:29:45 -0800 | [diff] [blame] | 3473 | } |