CaptureRequest.java revision b6eb52ffc51cec78c3adc2e5b25c4c3214344983
1b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala/* 2b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Copyright (C) 2013 The Android Open Source Project 3b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 4b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Licensed under the Apache License, Version 2.0 (the "License"); 5b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * you may not use this file except in compliance with the License. 6b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * You may obtain a copy of the License at 7b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 8b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * http://www.apache.org/licenses/LICENSE-2.0 9b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 10b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Unless required by applicable law or agreed to in writing, software 11b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * distributed under the License is distributed on an "AS IS" BASIS, 12b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * See the License for the specific language governing permissions and 14b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * limitations under the License. 15b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */ 16b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 172f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvalapackage android.hardware.camera2; 18b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 1970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvalaimport android.hardware.camera2.impl.CameraMetadataNative; 206c76f58f31635c19c14ae161f96dad2082537860Igor Murashkinimport android.hardware.camera2.impl.PublicKey; 216c76f58f31635c19c14ae161f96dad2082537860Igor Murashkinimport android.hardware.camera2.impl.SyntheticKey; 225776aafc7e70c0b79c4bee2bc50f44121b37c962Ruben Brunkimport android.hardware.camera2.utils.HashCodeHelpers; 23d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkinimport android.hardware.camera2.utils.TypeReference; 2470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport android.os.Parcel; 2570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport android.os.Parcelable; 26b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvalaimport android.view.Surface; 27b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 28feb50af361e4305a25758966b6b5df2738c00259Ruben Brunkimport java.util.Collection; 29feb50af361e4305a25758966b6b5df2738c00259Ruben Brunkimport java.util.Collections; 3070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport java.util.HashSet; 31d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkinimport java.util.List; 326bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkinimport java.util.Objects; 33b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 34b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 35b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala/** 3670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>An immutable package of settings and outputs needed to capture a single 3770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * image from the camera device.</p> 38b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 39b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>Contains the configuration for the capture hardware (sensor, lens, flash), 4070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * the processing pipeline, the control algorithms, and the output buffers. Also 4170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * contains the list of target Surfaces to send image data to for this 4270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * capture.</p> 43b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 4470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>CaptureRequests can be created by using a {@link Builder} instance, 4570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * obtained by calling {@link CameraDevice#createCaptureRequest}</p> 46b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 47b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>CaptureRequests are given to {@link CameraCaptureSession#capture} or 48b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * {@link CameraCaptureSession#setRepeatingRequest} to capture images from a camera.</p> 49b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 50b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>Each request can specify a different subset of target Surfaces for the 51b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * camera to send the captured data to. All the surfaces used in a request must 52b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * be part of the surface list given to the last call to 53b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * {@link CameraDevice#createCaptureSession}, when the request is submitted to the 54b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * session.</p> 55b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 56b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>For example, a request meant for repeating preview might only include the 57b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Surface for the preview SurfaceView or SurfaceTexture, while a 58b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * high-resolution still capture would also include a Surface from a ImageReader 59b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * configured for high-resolution JPEG images.</p> 60b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 61b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * @see CameraDevice#capture 62b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * @see CameraDevice#setRepeatingRequest 6370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see CameraDevice#createCaptureRequest 64b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */ 65d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkinpublic final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> 66d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin implements Parcelable { 67d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 68d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 69d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * A {@code Key} is used to do capture request field lookups with 70d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@link CaptureResult#get} or to set fields with 71d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@link CaptureRequest.Builder#set(Key, Object)}. 72d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 73d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>For example, to set the crop rectangle for the next capture: 74d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <code><pre> 75d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Rect cropRectangle = new Rect(0, 0, 640, 480); 76d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * captureRequestBuilder.set(SCALER_CROP_REGION, cropRectangle); 77d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * </pre></code> 78d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * </p> 79d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 80d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>To enumerate over all possible keys for {@link CaptureResult}, see 81d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@link CameraCharacteristics#getAvailableCaptureResultKeys}.</p> 82d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 83d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @see CaptureResult#get 84d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @see CameraCharacteristics#getAvailableCaptureResultKeys 85d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 86d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public final static class Key<T> { 87d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin private final CameraMetadataNative.Key<T> mKey; 88d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 89d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 90d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Visible for testing and vendor extensions only. 91d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 92d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 93d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 94d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public Key(String name, Class<T> type) { 95d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mKey = new CameraMetadataNative.Key<T>(name, type); 96d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 97d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 98d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 99d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Visible for testing and vendor extensions only. 100d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 101d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 102d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 103d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public Key(String name, TypeReference<T> typeReference) { 104d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mKey = new CameraMetadataNative.Key<T>(name, typeReference); 105d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 106d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 107d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 108d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Return a camelCase, period separated name formatted like: 109d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@code "root.section[.subsections].name"}. 110d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 111d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."}; 112d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * keys that are device/platform-specific are prefixed with {@code "com."}.</p> 113d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 114d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would 115d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device 116d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * specific key might look like {@code "com.google.nexus.data.private"}.</p> 117d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 118d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @return String representation of the key name 119d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 120d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public String getName() { 121d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return mKey.getName(); 122d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 123d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 124d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 125d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 126d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 127d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 128d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public final int hashCode() { 129d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return mKey.hashCode(); 130d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 131d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 132d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 133d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 134d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 135d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings("unchecked") 136d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 137d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public final boolean equals(Object o) { 138d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return o instanceof Key && ((Key<T>)o).mKey.equals(mKey); 139d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 140d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 141d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 142d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Visible for CameraMetadataNative implementation only; do not use. 143d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 144d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * TODO: Make this private or remove it altogether. 145d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 146d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 147d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 148d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public CameraMetadataNative.Key<T> getNativeKey() { 149d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return mKey; 150d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 151d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 152d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings({ "unchecked" }) 153d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /*package*/ Key(CameraMetadataNative.Key<?> nativeKey) { 154d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mKey = (CameraMetadataNative.Key<T>) nativeKey; 155d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 156d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 15770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 15870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala private final HashSet<Surface> mSurfaceSet; 15970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala private final CameraMetadataNative mSettings; 1605398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen private boolean mIsReprocess; 1617a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen // Each reprocess request must be tied to a reprocessible session ID. 1627a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen // Valid only for reprocess requests (mIsReprocess == true). 1637a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen private int mReprocessibleSessionId; 16470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 1654068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala private Object mUserTag; 166b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 167b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala /** 1686bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Construct empty request. 1696bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 1706bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Used by Binder to unparcel this object only. 17170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin */ 1726bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin private CaptureRequest() { 17370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings = new CameraMetadataNative(); 17470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet = new HashSet<Surface>(); 1755398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen mIsReprocess = false; 1767a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen mReprocessibleSessionId = CameraCaptureSession.SESSION_ID_NONE; 177b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala } 178b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 179b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala /** 1806bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Clone from source capture request. 1816bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 1826bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Used by the Builder to create an immutable copy. 183b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */ 1846bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin @SuppressWarnings("unchecked") 18570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala private CaptureRequest(CaptureRequest source) { 18670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings = new CameraMetadataNative(source.mSettings); 18770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet = (HashSet<Surface>) source.mSurfaceSet.clone(); 1885398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen mIsReprocess = source.mIsReprocess; 1897a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen mReprocessibleSessionId = source.mReprocessibleSessionId; 1907b01c5c4d27ebbd739d9e5e0de7eaafbffd8e084Eino-Ville Talvala mUserTag = source.mUserTag; 191b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala } 192b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 193b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala /** 1946bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Take ownership of passed-in settings. 1956bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 1966bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Used by the Builder to create a mutable CaptureRequest. 1977a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 1987a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @param settings Settings for this capture request. 1997a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @param isReprocess Indicates whether to create a reprocess capture request. {@code true} 2007a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * to create a reprocess capture request. {@code false} to create a regular 2017a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * capture request. 2027a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @param reprocessibleSessionId The ID of the camera capture session this capture is created 2037a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * for. This is used to validate if the application submits a 2047a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * reprocess capture request to the same session where 2057a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * the {@link TotalCaptureResult}, used to create the reprocess 2067a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * capture, came from. 2077a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 2087a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @throws IllegalArgumentException If creating a reprocess capture request with an invalid 2097a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * reprocessibleSessionId. 2107a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 2117a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @see CameraDevice#createReprocessCaptureRequest 212b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */ 2137a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen private CaptureRequest(CameraMetadataNative settings, boolean isReprocess, 2147a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen int reprocessibleSessionId) { 215d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mSettings = CameraMetadataNative.move(settings); 21670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet = new HashSet<Surface>(); 2175398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen mIsReprocess = isReprocess; 2187a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen if (isReprocess) { 2197a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen if (reprocessibleSessionId == CameraCaptureSession.SESSION_ID_NONE) { 2207a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen throw new IllegalArgumentException("Create a reprocess capture request with an " + 2217a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen "invalid session ID: " + reprocessibleSessionId); 2227a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen } 2237a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen mReprocessibleSessionId = reprocessibleSessionId; 2247a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen } else { 2257a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen mReprocessibleSessionId = CameraCaptureSession.SESSION_ID_NONE; 2267a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen } 22770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 22870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 229d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 230d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Get a capture request field value. 231d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 232d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>The field definitions can be found in {@link CaptureRequest}.</p> 233d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 234d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>Querying the value for the same key more than once will return a value 235d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * which is equal to the previous queried value.</p> 236d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 237d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @throws IllegalArgumentException if the key was not valid 238d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 239d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @param key The result field to read. 240d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @return The value of that key, or {@code null} if the field is not set. 241d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 24270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public <T> T get(Key<T> key) { 24370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mSettings.get(key); 2444068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala } 2454068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala 2464068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala /** 247d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 248d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 249d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 250d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings("unchecked") 251d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 252d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin protected <T> T getProtected(Key<?> key) { 253d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return (T) mSettings.get(key); 254d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 255d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 256d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 257d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 258d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 259d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 260d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings("unchecked") 261d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 262d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin protected Class<Key<?>> getKeyClass() { 263d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin Object thisClass = Key.class; 264d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return (Class<Key<?>>)thisClass; 265d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 266d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 267d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 268d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 269d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 270d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 271d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public List<Key<?>> getKeys() { 272d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin // Force the javadoc for this function to show up on the CaptureRequest page 273d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return super.getKeys(); 274d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 275d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 276d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 2774068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * Retrieve the tag for this request, if any. 2784068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * 2794068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * <p>This tag is not used for anything by the camera device, but can be 2804068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * used by an application to easily identify a CaptureRequest when it is 2814068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * returned by 282fd887436bd111e4d2c7307578a51b5070025b7f2Eino-Ville Talvala * {@link CameraCaptureSession.CaptureCallback#onCaptureCompleted CaptureCallback.onCaptureCompleted} 2834068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * </p> 2844068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * 2854068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * @return the last tag Object set on this request, or {@code null} if 2864068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * no tag has been set. 28770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see Builder#setTag 2884068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala */ 2894068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala public Object getTag() { 29070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mUserTag; 2914068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala } 2924068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala 2936bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin /** 2945398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * Determine if this is a reprocess capture request. 2955398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * 2965398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * <p>A reprocess capture request produces output images from an input buffer from the 2975398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * {@link CameraCaptureSession}'s input {@link Surface}. A reprocess capture request can be 2985398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * created by {@link CameraDevice#createReprocessCaptureRequest}.</p> 2995398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * 3005398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * @return {@code true} if this is a reprocess capture request. {@code false} if this is not a 3015398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * reprocess capture request. 3025398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * 3035398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * @see CameraDevice#createReprocessCaptureRequest 3045398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen */ 3055398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen public boolean isReprocess() { 3065398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen return mIsReprocess; 3075398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen } 3085398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen 3095398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen /** 3107a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * Get the reprocessible session ID this reprocess capture request is associated with. 3117a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 3127a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @return the reprocessible session ID this reprocess capture request is associated with 3137a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 3147a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @throws IllegalStateException if this capture request is not a reprocess capture request. 3157a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @hide 3167a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen */ 3177a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen public int getReprocessibleSessionId() { 3187a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen if (mIsReprocess == false || 3197a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen mReprocessibleSessionId == CameraCaptureSession.SESSION_ID_NONE) { 3207a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen throw new IllegalStateException("Getting the reprocessible session ID for a "+ 3217a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen "non-reprocess capture request is illegal."); 3227a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen } 3237a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen return mReprocessibleSessionId; 3247a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen } 3257a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen 3267a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen /** 3276bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Determine whether this CaptureRequest is equal to another CaptureRequest. 3286bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 3296bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * <p>A request is considered equal to another is if it's set of key/values is equal, it's 3305398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * list of output surfaces is equal, the user tag is equal, and the return values of 3315398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * isReprocess() are equal.</p> 3326bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 3336bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * @param other Another instance of CaptureRequest. 3346bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 3356bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * @return True if the requests are the same, false otherwise. 3366bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin */ 3376bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin @Override 3386bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin public boolean equals(Object other) { 3396bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin return other instanceof CaptureRequest 3406bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin && equals((CaptureRequest)other); 3416bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin } 3426bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin 3436bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin private boolean equals(CaptureRequest other) { 3446bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin return other != null 3456bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin && Objects.equals(mUserTag, other.mUserTag) 3466bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin && mSurfaceSet.equals(other.mSurfaceSet) 3475398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen && mSettings.equals(other.mSettings) 3487a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen && mIsReprocess == other.mIsReprocess 3497a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen && mReprocessibleSessionId == other.mReprocessibleSessionId; 3506bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin } 3516bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin 3526bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin @Override 3536bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin public int hashCode() { 3545776aafc7e70c0b79c4bee2bc50f44121b37c962Ruben Brunk return HashCodeHelpers.hashCode(mSettings, mSurfaceSet, mUserTag); 3556bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin } 3566bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin 35770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public static final Parcelable.Creator<CaptureRequest> CREATOR = 35870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin new Parcelable.Creator<CaptureRequest>() { 35970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin @Override 36070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public CaptureRequest createFromParcel(Parcel in) { 36170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin CaptureRequest request = new CaptureRequest(); 36270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin request.readFromParcel(in); 36370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 36470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin return request; 36570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 36670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 36770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin @Override 36870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public CaptureRequest[] newArray(int size) { 36970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin return new CaptureRequest[size]; 37070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 37170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin }; 37270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 37370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin /** 37470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin * Expand this object from a Parcel. 37570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Hidden since this breaks the immutability of CaptureRequest, but is 37670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * needed to receive CaptureRequests with aidl. 37770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 37870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin * @param in The parcel from which the object should be read 37970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @hide 38070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin */ 38172f9f0a96e4476ef231d5001cb30521ad4ce5b1eIgor Murashkin private void readFromParcel(Parcel in) { 38270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings.readFromParcel(in); 38370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 38470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet.clear(); 38570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 38670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala Parcelable[] parcelableArray = in.readParcelableArray(Surface.class.getClassLoader()); 38770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 38870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala if (parcelableArray == null) { 38970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return; 39070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 39170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 39270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala for (Parcelable p : parcelableArray) { 39370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala Surface s = (Surface) p; 39470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet.add(s); 39570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 3965398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen 3975398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen mIsReprocess = (in.readInt() == 0) ? false : true; 3987a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen mReprocessibleSessionId = CameraCaptureSession.SESSION_ID_NONE; 39970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 40070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 40170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin @Override 40270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public int describeContents() { 40370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return 0; 40470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 40570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 40670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala @Override 40770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public void writeToParcel(Parcel dest, int flags) { 40870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings.writeToParcel(dest, flags); 40970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala dest.writeParcelableArray(mSurfaceSet.toArray(new Surface[mSurfaceSet.size()]), flags); 4105398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen dest.writeInt(mIsReprocess ? 1 : 0); 41170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 41270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 41370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 414feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk * @hide 415feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk */ 416feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk public boolean containsTarget(Surface surface) { 417feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk return mSurfaceSet.contains(surface); 418feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk } 419feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk 420feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk /** 421feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk * @hide 422feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk */ 423feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk public Collection<Surface> getTargets() { 424feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk return Collections.unmodifiableCollection(mSurfaceSet); 425feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk } 426feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk 427feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk /** 42870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * A builder for capture requests. 42970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 43070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>To obtain a builder instance, use the 43170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * {@link CameraDevice#createCaptureRequest} method, which initializes the 43270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * request fields to one of the templates defined in {@link CameraDevice}. 43370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 43470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see CameraDevice#createCaptureRequest 435b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraDevice#TEMPLATE_PREVIEW 436b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraDevice#TEMPLATE_RECORD 437b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraDevice#TEMPLATE_STILL_CAPTURE 438b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraDevice#TEMPLATE_VIDEO_SNAPSHOT 439b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraDevice#TEMPLATE_MANUAL 44070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 44170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public final static class Builder { 44270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 4437a36a0fbb0a5f14047a3680668da954beca05dcbIgor Murashkin private final CaptureRequest mRequest; 44470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 44570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 44670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Initialize the builder using the template; the request takes 44770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * ownership of the template. 44870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 4497a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @param template Template settings for this capture request. 4507a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @param reprocess Indicates whether to create a reprocess capture request. {@code true} 4517a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * to create a reprocess capture request. {@code false} to create a regular 4527a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * capture request. 4537a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @param reprocessibleSessionId The ID of the camera capture session this capture is 4547a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * created for. This is used to validate if the application 4557a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * submits a reprocess capture request to the same session 4567a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * where the {@link TotalCaptureResult}, used to create the 4577a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * reprocess capture, came from. 4587a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 4597a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @throws IllegalArgumentException If creating a reprocess capture request with an invalid 4607a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * reprocessibleSessionId. 46170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @hide 46270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 4637a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen public Builder(CameraMetadataNative template, boolean reprocess, 4647a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen int reprocessibleSessionId) { 4657a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen mRequest = new CaptureRequest(template, reprocess, reprocessibleSessionId); 46670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 46770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 46870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 46970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Add a surface to the list of targets for this request</p> 47070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 47170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>The Surface added must be one of the surfaces included in the most 472b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * recent call to {@link CameraDevice#createCaptureSession}, when the 47370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * request is given to the camera device.</p> 47470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 47570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Adding a target more than once has no effect.</p> 47670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 47770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param outputTarget Surface to use as an output target for this request 47870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 47970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public void addTarget(Surface outputTarget) { 48070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mSurfaceSet.add(outputTarget); 48170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 48270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 48370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 48470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Remove a surface from the list of targets for this request.</p> 48570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 48670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Removing a target that is not currently added has no effect.</p> 48770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 48870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param outputTarget Surface to use as an output target for this request 48970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 49070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public void removeTarget(Surface outputTarget) { 49170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mSurfaceSet.remove(outputTarget); 49270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 49370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 49470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 49570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Set a capture request field to a value. The field definitions can be 49670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * found in {@link CaptureRequest}. 49770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 49870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param key The metadata field to write. 49970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param value The value to set the field to, which must be of a matching 50070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * type to the key. 50170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 50270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public <T> void set(Key<T> key, T value) { 50370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mSettings.set(key, value); 50470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 50570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 50670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 50770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Get a capture request field value. The field definitions can be 50870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * found in {@link CaptureRequest}. 50970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 51070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @throws IllegalArgumentException if the key was not valid 51170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 51270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param key The metadata field to read. 51370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @return The value of that key, or {@code null} if the field is not set. 51470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 51570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public <T> T get(Key<T> key) { 51670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mRequest.mSettings.get(key); 51770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 51870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 51970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 52070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Set a tag for this request. 52170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 52270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>This tag is not used for anything by the camera device, but can be 52370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * used by an application to easily identify a CaptureRequest when it is 52470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * returned by 525fd887436bd111e4d2c7307578a51b5070025b7f2Eino-Ville Talvala * {@link CameraCaptureSession.CaptureCallback#onCaptureCompleted CaptureCallback.onCaptureCompleted} 52670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 52770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param tag an arbitrary Object to store with this request 52870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see CaptureRequest#getTag 52970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 53070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public void setTag(Object tag) { 53170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mUserTag = tag; 53270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 53370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 53470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 53570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Build a request using the current target Surfaces and settings. 536edeab40338a047655f6af60e9e950dbad262279bSol Boucher * <p>Note that, although it is possible to create a {@code CaptureRequest} with no target 537edeab40338a047655f6af60e9e950dbad262279bSol Boucher * {@link Surface}s, passing such a request into {@link CameraCaptureSession#capture}, 538edeab40338a047655f6af60e9e950dbad262279bSol Boucher * {@link CameraCaptureSession#captureBurst}, 539edeab40338a047655f6af60e9e950dbad262279bSol Boucher * {@link CameraCaptureSession#setRepeatingBurst}, or 540edeab40338a047655f6af60e9e950dbad262279bSol Boucher * {@link CameraCaptureSession#setRepeatingRequest} will cause that method to throw an 541edeab40338a047655f6af60e9e950dbad262279bSol Boucher * {@link IllegalArgumentException}.</p> 54270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 54370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @return A new capture request instance, ready for submission to the 54470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * camera device. 54570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 54670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public CaptureRequest build() { 54770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return new CaptureRequest(mRequest); 54870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 54970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 55070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 55170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 55270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @hide 55370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 55470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public boolean isEmpty() { 55570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mRequest.mSettings.isEmpty(); 55670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 55770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 558b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala } 559b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 5605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 5615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * The key entries below this point are generated from metadata 5625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * definitions in /system/media/camera/docs. Do not modify by hand or 5635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * modify the comment blocks at the start or end. 5645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 5655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 5665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 5677d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The mode control selects how the image data is converted from the 5687d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * sensor's native color into linear sRGB color.</p> 569b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>When auto-white balance (AWB) is enabled with {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, this 5707d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * control is overridden by the AWB routine. When AWB is disabled, the 5717d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * application controls how the color mapping is performed.</p> 5727d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>We define the expected processing pipeline below. For consistency 5737d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * across devices, this is always the case with TRANSFORM_MATRIX.</p> 5747d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>When either FULL or HIGH_QUALITY is used, the camera device may 5757d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 5767d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the 5777d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * camera device (in the results) and be roughly correct.</p> 5787d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>Switching to TRANSFORM_MATRIX and using the data provided from 5797d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * FAST or HIGH_QUALITY will yield a picture with the same white point 5807d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * as what was produced by the camera device in the earlier frame.</p> 5817d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The expected processing pipeline is as follows:</p> 5827d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p><img alt="White balance processing pipeline" src="../../../../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p> 5837d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The white balance is encoded by two values, a 4-channel white-balance 5847d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * gain vector (applied in the Bayer domain), and a 3x3 color transform 5857d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * matrix (applied after demosaic).</p> 5867d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The 4-channel white-balance gains are defined as:</p> 5877d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} = [ R G_even G_odd B ] 5887d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * </code></pre> 5897d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>where <code>G_even</code> is the gain for green pixels on even rows of the 5907d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * output, and <code>G_odd</code> is the gain for green pixels on the odd rows. 5917d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * These may be identical for a given camera device implementation; if 5927d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * the camera device does not support a separate gain for even/odd green 5937d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to 5947d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <code>G_even</code> in the output result metadata.</p> 5957d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The matrices for color transforms are defined as a 9-entry vector:</p> 5967d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ] 5977d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * </code></pre> 5987d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>, 5997d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p> 6007d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>with colors as follows:</p> 6017d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <pre><code>r' = I0r + I1g + I2b 6027d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * g' = I3r + I4g + I5b 6037d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * b' = I6r + I7g + I8b 6047d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * </code></pre> 6057d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>Both the input and output value ranges must match. Overflow/underflow 6067d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * values are clipped to fit within the range.</p> 607fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 608fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 609fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX TRANSFORM_MATRIX}</li> 610fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_MODE_FAST FAST}</li> 611fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 612fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 6134b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 6144b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 6154b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 6164b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 6170da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 6187d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * @see CaptureRequest#COLOR_CORRECTION_GAINS 6197d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 6200da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_AWB_MODE 6214b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 6225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX 6235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #COLOR_CORRECTION_MODE_FAST 6245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY 6255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 6266c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 6275a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> COLOR_CORRECTION_MODE = 6285a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.colorCorrection.mode", int.class); 6295a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 6305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 631ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>A color transform matrix to use to transform 632b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * from sensor RGB color space to output linear sRGB color space.</p> 63349a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>This matrix is either set by the camera device when the request 6340da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or 6355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * directly by the application in the request when the 6360da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p> 63749a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>In the latter case, the camera device may round the matrix to account 63849a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * for precision issues; the final rounded matrix should be reported back 63949a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * in this matrix result metadata. The transform should keep the magnitude 64049a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * of the output color values within <code>[0, 1.0]</code> (assuming input color 64149a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p> 642d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * <p>The valid range of each matrix element varies on different devices, but 643d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * values within [-1.5, 3.0] are guaranteed not to be clipped.</p> 644fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Unitless scale factors</p> 6454b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 6464b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 6474b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 6484b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 6490da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 6500da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#COLOR_CORRECTION_MODE 6514b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 6525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 6536c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 6542bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala public static final Key<android.hardware.camera2.params.ColorSpaceTransform> COLOR_CORRECTION_TRANSFORM = 6552bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.colorCorrection.transform", android.hardware.camera2.params.ColorSpaceTransform.class); 6565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 6575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 6587d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>Gains applying to Bayer raw color channels for 659cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * white-balance.</p> 6602bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * <p>These per-channel gains are either set by the camera device 6612bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * when the request {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not 6622bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * TRANSFORM_MATRIX, or directly by the application in the 6632bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * request when the {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is 6642bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * TRANSFORM_MATRIX.</p> 6652bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * <p>The gains in the result metadata are the gains actually 6662bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * applied by the camera device to the current frame.</p> 667d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * <p>The valid range of gains varies on different devices, but gains 668d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * between [1.0, 3.0] are guaranteed not to be clipped. Even if a given 669d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * device allows gains below 1.0, this is usually not recommended because 670d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * this can create color artifacts.</p> 671fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Unitless gain factors</p> 6724b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 6734b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 6744b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 6754b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 6760da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 6770da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#COLOR_CORRECTION_MODE 6784b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 6795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 6806c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 6812bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala public static final Key<android.hardware.camera2.params.RggbChannelVector> COLOR_CORRECTION_GAINS = 6822bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala new Key<android.hardware.camera2.params.RggbChannelVector>("android.colorCorrection.gains", android.hardware.camera2.params.RggbChannelVector.class); 6835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 6845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 685a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * <p>Mode of operation for the chromatic aberration correction algorithm.</p> 686a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light 687a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * can not focus on the same point after exiting from the lens. This metadata defines 688a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * the high level control of chromatic aberration correction algorithm, which aims to 689a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * minimize the chromatic artifacts that may occur along the object boundaries in an 690a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * image.</p> 691a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * <p>FAST/HIGH_QUALITY both mean that camera device determined aberration 692a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * correction will be applied. HIGH_QUALITY mode indicates that the camera device will 693a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * use the highest-quality aberration correction algorithms, even if it slows down 694a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * capture rate. FAST means the camera device will not slow down capture rate when 695a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * applying aberration correction.</p> 6964b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>LEGACY devices will always be in FAST mode.</p> 697fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 698fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 699fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_OFF OFF}</li> 700fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_FAST FAST}</li> 701fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 702fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 703fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 704fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</p> 7054b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 706a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * 7079e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES 7089e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He * @see #COLOR_CORRECTION_ABERRATION_MODE_OFF 7099e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He * @see #COLOR_CORRECTION_ABERRATION_MODE_FAST 7109e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He * @see #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY 711a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He */ 7126c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 7139e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He public static final Key<Integer> COLOR_CORRECTION_ABERRATION_MODE = 7149e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He new Key<Integer>("android.colorCorrection.aberrationMode", int.class); 715a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He 716a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He /** 7170da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>The desired setting for the camera device's auto-exposure 7180da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * algorithm's antibanding compensation.</p> 7190da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>Some kinds of lighting fixtures, such as some fluorescent 7200da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * lights, flicker at the rate of the power supply frequency 7210da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * (60Hz or 50Hz, depending on country). While this is 7220da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * typically not noticeable to a person, it can be visible to 7230da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * a camera device. If a camera sets its exposure time to the 7240da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * wrong value, the flicker may become visible in the 7250da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * viewfinder as flicker or in a final captured image, as a 7260da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * set of variable-brightness bands across the image.</p> 7270da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>Therefore, the auto-exposure routines of camera devices 7280da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * include antibanding routines that ensure that the chosen 7290da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * exposure value will not cause such banding. The choice of 7300da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * exposure time depends on the rate of flicker, which the 7310da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * camera device can detect automatically, or the expected 7320da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * rate can be selected by the application using this 7330da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * control.</p> 7340da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>A given camera device may not support all of the possible 7350da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * options for the antibanding mode. The 7360da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains 7370da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * the available modes for a given camera device.</p> 7387b2cae6ceca680f6034a9fe43df2446cbae2f090Yin-Chia Yeh * <p>AUTO mode is the default if it is available on given 7397b2cae6ceca680f6034a9fe43df2446cbae2f090Yin-Chia Yeh * camera device. When AUTO mode is not available, the 7407b2cae6ceca680f6034a9fe43df2446cbae2f090Yin-Chia Yeh * default will be either 50HZ or 60HZ, and both 50HZ 7417b2cae6ceca680f6034a9fe43df2446cbae2f090Yin-Chia Yeh * and 60HZ will be available.</p> 7420da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>If manual exposure control is enabled (by setting 7430da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF), 7440da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * then this setting has no effect, and the application must 7450da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ensure it selects exposure times that do not cause banding 7460da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist 7470da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * the application in this.</p> 748fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 749fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 750fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_OFF OFF}</li> 751fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_50HZ 50HZ}</li> 752fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_60HZ 60HZ}</li> 753fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_AUTO AUTO}</li> 754fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 755fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br></p> 756fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>{@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes}</p> 7574b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 7580da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 7595f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES 760399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 761265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 762265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureResult#STATISTICS_SCENE_FLICKER 7635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_OFF 7645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ 7655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ 7665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_AUTO 7675a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 7686c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 7695a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_ANTIBANDING_MODE = 7705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aeAntibandingMode", int.class); 7715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 7725a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 773b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Adjustment to auto-exposure (AE) target image 774b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * brightness.</p> 775b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The adjustment is measured as a count of steps, with the 776b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * step size defined by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} and the 777b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * allowed range by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}.</p> 778b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>For example, if the exposure value (EV) step is 0.333, '6' 779b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * will mean an exposure compensation of +2 EV; -3 will mean an 780b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * exposure compensation of -1 EV. One EV represents a doubling 781b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * of image brightness. Note that this control will only be 782b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF. This control 783b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * will take effect even when {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} <code>== true</code>.</p> 784a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * <p>In the event of exposure compensation value being changed, camera device 785a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * may take several frames to reach the newly requested exposure target. 786a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * During that time, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} field will be in the SEARCHING 787a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * state. Once the new exposure target is reached, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} will 788a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or 789a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * FLASH_REQUIRED (if the scene is too dark for still capture).</p> 790fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Compensation steps</p> 791fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 792fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}</p> 7934b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 794a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * 795b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE 796b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP 797a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureRequest#CONTROL_AE_LOCK 798a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureRequest#CONTROL_AE_MODE 799a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureResult#CONTROL_AE_STATE 8005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 8016c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 8025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_EXPOSURE_COMPENSATION = 8035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aeExposureCompensation", int.class); 8045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 8055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 806b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Whether auto-exposure (AE) is currently locked to its latest 80749a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * calculated values.</p> 808fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters, 809fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p> 810fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Note that even when AE is locked, the flash may be fired if 811fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH / 812fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p> 813a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * <p>When {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} is changed, even if the AE lock 814a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * is ON, the camera device will still adjust its exposure value.</p> 81549a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) 81649a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * when AE is already locked, the camera device will not change the exposure time 81749a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}) 818d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} 81949a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the 820fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed. 821fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.</p> 822fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * <p>When an AE precapture sequence is triggered, AE unlock will not be able to unlock 823fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * the AE if AE is locked by the camera device internally during precapture metering 824fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * sequence In other words, submitting requests with AE unlock has no effect for an 825fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * ongoing precapture metering sequence. Otherwise, the precapture metering sequence 826fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * will never succeed in a sequence of preview requests where AE lock is always set 827fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * to <code>false</code>.</p> 828fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Since the camera device has a pipeline of in-flight requests, the settings that 829fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * get locked do not necessarily correspond to the settings that were present in the 830fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * latest capture result received from the camera device, since additional captures 831fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * and AE updates may have occurred even before the result was sent out. If an 832fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * application is switching between automatic and manual control and wishes to eliminate 833fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * any flicker during the switch, the following procedure is recommended:</p> 834fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ol> 835fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Starting in auto-AE mode:</li> 836fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Lock AE</li> 837fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Wait for the first result to be output that has the AE locked</li> 838fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Copy exposure settings from that result into a request, set the request to manual AE</li> 839fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Submit the capture request, proceed to run manual AE as desired.</li> 840fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ol> 84149a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p> 8424b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 84349a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * 844a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 84549a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 84649a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 84749a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureResult#CONTROL_AE_STATE 84849a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#SENSOR_EXPOSURE_TIME 84949a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#SENSOR_SENSITIVITY 8505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 8516c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 8525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> CONTROL_AE_LOCK = 8535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.control.aeLock", boolean.class); 8545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 8555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 8560da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>The desired mode for the camera device's 8570da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * auto-exposure routine.</p> 8580da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is 8590da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * AUTO.</p> 8600da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>When set to any of the ON modes, the camera device's 8610da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * auto-exposure routine is enabled, overriding the 8620da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * application's selected exposure time, sensor sensitivity, 8630da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 8640da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and 8650da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes 8660da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * is selected, the camera device's flash unit controls are 8670da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * also overridden.</p> 8680da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>The FLASH modes are only available if the camera device 8690da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p> 8700da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>If flash TORCH mode is desired, this field must be set to 8710da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p> 8720da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>When set to any of the ON modes, the values chosen by the 8730da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * camera device auto-exposure routine for the overridden 8740da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * fields for a given capture will be available in its 8750da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * CaptureResult.</p> 876fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 877fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 878fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_MODE_OFF OFF}</li> 879fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_MODE_ON ON}</li> 880fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH ON_AUTO_FLASH}</li> 881fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_MODE_ON_ALWAYS_FLASH ON_ALWAYS_FLASH}</li> 882fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE ON_AUTO_FLASH_REDEYE}</li> 883fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 884fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 885fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES android.control.aeAvailableModes}</p> 8864b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 8870da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 888fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES 8895f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#CONTROL_MODE 890265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 891265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#FLASH_MODE 892aef3b7ed9f2a27aed9aecef030432d1100a60406Igor Murashkin * @see CaptureRequest#SENSOR_EXPOSURE_TIME 893aef3b7ed9f2a27aed9aecef030432d1100a60406Igor Murashkin * @see CaptureRequest#SENSOR_FRAME_DURATION 894399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * @see CaptureRequest#SENSOR_SENSITIVITY 8955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_OFF 8965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON 8975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON_AUTO_FLASH 8985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH 8995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE 9005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 9016c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 9025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_MODE = 9035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aeMode", int.class); 9045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 9055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 906fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>List of metering areas to use for auto-exposure adjustment.</p> 907fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0. 908808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * Otherwise will always be present.</p> 909fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The maximum number of regions supported by the device is determined by the value 910fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe}.</p> 911ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The coordinate system is based on the active pixel array, 9122629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight * with (0,0) being the top-left pixel in the active pixel array, and 9130da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 9140da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 91597f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * bottom-right pixel in the active pixel array.</p> 916fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight 91797f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * for every pixel in the area. This means that a large metering area 91897f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * with the same weight as a smaller area will have more effect in 91997f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * the metering result. Metering areas can partially overlap and the 92097f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * camera device will add the weights in the overlap region.</p> 921fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The weights are relative to weights of other exposure metering regions, so if only one 922fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * region is used, all non-zero weights will have the same effect. A region with 0 923fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * weight is ignored.</p> 924fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If all regions have 0 weight, then no specific metering area needs to be used by the 925fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * camera device.</p> 926fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in 927fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * capture result metadata, the camera device will ignore the sections outside the crop 928fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * region and output only the intersection rectangle as the metering region in the result 929fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * metadata. If the region is entirely outside the crop region, it will be ignored and 930fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * not reported in the result metadata.</p> 931fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 932fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 933fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * Coordinates must be between <code>[(0,0), (width, height))</code> of 934fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 935808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 9360da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 937808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AE 9380da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 939265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 9405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 9416c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 942817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AE_REGIONS = 943817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.aeRegions", android.hardware.camera2.params.MeteringRectangle[].class); 9445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 9455a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 946fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Range over which the auto-exposure routine can 947fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * adjust the capture frame rate to maintain good 948fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * exposure.</p> 949b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Only constrains auto-exposure (AE) algorithm, not 950fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and 951fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.</p> 952fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Frames per second (FPS)</p> 953fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 954fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}</p> 955fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This key is available on all devices.</p> 9560da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 957fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES 9580da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SENSOR_EXPOSURE_TIME 959fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureRequest#SENSOR_FRAME_DURATION 9605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 9616c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 96278712a8bd7275542013ba099f33536eead0167fbIgor Murashkin public static final Key<android.util.Range<Integer>> CONTROL_AE_TARGET_FPS_RANGE = 96378712a8bd7275542013ba099f33536eead0167fbIgor Murashkin new Key<android.util.Range<Integer>>("android.control.aeTargetFpsRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 9645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 9655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 966228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>Whether the camera device will trigger a precapture 967228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * metering sequence when it processes this request.</p> 968ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>This entry is normally set to IDLE, or is not 9695a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * included at all in the request settings. When included and 970dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * set to START, the camera device will trigger the auto-exposure (AE) 971ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * precapture metering sequence.</p> 972fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * <p>When set to CANCEL, the camera device will cancel any active 973fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * precapture metering trigger, and return to its initial AE state. 974fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * If a precapture metering sequence is already completed, and the camera 975fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * device has implicitly locked the AE for subsequent still capture, the 976fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * CANCEL trigger will unlock the AE and return to its initial AE state.</p> 977dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * <p>The precapture sequence should be triggered before starting a 978e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * high-quality still capture for final metering decisions to 979e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * be made, and for firing pre-capture flash pulses to estimate 980e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * scene brightness and required final capture flash power, when 981e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * the flash is enabled.</p> 982e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>Normally, this entry should be set to START for only a 983e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * single request, and the application should wait until the 984e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * sequence completes before starting a new one.</p> 985dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * <p>When a precapture metering sequence is finished, the camera device 986dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * may lock the auto-exposure routine internally to be able to accurately expose the 987dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * subsequent still capture image (<code>{@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} == STILL_CAPTURE</code>). 988dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * For this case, the AE may not resume normal scan if no subsequent still capture is 989dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * submitted. To ensure that the AE routine restarts normal scan, the application should 990dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * submit a request with <code>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} == true</code>, followed by a request 991dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * with <code>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} == false</code>, if the application decides not to submit a 992fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * still capture request after the precapture sequence completes. Alternatively, for 993fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * API level 23 or newer devices, the CANCEL can be used to unlock the camera device 994fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * internally locked AE if the application doesn't submit a still capture request after 995fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not 996fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * be used in devices that have earlier API levels.</p> 997e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>The exact effect of auto-exposure (AE) precapture trigger 998e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * depends on the current AE mode and state; see 999b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture state transition 1000b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * details.</p> 1001fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>On LEGACY-level devices, the precapture trigger is not supported; 1002fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * capturing a high-resolution JPEG image will automatically trigger a 1003fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * precapture sequence before the high-resolution capture, including 1004fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * potentially firing a pre-capture flash.</p> 1005fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1006fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1007fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE IDLE}</li> 1008fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_START START}</li> 1009fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL CANCEL}</li> 1010fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 10114b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 10124b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Limited capability</b> - 10134b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 10144b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1015228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * 1016dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * @see CaptureRequest#CONTROL_AE_LOCK 1017228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * @see CaptureResult#CONTROL_AE_STATE 1018dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * @see CaptureRequest#CONTROL_CAPTURE_INTENT 10194b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 10205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE 10215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START 1022fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * @see #CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL 10235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 10246c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 10255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER = 10265a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aePrecaptureTrigger", int.class); 10275a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 10285a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1029b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Whether auto-focus (AF) is currently enabled, and what 1030b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * mode it is set to.</p> 1031cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO and the lens is not fixed focus 10327144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * (i.e. <code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0</code>). Also note that 10337144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF, the behavior of AF is device 10347144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * dependent. It is recommended to lock AF by using {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger} before 10357144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * setting {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} to OFF, or set AF mode to OFF when AE is OFF.</p> 103678146ecb24871302a4c4dc0a7341044a06d29ee8Zhijun He * <p>If the lens is controlled by the camera device auto-focus algorithm, 1037d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * the camera device will report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState} 1038fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * in result metadata.</p> 1039fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1040fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1041fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_OFF OFF}</li> 1042fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_AUTO AUTO}</li> 1043fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_MACRO MACRO}</li> 1044fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_VIDEO CONTINUOUS_VIDEO}</li> 1045fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_PICTURE CONTINUOUS_PICTURE}</li> 1046fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_EDOF EDOF}</li> 1047fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1048fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1049fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES android.control.afAvailableModes}</p> 1050fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This key is available on all devices.</p> 10510da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 10527144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * @see CaptureRequest#CONTROL_AE_MODE 1053fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES 1054d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * @see CaptureResult#CONTROL_AF_STATE 10557144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * @see CaptureRequest#CONTROL_AF_TRIGGER 10560da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 1057cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 10585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_OFF 10595a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_AUTO 10605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_MACRO 10615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO 10625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE 10635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_EDOF 10645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 10656c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 10665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AF_MODE = 10675a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.afMode", int.class); 10685a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 10695a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1070fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>List of metering areas to use for auto-focus.</p> 1071fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0. 1072808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * Otherwise will always be present.</p> 1073fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The maximum number of focus areas supported by the device is determined by the value 1074fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf}.</p> 1075ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The coordinate system is based on the active pixel array, 10762629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight * with (0,0) being the top-left pixel in the active pixel array, and 10770da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 10780da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 107997f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * bottom-right pixel in the active pixel array.</p> 1080fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight 108197f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * for every pixel in the area. This means that a large metering area 108297f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * with the same weight as a smaller area will have more effect in 108397f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * the metering result. Metering areas can partially overlap and the 108497f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * camera device will add the weights in the overlap region.</p> 1085fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The weights are relative to weights of other metering regions, so if only one region 1086fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * is used, all non-zero weights will have the same effect. A region with 0 weight is 1087fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * ignored.</p> 1088fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If all regions have 0 weight, then no specific metering area needs to be used by the 1089fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * camera device.</p> 1090fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in 1091fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * capture result metadata, the camera device will ignore the sections outside the crop 1092fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * region and output only the intersection rectangle as the metering region in the result 1093fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * metadata. If the region is entirely outside the crop region, it will be ignored and 1094fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * not reported in the result metadata.</p> 1095fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1096fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1097fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * Coordinates must be between <code>[(0,0), (width, height))</code> of 1098fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1099808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 11000da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1101808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AF 11020da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 1103265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 11045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 11056c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 1106817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AF_REGIONS = 1107817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.afRegions", android.hardware.camera2.params.MeteringRectangle[].class); 11085a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 11095a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1110228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>Whether the camera device will trigger autofocus for this request.</p> 1111ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>This entry is normally set to IDLE, or is not 1112ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * included at all in the request settings.</p> 1113228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>When included and set to START, the camera device will trigger the 1114228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p> 1115228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>When set to CANCEL, the camera device will cancel any active trigger, 1116228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * and return to its initial AF state.</p> 1117e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>Generally, applications should set this entry to START or CANCEL for only a 1118e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * single capture, and then return it to IDLE (or not set at all). Specifying 1119e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * START for multiple captures in a row means restarting the AF operation over 1120e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * and over again.</p> 1121e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what the trigger means for each AF mode.</p> 1122fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1123fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1124fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_TRIGGER_IDLE IDLE}</li> 1125fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_TRIGGER_START START}</li> 1126fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_TRIGGER_CANCEL CANCEL}</li> 1127fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 11284b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1129228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * 1130228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * @see CaptureResult#CONTROL_AF_STATE 11315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_TRIGGER_IDLE 11325a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_TRIGGER_START 11335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_TRIGGER_CANCEL 11345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 11356c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 11365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AF_TRIGGER = 11375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.afTrigger", int.class); 11385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 11395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1140b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Whether auto-white balance (AWB) is currently locked to its 11412d5e89778e955b4ff209a93e738761356349d48cZhijun He * latest calculated values.</p> 1142fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters, 1143fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p> 1144fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Since the camera device has a pipeline of in-flight requests, the settings that 1145fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * get locked do not necessarily correspond to the settings that were present in the 1146fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * latest capture result received from the camera device, since additional captures 1147fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * and AWB updates may have occurred even before the result was sent out. If an 1148fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * application is switching between automatic and manual control and wishes to eliminate 1149fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * any flicker during the switch, the following procedure is recommended:</p> 1150fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ol> 1151fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Starting in auto-AWB mode:</li> 1152fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Lock AWB</li> 1153fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Wait for the first result to be output that has the AWB locked</li> 1154fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li> 1155fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Submit the capture request, proceed to run manual AWB as desired.</li> 1156fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ol> 1157e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>Note that AWB lock is only meaningful when 1158e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is in the AUTO mode; in other modes, 1159e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * AWB is already fixed to a specific setting.</p> 11604b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p> 11614b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1162e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * 1163e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * @see CaptureRequest#CONTROL_AWB_MODE 11645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 11656c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 11665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> CONTROL_AWB_LOCK = 11675a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.control.awbLock", boolean.class); 11685a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 11695a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1170b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Whether auto-white balance (AWB) is currently setting the color 11715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * transform fields, and what its illumination target 1172cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * is.</p> 1173399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is AUTO.</p> 1174e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>When set to the ON mode, the camera device's auto-white balance 1175399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * routine is enabled, overriding the application's selected 1176399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 11777144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}. Note that when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} 11787144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * is OFF, the behavior of AWB is device dependent. It is recommened to 11797144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * also set AWB mode to OFF or lock AWB by using {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} before 11807144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * setting AE mode to OFF.</p> 1181e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>When set to the OFF mode, the camera device's auto-white balance 1182cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * routine is disabled. The application manually controls the white 1183d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * balance by {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} 1184399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p> 1185e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>When set to any other modes, the camera device's auto-white 1186e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * balance routine is disabled. The camera device uses each 1187e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * particular illumination target for white balance 1188e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * adjustment. The application's values for 1189e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, 1190e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 1191e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} are ignored.</p> 1192fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1193fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1194fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_OFF OFF}</li> 1195fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_AUTO AUTO}</li> 1196fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_INCANDESCENT INCANDESCENT}</li> 1197fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_FLUORESCENT FLUORESCENT}</li> 1198fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_WARM_FLUORESCENT WARM_FLUORESCENT}</li> 1199fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_DAYLIGHT DAYLIGHT}</li> 1200fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT CLOUDY_DAYLIGHT}</li> 1201fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_TWILIGHT TWILIGHT}</li> 1202fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_SHADE SHADE}</li> 1203fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1204fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1205fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES android.control.awbAvailableModes}</p> 12064b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 12070da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1208265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#COLOR_CORRECTION_GAINS 12095f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#COLOR_CORRECTION_MODE 12105f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 12117144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * @see CaptureRequest#CONTROL_AE_MODE 1212fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES 12137144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * @see CaptureRequest#CONTROL_AWB_LOCK 1214265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 12155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_OFF 12165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_AUTO 12175a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_INCANDESCENT 12185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_FLUORESCENT 12195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT 12205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_DAYLIGHT 12215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT 12225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_TWILIGHT 12235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_SHADE 12245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 12256c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 12265a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AWB_MODE = 12275a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.awbMode", int.class); 12285a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 12295a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1230fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>List of metering areas to use for auto-white-balance illuminant 1231f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk * estimation.</p> 1232fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0. 1233808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * Otherwise will always be present.</p> 1234fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The maximum number of regions supported by the device is determined by the value 1235fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb}.</p> 1236ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The coordinate system is based on the active pixel array, 12372629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight * with (0,0) being the top-left pixel in the active pixel array, and 12380da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 12390da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 124097f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * bottom-right pixel in the active pixel array.</p> 124197f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * <p>The weight must range from 0 to 1000, and represents a weight 124297f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * for every pixel in the area. This means that a large metering area 124397f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * with the same weight as a smaller area will have more effect in 124497f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * the metering result. Metering areas can partially overlap and the 124597f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * camera device will add the weights in the overlap region.</p> 1246fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The weights are relative to weights of other white balance metering regions, so if 1247fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * only one region is used, all non-zero weights will have the same effect. A region with 1248fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0 weight is ignored.</p> 1249fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If all regions have 0 weight, then no specific metering area needs to be used by the 1250fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * camera device.</p> 1251fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in 1252fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * capture result metadata, the camera device will ignore the sections outside the crop 1253fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * region and output only the intersection rectangle as the metering region in the result 1254fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * metadata. If the region is entirely outside the crop region, it will be ignored and 1255fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * not reported in the result metadata.</p> 1256fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1257fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1258fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * Coordinates must be between <code>[(0,0), (width, height))</code> of 1259fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1260808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 12610da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1262808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AWB 12630da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 1264265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 12655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 12666c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 1267817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS = 1268817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.awbRegions", android.hardware.camera2.params.MeteringRectangle[].class); 12695a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 12705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 127166d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>Information to the camera device 3A (auto-exposure, 127266d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * auto-focus, auto-white balance) routines about the purpose 127366d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * of this capture, to help the camera device to decide optimal 3A 127466d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * strategy.</p> 1275e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * <p>This control (except for MANUAL) is only effective if 1276e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p> 1277e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 1278513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * contains OPAQUE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if 1279513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR. Other intent values are 1280513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * always supported.</p> 1281fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1282fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1283fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_CUSTOM CUSTOM}</li> 1284fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_PREVIEW PREVIEW}</li> 1285fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_STILL_CAPTURE STILL_CAPTURE}</li> 1286fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_RECORD VIDEO_RECORD}</li> 1287fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT VIDEO_SNAPSHOT}</li> 1288fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li> 1289fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_MANUAL MANUAL}</li> 1290fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1291fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This key is available on all devices.</p> 12920da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 12930da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 1294e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 12955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_CUSTOM 12965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_PREVIEW 12975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE 12985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD 12995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT 13005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG 1301e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * @see #CONTROL_CAPTURE_INTENT_MANUAL 13025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 13036c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 13045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_CAPTURE_INTENT = 13055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.captureIntent", int.class); 13065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 13075a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 13085f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * <p>A special color effect to apply.</p> 13095f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * <p>When this mode is set, a color effect will be applied 13105f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * to images produced by the camera device. The interpretation 13115f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * and implementation of these color effects is left to the 13125f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * implementor of the camera device, and should not be 13135f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * depended on to be consistent (or present) across all 13145f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * devices.</p> 1315fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1316fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1317fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_OFF OFF}</li> 1318fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_MONO MONO}</li> 1319fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_NEGATIVE NEGATIVE}</li> 1320fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_SOLARIZE SOLARIZE}</li> 1321fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_SEPIA SEPIA}</li> 1322fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_POSTERIZE POSTERIZE}</li> 1323fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_WHITEBOARD WHITEBOARD}</li> 1324fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_BLACKBOARD BLACKBOARD}</li> 1325fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_AQUA AQUA}</li> 1326fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1327fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1328fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS android.control.availableEffects}</p> 13294b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 13300da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1331fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS 13325a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_OFF 13335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_MONO 13345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_NEGATIVE 13355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_SOLARIZE 13365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_SEPIA 13375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_POSTERIZE 13385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_WHITEBOARD 13395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_BLACKBOARD 13405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_AQUA 13415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 13426c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 13435a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_EFFECT_MODE = 13445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.effectMode", int.class); 13455a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 13465a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1347fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control 1348cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * routines.</p> 1349fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This is a top-level 3A control switch. When set to OFF, all 3A control 13505f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * by the camera device is disabled. The application must set the fields for 1351f353742124af698098884b4172644af0851b30caZhijun He * capture parameters itself.</p> 1352f353742124af698098884b4172644af0851b30caZhijun He * <p>When set to AUTO, the individual algorithm controls in 13530da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p> 1354f353742124af698098884b4172644af0851b30caZhijun He * <p>When set to USE_SCENE_MODE, the individual controls in 13555f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * android.control.* are mostly disabled, and the camera device implements 1356f353742124af698098884b4172644af0851b30caZhijun He * one of the scene mode settings (such as ACTION, SUNSET, or PARTY) 13575f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * as it wishes. The camera device scene mode 3A settings are provided by 1358f353742124af698098884b4172644af0851b30caZhijun He * android.control.sceneModeOverrides.</p> 13592d5e89778e955b4ff209a93e738761356349d48cZhijun He * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference 13602d5e89778e955b4ff209a93e738761356349d48cZhijun He * is that this frame will not be used by camera device background 3A statistics 13612d5e89778e955b4ff209a93e738761356349d48cZhijun He * update, as if this frame is never captured. This mode can be used in the scenario 13622d5e89778e955b4ff209a93e738761356349d48cZhijun He * where the application doesn't want a 3A manual control capture to affect 13632d5e89778e955b4ff209a93e738761356349d48cZhijun He * the subsequent auto 3A capture results.</p> 1364fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1365fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1366fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_MODE_OFF OFF}</li> 1367fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_MODE_AUTO AUTO}</li> 1368fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_MODE_USE_SCENE_MODE USE_SCENE_MODE}</li> 1369fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_MODE_OFF_KEEP_STATE OFF_KEEP_STATE}</li> 1370fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1371d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * <p><b>Available values for this device:</b><br> 1372d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * {@link CameraCharacteristics#CONTROL_AVAILABLE_MODES android.control.availableModes}</p> 13734b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 13740da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 13750da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_AF_MODE 1376d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * @see CameraCharacteristics#CONTROL_AVAILABLE_MODES 13775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_MODE_OFF 13785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_MODE_AUTO 13795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_MODE_USE_SCENE_MODE 13802d5e89778e955b4ff209a93e738761356349d48cZhijun He * @see #CONTROL_MODE_OFF_KEEP_STATE 13815a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 13826c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 13835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_MODE = 13845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.mode", int.class); 13855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 13865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1387fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Control for which scene mode is currently active.</p> 1388fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Scene modes are custom camera modes optimized for a certain set of conditions and 1389fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * capture settings.</p> 1390e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * <p>This is the mode that that is active when 1391e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, 1392e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * these modes will disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, 1393fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.</p> 1394e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * <p>The interpretation and implementation of these scene modes is left 1395e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * to the implementor of the camera device. Their behavior will not be 1396e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * consistent across all devices, and any given device may only implement 1397e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * a subset of these modes.</p> 1398fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1399fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1400fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_DISABLED DISABLED}</li> 1401fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_FACE_PRIORITY FACE_PRIORITY}</li> 1402fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_ACTION ACTION}</li> 1403fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_PORTRAIT PORTRAIT}</li> 1404fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_LANDSCAPE LANDSCAPE}</li> 1405fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_NIGHT NIGHT}</li> 1406fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_NIGHT_PORTRAIT NIGHT_PORTRAIT}</li> 1407fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_THEATRE THEATRE}</li> 1408fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_BEACH BEACH}</li> 1409fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_SNOW SNOW}</li> 1410fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_SUNSET SUNSET}</li> 1411fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_STEADYPHOTO STEADYPHOTO}</li> 1412fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_FIREWORKS FIREWORKS}</li> 1413fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_SPORTS SPORTS}</li> 1414fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_PARTY PARTY}</li> 1415fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_CANDLELIGHT CANDLELIGHT}</li> 1416fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_BARCODE BARCODE}</li> 1417fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO HIGH_SPEED_VIDEO}</li> 1418f4eac129545fd583d33d9e7ab05cc87f61079bb9Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_HDR HDR}</li> 1419fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1420fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1421fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}</p> 14224b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 14230da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1424e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see CaptureRequest#CONTROL_AE_MODE 1425e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see CaptureRequest#CONTROL_AF_MODE 1426e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES 1427e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see CaptureRequest#CONTROL_AWB_MODE 14280da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 1429e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see #CONTROL_SCENE_MODE_DISABLED 14305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_FACE_PRIORITY 14315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_ACTION 14325a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_PORTRAIT 14335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_LANDSCAPE 14345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_NIGHT 14355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT 14365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_THEATRE 14375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_BEACH 14385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_SNOW 14395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_SUNSET 14405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_STEADYPHOTO 14415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_FIREWORKS 14425a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_SPORTS 14435a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_PARTY 14445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_CANDLELIGHT 14455a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_BARCODE 1446e040418f4779c37aa9df69a3916d376af9d2e868Zhijun He * @see #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO 1447f4eac129545fd583d33d9e7ab05cc87f61079bb9Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_HDR 14485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 14496c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 14505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_SCENE_MODE = 14515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.sceneMode", int.class); 14525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 14535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1454ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether video stabilization is 1455b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * active.</p> 1456fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Video stabilization automatically translates and scales images from 1457fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the camera in order to stabilize motion between consecutive frames.</p> 1458ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>If enabled, video stabilization can modify the 145945fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream stabilized.</p> 1460fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Switching between different video stabilization modes may take several 1461fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * frames to initialize, the camera device will report the current mode 1462fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * in capture result metadata. For example, When "ON" mode is requested, 1463fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the video stabilization modes in the first several capture results may 1464fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * still be "OFF", and it will become "ON" when the initialization is 1465fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * done.</p> 1466fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If a camera device supports both this mode and OIS 1467fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may 1468fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * produce undesirable interaction, so it is recommended not to enable 1469fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * both at the same time.</p> 1470fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1471fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1472fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_OFF OFF}</li> 1473fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_ON ON}</li> 1474fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 14754b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 14760da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 147745fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 14780da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 14794793af5e3577c51858719a8977d300c3aafdf881Zhijun He * @see #CONTROL_VIDEO_STABILIZATION_MODE_OFF 14804793af5e3577c51858719a8977d300c3aafdf881Zhijun He * @see #CONTROL_VIDEO_STABILIZATION_MODE_ON 14815a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 14826c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 14834793af5e3577c51858719a8977d300c3aafdf881Zhijun He public static final Key<Integer> CONTROL_VIDEO_STABILIZATION_MODE = 14844793af5e3577c51858719a8977d300c3aafdf881Zhijun He new Key<Integer>("android.control.videoStabilizationMode", int.class); 14855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 14865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1487ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Operation mode for edge 1488cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * enhancement.</p> 1489fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Edge enhancement improves sharpness and details in the captured image. OFF means 1490fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * no enhancement will be applied by the camera device.</p> 14915f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement 14922807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He * will be applied. HIGH_QUALITY mode indicates that the 14935f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * camera device will use the highest-quality enhancement algorithms, 14945f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * even if it slows down capture rate. FAST means the camera device will 14952807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He * not slow down capture rate when applying edge enhancement.</p> 14960e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera 14970e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively. 14980e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * The camera device may adjust its internal noise reduction parameters for best 14990e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * image quality based on the {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}, if it is set.</p> 1500fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1501fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1502fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #EDGE_MODE_OFF OFF}</li> 1503fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #EDGE_MODE_FAST FAST}</li> 1504fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #EDGE_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 1505fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1506fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1507fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}</p> 15084b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 15094b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 15104b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 15114b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 15126dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * 15136dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES 15144b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 15150e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR 15165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #EDGE_MODE_OFF 15175a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #EDGE_MODE_FAST 15185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #EDGE_MODE_HIGH_QUALITY 15195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 15206c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 15215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> EDGE_MODE = 15225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.edge.mode", int.class); 15235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 15245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 152566d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>The desired mode for for the camera device's flash control.</p> 152666d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>This control is only effective when flash unit is available 1527153ac102d36df66853b523ab01763dc457972517Zhijun He * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p> 152866d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF. 152966d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH, 153066d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p> 153166d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When set to OFF, the camera device will not fire flash for this capture.</p> 153266d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When set to SINGLE, the camera device will fire flash regardless of the camera 153366d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * device's auto-exposure routine's result. When used in still capture case, this 1534b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * control should be used along with auto-exposure (AE) precapture metering sequence 153566d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p> 153666d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When set to TORCH, the flash will be on continuously. This mode can be used 153766d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * for use cases such as preview, auto-focus assist, still capture, or video recording.</p> 1538ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * <p>The flash status will be reported by {@link CaptureResult#FLASH_STATE android.flash.state} in the capture result metadata.</p> 1539fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1540fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1541fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #FLASH_MODE_OFF OFF}</li> 1542fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #FLASH_MODE_SINGLE SINGLE}</li> 1543fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #FLASH_MODE_TORCH TORCH}</li> 1544fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 15454b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 154666d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * 154766d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 154866d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 154966d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 1550ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#FLASH_STATE 15515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #FLASH_MODE_OFF 15525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #FLASH_MODE_SINGLE 15535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #FLASH_MODE_TORCH 15545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 15556c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 15565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> FLASH_MODE = 15575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.flash.mode", int.class); 15585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 15595a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1560fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Operational mode for hot pixel correction.</p> 1561eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * <p>Hotpixel correction interpolates out, or otherwise removes, pixels 1562fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * that do not accurately measure the incoming light (i.e. pixels that 1563fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * are stuck at an arbitrary value or are oversensitive).</p> 1564fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1565fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1566fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #HOT_PIXEL_MODE_OFF OFF}</li> 1567fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #HOT_PIXEL_MODE_FAST FAST}</li> 1568fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #HOT_PIXEL_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 1569fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1570fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1571fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}</p> 15724b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 15739d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * 15749d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES 1575eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * @see #HOT_PIXEL_MODE_OFF 1576eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * @see #HOT_PIXEL_MODE_FAST 1577eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * @see #HOT_PIXEL_MODE_HIGH_QUALITY 1578eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk */ 15796c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 1580eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk public static final Key<Integer> HOT_PIXEL_MODE = 1581eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk new Key<Integer>("android.hotPixel.mode", int.class); 1582eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk 1583eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk /** 1584574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * <p>A location object to use when generating image GPS metadata.</p> 1585fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Setting a location object in a request will include the GPS coordinates of the location 1586fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * into any JPEG images captured based on the request. These coordinates can then be 1587fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * viewed by anyone who receives the JPEG image.</p> 15884b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1589574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk */ 15906c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 15916c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @SyntheticKey 1592574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk public static final Key<android.location.Location> JPEG_GPS_LOCATION = 1593574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk new Key<android.location.Location>("android.jpeg.gpsLocation", android.location.Location.class); 1594574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk 1595574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk /** 1596ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>GPS coordinates to include in output JPEG 1597fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * EXIF.</p> 1598fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1599fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (-180 - 180], [-90,90], [-inf, inf]</p> 16004b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1601574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * @hide 16025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 16035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<double[]> JPEG_GPS_COORDINATES = 16045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<double[]>("android.jpeg.gpsCoordinates", double[].class); 16055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 16065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1607ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>32 characters describing GPS algorithm to 1608fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * include in EXIF.</p> 1609fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: UTF-8 null-terminated string</p> 16104b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1611574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * @hide 16125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 16135a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<String> JPEG_GPS_PROCESSING_METHOD = 16145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<String>("android.jpeg.gpsProcessingMethod", String.class); 16155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 16165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1617ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Time GPS fix was made to include in 1618fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * EXIF.</p> 1619fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: UTC in seconds since January 1, 1970</p> 16204b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1621574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * @hide 16225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 16235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Long> JPEG_GPS_TIMESTAMP = 16245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Long>("android.jpeg.gpsTimestamp", long.class); 16255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 16265a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1627fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The orientation for a JPEG image.</p> 1628fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The clockwise rotation angle in degrees, relative to the orientation 1629fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * to the camera, that the JPEG picture needs to be rotated by, to be viewed 1630fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * upright.</p> 1631fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Camera devices may either encode this value into the JPEG EXIF header, or 1632d49ebcc3ad3d37d9c37e638db5d308c9c22c30fbYin-Chia Yeh * rotate the image data to match this orientation. When the image data is rotated, 1633d49ebcc3ad3d37d9c37e638db5d308c9c22c30fbYin-Chia Yeh * the thumbnail data will also be rotated.</p> 1634fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Note that this orientation is relative to the orientation of the camera sensor, given 1635fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.</p> 1636fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>To translate from the device orientation given by the Android sensor APIs, the following 1637fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * sample code may be used:</p> 1638fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) { 1639fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0; 1640fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION); 1641fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1642fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * // Round device orientation to a multiple of 90 1643fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * deviceOrientation = (deviceOrientation + 45) / 90 * 90; 1644fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1645fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * // Reverse device orientation for front-facing cameras 1646fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT; 1647fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * if (facingFront) deviceOrientation = -deviceOrientation; 1648fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1649fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * // Calculate desired JPEG orientation relative to camera orientation to make 1650fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * // the image upright relative to the device orientation 1651fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360; 1652fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1653fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * return jpegOrientation; 1654fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * } 1655fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </code></pre> 1656fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Degrees in multiples of 90</p> 1657fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1658fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0, 90, 180, 270</p> 16594b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1660fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1661fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_ORIENTATION 16625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 16636c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 16645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> JPEG_ORIENTATION = 16655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.jpeg.orientation", int.class); 16665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 16675a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1668ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Compression quality of the final JPEG 1669b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * image.</p> 1670e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>85-95 is typical usage range.</p> 1671fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1672fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1-100; larger is higher quality</p> 16734b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 16745a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 16756c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 16765a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Byte> JPEG_QUALITY = 16775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Byte>("android.jpeg.quality", byte.class); 16785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 16795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1680ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Compression quality of JPEG 1681e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * thumbnail.</p> 1682fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1683fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1-100; larger is higher quality</p> 16844b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 16855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 16866c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 16875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Byte> JPEG_THUMBNAIL_QUALITY = 16885a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Byte>("android.jpeg.thumbnailQuality", byte.class); 16895a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 16905a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1691b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Resolution of embedded JPEG thumbnail.</p> 16925f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail, 16935f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * but the captured JPEG will still be a valid image.</p> 1694fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected 1695fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * should have the same aspect ratio as the main JPEG output.</p> 169650f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect 169750f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * ratio, the camera device creates the thumbnail by cropping it from the primary image. 169850f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has 169950f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to 170050f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * generate the thumbnail image. The thumbnail image will always have a smaller Field 170150f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * Of View (FOV) than the primary image when aspect ratios differ.</p> 1702fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1703fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES android.jpeg.availableThumbnailSizes}</p> 17044b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1705fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1706fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES 17075a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 17086c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 170972f9f0a96e4476ef231d5001cb30521ad4ce5b1eIgor Murashkin public static final Key<android.util.Size> JPEG_THUMBNAIL_SIZE = 171072f9f0a96e4476ef231d5001cb30521ad4ce5b1eIgor Murashkin new Key<android.util.Size>("android.jpeg.thumbnailSize", android.util.Size.class); 17115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 17125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1713fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The desired lens aperture size, as a ratio of lens focal length to the 1714fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * effective aperture diameter.</p> 1715fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Setting this value is only supported on the camera devices that have a variable 1716fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * aperture lens.</p> 1717fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF, 1718fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 1719d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} 1720fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * to achieve manual exposure control.</p> 1721fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * <p>The requested aperture value may take several frames to reach the 1722fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * requested value; the camera device will report the current (intermediate) 1723ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * aperture size in capture result metadata while the aperture is changing. 1724ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * While the aperture is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 1725fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of 1726fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * the ON modes, this will be overridden by the camera device 1727fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * auto-exposure algorithm, the overridden values are then provided 1728fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * back to the user in the corresponding result.</p> 1729fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: The f-number (f/N)</p> 1730fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1731fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}</p> 17324b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 17334b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 17344b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 17354b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1736fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * 1737399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 17384b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1739265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES 1740ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#LENS_STATE 1741265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#SENSOR_EXPOSURE_TIME 1742d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * @see CaptureRequest#SENSOR_FRAME_DURATION 1743265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#SENSOR_SENSITIVITY 17445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 17456c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 17465a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_APERTURE = 17475a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.aperture", float.class); 17485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 17495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1750fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The desired setting for the lens neutral density filter(s).</p> 1751fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This control will not be supported on most camera devices.</p> 1752855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * <p>Lens filters are typically used to lower the amount of light the 1753855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * sensor is exposed to (measured in steps of EV). As used here, an EV 1754855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * step is the standard logarithmic representation, which are 1755855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * non-negative, and inversely proportional to the amount of light 1756855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * hitting the sensor. For example, setting this to 0 would result 1757855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * in no reduction of the incoming light, and setting this to 2 would 1758855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * mean that the filter is set to reduce incoming light by two stops 1759855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * (allowing 1/4 of the prior amount of light to the sensor).</p> 1760ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * <p>It may take several frames before the lens filter density changes 1761ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * to the requested value. While the filter density is still changing, 1762ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 1763fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Exposure Value (EV)</p> 1764fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1765fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}</p> 17664b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 17674b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 17684b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 17694b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1770855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * 17714b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1772855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES 1773ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#LENS_STATE 17745a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 17756c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 17765a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_FILTER_DENSITY = 17775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.filterDensity", float.class); 17785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 17795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1780fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The desired lens focal length; used for optical zoom.</p> 1781a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * <p>This setting controls the physical focal length of the camera 1782a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * device's lens. Changing the focal length changes the field of 1783a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * view of the camera device, and is usually used for optical zoom.</p> 1784a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this 1785a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * setting won't be applied instantaneously, and it may take several 1786ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * frames before the lens can change to the requested focal length. 1787a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will 1788a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * be set to MOVING.</p> 1789fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Optical zoom will not be supported on most devices.</p> 1790fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Millimeters</p> 1791fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1792fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths}</p> 17934b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1794a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * 1795a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * @see CaptureRequest#LENS_APERTURE 1796a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * @see CaptureRequest#LENS_FOCUS_DISTANCE 1797fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS 1798a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * @see CaptureResult#LENS_STATE 17995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 18006c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 18015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_FOCAL_LENGTH = 18025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.focalLength", float.class); 18035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 18045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1805fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Desired distance to plane of sharpest focus, 1806b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * measured from frontmost surface of the lens.</p> 1807fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This control can be used for setting manual focus, on devices that support 1808fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the MANUAL_SENSOR capability and have a variable-focus lens (see 1809fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}).</p> 1810fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>A value of <code>0.0f</code> means infinity focus. The value set will be clamped to 1811fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <code>[0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>.</p> 1812ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * <p>Like {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, this setting won't be applied 1813ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * instantaneously, and it may take several frames before the lens 1814ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * can move to the requested focus distance. While the lens is still moving, 1815ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 18164b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>LEGACY devices support at most setting this to <code>0.0f</code> 18174b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * for infinity focus.</p> 1818fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> 1819fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1820fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * >= 0</p> 18214b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 18224b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 18234b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 18244b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1825ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * 18264b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1827ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureRequest#LENS_FOCAL_LENGTH 1828fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 1829ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 1830ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#LENS_STATE 18315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 18326c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 18335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_FOCUS_DISTANCE = 18345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.focusDistance", float.class); 18355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 18365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 183700849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * <p>Sets whether the camera device uses optical image stabilization (OIS) 183800849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * when capturing images.</p> 1839e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>OIS is used to compensate for motion blur due to small 1840e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * movements of the camera during capture. Unlike digital image 1841e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * stabilization ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), OIS 1842e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * makes use of mechanical elements to stabilize the camera 1843e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * sensor, and thus allows for longer exposure times before 1844e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * camera shake becomes apparent.</p> 184545fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * <p>Switching between different optical stabilization modes may take several 184645fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * frames to initialize, the camera device will report the current mode in 184745fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * capture result metadata. For example, When "ON" mode is requested, the 184845fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * optical stabilization modes in the first several capture results may still 184945fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * be "OFF", and it will become "ON" when the initialization is done.</p> 1850fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If a camera device supports both OIS and digital image stabilization 1851fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), turning both modes on may produce undesirable 1852fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * interaction, so it is recommended not to enable both at the same time.</p> 1853e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>Not all devices will support OIS; see 1854e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization} for 1855e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * available controls.</p> 1856fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1857fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1858fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_OFF OFF}</li> 1859fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_ON ON}</li> 1860fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1861fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1862fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}</p> 18634b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 18644b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Limited capability</b> - 18654b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 18664b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1867e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * 1868e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 18694b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1870e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION 18715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF 18725a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #LENS_OPTICAL_STABILIZATION_MODE_ON 18735a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 18746c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 18755a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE = 18765a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.lens.opticalStabilizationMode", int.class); 18775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 18785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1879e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>Mode of operation for the noise reduction algorithm.</p> 1880fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The noise reduction algorithm attempts to improve image quality by removing 18810e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * excessive noise added by the capture process, especially in dark conditions.</p> 18820e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>OFF means no noise reduction will be applied by the camera device, for both raw and 18830e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * YUV domain.</p> 18840e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove 18850e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF. 18860e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * This mode is optional, may not be support by all devices. The application should check 18870e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} before using it.</p> 18885f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering 18895f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * will be applied. HIGH_QUALITY mode indicates that the camera device 18905f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * will use the highest-quality noise filtering algorithms, 1891e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * even if it slows down capture rate. FAST means the camera device will not 18922807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He * slow down capture rate when applying noise filtering.</p> 18930e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device 18940e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device 18950e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * may adjust the noise reduction parameters for best image quality based on the 18960e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor} if it is set.</p> 1897fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1898fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1899fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #NOISE_REDUCTION_MODE_OFF OFF}</li> 1900fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #NOISE_REDUCTION_MODE_FAST FAST}</li> 1901fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #NOISE_REDUCTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 19020e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <li>{@link #NOISE_REDUCTION_MODE_MINIMAL MINIMAL}</li> 1903fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1904fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1905fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}</p> 19064b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 19074b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 19084b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 19094b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 19106dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * 19114b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 19126dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES 19130e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR 19145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #NOISE_REDUCTION_MODE_OFF 19155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #NOISE_REDUCTION_MODE_FAST 19165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY 19170e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see #NOISE_REDUCTION_MODE_MINIMAL 19185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 19196c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 19205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> NOISE_REDUCTION_MODE = 19215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.noiseReduction.mode", int.class); 19225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 19235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1924ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>An application-specified ID for the current 19255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * request. Must be maintained unchanged in output 1926ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * frame</p> 1927fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: arbitrary integer assigned by application</p> 1928fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1929fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * Any int</p> 19304b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 19315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @hide 19325a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 19335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> REQUEST_ID = 19345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.request.id", int.class); 19355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 19365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1937fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The desired region of the sensor to read out for this capture.</p> 1938fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This control can be used to implement digital zoom.</p> 1939b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The crop region coordinate system is based off 1940b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being the 1941b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * top-left corner of the sensor active array.</p> 1942b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Output streams use this rectangle to produce their output, 1943b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * cropping to a smaller region if necessary to maintain the 1944b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * stream's aspect ratio, then scaling the sensor input to 1945b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * match the output's configured resolution.</p> 1946b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The crop region is applied after the RAW to other color 1947b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * space (e.g. YUV) conversion. Since raw streams 1948b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * (e.g. RAW16) don't have the conversion stage, they are not 1949b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * croppable. The crop region will be ignored by raw streams.</p> 19509e6d1880c288d7d0ddcb651dda88d069f058ecedZhijun He * <p>For non-raw streams, any additional per-stream cropping will 19519e6d1880c288d7d0ddcb651dda88d069f058ecedZhijun He * be done to maximize the final pixel area of the stream.</p> 1952ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>For example, if the crop region is set to a 4:3 aspect 1953b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * ratio, then 4:3 streams will use the exact crop 1954b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * region. 16:9 streams will further crop vertically 1955ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * (letterbox).</p> 1956ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Conversely, if the crop region is set to a 16:9, then 4:3 1957b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * outputs will crop horizontally (pillarbox), and 16:9 1958b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * streams will match exactly. These additional crops will 1959ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * be centered within the crop region.</p> 1960b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The width and height of the crop region cannot 1961b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * be set to be smaller than 1962b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <code>floor( activeArraySize.width / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code> and 1963b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <code>floor( activeArraySize.height / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>, respectively.</p> 1964b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The camera device may adjust the crop region to account 1965b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * for rounding and other hardware requirements; the final 1966b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * crop region used will be included in the output capture 1967b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * result.</p> 1968fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Pixel coordinates relative to 1969fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 19704b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1971d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * 1972d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM 1973b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 19745a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 19756c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 19765a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<android.graphics.Rect> SCALER_CROP_REGION = 19775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class); 19785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 19795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1980ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Duration each pixel is exposed to 1981ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * light.</p> 1982fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If the sensor can't expose this exact duration, it will shorten the 1983fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * duration exposed to the nearest possible value (rather than expose longer). 1984fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * The final exposure time used will be available in the output capture result.</p> 1985fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to 1986fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * OFF; otherwise the auto-exposure algorithm will override this value.</p> 1987fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Nanoseconds</p> 1988fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1989fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</p> 19904b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 19914b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 19924b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 19934b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 19944b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * 1995fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureRequest#CONTROL_AE_MODE 1996fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 19974b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1998fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE 19995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 20006c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 20015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Long> SENSOR_EXPOSURE_TIME = 20025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Long>("android.sensor.exposureTime", long.class); 20035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 20045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2005ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Duration from start of frame exposure to 2006143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * start of next frame exposure.</p> 2007143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>The maximum frame rate that can be supported by a camera subsystem is 2008143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * a function of many factors:</p> 2009143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <ul> 2010143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Requested resolutions of output image streams</li> 2011143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Availability of binning / skipping modes on the imager</li> 2012143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>The bandwidth of the imager interface</li> 2013143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>The bandwidth of the various ISP processing blocks</li> 2014143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * </ul> 2015143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>Since these factors can vary greatly between different ISPs and 2016143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * sensors, the camera abstraction tries to represent the bandwidth 2017143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * restrictions with as simple a model as possible.</p> 2018143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>The model presented has the following characteristics:</p> 2019143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <ul> 2020143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>The image sensor is always configured to output the smallest 2021143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * resolution possible given the application's requested output stream 2022143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * sizes. The smallest resolution is defined as being at least as large 2023143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * as the largest requested output stream size; the camera pipeline must 2024143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * never digitally upsample sensor data when the crop region covers the 2025143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * whole sensor. In general, this means that if only small output stream 2026143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * resolutions are configured, the sensor can provide a higher frame 2027143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * rate.</li> 2028143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Since any request may use any or all the currently configured 2029143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * output streams, the sensor and ISP must be configured to support 2030143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * scaling a single capture to all the streams at the same time. This 2031143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * means the camera pipeline must be ready to produce the largest 2032143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * requested output size without any delay. Therefore, the overall 2033143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * frame rate of a given configured stream set is governed only by the 2034143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * largest requested stream resolution.</li> 2035143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Using more than one output stream in a request does not affect the 2036143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * frame duration.</li> 2037a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <li>Certain format-streams may need to do additional background processing 2038a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * before data is consumed/produced by that stream. These processors 2039a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * can run concurrently to the rest of the camera pipeline, but 2040a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * cannot process more than 1 capture at a time.</li> 2041143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * </ul> 2042143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>The necessary information for the application, given the model above, 2043b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * is provided via the {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} field using 2044b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }. 2045143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * These are used to determine the maximum frame rate / minimum frame 2046143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * duration that is possible for a given stream configuration.</p> 2047143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>Specifically, the application can use the following rules to 2048a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * determine the minimum frame duration it can request from the camera 2049143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * device:</p> 2050143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <ol> 2051a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <li>Let the set of currently configured input/output streams 2052a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * be called <code>S</code>.</li> 2053b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * <li>Find the minimum frame durations for each stream in <code>S</code>, by looking 2054b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * it up in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} using {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration } 2055b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * (with its respective size/format). Let this set of frame durations be 2056b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * called <code>F</code>.</li> 2057a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <li>For any given request <code>R</code>, the minimum frame duration allowed 2058a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * for <code>R</code> is the maximum out of all values in <code>F</code>. Let the streams 2059a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * used in <code>R</code> be called <code>S_r</code>.</li> 2060143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * </ol> 2061b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * <p>If none of the streams in <code>S_r</code> have a stall time (listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration } 2062b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * using its respective size/format), then the frame duration in <code>F</code> 2063b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * determines the steady state frame rate that the application will get 2064b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * if it uses <code>R</code> as a repeating request. Let this special kind of 2065b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * request be called <code>Rsimple</code>.</p> 2066a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved 2067a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * by a single capture of a new request <code>Rstall</code> (which has at least 2068a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * one in-use stream with a non-0 stall time) and if <code>Rstall</code> has the 2069a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * same minimum frame duration this will not cause a frame rate loss 2070a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * if all buffers from the previous <code>Rstall</code> have already been 2071a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * delivered.</p> 2072a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <p>For more details about stalling, see 2073b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }.</p> 2074fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This control is only effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} is set to 2075fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * OFF; otherwise the auto-exposure algorithm will override this value.</p> 2076fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Nanoseconds</p> 2077fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2078fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * See {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}, 2079fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}. The duration 2080fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * is capped to <code>max(duration, exposureTime + overhead)</code>.</p> 20814b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 20824b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 20834b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 20844b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2085143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * 2086fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureRequest#CONTROL_AE_MODE 2087fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 20884b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 20899c595174ccaaf3d36315c4a100e47ee4369073f6Igor Murashkin * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 2090fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION 20915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 20926c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 20935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Long> SENSOR_FRAME_DURATION = 20945a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Long>("android.sensor.frameDuration", long.class); 20955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 20965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2097b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The amount of gain applied to sensor data 2098b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * before processing.</p> 2099b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The sensitivity is the standard ISO sensitivity value, 2100b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * as defined in ISO 12232:2006.</p> 2101b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The sensitivity must be within {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}, and 2102b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * if if it less than {@link CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY android.sensor.maxAnalogSensitivity}, the camera device 2103b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * is guaranteed to use only analog amplification for applying the gain.</p> 2104b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>If the camera device cannot apply the exact sensitivity 2105b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * requested, it will reduce the gain to the nearest supported 2106b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * value. The final sensitivity used will be available in the 2107b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * output capture result.</p> 2108fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: ISO arithmetic units</p> 2109fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2110fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</p> 21114b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 21124b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 21134b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 21144b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2115b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * 21164b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2117b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE 2118b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY 21195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 21206c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 21215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> SENSOR_SENSITIVITY = 21225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.sensor.sensitivity", int.class); 21235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 21245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2125c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern 2126c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p> 2127c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>Each color channel is treated as an unsigned 32-bit integer. 2128c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * The camera device then uses the most significant X bits 2129c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * that correspond to how many bits are in its Bayer raw sensor 2130c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * output.</p> 2131c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>For example, a sensor with RAW10 Bayer output would use the 2132c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * 10 most significant bits from each color channel.</p> 2133c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2134c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * 2135c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 2136c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin */ 21376c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 2138c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin public static final Key<int[]> SENSOR_TEST_PATTERN_DATA = 2139c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin new Key<int[]>("android.sensor.testPatternData", int[].class); 2140c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin 2141c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin /** 2142c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>When enabled, the sensor sends a test pattern instead of 2143c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * doing a real exposure from the camera.</p> 2144c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>When a test pattern is enabled, all manual sensor controls specified 2145e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * by android.sensor.* will be ignored. All other controls should 2146c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * work as normal.</p> 2147c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>For example, if manual flash is enabled, flash firing should still 2148c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * occur (and that the test pattern remain unmodified, since the flash 2149c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * would not actually affect it).</p> 2150fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Defaults to OFF.</p> 2151fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2152fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2153fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_OFF OFF}</li> 2154fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR SOLID_COLOR}</li> 2155fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS COLOR_BARS}</li> 2156fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY COLOR_BARS_FADE_TO_GRAY}</li> 2157fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_PN9 PN9}</li> 2158fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_CUSTOM1 CUSTOM1}</li> 2159fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2160fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 2161fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</p> 2162c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2163fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 2164fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES 2165c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_OFF 2166c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR 2167c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS 2168c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY 2169c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_PN9 2170c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1 2171c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin */ 21726c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 2173c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin public static final Key<Integer> SENSOR_TEST_PATTERN_MODE = 2174c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin new Key<Integer>("android.sensor.testPatternMode", int.class); 2175c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin 2176c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin /** 2177ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * <p>Quality of lens shading correction applied 2178ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * to the image data.</p> 2179ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * <p>When set to OFF mode, no lens shading correction will be applied by the 2180ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * camera device, and an identity lens shading map data will be provided 2181ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens 2182fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * shading map with size of <code>[ 4, 3 ]</code>, 2183fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the output {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap} for this case will be an identity 2184fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * map shown below:</p> 2185ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * <pre><code>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2186fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2187fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2188fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2189fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2190fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] 2191ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * </code></pre> 2192fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>When set to other modes, lens shading correction will be applied by the camera 2193fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * device. Applications can request lens shading map data by setting 2194fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide lens 2195fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap}; the returned shading map 2196fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * data will be the one applied by the camera device for this capture request.</p> 2197fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore 2198fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and 2199fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * AWB are in AUTO modes({@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF and {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} <code>!=</code> 2200fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * OFF), to get best results, it is recommended that the applications wait for the AE and AWB 2201fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * to be converged before using the returned shading map data.</p> 2202fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2203fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2204fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SHADING_MODE_OFF OFF}</li> 2205fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SHADING_MODE_FAST FAST}</li> 2206fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SHADING_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 2207fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2208e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * <p><b>Available values for this device:</b><br> 2209e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * {@link CameraCharacteristics#SHADING_AVAILABLE_MODES android.shading.availableModes}</p> 22104b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 22114b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 22124b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 22134b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2214ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * 2215fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 2216fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * @see CaptureRequest#CONTROL_AWB_MODE 22174b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2218e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * @see CameraCharacteristics#SHADING_AVAILABLE_MODES 2219fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP 2220ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 2221ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see #SHADING_MODE_OFF 2222ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see #SHADING_MODE_FAST 2223ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see #SHADING_MODE_HIGH_QUALITY 2224ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He */ 22256c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 2226ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He public static final Key<Integer> SHADING_MODE = 2227ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He new Key<Integer>("android.shading.mode", int.class); 2228ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He 2229ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He /** 2230fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Operating mode for the face detector 2231b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * unit.</p> 2232ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether face detection is enabled, and whether it 22335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * should output just the basic fields or the full set of 2234fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * fields.</p> 2235fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2236fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2237fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #STATISTICS_FACE_DETECT_MODE_OFF OFF}</li> 2238fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #STATISTICS_FACE_DETECT_MODE_SIMPLE SIMPLE}</li> 2239fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #STATISTICS_FACE_DETECT_MODE_FULL FULL}</li> 2240fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2241fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 2242fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}</p> 2243fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This key is available on all devices.</p> 22440da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 22450da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES 22465a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #STATISTICS_FACE_DETECT_MODE_OFF 22475a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE 22485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #STATISTICS_FACE_DETECT_MODE_FULL 22495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 22506c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 22515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> STATISTICS_FACE_DETECT_MODE = 22525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.statistics.faceDetectMode", int.class); 22535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 22545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2255fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Operating mode for hot pixel map generation.</p> 2256fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If set to <code>true</code>, a hot pixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}. 2257fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * If set to <code>false</code>, no hot pixel map will be returned.</p> 2258fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2259fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}</p> 22604b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 22619d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * 22629d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP 22639d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES 22649d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk */ 22656c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 22669d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE = 22679d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class); 22689d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk 22699d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk /** 2270cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * <p>Whether the camera device will output the lens 2271cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * shading map in output result metadata.</p> 2272ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>When set to ON, 2273e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * android.statistics.lensShadingMap will be provided in 22747a9b30e9e3e45d387d2fc0cb2bd2eb79da7dd268Igor Murashkin * the output result metadata.</p> 2275fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>ON is always supported on devices with the RAW capability.</p> 2276fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2277fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2278fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_OFF OFF}</li> 2279fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_ON ON}</li> 2280fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2281e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * <p><b>Available values for this device:</b><br> 2282e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES android.statistics.info.availableLensShadingMapModes}</p> 22834b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 22844b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 22854b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 22864b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 22874b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * 22884b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2289e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES 2290d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF 2291d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON 2292d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala */ 22936c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 2294d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE = 2295d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala new Key<Integer>("android.statistics.lensShadingMapMode", int.class); 2296d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala 2297d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala /** 2298ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Tonemapping / contrast / gamma curve for the blue 2299e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2300e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 23018490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>See android.tonemap.curveRed for more details.</p> 23024b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 23034b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 23044b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 23054b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 23060da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 23074b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 23085f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#TONEMAP_MODE 23098490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @hide 23105a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 23113ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He public static final Key<float[]> TONEMAP_CURVE_BLUE = 23123ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He new Key<float[]>("android.tonemap.curveBlue", float[].class); 23135a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 23145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2315ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Tonemapping / contrast / gamma curve for the green 2316e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2317e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 23188490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>See android.tonemap.curveRed for more details.</p> 23194b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 23204b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 23214b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 23224b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 23230da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 23244b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 23255f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#TONEMAP_MODE 23268490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @hide 23275a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 23283ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He public static final Key<float[]> TONEMAP_CURVE_GREEN = 23293ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He new Key<float[]>("android.tonemap.curveGreen", float[].class); 23305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 23315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2332ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Tonemapping / contrast / gamma curve for the red 2333e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2334e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 2335e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Each channel's curve is defined by an array of control points:</p> 23368490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = 2337fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ] 2338870922be2399766078d0a4e42a0158ecb9eb1f86Zhijun He * 2 <= N <= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre> 2339fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>These are sorted in order of increasing <code>Pin</code>; it is 2340fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * required that input values 0.0 and 1.0 are included in the list to 2341e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * define a complete mapping. For input values between control points, 2342e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * the camera device must linearly interpolate between the control 2343e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * points.</p> 2344e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Each curve can have an independent number of points, and the number 2345e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * of points can be less than max (that is, the request doesn't have to 2346e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * always provide a curve with number of points equivalent to 2347e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p> 2348e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>A few examples, and their corresponding graphical mappings; these 2349e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * only specify the red channel and the precision is limited to 4 2350e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * digits, for conciseness.</p> 2351e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Linear mapping:</p> 23528490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 0, 0, 1.0, 1.0 ] 2353e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 2354e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p> 2355e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Invert mapping:</p> 23568490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 0, 1.0, 1.0, 0 ] 2357e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 2358e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p> 2359e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Gamma 1/2.2 mapping, with 16 control points:</p> 23608490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 2361fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812, 2362fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072, 2363fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685, 2364fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ] 2365e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 2366e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p> 2367e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p> 23688490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 2369fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845, 2370fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130, 2371fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721, 2372fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ] 2373e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 2374e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 2375fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2376fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0-1 on both input and output coordinates, normalized 2377fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * as a floating-point value such that 0 == black and 1 == white.</p> 23784b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 23794b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 23804b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 23814b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 23820da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 23834b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2384e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS 23850da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#TONEMAP_MODE 23868490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @hide 23875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 23885a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<float[]> TONEMAP_CURVE_RED = 23895a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<float[]>("android.tonemap.curveRed", float[].class); 23905a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 23915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 23928490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Tonemapping / contrast / gamma curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} 23938490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * is CONTRAST_CURVE.</p> 23948490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>The tonemapCurve consist of three curves for each of red, green, and blue 23958490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * channels respectively. The following example uses the red channel as an 23968490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * example. The same logic applies to green and blue channel. 23978490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * Each channel's curve is defined by an array of control points:</p> 23988490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = 2399fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ] 24008490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * 2 <= N <= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre> 24018490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>These are sorted in order of increasing <code>Pin</code>; it is always 24028490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * guaranteed that input values 0.0 and 1.0 are included in the list to 24038490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * define a complete mapping. For input values between control points, 24048490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * the camera device must linearly interpolate between the control 24058490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * points.</p> 24068490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Each curve can have an independent number of points, and the number 24078490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * of points can be less than max (that is, the request doesn't have to 24088490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * always provide a curve with number of points equivalent to 24098490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p> 24108490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>A few examples, and their corresponding graphical mappings; these 24118490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * only specify the red channel and the precision is limited to 4 24128490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * digits, for conciseness.</p> 24138490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Linear mapping:</p> 24148490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ (0, 0), (1.0, 1.0) ] 24158490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 24168490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p> 24178490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Invert mapping:</p> 24188490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ (0, 1.0), (1.0, 0) ] 24198490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 24208490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p> 24218490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Gamma 1/2.2 mapping, with 16 control points:</p> 24228490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ 2423fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812), 2424fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072), 2425fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685), 2426fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ] 24278490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 24288490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p> 24298490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p> 24308490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ 2431fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845), 2432fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130), 2433fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721), 2434fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ] 24358490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 24368490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 24374b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 24384b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 24394b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 24404b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 24418490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * 24424b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 24438490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS 24448490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @see CaptureRequest#TONEMAP_MODE 24458490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh */ 24466c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 24476c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @SyntheticKey 24488490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh public static final Key<android.hardware.camera2.params.TonemapCurve> TONEMAP_CURVE = 24498490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh new Key<android.hardware.camera2.params.TonemapCurve>("android.tonemap.curve", android.hardware.camera2.params.TonemapCurve.class); 24508490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh 24518490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh /** 2452e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>High-level global contrast/gamma/tonemapping control.</p> 2453e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>When switching to an application-defined contrast curve by setting 2454e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined 2455e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * per-channel with a set of <code>(in, out)</code> points that specify the 2456e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * mapping from input high-bit-depth pixel value to the output 2457e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * low-bit-depth value. Since the actual pixel ranges of both input 2458e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * and output may change depending on the camera pipeline, the values 2459e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * are specified by normalized floating-point numbers.</p> 2460e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>More-complex color mapping operations such as 3D color look-up 2461e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * tables, selective chroma enhancement, or other non-linear color 2462e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2463e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 2464e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>When using either FAST or HIGH_QUALITY, the camera device will 24658490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}. 2466e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * These values are always available, and as close as possible to the 2467e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * actually used nonlinear/nonglobal transforms.</p> 2468fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * <p>If a request is sent with CONTRAST_CURVE with the camera device's 2469e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be 2470e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * roughly the same.</p> 2471fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2472fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2473fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #TONEMAP_MODE_CONTRAST_CURVE CONTRAST_CURVE}</li> 2474fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #TONEMAP_MODE_FAST FAST}</li> 2475fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #TONEMAP_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 2476956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <li>{@link #TONEMAP_MODE_GAMMA_VALUE GAMMA_VALUE}</li> 2477956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <li>{@link #TONEMAP_MODE_PRESET_CURVE PRESET_CURVE}</li> 2478fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2479fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 2480fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}</p> 24814b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 24824b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 24834b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 24844b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 24853242f4fb19b77bcd2435cbe710188d012d08b005Igor Murashkin * 24864b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 24876dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES 24888490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @see CaptureRequest#TONEMAP_CURVE 2489e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * @see CaptureRequest#TONEMAP_MODE 24905a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #TONEMAP_MODE_CONTRAST_CURVE 24915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #TONEMAP_MODE_FAST 24925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #TONEMAP_MODE_HIGH_QUALITY 2493956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see #TONEMAP_MODE_GAMMA_VALUE 2494956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see #TONEMAP_MODE_PRESET_CURVE 24955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 24966c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 24975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> TONEMAP_MODE = 24985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.tonemap.mode", int.class); 24995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 25005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2501956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2502956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * GAMMA_VALUE</p> 2503956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>The tonemap curve will be defined the following formula: 2504956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * * OUT = pow(IN, 1.0 / gamma) 2505956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * where IN and OUT is the input pixel value scaled to range [0.0, 1.0], 2506956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * pow is the power function and gamma is the gamma value specified by this 2507956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * key.</p> 2508956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>The same curve will be applied to all color channels. The camera device 2509956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * may clip the input gamma value to its supported range. The actual applied 2510956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * value will be returned in capture result.</p> 2511956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>The valid range of gamma value varies on different devices, but values 2512956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * within [1.0, 5.0] are guaranteed not to be clipped.</p> 2513956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2514956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * 2515956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see CaptureRequest#TONEMAP_MODE 2516956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh */ 2517956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh @PublicKey 2518956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh public static final Key<Float> TONEMAP_GAMMA = 2519956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh new Key<Float>("android.tonemap.gamma", float.class); 2520956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh 2521956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh /** 2522956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2523956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * PRESET_CURVE</p> 2524956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>The tonemap curve will be defined by specified standard.</p> 2525956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>sRGB (approximated by 16 control points):</p> 2526956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 2527956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>Rec. 709 (approximated by 16 control points):</p> 2528956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p><img alt="Rec. 709 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png" /></p> 2529956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>Note that above figures show a 16 control points approximation of preset 2530956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * curves. Camera devices may apply a different approximation to the curve.</p> 2531956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p><b>Possible values:</b> 2532956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <ul> 2533956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <li>{@link #TONEMAP_PRESET_CURVE_SRGB SRGB}</li> 2534956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <li>{@link #TONEMAP_PRESET_CURVE_REC709 REC709}</li> 2535956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * </ul></p> 2536956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2537956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * 2538956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see CaptureRequest#TONEMAP_MODE 2539956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see #TONEMAP_PRESET_CURVE_SRGB 2540956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see #TONEMAP_PRESET_CURVE_REC709 2541956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh */ 2542956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh @PublicKey 2543956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh public static final Key<Integer> TONEMAP_PRESET_CURVE = 2544956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh new Key<Integer>("android.tonemap.presetCurve", int.class); 2545956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh 2546956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh /** 2547ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>This LED is nominally used to indicate to the user 25485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * that the camera is powered on and may be streaming images back to the 25495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * Application Processor. In certain rare circumstances, the OS may 25505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * disable this when video is processed locally and not transmitted to 2551ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * any untrusted applications.</p> 2552ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>In particular, the LED <em>must</em> always be on when the data could be 2553ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * transmitted off the device. The LED <em>should</em> always be on whenever 2554ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * data is stored locally on the device.</p> 2555ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The LED <em>may</em> be off if a trusted application is using the data that 2556ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * doesn't violate the above rules.</p> 25574b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 25585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @hide 25595a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 25605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> LED_TRANSMIT = 25615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.led.transmit", boolean.class); 25625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 25635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2564ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether black-level compensation is locked 25650956af56a294397325f2695604229ab7550364caEino-Ville Talvala * to its current values, or is free to vary.</p> 2566fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>When set to <code>true</code> (ON), the values used for black-level 25670956af56a294397325f2695604229ab7550364caEino-Ville Talvala * compensation will not change until the lock is set to 2568fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <code>false</code> (OFF).</p> 2569ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Since changes to certain capture parameters (such as 25705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * exposure time) may require resetting of black level 25710956af56a294397325f2695604229ab7550364caEino-Ville Talvala * compensation, the camera device must report whether setting 25720956af56a294397325f2695604229ab7550364caEino-Ville Talvala * the black level lock was successful in the output result 2573ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * metadata.</p> 2574ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>For example, if a sequence of requests is as follows:</p> 2575ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <ul> 2576ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 1: Exposure = 10ms, Black level lock = OFF</li> 2577ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 2: Exposure = 10ms, Black level lock = ON</li> 2578ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 3: Exposure = 10ms, Black level lock = ON</li> 2579ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 4: Exposure = 20ms, Black level lock = ON</li> 2580ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 5: Exposure = 20ms, Black level lock = ON</li> 2581ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 6: Exposure = 20ms, Black level lock = ON</li> 2582ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * </ul> 25830956af56a294397325f2695604229ab7550364caEino-Ville Talvala * <p>And the exposure change in Request 4 requires the camera 25840956af56a294397325f2695604229ab7550364caEino-Ville Talvala * device to reset the black level offsets, then the output 25850956af56a294397325f2695604229ab7550364caEino-Ville Talvala * result metadata is expected to be:</p> 2586ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <ul> 2587ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 1: Exposure = 10ms, Black level lock = OFF</li> 2588ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 2: Exposure = 10ms, Black level lock = ON</li> 2589ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 3: Exposure = 10ms, Black level lock = ON</li> 2590ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 4: Exposure = 20ms, Black level lock = OFF</li> 2591ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 5: Exposure = 20ms, Black level lock = ON</li> 2592ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 6: Exposure = 20ms, Black level lock = ON</li> 2593ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * </ul> 25940956af56a294397325f2695604229ab7550364caEino-Ville Talvala * <p>This indicates to the application that on frame 4, black 25950956af56a294397325f2695604229ab7550364caEino-Ville Talvala * levels were reset due to exposure value changes, and pixel 25960956af56a294397325f2695604229ab7550364caEino-Ville Talvala * values may not be consistent across captures.</p> 25970956af56a294397325f2695604229ab7550364caEino-Ville Talvala * <p>The camera device will maintain the lock to the extent 25980956af56a294397325f2695604229ab7550364caEino-Ville Talvala * possible, only overriding the lock to OFF when changes to 25990956af56a294397325f2695604229ab7550364caEino-Ville Talvala * other request parameters require a black level recalculation 26000956af56a294397325f2695604229ab7550364caEino-Ville Talvala * or reset.</p> 26014b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 26024b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 26034b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 26044b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 26054b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * 26064b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 26075a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 26086c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 26095a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> BLACK_LEVEL_LOCK = 26105a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.blackLevel.lock", boolean.class); 26115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 26120e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He /** 26130e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>The amount of exposure time increase factor applied to the original output 26140e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * frame by the application processing before sending for reprocessing.</p> 26150e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>This is optional, and will be supported if the camera device supports YUV_REPROCESSING 26160e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains YUV_REPROCESSING).</p> 26170e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>For some YUV reprocessing use cases, the application may choose to filter the original 26180e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * output frames to effectively reduce the noise to the same level as a frame that was 26190e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * captured with longer exposure time. To be more specific, assuming the original captured 26200e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * images were captured with a sensitivity of S and an exposure time of T, the model in 26210e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * the camera device is that the amount of noise in the image would be approximately what 26220e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * would be expected if the original capture parameters had been a sensitivity of 26230e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * S/effectiveExposureFactor and an exposure time of T*effectiveExposureFactor, rather 26240e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * than S and T respectively. If the captured images were processed by the application 26250e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * before being sent for reprocessing, then the application may have used image processing 26260e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * algorithms and/or multi-frame image fusion to reduce the noise in the 26270e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * application-processed images (input images). By using the effectiveExposureFactor 26280e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * control, the application can communicate to the camera device the actual noise level 26290e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * improvement in the application-processed image. With this information, the camera 26300e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * device can select appropriate noise reduction and edge enhancement parameters to avoid 26310e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * excessive noise reduction ({@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}) and insufficient edge 26320e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * enhancement ({@link CaptureRequest#EDGE_MODE android.edge.mode}) being applied to the reprocessed frames.</p> 26330e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>For example, for multi-frame image fusion use case, the application may fuse 26340e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * multiple output frames together to a final frame for reprocessing. When N image are 26350e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * fused into 1 image for reprocessing, the exposure time increase factor could be up to 26360e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * square root of N (based on a simple photon shot noise model). The camera device will 26370e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * adjust the reprocessing noise reduction and edge enhancement parameters accordingly to 26380e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * produce the best quality images.</p> 26390e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>This is relative factor, 1.0 indicates the application hasn't processed the input 26400e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * buffer in a way that affects its effective exposure time.</p> 26410e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>This control is only effective for YUV reprocessing capture request. For noise 26420e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * reduction reprocessing, it is only effective when <code>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} != OFF</code>. 26430e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * Similarly, for edge enhancement reprocessing, it is only effective when 26440e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <code>{@link CaptureRequest#EDGE_MODE android.edge.mode} != OFF</code>.</p> 26450e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p><b>Units</b>: Relative exposure time increase factor.</p> 26460e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p><b>Range of valid values:</b><br> 26470e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * >= 1.0</p> 26480e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2649513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * <p><b>Limited capability</b> - 2650513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2651513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 26520e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * 26530e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see CaptureRequest#EDGE_MODE 2654513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 26550e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see CaptureRequest#NOISE_REDUCTION_MODE 26560e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 26570e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He */ 26580e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He @PublicKey 26590e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He public static final Key<Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR = 26600e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He new Key<Float>("android.reprocess.effectiveExposureFactor", float.class); 26610e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He 26625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 26635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * End generated code 26645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 26656c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin 26664b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin 26674b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin 26685a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala} 2669