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 198b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvalaimport android.annotation.NonNull; 208b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvalaimport android.annotation.Nullable; 2170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvalaimport android.hardware.camera2.impl.CameraMetadataNative; 226c76f58f31635c19c14ae161f96dad2082537860Igor Murashkinimport android.hardware.camera2.impl.PublicKey; 236c76f58f31635c19c14ae161f96dad2082537860Igor Murashkinimport android.hardware.camera2.impl.SyntheticKey; 245776aafc7e70c0b79c4bee2bc50f44121b37c962Ruben Brunkimport android.hardware.camera2.utils.HashCodeHelpers; 25d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkinimport android.hardware.camera2.utils.TypeReference; 2670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport android.os.Parcel; 2770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport android.os.Parcelable; 28b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvalaimport android.view.Surface; 29b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 30feb50af361e4305a25758966b6b5df2738c00259Ruben Brunkimport java.util.Collection; 31feb50af361e4305a25758966b6b5df2738c00259Ruben Brunkimport java.util.Collections; 3270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport java.util.HashSet; 33d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkinimport java.util.List; 346bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkinimport java.util.Objects; 35b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 36b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 37b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala/** 3870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>An immutable package of settings and outputs needed to capture a single 3970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * image from the camera device.</p> 40b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 41b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>Contains the configuration for the capture hardware (sensor, lens, flash), 4270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * the processing pipeline, the control algorithms, and the output buffers. Also 4370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * contains the list of target Surfaces to send image data to for this 4470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * capture.</p> 45b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 4670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>CaptureRequests can be created by using a {@link Builder} instance, 4770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * obtained by calling {@link CameraDevice#createCaptureRequest}</p> 48b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 49b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>CaptureRequests are given to {@link CameraCaptureSession#capture} or 50b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * {@link CameraCaptureSession#setRepeatingRequest} to capture images from a camera.</p> 51b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 52b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>Each request can specify a different subset of target Surfaces for the 53b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * camera to send the captured data to. All the surfaces used in a request must 54b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * be part of the surface list given to the last call to 55b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * {@link CameraDevice#createCaptureSession}, when the request is submitted to the 56b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * session.</p> 57b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 58b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>For example, a request meant for repeating preview might only include the 59b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Surface for the preview SurfaceView or SurfaceTexture, while a 60b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * high-resolution still capture would also include a Surface from a ImageReader 61b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * configured for high-resolution JPEG images.</p> 62b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * 630aa2bdeaa0c5c6f7691b73932241073fb984af15Eino-Ville Talvala * <p>A reprocess capture request allows a previously-captured image from the camera device to be 640aa2bdeaa0c5c6f7691b73932241073fb984af15Eino-Ville Talvala * sent back to the device for further processing. It can be created with 65bd7f34f151c4dafec90d92b9375708904a6b0732Eino-Ville Talvala * {@link CameraDevice#createReprocessCaptureRequest}, and used with a reprocessable capture session 660aa2bdeaa0c5c6f7691b73932241073fb984af15Eino-Ville Talvala * created with {@link CameraDevice#createReprocessableCaptureSession}.</p> 670aa2bdeaa0c5c6f7691b73932241073fb984af15Eino-Ville Talvala * 680aa2bdeaa0c5c6f7691b73932241073fb984af15Eino-Ville Talvala * @see CameraCaptureSession#capture 690aa2bdeaa0c5c6f7691b73932241073fb984af15Eino-Ville Talvala * @see CameraCaptureSession#setRepeatingRequest 700aa2bdeaa0c5c6f7691b73932241073fb984af15Eino-Ville Talvala * @see CameraCaptureSession#captureBurst 710aa2bdeaa0c5c6f7691b73932241073fb984af15Eino-Ville Talvala * @see CameraCaptureSession#setRepeatingBurst 7270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see CameraDevice#createCaptureRequest 730aa2bdeaa0c5c6f7691b73932241073fb984af15Eino-Ville Talvala * @see CameraDevice#createReprocessCaptureRequest 74b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */ 75d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkinpublic final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>> 76d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin implements Parcelable { 77d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 78d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 79d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * A {@code Key} is used to do capture request field lookups with 80d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@link CaptureResult#get} or to set fields with 81d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@link CaptureRequest.Builder#set(Key, Object)}. 82d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 83d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>For example, to set the crop rectangle for the next capture: 84d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <code><pre> 85d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Rect cropRectangle = new Rect(0, 0, 640, 480); 86d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * captureRequestBuilder.set(SCALER_CROP_REGION, cropRectangle); 87d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * </pre></code> 88d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * </p> 89d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 90d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>To enumerate over all possible keys for {@link CaptureResult}, see 91d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@link CameraCharacteristics#getAvailableCaptureResultKeys}.</p> 92d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 93d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @see CaptureResult#get 94d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @see CameraCharacteristics#getAvailableCaptureResultKeys 95d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 96d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public final static class Key<T> { 97d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin private final CameraMetadataNative.Key<T> mKey; 98d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 99d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 100d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Visible for testing and vendor extensions only. 101d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 102d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 103d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 104de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev public Key(String name, Class<T> type, long vendorId) { 105de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev mKey = new CameraMetadataNative.Key<T>(name, type, vendorId); 106de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev } 107de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev 108de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev /** 109de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev * Visible for testing and vendor extensions only. 110de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev * 111de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev * @hide 112de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev */ 113d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public Key(String name, Class<T> type) { 114d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mKey = new CameraMetadataNative.Key<T>(name, type); 115d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 116d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 117d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 118d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Visible for testing and vendor extensions only. 119d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 120d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 121d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 122d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public Key(String name, TypeReference<T> typeReference) { 123d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mKey = new CameraMetadataNative.Key<T>(name, typeReference); 124d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 125d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 126d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 127d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Return a camelCase, period separated name formatted like: 128d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@code "root.section[.subsections].name"}. 129d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 130d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>Built-in keys exposed by the Android SDK are always prefixed with {@code "android."}; 131d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * keys that are device/platform-specific are prefixed with {@code "com."}.</p> 132d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 133d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>For example, {@code CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP} would 134d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * have a name of {@code "android.scaler.streamConfigurationMap"}; whereas a device 135d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * specific key might look like {@code "com.google.nexus.data.private"}.</p> 136d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 137d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @return String representation of the key name 138d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 1398b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvala @NonNull 140d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public String getName() { 141d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return mKey.getName(); 142d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 143d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 144d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 145de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev * Return vendor tag id. 146de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev * 147de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev * @hide 148de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev */ 149de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev public long getVendorId() { 150de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev return mKey.getVendorId(); 151de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev } 152de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev 153de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev /** 154d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 155d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 156d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 157d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public final int hashCode() { 158d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return mKey.hashCode(); 159d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 160d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 161d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 162d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 163d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 164d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings("unchecked") 165d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 166d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public final boolean equals(Object o) { 167d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return o instanceof Key && ((Key<T>)o).mKey.equals(mKey); 168d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 169d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 170d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 17112a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen * Return this {@link Key} as a string representation. 17212a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen * 17312a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen * <p>{@code "CaptureRequest.Key(%s)"}, where {@code %s} represents 17412a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen * the name of this key as returned by {@link #getName}.</p> 17512a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen * 17612a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen * @return string representation of {@link Key} 17712a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen */ 17812a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen @NonNull 17912a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen @Override 18012a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen public String toString() { 18112a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen return String.format("CaptureRequest.Key(%s)", mKey.getName()); 18212a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen } 18312a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen 18412a8385b7e403c6e1af6c824d3e77088242f89a7Chien-Yu Chen /** 185d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Visible for CameraMetadataNative implementation only; do not use. 186d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 187d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * TODO: Make this private or remove it altogether. 188d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 189d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 190d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 191d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public CameraMetadataNative.Key<T> getNativeKey() { 192d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return mKey; 193d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 194d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 195d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings({ "unchecked" }) 196d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /*package*/ Key(CameraMetadataNative.Key<?> nativeKey) { 197d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mKey = (CameraMetadataNative.Key<T>) nativeKey; 198d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 199d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 20070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 20170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala private final HashSet<Surface> mSurfaceSet; 20270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala private final CameraMetadataNative mSettings; 2035398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen private boolean mIsReprocess; 204a7677722304670dc07feef242156b97e6bb51bcdZhijun He // If this request is part of constrained high speed request list that was created by 205639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala // {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList} 206a7677722304670dc07feef242156b97e6bb51bcdZhijun He private boolean mIsPartOfCHSRequestList = false; 2078062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen // Each reprocess request must be tied to a reprocessable session ID. 2087a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen // Valid only for reprocess requests (mIsReprocess == true). 2098062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen private int mReprocessableSessionId; 21070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 2114068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala private Object mUserTag; 212b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 213b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala /** 2146bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Construct empty request. 2156bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 2166bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Used by Binder to unparcel this object only. 21770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin */ 2186bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin private CaptureRequest() { 21970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings = new CameraMetadataNative(); 220de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev setNativeInstance(mSettings); 22170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet = new HashSet<Surface>(); 2225398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen mIsReprocess = false; 2238062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen mReprocessableSessionId = CameraCaptureSession.SESSION_ID_NONE; 224b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala } 225b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 226b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala /** 2276bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Clone from source capture request. 2286bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 2296bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Used by the Builder to create an immutable copy. 230b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */ 2316bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin @SuppressWarnings("unchecked") 23270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala private CaptureRequest(CaptureRequest source) { 23370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings = new CameraMetadataNative(source.mSettings); 234de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev setNativeInstance(mSettings); 23570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet = (HashSet<Surface>) source.mSurfaceSet.clone(); 2365398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen mIsReprocess = source.mIsReprocess; 237a7677722304670dc07feef242156b97e6bb51bcdZhijun He mIsPartOfCHSRequestList = source.mIsPartOfCHSRequestList; 2388062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen mReprocessableSessionId = source.mReprocessableSessionId; 2397b01c5c4d27ebbd739d9e5e0de7eaafbffd8e084Eino-Ville Talvala mUserTag = source.mUserTag; 240b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala } 241b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 242b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala /** 2436bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Take ownership of passed-in settings. 2446bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 2456bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Used by the Builder to create a mutable CaptureRequest. 2467a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 2477a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @param settings Settings for this capture request. 2487a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @param isReprocess Indicates whether to create a reprocess capture request. {@code true} 2497a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * to create a reprocess capture request. {@code false} to create a regular 2507a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * capture request. 2518062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen * @param reprocessableSessionId The ID of the camera capture session this capture is created 2527a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * for. This is used to validate if the application submits a 2537a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * reprocess capture request to the same session where 2547a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * the {@link TotalCaptureResult}, used to create the reprocess 2557a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * capture, came from. 2567a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 2577a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @throws IllegalArgumentException If creating a reprocess capture request with an invalid 2588062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen * reprocessableSessionId. 2597a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 2607a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @see CameraDevice#createReprocessCaptureRequest 261b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */ 2627a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen private CaptureRequest(CameraMetadataNative settings, boolean isReprocess, 2638062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen int reprocessableSessionId) { 264d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin mSettings = CameraMetadataNative.move(settings); 265de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev setNativeInstance(mSettings); 26670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet = new HashSet<Surface>(); 2675398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen mIsReprocess = isReprocess; 2687a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen if (isReprocess) { 2698062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen if (reprocessableSessionId == CameraCaptureSession.SESSION_ID_NONE) { 2707a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen throw new IllegalArgumentException("Create a reprocess capture request with an " + 2718062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen "invalid session ID: " + reprocessableSessionId); 2727a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen } 2738062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen mReprocessableSessionId = reprocessableSessionId; 2747a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen } else { 2758062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen mReprocessableSessionId = CameraCaptureSession.SESSION_ID_NONE; 2767a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen } 27770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 27870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 279d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 280d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * Get a capture request field value. 281d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 282d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>The field definitions can be found in {@link CaptureRequest}.</p> 283d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 284d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * <p>Querying the value for the same key more than once will return a value 285d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * which is equal to the previous queried value.</p> 286d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 287d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @throws IllegalArgumentException if the key was not valid 288d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * 289d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @param key The result field to read. 290d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @return The value of that key, or {@code null} if the field is not set. 291d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 2928b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvala @Nullable 29370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public <T> T get(Key<T> key) { 29470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mSettings.get(key); 2954068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala } 2964068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala 2974068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala /** 298d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 299d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 300d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 301d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings("unchecked") 302d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 303d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin protected <T> T getProtected(Key<?> key) { 304d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return (T) mSettings.get(key); 305d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 306d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 307d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 308d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 309d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * @hide 310d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 311d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @SuppressWarnings("unchecked") 312d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 313d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin protected Class<Key<?>> getKeyClass() { 314d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin Object thisClass = Key.class; 315d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return (Class<Key<?>>)thisClass; 316d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 317d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 318d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 319d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin * {@inheritDoc} 320d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin */ 321d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin @Override 3228b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvala @NonNull 323d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin public List<Key<?>> getKeys() { 324d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin // Force the javadoc for this function to show up on the CaptureRequest page 325d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin return super.getKeys(); 326d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin } 327d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin 328d6d65154e55612b489aae95b60f3145f3b81f3b4Igor Murashkin /** 3294068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * Retrieve the tag for this request, if any. 3304068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * 3314068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * <p>This tag is not used for anything by the camera device, but can be 3324068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * used by an application to easily identify a CaptureRequest when it is 3334068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * returned by 334fd887436bd111e4d2c7307578a51b5070025b7f2Eino-Ville Talvala * {@link CameraCaptureSession.CaptureCallback#onCaptureCompleted CaptureCallback.onCaptureCompleted} 3354068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * </p> 3364068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * 3374068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * @return the last tag Object set on this request, or {@code null} if 3384068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala * no tag has been set. 33970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see Builder#setTag 3404068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala */ 3418b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvala @Nullable 3424068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala public Object getTag() { 34370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mUserTag; 3444068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala } 3454068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala 3466bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin /** 3475398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * Determine if this is a reprocess capture request. 3485398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * 3495398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * <p>A reprocess capture request produces output images from an input buffer from the 3505398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * {@link CameraCaptureSession}'s input {@link Surface}. A reprocess capture request can be 3515398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * created by {@link CameraDevice#createReprocessCaptureRequest}.</p> 3525398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * 3535398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * @return {@code true} if this is a reprocess capture request. {@code false} if this is not a 3545398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * reprocess capture request. 3555398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * 3565398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * @see CameraDevice#createReprocessCaptureRequest 3575398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen */ 3585398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen public boolean isReprocess() { 3595398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen return mIsReprocess; 3605398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen } 3615398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen 3625398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen /** 363a7677722304670dc07feef242156b97e6bb51bcdZhijun He * <p>Determine if this request is part of a constrained high speed request list that was 364639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * created by 365639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList}. 366639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * A constrained high speed request list contains some constrained high speed capture requests 367639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * with certain interleaved pattern that is suitable for high speed preview/video streaming. An 368639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * active constrained high speed capture session only accepts constrained high speed request 369639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * lists. This method can be used to do the sanity check when a constrained high speed capture 370639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * session receives a request list via {@link CameraCaptureSession#setRepeatingBurst} or 371639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * {@link CameraCaptureSession#captureBurst}. </p> 372a7677722304670dc07feef242156b97e6bb51bcdZhijun He * 373a7677722304670dc07feef242156b97e6bb51bcdZhijun He * 374a7677722304670dc07feef242156b97e6bb51bcdZhijun He * @return {@code true} if this request is part of a constrained high speed request list, 375a7677722304670dc07feef242156b97e6bb51bcdZhijun He * {@code false} otherwise. 376a7677722304670dc07feef242156b97e6bb51bcdZhijun He * 377a7677722304670dc07feef242156b97e6bb51bcdZhijun He * @hide 378a7677722304670dc07feef242156b97e6bb51bcdZhijun He */ 379a7677722304670dc07feef242156b97e6bb51bcdZhijun He public boolean isPartOfCRequestList() { 380a7677722304670dc07feef242156b97e6bb51bcdZhijun He return mIsPartOfCHSRequestList; 381a7677722304670dc07feef242156b97e6bb51bcdZhijun He } 382a7677722304670dc07feef242156b97e6bb51bcdZhijun He 383a7677722304670dc07feef242156b97e6bb51bcdZhijun He /** 384a7677722304670dc07feef242156b97e6bb51bcdZhijun He * Returns a copy of the underlying {@link CameraMetadataNative}. 385a7677722304670dc07feef242156b97e6bb51bcdZhijun He * @hide 386a7677722304670dc07feef242156b97e6bb51bcdZhijun He */ 387a7677722304670dc07feef242156b97e6bb51bcdZhijun He public CameraMetadataNative getNativeCopy() { 388a7677722304670dc07feef242156b97e6bb51bcdZhijun He return new CameraMetadataNative(mSettings); 389a7677722304670dc07feef242156b97e6bb51bcdZhijun He } 390a7677722304670dc07feef242156b97e6bb51bcdZhijun He 391a7677722304670dc07feef242156b97e6bb51bcdZhijun He /** 3928062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen * Get the reprocessable session ID this reprocess capture request is associated with. 3937a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 3948062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen * @return the reprocessable session ID this reprocess capture request is associated with 3957a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 3967a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @throws IllegalStateException if this capture request is not a reprocess capture request. 3977a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @hide 3987a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen */ 3998062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen public int getReprocessableSessionId() { 4007a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen if (mIsReprocess == false || 4018062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen mReprocessableSessionId == CameraCaptureSession.SESSION_ID_NONE) { 4028062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen throw new IllegalStateException("Getting the reprocessable session ID for a "+ 4037a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen "non-reprocess capture request is illegal."); 4047a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen } 4058062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen return mReprocessableSessionId; 4067a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen } 4077a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen 4087a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen /** 4096bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * Determine whether this CaptureRequest is equal to another CaptureRequest. 4106bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 4116bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * <p>A request is considered equal to another is if it's set of key/values is equal, it's 4125398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * list of output surfaces is equal, the user tag is equal, and the return values of 4135398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen * isReprocess() are equal.</p> 4146bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 4156bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * @param other Another instance of CaptureRequest. 4166bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * 4176bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin * @return True if the requests are the same, false otherwise. 4186bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin */ 4196bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin @Override 4206bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin public boolean equals(Object other) { 4216bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin return other instanceof CaptureRequest 4226bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin && equals((CaptureRequest)other); 4236bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin } 4246bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin 4256bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin private boolean equals(CaptureRequest other) { 4266bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin return other != null 4276bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin && Objects.equals(mUserTag, other.mUserTag) 4286bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin && mSurfaceSet.equals(other.mSurfaceSet) 4295398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen && mSettings.equals(other.mSettings) 4307a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen && mIsReprocess == other.mIsReprocess 4318062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen && mReprocessableSessionId == other.mReprocessableSessionId; 4326bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin } 4336bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin 4346bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin @Override 4356bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin public int hashCode() { 4360819c75680c81a4e9c8a1ec518ac62cceccf3f56Eino-Ville Talvala return HashCodeHelpers.hashCodeGeneric(mSettings, mSurfaceSet, mUserTag); 4376bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin } 4386bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin 43970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public static final Parcelable.Creator<CaptureRequest> CREATOR = 44070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin new Parcelable.Creator<CaptureRequest>() { 44170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin @Override 44270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public CaptureRequest createFromParcel(Parcel in) { 44370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin CaptureRequest request = new CaptureRequest(); 44470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin request.readFromParcel(in); 44570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 44670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin return request; 44770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 44870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 44970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin @Override 45070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public CaptureRequest[] newArray(int size) { 45170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin return new CaptureRequest[size]; 45270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 45370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin }; 45470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 45570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin /** 45670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin * Expand this object from a Parcel. 45770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Hidden since this breaks the immutability of CaptureRequest, but is 45870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * needed to receive CaptureRequests with aidl. 45970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 46070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin * @param in The parcel from which the object should be read 46170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @hide 46270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin */ 46372f9f0a96e4476ef231d5001cb30521ad4ce5b1eIgor Murashkin private void readFromParcel(Parcel in) { 46470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings.readFromParcel(in); 465de62d84eb9dbcd43c4db3100a3cd80209b04cd2fEmilian Peev setNativeInstance(mSettings); 46670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 46770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet.clear(); 46870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 46970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala Parcelable[] parcelableArray = in.readParcelableArray(Surface.class.getClassLoader()); 47070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 47170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala if (parcelableArray == null) { 47270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return; 47370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 47470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 47570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala for (Parcelable p : parcelableArray) { 47670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala Surface s = (Surface) p; 47770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSurfaceSet.add(s); 47870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 4795398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen 4805398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen mIsReprocess = (in.readInt() == 0) ? false : true; 4818062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen mReprocessableSessionId = CameraCaptureSession.SESSION_ID_NONE; 48270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 48370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 48470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin @Override 48570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public int describeContents() { 48670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return 0; 48770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 48870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 48970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala @Override 49070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin public void writeToParcel(Parcel dest, int flags) { 49170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mSettings.writeToParcel(dest, flags); 49270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala dest.writeParcelableArray(mSurfaceSet.toArray(new Surface[mSurfaceSet.size()]), flags); 4935398a676809faaf3c6c2875edc1907ad6b8e1c89Chien-Yu Chen dest.writeInt(mIsReprocess ? 1 : 0); 49470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 49570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 49670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 497feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk * @hide 498feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk */ 499feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk public boolean containsTarget(Surface surface) { 500feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk return mSurfaceSet.contains(surface); 501feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk } 502feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk 503feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk /** 504feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk * @hide 505feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk */ 506feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk public Collection<Surface> getTargets() { 507feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk return Collections.unmodifiableCollection(mSurfaceSet); 508feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk } 509feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk 510feb50af361e4305a25758966b6b5df2738c00259Ruben Brunk /** 51170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * A builder for capture requests. 51270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 51370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>To obtain a builder instance, use the 51470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * {@link CameraDevice#createCaptureRequest} method, which initializes the 51570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * request fields to one of the templates defined in {@link CameraDevice}. 51670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 51770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see CameraDevice#createCaptureRequest 518b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraDevice#TEMPLATE_PREVIEW 519b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraDevice#TEMPLATE_RECORD 520b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraDevice#TEMPLATE_STILL_CAPTURE 521b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraDevice#TEMPLATE_VIDEO_SNAPSHOT 522b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraDevice#TEMPLATE_MANUAL 52370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 52470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public final static class Builder { 52570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 5267a36a0fbb0a5f14047a3680668da954beca05dcbIgor Murashkin private final CaptureRequest mRequest; 52770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 52870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 52970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Initialize the builder using the template; the request takes 53070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * ownership of the template. 53170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 5327a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @param template Template settings for this capture request. 5337a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @param reprocess Indicates whether to create a reprocess capture request. {@code true} 5347a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * to create a reprocess capture request. {@code false} to create a regular 5357a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * capture request. 5368062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen * @param reprocessableSessionId The ID of the camera capture session this capture is 5377a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * created for. This is used to validate if the application 5387a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * submits a reprocess capture request to the same session 5397a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * where the {@link TotalCaptureResult}, used to create the 5407a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * reprocess capture, came from. 5417a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * 5427a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen * @throws IllegalArgumentException If creating a reprocess capture request with an invalid 5438062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen * reprocessableSessionId. 54470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @hide 54570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 5467a316f6b1b040f0113161db87a36397aebfb80b8Chien-Yu Chen public Builder(CameraMetadataNative template, boolean reprocess, 5478062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen int reprocessableSessionId) { 5488062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen mRequest = new CaptureRequest(template, reprocess, reprocessableSessionId); 54970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 55070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 55170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 55270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Add a surface to the list of targets for this request</p> 55370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 55470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>The Surface added must be one of the surfaces included in the most 555b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * recent call to {@link CameraDevice#createCaptureSession}, when the 55670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * request is given to the camera device.</p> 55770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 55870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Adding a target more than once has no effect.</p> 55970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 56070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param outputTarget Surface to use as an output target for this request 56170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 5628b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvala public void addTarget(@NonNull Surface outputTarget) { 56370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mSurfaceSet.add(outputTarget); 56470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 56570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin 56670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 56770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Remove a surface from the list of targets for this request.</p> 56870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 56970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>Removing a target that is not currently added has no effect.</p> 57070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 57170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param outputTarget Surface to use as an output target for this request 57270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 5738b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvala public void removeTarget(@NonNull Surface outputTarget) { 57470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mSurfaceSet.remove(outputTarget); 57570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin } 57670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 57770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 57870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Set a capture request field to a value. The field definitions can be 57970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * found in {@link CaptureRequest}. 58070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 581d8407271ffa83d27e9a524f485a0799e422e1fd6Eino-Ville Talvala * <p>Setting a field to {@code null} will remove that field from the capture request. 582d8407271ffa83d27e9a524f485a0799e422e1fd6Eino-Ville Talvala * Unless the field is optional, removing it will likely produce an error from the camera 583d8407271ffa83d27e9a524f485a0799e422e1fd6Eino-Ville Talvala * device when the request is submitted.</p> 584d8407271ffa83d27e9a524f485a0799e422e1fd6Eino-Ville Talvala * 58570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param key The metadata field to write. 58670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param value The value to set the field to, which must be of a matching 58770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * type to the key. 58870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 5898b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvala public <T> void set(@NonNull Key<T> key, T value) { 59070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mSettings.set(key, value); 59170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 59270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 59370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 59470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Get a capture request field value. The field definitions can be 59570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * found in {@link CaptureRequest}. 59670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 59770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @throws IllegalArgumentException if the key was not valid 59870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 59970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param key The metadata field to read. 60070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @return The value of that key, or {@code null} if the field is not set. 60170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 6028b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvala @Nullable 60370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public <T> T get(Key<T> key) { 60470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mRequest.mSettings.get(key); 60570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 60670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 60770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 60870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Set a tag for this request. 60970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 61070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>This tag is not used for anything by the camera device, but can be 61170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * used by an application to easily identify a CaptureRequest when it is 61270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * returned by 613fd887436bd111e4d2c7307578a51b5070025b7f2Eino-Ville Talvala * {@link CameraCaptureSession.CaptureCallback#onCaptureCompleted CaptureCallback.onCaptureCompleted} 61470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 61570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @param tag an arbitrary Object to store with this request 61670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see CaptureRequest#getTag 61770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 6188b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvala public void setTag(@Nullable Object tag) { 61970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala mRequest.mUserTag = tag; 62070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 62170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 62270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 623a7677722304670dc07feef242156b97e6bb51bcdZhijun He * <p>Mark this request as part of a constrained high speed request list created by 624639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * {@link android.hardware.camera2.CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList}. 625639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * A constrained high speed request list contains some constrained high speed capture 626639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * requests with certain interleaved pattern that is suitable for high speed preview/video 627639fffee624302ec5b175503d7bd8a441340a629Eino-Ville Talvala * streaming.</p> 628a7677722304670dc07feef242156b97e6bb51bcdZhijun He * 629a7677722304670dc07feef242156b97e6bb51bcdZhijun He * @hide 630a7677722304670dc07feef242156b97e6bb51bcdZhijun He */ 631a7677722304670dc07feef242156b97e6bb51bcdZhijun He public void setPartOfCHSRequestList(boolean partOfCHSList) { 632a7677722304670dc07feef242156b97e6bb51bcdZhijun He mRequest.mIsPartOfCHSRequestList = partOfCHSList; 633a7677722304670dc07feef242156b97e6bb51bcdZhijun He } 634a7677722304670dc07feef242156b97e6bb51bcdZhijun He 635a7677722304670dc07feef242156b97e6bb51bcdZhijun He /** 63670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * Build a request using the current target Surfaces and settings. 637edeab40338a047655f6af60e9e950dbad262279bSol Boucher * <p>Note that, although it is possible to create a {@code CaptureRequest} with no target 638edeab40338a047655f6af60e9e950dbad262279bSol Boucher * {@link Surface}s, passing such a request into {@link CameraCaptureSession#capture}, 639edeab40338a047655f6af60e9e950dbad262279bSol Boucher * {@link CameraCaptureSession#captureBurst}, 640edeab40338a047655f6af60e9e950dbad262279bSol Boucher * {@link CameraCaptureSession#setRepeatingBurst}, or 641edeab40338a047655f6af60e9e950dbad262279bSol Boucher * {@link CameraCaptureSession#setRepeatingRequest} will cause that method to throw an 642edeab40338a047655f6af60e9e950dbad262279bSol Boucher * {@link IllegalArgumentException}.</p> 64370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * 64470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @return A new capture request instance, ready for submission to the 64570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * camera device. 64670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 6478b905578b54041f7d0b8dc04dd158d16d28262a1Eino-Ville Talvala @NonNull 64870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public CaptureRequest build() { 64970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return new CaptureRequest(mRequest); 65070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 65170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 65270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala /** 65370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @hide 65470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala */ 65570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala public boolean isEmpty() { 65670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala return mRequest.mSettings.isEmpty(); 65770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala } 65870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala 659b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala } 660b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala 6615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 6625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * The key entries below this point are generated from metadata 6635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * definitions in /system/media/camera/docs. Do not modify by hand or 6645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * modify the comment blocks at the start or end. 6655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/ 6665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 6675a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 6687d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The mode control selects how the image data is converted from the 6697d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * sensor's native color into linear sRGB color.</p> 670b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>When auto-white balance (AWB) is enabled with {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, this 6717d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * control is overridden by the AWB routine. When AWB is disabled, the 6727d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * application controls how the color mapping is performed.</p> 6737d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>We define the expected processing pipeline below. For consistency 6747d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * across devices, this is always the case with TRANSFORM_MATRIX.</p> 6757d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>When either FULL or HIGH_QUALITY is used, the camera device may 6767d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 6777d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the 6787d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * camera device (in the results) and be roughly correct.</p> 6797d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>Switching to TRANSFORM_MATRIX and using the data provided from 6807d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * FAST or HIGH_QUALITY will yield a picture with the same white point 6817d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * as what was produced by the camera device in the earlier frame.</p> 6827d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The expected processing pipeline is as follows:</p> 6837d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p><img alt="White balance processing pipeline" src="../../../../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p> 6847d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The white balance is encoded by two values, a 4-channel white-balance 6857d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * gain vector (applied in the Bayer domain), and a 3x3 color transform 6867d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * matrix (applied after demosaic).</p> 6877d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The 4-channel white-balance gains are defined as:</p> 6887d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} = [ R G_even G_odd B ] 6897d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * </code></pre> 6907d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>where <code>G_even</code> is the gain for green pixels on even rows of the 6917d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * output, and <code>G_odd</code> is the gain for green pixels on the odd rows. 6927d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * These may be identical for a given camera device implementation; if 6937d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * the camera device does not support a separate gain for even/odd green 6947d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to 6957d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <code>G_even</code> in the output result metadata.</p> 6967d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>The matrices for color transforms are defined as a 9-entry vector:</p> 6977d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ] 6987d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * </code></pre> 6997d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>, 7007d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p> 7017d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>with colors as follows:</p> 7027d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <pre><code>r' = I0r + I1g + I2b 7037d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * g' = I3r + I4g + I5b 7047d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * b' = I6r + I7g + I8b 7057d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * </code></pre> 7067d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>Both the input and output value ranges must match. Overflow/underflow 7077d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * values are clipped to fit within the range.</p> 708fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 709fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 710fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX TRANSFORM_MATRIX}</li> 711fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_MODE_FAST FAST}</li> 712fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 713fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 7144b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 7154b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 7164b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 7174b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 7180da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 7197d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * @see CaptureRequest#COLOR_CORRECTION_GAINS 7207d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 7210da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_AWB_MODE 7224b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 7235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX 7245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #COLOR_CORRECTION_MODE_FAST 7255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY 7265a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 7276c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 7285a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> COLOR_CORRECTION_MODE = 7295a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.colorCorrection.mode", int.class); 7305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 7315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 732ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>A color transform matrix to use to transform 733b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * from sensor RGB color space to output linear sRGB color space.</p> 73449a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>This matrix is either set by the camera device when the request 7350da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or 7365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * directly by the application in the request when the 7370da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p> 73849a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>In the latter case, the camera device may round the matrix to account 73949a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * for precision issues; the final rounded matrix should be reported back 74049a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * in this matrix result metadata. The transform should keep the magnitude 74149a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * of the output color values within <code>[0, 1.0]</code> (assuming input color 74249a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p> 743d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * <p>The valid range of each matrix element varies on different devices, but 744d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * values within [-1.5, 3.0] are guaranteed not to be clipped.</p> 745fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Unitless scale factors</p> 7464b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 7474b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 7484b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 7494b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 7500da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 7510da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#COLOR_CORRECTION_MODE 7524b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 7535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 7546c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 7552bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala public static final Key<android.hardware.camera2.params.ColorSpaceTransform> COLOR_CORRECTION_TRANSFORM = 7562bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala new Key<android.hardware.camera2.params.ColorSpaceTransform>("android.colorCorrection.transform", android.hardware.camera2.params.ColorSpaceTransform.class); 7575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 7585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 7597d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin * <p>Gains applying to Bayer raw color channels for 760cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * white-balance.</p> 7612bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * <p>These per-channel gains are either set by the camera device 7622bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * when the request {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not 7632bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * TRANSFORM_MATRIX, or directly by the application in the 7642bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * request when the {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is 7652bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * TRANSFORM_MATRIX.</p> 7662bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * <p>The gains in the result metadata are the gains actually 7672bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala * applied by the camera device to the current frame.</p> 768d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * <p>The valid range of gains varies on different devices, but gains 769d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * between [1.0, 3.0] are guaranteed not to be clipped. Even if a given 770d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * device allows gains below 1.0, this is usually not recommended because 771d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * this can create color artifacts.</p> 772fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Unitless gain factors</p> 7734b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 7744b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 7754b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 7764b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 7770da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 7780da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#COLOR_CORRECTION_MODE 7794b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 7805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 7816c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 7822bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala public static final Key<android.hardware.camera2.params.RggbChannelVector> COLOR_CORRECTION_GAINS = 7832bb91a7a68e32530adf730deeef2fe95bad20a96Eino-Ville Talvala new Key<android.hardware.camera2.params.RggbChannelVector>("android.colorCorrection.gains", android.hardware.camera2.params.RggbChannelVector.class); 7845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 7855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 786a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * <p>Mode of operation for the chromatic aberration correction algorithm.</p> 787a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * <p>Chromatic (color) aberration is caused by the fact that different wavelengths of light 788a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * can not focus on the same point after exiting from the lens. This metadata defines 789a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * the high level control of chromatic aberration correction algorithm, which aims to 790a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * minimize the chromatic artifacts that may occur along the object boundaries in an 791a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * image.</p> 792a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * <p>FAST/HIGH_QUALITY both mean that camera device determined aberration 793a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * correction will be applied. HIGH_QUALITY mode indicates that the camera device will 794a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * use the highest-quality aberration correction algorithms, even if it slows down 795a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * capture rate. FAST means the camera device will not slow down capture rate when 796a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * applying aberration correction.</p> 7974b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>LEGACY devices will always be in FAST mode.</p> 798fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 799fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 800fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_OFF OFF}</li> 801fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_FAST FAST}</li> 802fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 803fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 804fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 805fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES android.colorCorrection.availableAberrationModes}</p> 8064b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 807a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He * 8089e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES 8099e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He * @see #COLOR_CORRECTION_ABERRATION_MODE_OFF 8109e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He * @see #COLOR_CORRECTION_ABERRATION_MODE_FAST 8119e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He * @see #COLOR_CORRECTION_ABERRATION_MODE_HIGH_QUALITY 812a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He */ 8136c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 8149e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He public static final Key<Integer> COLOR_CORRECTION_ABERRATION_MODE = 8159e4e439a688f1859cd895f2ff7ecad75cddb116bZhijun He new Key<Integer>("android.colorCorrection.aberrationMode", int.class); 816a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He 817a05e59d12b410638e97bc2d88c64442c47907fe3Zhijun He /** 8180da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>The desired setting for the camera device's auto-exposure 8190da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * algorithm's antibanding compensation.</p> 8200da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>Some kinds of lighting fixtures, such as some fluorescent 8210da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * lights, flicker at the rate of the power supply frequency 8220da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * (60Hz or 50Hz, depending on country). While this is 8230da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * typically not noticeable to a person, it can be visible to 8240da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * a camera device. If a camera sets its exposure time to the 8250da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * wrong value, the flicker may become visible in the 8260da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * viewfinder as flicker or in a final captured image, as a 8270da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * set of variable-brightness bands across the image.</p> 8280da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>Therefore, the auto-exposure routines of camera devices 8290da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * include antibanding routines that ensure that the chosen 8300da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * exposure value will not cause such banding. The choice of 8310da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * exposure time depends on the rate of flicker, which the 8320da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * camera device can detect automatically, or the expected 8330da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * rate can be selected by the application using this 8340da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * control.</p> 8350da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>A given camera device may not support all of the possible 8360da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * options for the antibanding mode. The 8370da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains 8380da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * the available modes for a given camera device.</p> 8397b2cae6ceca680f6034a9fe43df2446cbae2f090Yin-Chia Yeh * <p>AUTO mode is the default if it is available on given 8407b2cae6ceca680f6034a9fe43df2446cbae2f090Yin-Chia Yeh * camera device. When AUTO mode is not available, the 8417b2cae6ceca680f6034a9fe43df2446cbae2f090Yin-Chia Yeh * default will be either 50HZ or 60HZ, and both 50HZ 8427b2cae6ceca680f6034a9fe43df2446cbae2f090Yin-Chia Yeh * and 60HZ will be available.</p> 8430da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>If manual exposure control is enabled (by setting 8440da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF), 8450da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * then this setting has no effect, and the application must 8460da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ensure it selects exposure times that do not cause banding 8470da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist 8480da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * the application in this.</p> 849fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 850fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 851fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_OFF OFF}</li> 852fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_50HZ 50HZ}</li> 853fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_60HZ 60HZ}</li> 854fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_ANTIBANDING_MODE_AUTO AUTO}</li> 855fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 856fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br></p> 857fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>{@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes}</p> 8584b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 8590da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 8605f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES 861399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 862265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 863265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureResult#STATISTICS_SCENE_FLICKER 8645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_OFF 8655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ 8665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ 8675a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_ANTIBANDING_MODE_AUTO 8685a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 8696c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 8705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_ANTIBANDING_MODE = 8715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aeAntibandingMode", int.class); 8725a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 8735a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 874b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Adjustment to auto-exposure (AE) target image 875b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * brightness.</p> 876b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The adjustment is measured as a count of steps, with the 877b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * step size defined by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP android.control.aeCompensationStep} and the 878b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * allowed range by {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}.</p> 879b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>For example, if the exposure value (EV) step is 0.333, '6' 880b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * will mean an exposure compensation of +2 EV; -3 will mean an 881b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * exposure compensation of -1 EV. One EV represents a doubling 882b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * of image brightness. Note that this control will only be 883b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * effective if {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} <code>!=</code> OFF. This control 884b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * will take effect even when {@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} <code>== true</code>.</p> 885a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * <p>In the event of exposure compensation value being changed, camera device 886a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * may take several frames to reach the newly requested exposure target. 887a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * During that time, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} field will be in the SEARCHING 888a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * state. Once the new exposure target is reached, {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} will 889a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * change from SEARCHING to either CONVERGED, LOCKED (if AE lock is enabled), or 890a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * FLASH_REQUIRED (if the scene is too dark for still capture).</p> 891fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Compensation steps</p> 892fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 893fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE android.control.aeCompensationRange}</p> 8944b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 895a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * 896b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_RANGE 897b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP 898a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureRequest#CONTROL_AE_LOCK 899a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureRequest#CONTROL_AE_MODE 900a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureResult#CONTROL_AE_STATE 9015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 9026c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 9035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_EXPOSURE_COMPENSATION = 9045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aeExposureCompensation", int.class); 9055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 9065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 907b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Whether auto-exposure (AE) is currently locked to its latest 90849a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * calculated values.</p> 909fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>When set to <code>true</code> (ON), the AE algorithm is locked to its latest parameters, 910fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * and will not change exposure settings until the lock is set to <code>false</code> (OFF).</p> 911fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Note that even when AE is locked, the flash may be fired if 912fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH / 913fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * ON_ALWAYS_FLASH / ON_AUTO_FLASH_REDEYE.</p> 914a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * <p>When {@link CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION android.control.aeExposureCompensation} is changed, even if the AE lock 915a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * is ON, the camera device will still adjust its exposure value.</p> 91649a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}) 91749a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * when AE is already locked, the camera device will not change the exposure time 91849a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}) 919d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} 92049a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the 921fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed. 922fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * Similarly, AE precapture trigger CANCEL has no effect when AE is already locked.</p> 923fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * <p>When an AE precapture sequence is triggered, AE unlock will not be able to unlock 924fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * the AE if AE is locked by the camera device internally during precapture metering 925fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * sequence In other words, submitting requests with AE unlock has no effect for an 926fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * ongoing precapture metering sequence. Otherwise, the precapture metering sequence 927fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * will never succeed in a sequence of preview requests where AE lock is always set 928fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * to <code>false</code>.</p> 929fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Since the camera device has a pipeline of in-flight requests, the settings that 930fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * get locked do not necessarily correspond to the settings that were present in the 931fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * latest capture result received from the camera device, since additional captures 932fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * and AE updates may have occurred even before the result was sent out. If an 933fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * application is switching between automatic and manual control and wishes to eliminate 934fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * any flicker during the switch, the following procedure is recommended:</p> 935fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ol> 936fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Starting in auto-AE mode:</li> 937fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Lock AE</li> 938fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Wait for the first result to be output that has the AE locked</li> 939fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Copy exposure settings from that result into a request, set the request to manual AE</li> 940fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Submit the capture request, proceed to run manual AE as desired.</li> 941fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ol> 94249a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p> 9434b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 94449a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * 945a4227dfe48dcfb49709e05f7db413e0d883997f0Yin-Chia Yeh * @see CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION 94649a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 94749a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 94849a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureResult#CONTROL_AE_STATE 94949a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#SENSOR_EXPOSURE_TIME 95049a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He * @see CaptureRequest#SENSOR_SENSITIVITY 9515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 9526c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 9535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> CONTROL_AE_LOCK = 9545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.control.aeLock", boolean.class); 9555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 9565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 9570da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>The desired mode for the camera device's 9580da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * auto-exposure routine.</p> 9590da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is 9600da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * AUTO.</p> 9610da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>When set to any of the ON modes, the camera device's 9620da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * auto-exposure routine is enabled, overriding the 9630da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * application's selected exposure time, sensor sensitivity, 9640da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 9650da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and 9660da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes 9670da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * is selected, the camera device's flash unit controls are 9680da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * also overridden.</p> 9690da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>The FLASH modes are only available if the camera device 9700da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p> 9710da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>If flash TORCH mode is desired, this field must be set to 9720da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p> 9730da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * <p>When set to any of the ON modes, the values chosen by the 9740da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * camera device auto-exposure routine for the overridden 9750da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * fields for a given capture will be available in its 9760da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * CaptureResult.</p> 977fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 978fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 979fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_MODE_OFF OFF}</li> 980fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_MODE_ON ON}</li> 981fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH ON_AUTO_FLASH}</li> 982fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_MODE_ON_ALWAYS_FLASH ON_ALWAYS_FLASH}</li> 983fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE ON_AUTO_FLASH_REDEYE}</li> 984fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 985fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 986fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES android.control.aeAvailableModes}</p> 9874b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 9880da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 989fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_MODES 9905f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#CONTROL_MODE 991265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 992265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#FLASH_MODE 993aef3b7ed9f2a27aed9aecef030432d1100a60406Igor Murashkin * @see CaptureRequest#SENSOR_EXPOSURE_TIME 994aef3b7ed9f2a27aed9aecef030432d1100a60406Igor Murashkin * @see CaptureRequest#SENSOR_FRAME_DURATION 995399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * @see CaptureRequest#SENSOR_SENSITIVITY 9965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_OFF 9975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON 9985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON_AUTO_FLASH 9995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH 10005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE 10015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 10026c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 10035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_MODE = 10045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aeMode", int.class); 10055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 10065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1007fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>List of metering areas to use for auto-exposure adjustment.</p> 1008fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe} is 0. 1009808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * Otherwise will always be present.</p> 1010fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The maximum number of regions supported by the device is determined by the value 1011fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AE android.control.maxRegionsAe}.</p> 1012ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The coordinate system is based on the active pixel array, 10132629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight * with (0,0) being the top-left pixel in the active pixel array, and 10140da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 10150da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 101697f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * bottom-right pixel in the active pixel array.</p> 1017fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight 101897f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * for every pixel in the area. This means that a large metering area 101997f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * with the same weight as a smaller area will have more effect in 102097f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * the metering result. Metering areas can partially overlap and the 102197f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * camera device will add the weights in the overlap region.</p> 1022fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The weights are relative to weights of other exposure metering regions, so if only one 1023fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * region is used, all non-zero weights will have the same effect. A region with 0 1024fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * weight is ignored.</p> 1025fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If all regions have 0 weight, then no specific metering area needs to be used by the 1026fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * camera device.</p> 1027fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in 1028fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * capture result metadata, the camera device will ignore the sections outside the crop 1029fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * region and output only the intersection rectangle as the metering region in the result 1030fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * metadata. If the region is entirely outside the crop region, it will be ignored and 1031fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * not reported in the result metadata.</p> 1032fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1033fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1034fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * Coordinates must be between <code>[(0,0), (width, height))</code> of 1035fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1036808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 10370da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1038808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AE 10390da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 1040265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 10415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 10426c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 1043817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AE_REGIONS = 1044817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.aeRegions", android.hardware.camera2.params.MeteringRectangle[].class); 10455a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 10465a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1047fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Range over which the auto-exposure routine can 1048fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * adjust the capture frame rate to maintain good 1049fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * exposure.</p> 1050b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Only constrains auto-exposure (AE) algorithm, not 1051fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * manual control of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime} and 1052fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}.</p> 1053fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Frames per second (FPS)</p> 1054fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1055fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * Any of the entries in {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges}</p> 1056fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This key is available on all devices.</p> 10570da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1058fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES 10590da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SENSOR_EXPOSURE_TIME 1060fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureRequest#SENSOR_FRAME_DURATION 10615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 10626c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 106378712a8bd7275542013ba099f33536eead0167fbIgor Murashkin public static final Key<android.util.Range<Integer>> CONTROL_AE_TARGET_FPS_RANGE = 106478712a8bd7275542013ba099f33536eead0167fbIgor Murashkin new Key<android.util.Range<Integer>>("android.control.aeTargetFpsRange", new TypeReference<android.util.Range<Integer>>() {{ }}); 10655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 10665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1067228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>Whether the camera device will trigger a precapture 1068228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * metering sequence when it processes this request.</p> 1069ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>This entry is normally set to IDLE, or is not 10705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * included at all in the request settings. When included and 1071dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * set to START, the camera device will trigger the auto-exposure (AE) 1072ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * precapture metering sequence.</p> 1073fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * <p>When set to CANCEL, the camera device will cancel any active 1074fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * precapture metering trigger, and return to its initial AE state. 1075fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * If a precapture metering sequence is already completed, and the camera 1076fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * device has implicitly locked the AE for subsequent still capture, the 1077fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * CANCEL trigger will unlock the AE and return to its initial AE state.</p> 1078dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * <p>The precapture sequence should be triggered before starting a 1079e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * high-quality still capture for final metering decisions to 1080e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * be made, and for firing pre-capture flash pulses to estimate 1081e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * scene brightness and required final capture flash power, when 1082e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * the flash is enabled.</p> 1083e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>Normally, this entry should be set to START for only a 1084e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * single request, and the application should wait until the 1085e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * sequence completes before starting a new one.</p> 1086dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * <p>When a precapture metering sequence is finished, the camera device 1087dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * may lock the auto-exposure routine internally to be able to accurately expose the 1088dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * subsequent still capture image (<code>{@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} == STILL_CAPTURE</code>). 1089dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * For this case, the AE may not resume normal scan if no subsequent still capture is 1090dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * submitted. To ensure that the AE routine restarts normal scan, the application should 1091dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * submit a request with <code>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} == true</code>, followed by a request 1092dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * with <code>{@link CaptureRequest#CONTROL_AE_LOCK android.control.aeLock} == false</code>, if the application decides not to submit a 1093fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * still capture request after the precapture sequence completes. Alternatively, for 1094fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * API level 23 or newer devices, the CANCEL can be used to unlock the camera device 1095fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * internally locked AE if the application doesn't submit a still capture request after 1096fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * the AE precapture trigger. Note that, the CANCEL was added in API level 23, and must not 1097fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * be used in devices that have earlier API levels.</p> 1098e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>The exact effect of auto-exposure (AE) precapture trigger 1099e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * depends on the current AE mode and state; see 1100b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture state transition 1101b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * details.</p> 1102fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>On LEGACY-level devices, the precapture trigger is not supported; 1103fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * capturing a high-resolution JPEG image will automatically trigger a 1104fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * precapture sequence before the high-resolution capture, including 1105fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * potentially firing a pre-capture flash.</p> 1106f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * <p>Using the precapture trigger and the auto-focus trigger {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger} 1107f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * simultaneously is allowed. However, since these triggers often require cooperation between 1108f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a 1109f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * focus sweep), the camera device may delay acting on a later trigger until the previous 1110f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * trigger has been fully handled. This may lead to longer intervals between the trigger and 1111f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * changes to {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} indicating the start of the precapture sequence, for 1112f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * example.</p> 1113f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * <p>If both the precapture and the auto-focus trigger are activated on the same request, then 1114f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * the camera device will complete them in the optimal order for that device.</p> 1115fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1116fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1117fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE IDLE}</li> 1118fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_START START}</li> 1119fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * <li>{@link #CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL CANCEL}</li> 1120fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 11214b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 11224b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Limited capability</b> - 11234b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 11244b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1125228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * 1126dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * @see CaptureRequest#CONTROL_AE_LOCK 1127228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * @see CaptureResult#CONTROL_AE_STATE 1128f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * @see CaptureRequest#CONTROL_AF_TRIGGER 1129dd72be5971039f6f61af47c956287dc28b33f34cZhijun He * @see CaptureRequest#CONTROL_CAPTURE_INTENT 11304b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 11315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE 11325a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START 1133fa95b0420ce819e5f559cd97f9edb086e9eebb71Zhijun He * @see #CONTROL_AE_PRECAPTURE_TRIGGER_CANCEL 11345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 11356c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 11365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER = 11375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.aePrecaptureTrigger", int.class); 11385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 11395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1140b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Whether auto-focus (AF) is currently enabled, and what 1141b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * mode it is set to.</p> 1142cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO and the lens is not fixed focus 11437144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * (i.e. <code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} > 0</code>). Also note that 11447144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF, the behavior of AF is device 11457144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * dependent. It is recommended to lock AF by using {@link CaptureRequest#CONTROL_AF_TRIGGER android.control.afTrigger} before 11467144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * setting {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} to OFF, or set AF mode to OFF when AE is OFF.</p> 114778146ecb24871302a4c4dc0a7341044a06d29ee8Zhijun He * <p>If the lens is controlled by the camera device auto-focus algorithm, 1148d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * the camera device will report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState} 1149fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * in result metadata.</p> 1150fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1151fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1152fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_OFF OFF}</li> 1153fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_AUTO AUTO}</li> 1154fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_MACRO MACRO}</li> 1155fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_VIDEO CONTINUOUS_VIDEO}</li> 1156fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_CONTINUOUS_PICTURE CONTINUOUS_PICTURE}</li> 1157fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_MODE_EDOF EDOF}</li> 1158fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1159fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1160fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES android.control.afAvailableModes}</p> 1161fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This key is available on all devices.</p> 11620da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 11637144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * @see CaptureRequest#CONTROL_AE_MODE 1164fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AF_AVAILABLE_MODES 1165d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * @see CaptureResult#CONTROL_AF_STATE 11667144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * @see CaptureRequest#CONTROL_AF_TRIGGER 11670da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 1168cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 11695a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_OFF 11705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_AUTO 11715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_MACRO 11725a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO 11735a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE 11745a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_MODE_EDOF 11755a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 11766c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 11775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AF_MODE = 11785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.afMode", int.class); 11795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 11805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1181fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>List of metering areas to use for auto-focus.</p> 1182fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf} is 0. 1183808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * Otherwise will always be present.</p> 1184fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The maximum number of focus areas supported by the device is determined by the value 1185fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AF android.control.maxRegionsAf}.</p> 1186ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The coordinate system is based on the active pixel array, 11872629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight * with (0,0) being the top-left pixel in the active pixel array, and 11880da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 11890da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 119097f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * bottom-right pixel in the active pixel array.</p> 1191fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The weight must be within <code>[0, 1000]</code>, and represents a weight 119297f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * for every pixel in the area. This means that a large metering area 119397f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * with the same weight as a smaller area will have more effect in 119497f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * the metering result. Metering areas can partially overlap and the 119597f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * camera device will add the weights in the overlap region.</p> 1196fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The weights are relative to weights of other metering regions, so if only one region 1197fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * is used, all non-zero weights will have the same effect. A region with 0 weight is 1198fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * ignored.</p> 1199fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If all regions have 0 weight, then no specific metering area needs to be used by the 1200fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * camera device.</p> 1201fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in 1202fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * capture result metadata, the camera device will ignore the sections outside the crop 1203fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * region and output only the intersection rectangle as the metering region in the result 1204fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * metadata. If the region is entirely outside the crop region, it will be ignored and 1205fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * not reported in the result metadata.</p> 1206fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1207fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1208fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * Coordinates must be between <code>[(0,0), (width, height))</code> of 1209fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1210808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 12110da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1212808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AF 12130da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 1214265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 12155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 12166c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 1217817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AF_REGIONS = 1218817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.afRegions", android.hardware.camera2.params.MeteringRectangle[].class); 12195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 12205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1221228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>Whether the camera device will trigger autofocus for this request.</p> 1222ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>This entry is normally set to IDLE, or is not 1223ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * included at all in the request settings.</p> 1224228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>When included and set to START, the camera device will trigger the 1225228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p> 1226228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * <p>When set to CANCEL, the camera device will cancel any active trigger, 1227228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * and return to its initial AF state.</p> 1228e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>Generally, applications should set this entry to START or CANCEL for only a 1229e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * single capture, and then return it to IDLE (or not set at all). Specifying 1230e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * START for multiple captures in a row means restarting the AF operation over 1231e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * and over again.</p> 1232e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what the trigger means for each AF mode.</p> 1233f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * <p>Using the autofocus trigger and the precapture trigger {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} 1234f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * simultaneously is allowed. However, since these triggers often require cooperation between 1235f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * the auto-focus and auto-exposure routines (for example, the may need to be enabled for a 1236f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * focus sweep), the camera device may delay acting on a later trigger until the previous 1237f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * trigger has been fully handled. This may lead to longer intervals between the trigger and 1238f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * changes to {@link CaptureResult#CONTROL_AF_STATE android.control.afState}, for example.</p> 1239fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1240fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1241fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_TRIGGER_IDLE IDLE}</li> 1242fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_TRIGGER_START START}</li> 1243fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AF_TRIGGER_CANCEL CANCEL}</li> 1244fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 12454b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1246228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * 1247f8a2f575900c527ce3fc73076fa88453a51017d0Eino-Ville Talvala * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 1248228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He * @see CaptureResult#CONTROL_AF_STATE 12495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_TRIGGER_IDLE 12505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_TRIGGER_START 12515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AF_TRIGGER_CANCEL 12525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 12536c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 12545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AF_TRIGGER = 12555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.afTrigger", int.class); 12565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 12575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1258b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Whether auto-white balance (AWB) is currently locked to its 12592d5e89778e955b4ff209a93e738761356349d48cZhijun He * latest calculated values.</p> 1260fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>When set to <code>true</code> (ON), the AWB algorithm is locked to its latest parameters, 1261fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * and will not change color balance settings until the lock is set to <code>false</code> (OFF).</p> 1262fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Since the camera device has a pipeline of in-flight requests, the settings that 1263fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * get locked do not necessarily correspond to the settings that were present in the 1264fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * latest capture result received from the camera device, since additional captures 1265fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * and AWB updates may have occurred even before the result was sent out. If an 1266fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * application is switching between automatic and manual control and wishes to eliminate 1267fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * any flicker during the switch, the following procedure is recommended:</p> 1268fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ol> 1269fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Starting in auto-AWB mode:</li> 1270fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Lock AWB</li> 1271fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Wait for the first result to be output that has the AWB locked</li> 1272fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Copy AWB settings from that result into a request, set the request to manual AWB</li> 1273fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>Submit the capture request, proceed to run manual AWB as desired.</li> 1274fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ol> 1275e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>Note that AWB lock is only meaningful when 1276e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode} is in the AUTO mode; in other modes, 1277e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * AWB is already fixed to a specific setting.</p> 12784b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>Some LEGACY devices may not support ON; the value is then overridden to OFF.</p> 12794b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1280e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * 1281e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * @see CaptureRequest#CONTROL_AWB_MODE 12825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 12836c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 12845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> CONTROL_AWB_LOCK = 12855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.control.awbLock", boolean.class); 12865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 12875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1288b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Whether auto-white balance (AWB) is currently setting the color 12895a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * transform fields, and what its illumination target 1290cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * is.</p> 1291399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is AUTO.</p> 1292e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>When set to the ON mode, the camera device's auto-white balance 1293399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * routine is enabled, overriding the application's selected 1294399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 12957144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}. Note that when {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} 12967144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * is OFF, the behavior of AWB is device dependent. It is recommened to 12977144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * also set AWB mode to OFF or lock AWB by using {@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} before 12987144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * setting AE mode to OFF.</p> 1299e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>When set to the OFF mode, the camera device's auto-white balance 1300cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * routine is disabled. The application manually controls the white 1301d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * balance by {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} 1302399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p> 1303e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>When set to any other modes, the camera device's auto-white 1304e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * balance routine is disabled. The camera device uses each 1305e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * particular illumination target for white balance 1306e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * adjustment. The application's values for 1307e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, 1308e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and 1309e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} are ignored.</p> 1310fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1311fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1312fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_OFF OFF}</li> 1313fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_AUTO AUTO}</li> 1314fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_INCANDESCENT INCANDESCENT}</li> 1315fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_FLUORESCENT FLUORESCENT}</li> 1316fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_WARM_FLUORESCENT WARM_FLUORESCENT}</li> 1317fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_DAYLIGHT DAYLIGHT}</li> 1318fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT CLOUDY_DAYLIGHT}</li> 1319fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_TWILIGHT TWILIGHT}</li> 1320fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_AWB_MODE_SHADE SHADE}</li> 1321fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1322fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1323fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES android.control.awbAvailableModes}</p> 13244b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 13250da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1326265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#COLOR_CORRECTION_GAINS 13275f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#COLOR_CORRECTION_MODE 13285f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM 13297144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * @see CaptureRequest#CONTROL_AE_MODE 1330fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AWB_AVAILABLE_MODES 13317144b5d2cf445ed245cfd9b09c7897966d01b5ffYin-Chia Yeh * @see CaptureRequest#CONTROL_AWB_LOCK 1332265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 13335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_OFF 13345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_AUTO 13355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_INCANDESCENT 13365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_FLUORESCENT 13375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT 13385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_DAYLIGHT 13395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT 13405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_TWILIGHT 13415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_AWB_MODE_SHADE 13425a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 13436c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 13445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_AWB_MODE = 13455a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.awbMode", int.class); 13465a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 13475a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1348fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>List of metering areas to use for auto-white-balance illuminant 1349f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk * estimation.</p> 1350fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Not available if {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb} is 0. 1351808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * Otherwise will always be present.</p> 1352fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The maximum number of regions supported by the device is determined by the value 1353fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * of {@link CameraCharacteristics#CONTROL_MAX_REGIONS_AWB android.control.maxRegionsAwb}.</p> 1354ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The coordinate system is based on the active pixel array, 13552629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight * with (0,0) being the top-left pixel in the active pixel array, and 13560da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1, 13570da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the 135897f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * bottom-right pixel in the active pixel array.</p> 135997f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * <p>The weight must range from 0 to 1000, and represents a weight 136097f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * for every pixel in the area. This means that a large metering area 136197f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * with the same weight as a smaller area will have more effect in 136297f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * the metering result. Metering areas can partially overlap and the 136397f1c854993a65b2c700426a1e3a83b23ea65337Yin-Chia Yeh * camera device will add the weights in the overlap region.</p> 1364fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The weights are relative to weights of other white balance metering regions, so if 1365fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * only one region is used, all non-zero weights will have the same effect. A region with 1366fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0 weight is ignored.</p> 1367fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If all regions have 0 weight, then no specific metering area needs to be used by the 1368fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * camera device.</p> 1369fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If the metering region is outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in 1370fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * capture result metadata, the camera device will ignore the sections outside the crop 1371fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * region and output only the intersection rectangle as the metering region in the result 1372fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * metadata. If the region is entirely outside the crop region, it will be ignored and 1373fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * not reported in the result metadata.</p> 1374fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Pixel coordinates within {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1375fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1376fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * Coordinates must be between <code>[(0,0), (width, height))</code> of 1377fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 1378808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 13790da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1380808150f066b53da1573e8b1fbd6b377d0fc229f8Yin-Chia Yeh * @see CameraCharacteristics#CONTROL_MAX_REGIONS_AWB 13810da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 1382265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 13835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 13846c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 1385817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh public static final Key<android.hardware.camera2.params.MeteringRectangle[]> CONTROL_AWB_REGIONS = 1386817f8933ee1c11130ad2ca45b5ac8ce8b729f125Yin-Chia Yeh new Key<android.hardware.camera2.params.MeteringRectangle[]>("android.control.awbRegions", android.hardware.camera2.params.MeteringRectangle[].class); 13875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 13885a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 138966d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>Information to the camera device 3A (auto-exposure, 139066d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * auto-focus, auto-white balance) routines about the purpose 139166d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * of this capture, to help the camera device to decide optimal 3A 139266d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * strategy.</p> 1393e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * <p>This control (except for MANUAL) is only effective if 1394e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p> 1395e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>ZERO_SHUTTER_LAG will be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} 13968062d31d27943da4d652878b4c36aeabb8bb8b08Chien-Yu Chen * contains PRIVATE_REPROCESSING or YUV_REPROCESSING. MANUAL will be supported if 1397513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR. Other intent values are 1398513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * always supported.</p> 1399fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1400fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1401fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_CUSTOM CUSTOM}</li> 1402fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_PREVIEW PREVIEW}</li> 1403fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_STILL_CAPTURE STILL_CAPTURE}</li> 1404fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_RECORD VIDEO_RECORD}</li> 1405fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT VIDEO_SNAPSHOT}</li> 1406fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li> 1407fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_CAPTURE_INTENT_MANUAL MANUAL}</li> 1408fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1409fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This key is available on all devices.</p> 14100da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 14110da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 1412e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 14135a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_CUSTOM 14145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_PREVIEW 14155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE 14165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD 14175a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT 14185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG 1419e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He * @see #CONTROL_CAPTURE_INTENT_MANUAL 14205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 14216c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 14225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_CAPTURE_INTENT = 14235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.captureIntent", int.class); 14245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 14255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 14265f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * <p>A special color effect to apply.</p> 14275f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * <p>When this mode is set, a color effect will be applied 14285f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * to images produced by the camera device. The interpretation 14295f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * and implementation of these color effects is left to the 14305f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * implementor of the camera device, and should not be 14315f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * depended on to be consistent (or present) across all 14325f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk * devices.</p> 1433fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1434fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1435fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_OFF OFF}</li> 1436fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_MONO MONO}</li> 1437fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_NEGATIVE NEGATIVE}</li> 1438fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_SOLARIZE SOLARIZE}</li> 1439fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_SEPIA SEPIA}</li> 1440fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_POSTERIZE POSTERIZE}</li> 1441fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_WHITEBOARD WHITEBOARD}</li> 1442fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_BLACKBOARD BLACKBOARD}</li> 1443fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_EFFECT_MODE_AQUA AQUA}</li> 1444fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1445fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1446fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS android.control.availableEffects}</p> 14474b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 14480da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1449fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS 14505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_OFF 14515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_MONO 14525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_NEGATIVE 14535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_SOLARIZE 14545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_SEPIA 14555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_POSTERIZE 14565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_WHITEBOARD 14575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_BLACKBOARD 14585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_EFFECT_MODE_AQUA 14595a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 14606c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 14615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_EFFECT_MODE = 14625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.effectMode", int.class); 14635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 14645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1465fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Overall mode of 3A (auto-exposure, auto-white-balance, auto-focus) control 1466cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * routines.</p> 1467fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This is a top-level 3A control switch. When set to OFF, all 3A control 14685f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * by the camera device is disabled. The application must set the fields for 1469f353742124af698098884b4172644af0851b30caZhijun He * capture parameters itself.</p> 1470f353742124af698098884b4172644af0851b30caZhijun He * <p>When set to AUTO, the individual algorithm controls in 14710da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p> 1472f353742124af698098884b4172644af0851b30caZhijun He * <p>When set to USE_SCENE_MODE, the individual controls in 14735f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * android.control.* are mostly disabled, and the camera device implements 1474f353742124af698098884b4172644af0851b30caZhijun He * one of the scene mode settings (such as ACTION, SUNSET, or PARTY) 14755f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * as it wishes. The camera device scene mode 3A settings are provided by 1476527d522f349d806fa9765130269de5a759cb6b69Zhijun He * {@link android.hardware.camera2.CaptureResult capture results}.</p> 14772d5e89778e955b4ff209a93e738761356349d48cZhijun He * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference 14782d5e89778e955b4ff209a93e738761356349d48cZhijun He * is that this frame will not be used by camera device background 3A statistics 14792d5e89778e955b4ff209a93e738761356349d48cZhijun He * update, as if this frame is never captured. This mode can be used in the scenario 14802d5e89778e955b4ff209a93e738761356349d48cZhijun He * where the application doesn't want a 3A manual control capture to affect 14812d5e89778e955b4ff209a93e738761356349d48cZhijun He * the subsequent auto 3A capture results.</p> 1482fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1483fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1484fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_MODE_OFF OFF}</li> 1485fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_MODE_AUTO AUTO}</li> 1486fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_MODE_USE_SCENE_MODE USE_SCENE_MODE}</li> 1487fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_MODE_OFF_KEEP_STATE OFF_KEEP_STATE}</li> 1488fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1489d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * <p><b>Available values for this device:</b><br> 1490d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * {@link CameraCharacteristics#CONTROL_AVAILABLE_MODES android.control.availableModes}</p> 14914b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 14920da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 14930da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_AF_MODE 1494d9fc67ce3c1498a911df39675b61b96ec1364f08Yin-Chia Yeh * @see CameraCharacteristics#CONTROL_AVAILABLE_MODES 14955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_MODE_OFF 14965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_MODE_AUTO 14975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_MODE_USE_SCENE_MODE 14982d5e89778e955b4ff209a93e738761356349d48cZhijun He * @see #CONTROL_MODE_OFF_KEEP_STATE 14995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 15006c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 15015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_MODE = 15025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.mode", int.class); 15035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 15045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1505fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Control for which scene mode is currently active.</p> 1506fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Scene modes are custom camera modes optimized for a certain set of conditions and 1507fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * capture settings.</p> 1508e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * <p>This is the mode that that is active when 1509ee2ebdedccaa708cfe810c50cc047990cc2054c5Zhijun He * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY, these modes will 1510ee2ebdedccaa708cfe810c50cc047990cc2054c5Zhijun He * disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}, {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} 1511ee2ebdedccaa708cfe810c50cc047990cc2054c5Zhijun He * while in use.</p> 1512e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * <p>The interpretation and implementation of these scene modes is left 1513e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * to the implementor of the camera device. Their behavior will not be 1514e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * consistent across all devices, and any given device may only implement 1515e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * a subset of these modes.</p> 1516fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1517fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1518fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_DISABLED DISABLED}</li> 1519fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_FACE_PRIORITY FACE_PRIORITY}</li> 1520fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_ACTION ACTION}</li> 1521fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_PORTRAIT PORTRAIT}</li> 1522fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_LANDSCAPE LANDSCAPE}</li> 1523fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_NIGHT NIGHT}</li> 1524fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_NIGHT_PORTRAIT NIGHT_PORTRAIT}</li> 1525fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_THEATRE THEATRE}</li> 1526fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_BEACH BEACH}</li> 1527fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_SNOW SNOW}</li> 1528fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_SUNSET SUNSET}</li> 1529fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_STEADYPHOTO STEADYPHOTO}</li> 1530fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_FIREWORKS FIREWORKS}</li> 1531fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_SPORTS SPORTS}</li> 1532fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_PARTY PARTY}</li> 1533fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_CANDLELIGHT CANDLELIGHT}</li> 1534fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_BARCODE BARCODE}</li> 1535fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO HIGH_SPEED_VIDEO}</li> 1536f4eac129545fd583d33d9e7ab05cc87f61079bb9Eino-Ville Talvala * <li>{@link #CONTROL_SCENE_MODE_HDR HDR}</li> 1537fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1538fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1539fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES android.control.availableSceneModes}</p> 15404b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 15410da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 1542e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see CaptureRequest#CONTROL_AE_MODE 1543e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see CaptureRequest#CONTROL_AF_MODE 1544e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * @see CameraCharacteristics#CONTROL_AVAILABLE_SCENE_MODES 1545e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see CaptureRequest#CONTROL_AWB_MODE 15460da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 1547e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk * @see #CONTROL_SCENE_MODE_DISABLED 15485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_FACE_PRIORITY 15495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_ACTION 15505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_PORTRAIT 15515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_LANDSCAPE 15525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_NIGHT 15535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT 15545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_THEATRE 15555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_BEACH 15565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_SNOW 15575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_SUNSET 15585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_STEADYPHOTO 15595a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_FIREWORKS 15605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_SPORTS 15615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_PARTY 15625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_CANDLELIGHT 15635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_BARCODE 1564e040418f4779c37aa9df69a3916d376af9d2e868Zhijun He * @see #CONTROL_SCENE_MODE_HIGH_SPEED_VIDEO 1565f4eac129545fd583d33d9e7ab05cc87f61079bb9Eino-Ville Talvala * @see #CONTROL_SCENE_MODE_HDR 15665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 15676c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 15685a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> CONTROL_SCENE_MODE = 15695a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.control.sceneMode", int.class); 15705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 15715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1572ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether video stabilization is 1573b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * active.</p> 15742813b0fae99fed1096dc23c3899e223459a54cecJianing Wei * <p>Video stabilization automatically warps images from 1575fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the camera in order to stabilize motion between consecutive frames.</p> 1576ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>If enabled, video stabilization can modify the 157745fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream stabilized.</p> 1578fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Switching between different video stabilization modes may take several 1579fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * frames to initialize, the camera device will report the current mode 1580fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * in capture result metadata. For example, When "ON" mode is requested, 1581fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the video stabilization modes in the first several capture results may 1582fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * still be "OFF", and it will become "ON" when the initialization is 1583fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * done.</p> 15842813b0fae99fed1096dc23c3899e223459a54cecJianing Wei * <p>In addition, not all recording sizes or frame rates may be supported for 15852813b0fae99fed1096dc23c3899e223459a54cecJianing Wei * stabilization by a device that reports stabilization support. It is guaranteed 15862813b0fae99fed1096dc23c3899e223459a54cecJianing Wei * that an output targeting a MediaRecorder or MediaCodec will be stabilized if 15872813b0fae99fed1096dc23c3899e223459a54cecJianing Wei * the recording resolution is less than or equal to 1920 x 1080 (width less than 15882813b0fae99fed1096dc23c3899e223459a54cecJianing Wei * or equal to 1920, height less than or equal to 1080), and the recording 15892813b0fae99fed1096dc23c3899e223459a54cecJianing Wei * frame rate is less than or equal to 30fps. At other sizes, the CaptureResult 15902813b0fae99fed1096dc23c3899e223459a54cecJianing Wei * {@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode} field will return 15912813b0fae99fed1096dc23c3899e223459a54cecJianing Wei * OFF if the recording output is not stabilized, or if there are no output 15922813b0fae99fed1096dc23c3899e223459a54cecJianing Wei * Surface types that can be stabilized.</p> 1593fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If a camera device supports both this mode and OIS 1594fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * ({@link CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE android.lens.opticalStabilizationMode}), turning both modes on may 1595fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * produce undesirable interaction, so it is recommended not to enable 1596fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * both at the same time.</p> 1597fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1598fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1599fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_OFF OFF}</li> 1600fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #CONTROL_VIDEO_STABILIZATION_MODE_ON ON}</li> 1601fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 16024b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 16030da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 16042813b0fae99fed1096dc23c3899e223459a54cecJianing Wei * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 160545fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * @see CaptureRequest#LENS_OPTICAL_STABILIZATION_MODE 16060da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#SCALER_CROP_REGION 16074793af5e3577c51858719a8977d300c3aafdf881Zhijun He * @see #CONTROL_VIDEO_STABILIZATION_MODE_OFF 16084793af5e3577c51858719a8977d300c3aafdf881Zhijun He * @see #CONTROL_VIDEO_STABILIZATION_MODE_ON 16095a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 16106c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 16114793af5e3577c51858719a8977d300c3aafdf881Zhijun He public static final Key<Integer> CONTROL_VIDEO_STABILIZATION_MODE = 16124793af5e3577c51858719a8977d300c3aafdf881Zhijun He new Key<Integer>("android.control.videoStabilizationMode", int.class); 16135a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 16145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 161533052d3359afe52514987298bc0b7cb1436247a5Yin-Chia Yeh * <p>The amount of additional sensitivity boost applied to output images 16161ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * after RAW sensor data is captured.</p> 16171ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * <p>Some camera devices support additional digital sensitivity boosting in the 16181ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * camera processing pipeline after sensor RAW image is captured. 16191ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * Such a boost will be applied to YUV/JPEG format output images but will not 16201ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE.</p> 162133052d3359afe52514987298bc0b7cb1436247a5Yin-Chia Yeh * <p>This key will be <code>null</code> for devices that do not support any RAW format 162233052d3359afe52514987298bc0b7cb1436247a5Yin-Chia Yeh * outputs. For devices that do support RAW format outputs, this key will always 162333052d3359afe52514987298bc0b7cb1436247a5Yin-Chia Yeh * present, and if a device does not support post RAW sensitivity boost, it will 162433052d3359afe52514987298bc0b7cb1436247a5Yin-Chia Yeh * list <code>100</code> in this key.</p> 16251ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * <p>If the camera device cannot apply the exact boost requested, it will reduce the 16261ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * boost to the nearest supported value. 16271ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * The final boost value used will be available in the output capture result.</p> 16281ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * <p>For devices that support post RAW sensitivity boost, the YUV/JPEG output images 16291ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * of such device will have the total sensitivity of 163067e61b6d222e310148e196fab4801dd8298efb5eYin-Chia Yeh * <code>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity} * {@link CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST android.control.postRawSensitivityBoost} / 100</code> 16311ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * The sensitivity of RAW format images will always be <code>{@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</code></p> 16321ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * <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 16331ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * OFF; otherwise the auto-exposure algorithm will override this value.</p> 16341ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * <p><b>Units</b>: ISO arithmetic units, the same as {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}</p> 16351ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * <p><b>Range of valid values:</b><br> 16361ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * {@link CameraCharacteristics#CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE android.control.postRawSensitivityBoostRange}</p> 16371ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 16381ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * 16391ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * @see CaptureRequest#CONTROL_AE_MODE 16401ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * @see CaptureRequest#CONTROL_MODE 16411ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * @see CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST 16421ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * @see CameraCharacteristics#CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE 16431ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * @see CaptureRequest#SENSOR_SENSITIVITY 16441ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh */ 16451ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh @PublicKey 16461ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh public static final Key<Integer> CONTROL_POST_RAW_SENSITIVITY_BOOST = 16471ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh new Key<Integer>("android.control.postRawSensitivityBoost", int.class); 16481ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh 16491ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh /** 1650e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * <p>Allow camera device to enable zero-shutter-lag mode for requests with 1651e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} == STILL_CAPTURE.</p> 1652e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * <p>If enableZsl is <code>true</code>, the camera device may enable zero-shutter-lag mode for requests with 1653e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * STILL_CAPTURE capture intent. The camera device may use images captured in the past to 1654e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * produce output images for a zero-shutter-lag request. The result metadata including the 1655e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp} reflects the source frames used to produce output images. 1656e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * Therefore, the contents of the output images and the result metadata may be out of order 1657e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * compared to previous regular requests. enableZsl does not affect requests with other 1658e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * capture intents.</p> 1659e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * <p>For example, when requests are submitted in the following order: 1660e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * Request A: enableZsl is ON, {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} is PREVIEW 1661e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * Request B: enableZsl is ON, {@link CaptureRequest#CONTROL_CAPTURE_INTENT android.control.captureIntent} is STILL_CAPTURE</p> 1662e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * <p>The output images for request B may have contents captured before the output images for 1663e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * request A, and the result metadata for request B may be older than the result metadata for 1664e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * request A.</p> 16651d72ee3b85a31b62a1a088e72c296f29b435d1d2Chien-Yu Chen * <p>Note that when enableZsl is <code>true</code>, it is not guaranteed to get output images captured in 16661d72ee3b85a31b62a1a088e72c296f29b435d1d2Chien-Yu Chen * the past for requests with STILL_CAPTURE capture intent.</p> 16671d72ee3b85a31b62a1a088e72c296f29b435d1d2Chien-Yu Chen * <p>For applications targeting SDK versions O and newer, the value of enableZsl in 16681d72ee3b85a31b62a1a088e72c296f29b435d1d2Chien-Yu Chen * TEMPLATE_STILL_CAPTURE template may be <code>true</code>. The value in other templates is always 16691d72ee3b85a31b62a1a088e72c296f29b435d1d2Chien-Yu Chen * <code>false</code> if present.</p> 16701d72ee3b85a31b62a1a088e72c296f29b435d1d2Chien-Yu Chen * <p>For applications targeting SDK versions older than O, the value of enableZsl in all 16711d72ee3b85a31b62a1a088e72c296f29b435d1d2Chien-Yu Chen * capture templates is always <code>false</code> if present.</p> 16728102638c714a0c6c201d764f4a54002c21be1a63Chien-Yu Chen * <p>For application-operated ZSL, use CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.</p> 1673e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 1674e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * 1675e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * @see CaptureRequest#CONTROL_CAPTURE_INTENT 1676e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen * @see CaptureResult#SENSOR_TIMESTAMP 1677e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen */ 1678e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen @PublicKey 1679e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen public static final Key<Boolean> CONTROL_ENABLE_ZSL = 1680e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen new Key<Boolean>("android.control.enableZsl", boolean.class); 1681e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen 1682e449171fc15aba2928a6e267a7214edbb470e812Chien-Yu Chen /** 1683ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Operation mode for edge 1684cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * enhancement.</p> 1685fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Edge enhancement improves sharpness and details in the captured image. OFF means 1686fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * no enhancement will be applied by the camera device.</p> 16875f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement 16882807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He * will be applied. HIGH_QUALITY mode indicates that the 16895f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * camera device will use the highest-quality enhancement algorithms, 16905f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * even if it slows down capture rate. FAST means the camera device will 16919c9167efe229f2d7bad0422c371923d5d1776f52Chien-Yu Chen * not slow down capture rate when applying edge enhancement. FAST may be the same as OFF if 16929c9167efe229f2d7bad0422c371923d5d1776f52Chien-Yu Chen * edge enhancement will slow down capture rate. Every output stream will have a similar 16939c9167efe229f2d7bad0422c371923d5d1776f52Chien-Yu Chen * amount of enhancement applied.</p> 16940dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular 16950dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * buffer of high-resolution images during preview and reprocess image(s) from that buffer 16960dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * into a final capture when triggered by the user. In this mode, the camera device applies 16970dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * edge enhancement to low-resolution streams (below maximum recording resolution) to 16980dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * maximize preview quality, but does not apply edge enhancement to high-resolution streams, 16990dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * since those will be reprocessed later if necessary.</p> 17000e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera 17010e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * device will apply FAST/HIGH_QUALITY YUV-domain edge enhancement, respectively. 17029c9167efe229f2d7bad0422c371923d5d1776f52Chien-Yu Chen * The camera device may adjust its internal edge enhancement parameters for best 17030e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * image quality based on the {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}, if it is set.</p> 1704fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1705fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1706fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #EDGE_MODE_OFF OFF}</li> 1707fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #EDGE_MODE_FAST FAST}</li> 1708fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #EDGE_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 17090dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * <li>{@link #EDGE_MODE_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li> 1710fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1711fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1712fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}</p> 17134b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 17144b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 17154b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 17164b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 17176dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * 17186dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES 17194b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 17200e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR 17215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #EDGE_MODE_OFF 17225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #EDGE_MODE_FAST 17235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #EDGE_MODE_HIGH_QUALITY 17240dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * @see #EDGE_MODE_ZERO_SHUTTER_LAG 17255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 17266c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 17275a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> EDGE_MODE = 17285a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.edge.mode", int.class); 17295a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 17305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 173166d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>The desired mode for for the camera device's flash control.</p> 173266d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>This control is only effective when flash unit is available 1733153ac102d36df66853b523ab01763dc457972517Zhijun He * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p> 173466d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF. 173566d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH, 173666d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p> 173766d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When set to OFF, the camera device will not fire flash for this capture.</p> 173866d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When set to SINGLE, the camera device will fire flash regardless of the camera 173966d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * device's auto-exposure routine's result. When used in still capture case, this 1740b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * control should be used along with auto-exposure (AE) precapture metering sequence 174166d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p> 174266d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * <p>When set to TORCH, the flash will be on continuously. This mode can be used 174366d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * for use cases such as preview, auto-focus assist, still capture, or video recording.</p> 1744ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * <p>The flash status will be reported by {@link CaptureResult#FLASH_STATE android.flash.state} in the capture result metadata.</p> 1745fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1746fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1747fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #FLASH_MODE_OFF OFF}</li> 1748fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #FLASH_MODE_SINGLE SINGLE}</li> 1749fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #FLASH_MODE_TORCH TORCH}</li> 1750fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 17514b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 175266d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * 175366d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 175466d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER 175566d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He * @see CameraCharacteristics#FLASH_INFO_AVAILABLE 1756ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#FLASH_STATE 17575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #FLASH_MODE_OFF 17585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #FLASH_MODE_SINGLE 17595a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #FLASH_MODE_TORCH 17605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 17616c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 17625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> FLASH_MODE = 17635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.flash.mode", int.class); 17645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 17655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1766fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Operational mode for hot pixel correction.</p> 1767eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * <p>Hotpixel correction interpolates out, or otherwise removes, pixels 1768fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * that do not accurately measure the incoming light (i.e. pixels that 1769fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * are stuck at an arbitrary value or are oversensitive).</p> 1770fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 1771fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 1772fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #HOT_PIXEL_MODE_OFF OFF}</li> 1773fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #HOT_PIXEL_MODE_FAST FAST}</li> 1774fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #HOT_PIXEL_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 1775fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 1776fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 1777fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}</p> 17784b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 17799d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * 17809d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES 1781eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * @see #HOT_PIXEL_MODE_OFF 1782eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * @see #HOT_PIXEL_MODE_FAST 1783eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk * @see #HOT_PIXEL_MODE_HIGH_QUALITY 1784eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk */ 17856c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 1786eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk public static final Key<Integer> HOT_PIXEL_MODE = 1787eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk new Key<Integer>("android.hotPixel.mode", int.class); 1788eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk 1789eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk /** 1790574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * <p>A location object to use when generating image GPS metadata.</p> 1791fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Setting a location object in a request will include the GPS coordinates of the location 1792fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * into any JPEG images captured based on the request. These coordinates can then be 1793fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * viewed by anyone who receives the JPEG image.</p> 17944b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1795574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk */ 17966c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 17976c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @SyntheticKey 1798574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk public static final Key<android.location.Location> JPEG_GPS_LOCATION = 1799574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk new Key<android.location.Location>("android.jpeg.gpsLocation", android.location.Location.class); 1800574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk 1801574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk /** 1802ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>GPS coordinates to include in output JPEG 1803fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * EXIF.</p> 1804fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1805fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (-180 - 180], [-90,90], [-inf, inf]</p> 18064b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1807574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * @hide 18085a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 18095a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<double[]> JPEG_GPS_COORDINATES = 18105a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<double[]>("android.jpeg.gpsCoordinates", double[].class); 18115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 18125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1813ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>32 characters describing GPS algorithm to 1814fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * include in EXIF.</p> 1815fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: UTF-8 null-terminated string</p> 18164b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1817574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * @hide 18185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 18195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<String> JPEG_GPS_PROCESSING_METHOD = 18205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<String>("android.jpeg.gpsProcessingMethod", String.class); 18215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 18225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1823ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Time GPS fix was made to include in 1824fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * EXIF.</p> 1825fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: UTC in seconds since January 1, 1970</p> 18264b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1827574936894d3044445a272b39f2d925af40ece5d8Ruben Brunk * @hide 18285a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 18295a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Long> JPEG_GPS_TIMESTAMP = 18305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Long>("android.jpeg.gpsTimestamp", long.class); 18315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 18325a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1833fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The orientation for a JPEG image.</p> 1834fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The clockwise rotation angle in degrees, relative to the orientation 1835fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * to the camera, that the JPEG picture needs to be rotated by, to be viewed 1836fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * upright.</p> 1837fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Camera devices may either encode this value into the JPEG EXIF header, or 1838d49ebcc3ad3d37d9c37e638db5d308c9c22c30fbYin-Chia Yeh * rotate the image data to match this orientation. When the image data is rotated, 1839d49ebcc3ad3d37d9c37e638db5d308c9c22c30fbYin-Chia Yeh * the thumbnail data will also be rotated.</p> 1840fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Note that this orientation is relative to the orientation of the camera sensor, given 1841fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * by {@link CameraCharacteristics#SENSOR_ORIENTATION android.sensor.orientation}.</p> 1842fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>To translate from the device orientation given by the Android sensor APIs, the following 1843fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * sample code may be used:</p> 1844fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <pre><code>private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) { 1845fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0; 1846fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * int sensorOrientation = c.get(CameraCharacteristics.SENSOR_ORIENTATION); 1847fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1848fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * // Round device orientation to a multiple of 90 1849fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * deviceOrientation = (deviceOrientation + 45) / 90 * 90; 1850fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1851fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * // Reverse device orientation for front-facing cameras 1852fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * boolean facingFront = c.get(CameraCharacteristics.LENS_FACING) == CameraCharacteristics.LENS_FACING_FRONT; 1853fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * if (facingFront) deviceOrientation = -deviceOrientation; 1854fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1855fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * // Calculate desired JPEG orientation relative to camera orientation to make 1856fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * // the image upright relative to the device orientation 1857fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * int jpegOrientation = (sensorOrientation + deviceOrientation + 360) % 360; 1858fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1859fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * return jpegOrientation; 1860fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * } 1861fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </code></pre> 1862fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Degrees in multiples of 90</p> 1863fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1864fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0, 90, 180, 270</p> 18654b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1866fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1867fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_ORIENTATION 18685a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 18696c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 18705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> JPEG_ORIENTATION = 18715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.jpeg.orientation", int.class); 18725a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 18735a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1874ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Compression quality of the final JPEG 1875b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * image.</p> 1876e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>85-95 is typical usage range.</p> 1877fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1878fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1-100; larger is higher quality</p> 18794b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 18805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 18816c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 18825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Byte> JPEG_QUALITY = 18835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Byte>("android.jpeg.quality", byte.class); 18845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 18855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1886ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Compression quality of JPEG 1887e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * thumbnail.</p> 1888fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1889fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1-100; larger is higher quality</p> 18904b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 18915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 18926c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 18935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Byte> JPEG_THUMBNAIL_QUALITY = 18945a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Byte>("android.jpeg.thumbnailQuality", byte.class); 18955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 18965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1897b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Resolution of embedded JPEG thumbnail.</p> 18985f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail, 18995f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * but the captured JPEG will still be a valid image.</p> 1900fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>For best results, when issuing a request for a JPEG image, the thumbnail size selected 1901fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * should have the same aspect ratio as the main JPEG output.</p> 190250f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * <p>If the thumbnail image aspect ratio differs from the JPEG primary image aspect 190350f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * ratio, the camera device creates the thumbnail by cropping it from the primary image. 190450f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * For example, if the primary image has 4:3 aspect ratio, the thumbnail image has 190550f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * 16:9 aspect ratio, the primary image will be cropped vertically (letterbox) to 190650f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * generate the thumbnail image. The thumbnail image will always have a smaller Field 190750f7243ca068c793c8b5aca37a9e983b630c477fZhijun He * Of View (FOV) than the primary image when aspect ratios differ.</p> 19085988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * <p>When an {@link CaptureRequest#JPEG_ORIENTATION android.jpeg.orientation} of non-zero degree is requested, 19095988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * the camera device will handle thumbnail rotation in one of the following ways:</p> 19105988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * <ul> 19115988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * <li>Set the {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag} 19125988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * and keep jpeg and thumbnail image data unrotated.</li> 19135988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * <li>Rotate the jpeg and thumbnail image data and not set 19145988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * {@link android.media.ExifInterface#TAG_ORIENTATION EXIF orientation flag}. In this 19155988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * case, LIMITED or FULL hardware level devices will report rotated thumnail size in 19165988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * capture result, so the width and height will be interchanged if 90 or 270 degree 19175988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * orientation is requested. LEGACY device will always report unrotated thumbnail 19185988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * size.</li> 19195988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * </ul> 1920fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1921fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES android.jpeg.availableThumbnailSizes}</p> 19224b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 1923fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1924fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#JPEG_AVAILABLE_THUMBNAIL_SIZES 19255988311cbbde38e09e3cc743e6a398034968ed55Yin-Chia Yeh * @see CaptureRequest#JPEG_ORIENTATION 19265a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 19276c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 192872f9f0a96e4476ef231d5001cb30521ad4ce5b1eIgor Murashkin public static final Key<android.util.Size> JPEG_THUMBNAIL_SIZE = 192972f9f0a96e4476ef231d5001cb30521ad4ce5b1eIgor Murashkin new Key<android.util.Size>("android.jpeg.thumbnailSize", android.util.Size.class); 19305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 19315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1932fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The desired lens aperture size, as a ratio of lens focal length to the 1933fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * effective aperture diameter.</p> 1934fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Setting this value is only supported on the camera devices that have a variable 1935fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * aperture lens.</p> 1936fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF, 1937fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}, 1938d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration} 1939fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * to achieve manual exposure control.</p> 1940fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * <p>The requested aperture value may take several frames to reach the 1941fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * requested value; the camera device will report the current (intermediate) 1942ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * aperture size in capture result metadata while the aperture is changing. 1943ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * While the aperture is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 1944fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of 1945fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * the ON modes, this will be overridden by the camera device 1946fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * auto-exposure algorithm, the overridden values are then provided 1947fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * back to the user in the corresponding result.</p> 1948fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: The f-number (f/N)</p> 1949fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1950fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}</p> 19514b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 19524b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 19534b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 19544b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1955fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He * 1956399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 19574b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1958265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES 1959ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#LENS_STATE 1960265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#SENSOR_EXPOSURE_TIME 1961d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * @see CaptureRequest#SENSOR_FRAME_DURATION 1962265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala * @see CaptureRequest#SENSOR_SENSITIVITY 19635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 19646c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 19655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_APERTURE = 19665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.aperture", float.class); 19675a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 19685a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1969fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The desired setting for the lens neutral density filter(s).</p> 1970fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This control will not be supported on most camera devices.</p> 1971855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * <p>Lens filters are typically used to lower the amount of light the 1972855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * sensor is exposed to (measured in steps of EV). As used here, an EV 1973855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * step is the standard logarithmic representation, which are 1974855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * non-negative, and inversely proportional to the amount of light 1975855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * hitting the sensor. For example, setting this to 0 would result 1976855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * in no reduction of the incoming light, and setting this to 2 would 1977855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * mean that the filter is set to reduce incoming light by two stops 1978855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * (allowing 1/4 of the prior amount of light to the sensor).</p> 1979ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * <p>It may take several frames before the lens filter density changes 1980ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * to the requested value. While the filter density is still changing, 1981ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 1982fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Exposure Value (EV)</p> 1983fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 1984fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}</p> 19854b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 19864b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 19874b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 19884b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 1989855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * 19904b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 1991855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES 1992ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#LENS_STATE 19935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 19946c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 19955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_FILTER_DENSITY = 19965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.filterDensity", float.class); 19975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 19985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 1999fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The desired lens focal length; used for optical zoom.</p> 2000a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * <p>This setting controls the physical focal length of the camera 2001a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * device's lens. Changing the focal length changes the field of 2002a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * view of the camera device, and is usually used for optical zoom.</p> 2003a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this 2004a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * setting won't be applied instantaneously, and it may take several 2005ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * frames before the lens can change to the requested focal length. 2006a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will 2007a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * be set to MOVING.</p> 2008fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Optical zoom will not be supported on most devices.</p> 2009fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Millimeters</p> 2010fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2011fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS android.lens.info.availableFocalLengths}</p> 20124b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 2013a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * 2014a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * @see CaptureRequest#LENS_APERTURE 2015a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * @see CaptureRequest#LENS_FOCUS_DISTANCE 2016fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS 2017a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk * @see CaptureResult#LENS_STATE 20185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 20196c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 20205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_FOCAL_LENGTH = 20215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.focalLength", float.class); 20225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 20235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2024fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Desired distance to plane of sharpest focus, 2025b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * measured from frontmost surface of the lens.</p> 2026fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This control can be used for setting manual focus, on devices that support 2027fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the MANUAL_SENSOR capability and have a variable-focus lens (see 2028fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}).</p> 2029fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>A value of <code>0.0f</code> means infinity focus. The value set will be clamped to 2030fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <code>[0.0f, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}]</code>.</p> 2031ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * <p>Like {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, this setting won't be applied 2032ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * instantaneously, and it may take several frames before the lens 2033ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * can move to the requested focus distance. While the lens is still moving, 2034ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p> 20354b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>LEGACY devices support at most setting this to <code>0.0f</code> 20364b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * for infinity focus.</p> 2037fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: See {@link CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION android.lens.info.focusDistanceCalibration} for details</p> 2038fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2039fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * >= 0</p> 20404b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 20414b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 20424b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 20434b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2044ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * 20454b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2046ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureRequest#LENS_FOCAL_LENGTH 2047fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#LENS_INFO_FOCUS_DISTANCE_CALIBRATION 2048ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE 2049ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He * @see CaptureResult#LENS_STATE 20505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 20516c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 20525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Float> LENS_FOCUS_DISTANCE = 20535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Float>("android.lens.focusDistance", float.class); 20545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 20555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 205600849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * <p>Sets whether the camera device uses optical image stabilization (OIS) 205700849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk * when capturing images.</p> 2058e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>OIS is used to compensate for motion blur due to small 2059e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * movements of the camera during capture. Unlike digital image 2060e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * stabilization ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), OIS 2061e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * makes use of mechanical elements to stabilize the camera 2062e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * sensor, and thus allows for longer exposure times before 2063e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * camera shake becomes apparent.</p> 206445fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * <p>Switching between different optical stabilization modes may take several 206545fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * frames to initialize, the camera device will report the current mode in 206645fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * capture result metadata. For example, When "ON" mode is requested, the 206745fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * optical stabilization modes in the first several capture results may still 206845fa43a1815e2d0a25ed3a126e4e732a03b7ed7fZhijun He * be "OFF", and it will become "ON" when the initialization is done.</p> 2069fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If a camera device supports both OIS and digital image stabilization 2070fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * ({@link CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE android.control.videoStabilizationMode}), turning both modes on may produce undesirable 2071fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * interaction, so it is recommended not to enable both at the same time.</p> 2072e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>Not all devices will support OIS; see 2073e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization} for 2074e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * available controls.</p> 2075fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2076fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2077fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_OFF OFF}</li> 2078fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #LENS_OPTICAL_STABILIZATION_MODE_ON ON}</li> 2079fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2080fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 2081fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION android.lens.info.availableOpticalStabilization}</p> 20824b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 20834b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Limited capability</b> - 20844b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 20854b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2086e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * 2087e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * @see CaptureRequest#CONTROL_VIDEO_STABILIZATION_MODE 20884b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2089e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * @see CameraCharacteristics#LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION 20905a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF 20915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #LENS_OPTICAL_STABILIZATION_MODE_ON 20925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 20936c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 20945a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE = 20955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.lens.opticalStabilizationMode", int.class); 20965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 20975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2098e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * <p>Mode of operation for the noise reduction algorithm.</p> 2099fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The noise reduction algorithm attempts to improve image quality by removing 21000e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * excessive noise added by the capture process, especially in dark conditions.</p> 21010e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>OFF means no noise reduction will be applied by the camera device, for both raw and 21020e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * YUV domain.</p> 21030e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>MINIMAL means that only sensor raw domain basic noise reduction is enabled ,to remove 21040e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * demosaicing or other processing artifacts. For YUV_REPROCESSING, MINIMAL is same as OFF. 21050e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * This mode is optional, may not be support by all devices. The application should check 21060e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes} before using it.</p> 21075f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering 21085f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * will be applied. HIGH_QUALITY mode indicates that the camera device 21095f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * will use the highest-quality noise filtering algorithms, 2110e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * even if it slows down capture rate. FAST means the camera device will not 21119c9167efe229f2d7bad0422c371923d5d1776f52Chien-Yu Chen * slow down capture rate when applying noise filtering. FAST may be the same as MINIMAL if 21129c9167efe229f2d7bad0422c371923d5d1776f52Chien-Yu Chen * MINIMAL is listed, or the same as OFF if any noise filtering will slow down capture rate. 21139c9167efe229f2d7bad0422c371923d5d1776f52Chien-Yu Chen * Every output stream will have a similar amount of enhancement applied.</p> 21140dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * <p>ZERO_SHUTTER_LAG is meant to be used by applications that maintain a continuous circular 21150dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * buffer of high-resolution images during preview and reprocess image(s) from that buffer 21160dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * into a final capture when triggered by the user. In this mode, the camera device applies 21170dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * noise reduction to low-resolution streams (below maximum recording resolution) to maximize 21180dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * preview quality, but does not apply noise reduction to high-resolution streams, since 21190dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * those will be reprocessed later if necessary.</p> 21200e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>For YUV_REPROCESSING, these FAST/HIGH_QUALITY modes both mean that the camera device 21210e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * will apply FAST/HIGH_QUALITY YUV domain noise reduction, respectively. The camera device 21220e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * may adjust the noise reduction parameters for best image quality based on the 21230e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * {@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor} if it is set.</p> 2124fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2125fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2126fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #NOISE_REDUCTION_MODE_OFF OFF}</li> 2127fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #NOISE_REDUCTION_MODE_FAST FAST}</li> 2128fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #NOISE_REDUCTION_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 21290e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <li>{@link #NOISE_REDUCTION_MODE_MINIMAL MINIMAL}</li> 21300dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * <li>{@link #NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG ZERO_SHUTTER_LAG}</li> 2131fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2132fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 2133fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}</p> 21344b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 21354b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 21364b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 21374b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 21386dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * 21394b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 21406dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES 21410e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR 21425a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #NOISE_REDUCTION_MODE_OFF 21435a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #NOISE_REDUCTION_MODE_FAST 21445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY 21450e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see #NOISE_REDUCTION_MODE_MINIMAL 21460dd17509a953774039c0e73beac4b0546504c774Eino-Ville Talvala * @see #NOISE_REDUCTION_MODE_ZERO_SHUTTER_LAG 21475a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 21486c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 21495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> NOISE_REDUCTION_MODE = 21505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.noiseReduction.mode", int.class); 21515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 21525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2153ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>An application-specified ID for the current 21545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * request. Must be maintained unchanged in output 2155ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * frame</p> 2156fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: arbitrary integer assigned by application</p> 2157fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2158fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * Any int</p> 21594b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 21605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @hide 21615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 21625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> REQUEST_ID = 21635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.request.id", int.class); 21645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 21655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2166fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The desired region of the sensor to read out for this capture.</p> 2167fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This control can be used to implement digital zoom.</p> 2168b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The crop region coordinate system is based off 2169b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}, with <code>(0, 0)</code> being the 2170b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * top-left corner of the sensor active array.</p> 2171b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>Output streams use this rectangle to produce their output, 2172b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * cropping to a smaller region if necessary to maintain the 2173b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * stream's aspect ratio, then scaling the sensor input to 2174b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * match the output's configured resolution.</p> 2175b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The crop region is applied after the RAW to other color 2176b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * space (e.g. YUV) conversion. Since raw streams 2177b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * (e.g. RAW16) don't have the conversion stage, they are not 2178b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * croppable. The crop region will be ignored by raw streams.</p> 21799e6d1880c288d7d0ddcb651dda88d069f058ecedZhijun He * <p>For non-raw streams, any additional per-stream cropping will 21809e6d1880c288d7d0ddcb651dda88d069f058ecedZhijun He * be done to maximize the final pixel area of the stream.</p> 2181ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>For example, if the crop region is set to a 4:3 aspect 2182b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * ratio, then 4:3 streams will use the exact crop 2183b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * region. 16:9 streams will further crop vertically 2184ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * (letterbox).</p> 2185ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Conversely, if the crop region is set to a 16:9, then 4:3 2186b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * outputs will crop horizontally (pillarbox), and 16:9 2187b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * streams will match exactly. These additional crops will 2188ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * be centered within the crop region.</p> 2189b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The width and height of the crop region cannot 2190b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * be set to be smaller than 2191b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <code>floor( activeArraySize.width / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code> and 2192b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <code>floor( activeArraySize.height / {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} )</code>, respectively.</p> 2193b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The camera device may adjust the crop region to account 2194b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * for rounding and other hardware requirements; the final 2195b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * crop region used will be included in the output capture 2196b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * result.</p> 2197fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Pixel coordinates relative to 2198fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</p> 21994b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p>This key is available on all devices.</p> 2200d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * 2201d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM 2202b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE 22035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 22046c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 22055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<android.graphics.Rect> SCALER_CROP_REGION = 22065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class); 22075a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 22085a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2209ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Duration each pixel is exposed to 2210ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * light.</p> 2211fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>If the sensor can't expose this exact duration, it will shorten the 2212fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * duration exposed to the nearest possible value (rather than expose longer). 2213fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * The final exposure time used will be available in the output capture result.</p> 2214fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-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 2215fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * OFF; otherwise the auto-exposure algorithm will override this value.</p> 2216fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Nanoseconds</p> 2217fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2218fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</p> 22194b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 22204b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 22214b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 22224b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 22234b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * 2224fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureRequest#CONTROL_AE_MODE 2225fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 22264b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2227fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE 22285a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 22296c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 22305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Long> SENSOR_EXPOSURE_TIME = 22315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Long>("android.sensor.exposureTime", long.class); 22325a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 22335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2234ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Duration from start of frame exposure to 2235143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * start of next frame exposure.</p> 2236143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>The maximum frame rate that can be supported by a camera subsystem is 2237143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * a function of many factors:</p> 2238143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <ul> 2239143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Requested resolutions of output image streams</li> 2240143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Availability of binning / skipping modes on the imager</li> 2241143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>The bandwidth of the imager interface</li> 2242143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>The bandwidth of the various ISP processing blocks</li> 2243143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * </ul> 2244143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>Since these factors can vary greatly between different ISPs and 2245143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * sensors, the camera abstraction tries to represent the bandwidth 2246143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * restrictions with as simple a model as possible.</p> 2247143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>The model presented has the following characteristics:</p> 2248143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <ul> 2249143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>The image sensor is always configured to output the smallest 2250143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * resolution possible given the application's requested output stream 2251143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * sizes. The smallest resolution is defined as being at least as large 2252143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * as the largest requested output stream size; the camera pipeline must 2253143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * never digitally upsample sensor data when the crop region covers the 2254143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * whole sensor. In general, this means that if only small output stream 2255143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * resolutions are configured, the sensor can provide a higher frame 2256143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * rate.</li> 2257143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Since any request may use any or all the currently configured 2258143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * output streams, the sensor and ISP must be configured to support 2259143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * scaling a single capture to all the streams at the same time. This 2260143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * means the camera pipeline must be ready to produce the largest 2261143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * requested output size without any delay. Therefore, the overall 2262143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * frame rate of a given configured stream set is governed only by the 2263143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * largest requested stream resolution.</li> 2264143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <li>Using more than one output stream in a request does not affect the 2265143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * frame duration.</li> 2266a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <li>Certain format-streams may need to do additional background processing 2267a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * before data is consumed/produced by that stream. These processors 2268a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * can run concurrently to the rest of the camera pipeline, but 2269a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * cannot process more than 1 capture at a time.</li> 2270143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * </ul> 2271143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>The necessary information for the application, given the model above, 2272b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * is provided via the {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} field using 2273b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration }. 2274143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * These are used to determine the maximum frame rate / minimum frame 2275143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * duration that is possible for a given stream configuration.</p> 2276143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <p>Specifically, the application can use the following rules to 2277a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * determine the minimum frame duration it can request from the camera 2278143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * device:</p> 2279143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * <ol> 2280a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <li>Let the set of currently configured input/output streams 2281a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * be called <code>S</code>.</li> 2282b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * <li>Find the minimum frame durations for each stream in <code>S</code>, by looking 2283b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * it up in {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap} using {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputMinFrameDuration } 2284b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * (with its respective size/format). Let this set of frame durations be 2285b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * called <code>F</code>.</li> 2286a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <li>For any given request <code>R</code>, the minimum frame duration allowed 2287a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * for <code>R</code> is the maximum out of all values in <code>F</code>. Let the streams 2288a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * used in <code>R</code> be called <code>S_r</code>.</li> 2289143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * </ol> 2290b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-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 } 2291b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * using its respective size/format), then the frame duration in <code>F</code> 2292b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * determines the steady state frame rate that the application will get 2293b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * if it uses <code>R</code> as a repeating request. Let this special kind of 2294b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * request be called <code>Rsimple</code>.</p> 2295a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved 2296a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * by a single capture of a new request <code>Rstall</code> (which has at least 2297a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * one in-use stream with a non-0 stall time) and if <code>Rstall</code> has the 2298a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * same minimum frame duration this will not cause a frame rate loss 2299a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * if all buffers from the previous <code>Rstall</code> have already been 2300a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * delivered.</p> 2301a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin * <p>For more details about stalling, see 2302b6eb52ffc51cec78c3adc2e5b25c4c3214344983Eino-Ville Talvala * {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputStallDuration }.</p> 2303fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-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 2304fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * OFF; otherwise the auto-exposure algorithm will override this value.</p> 2305fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: Nanoseconds</p> 2306fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2307fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * See {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}, 2308fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}. The duration 2309fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * is capped to <code>max(duration, exposureTime + overhead)</code>.</p> 23104b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 23114b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 23124b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 23134b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2314143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin * 2315fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureRequest#CONTROL_AE_MODE 2316fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureRequest#CONTROL_MODE 23174b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 23189c595174ccaaf3d36315c4a100e47ee4369073f6Igor Murashkin * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP 2319fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION 23205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 23216c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 23225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Long> SENSOR_FRAME_DURATION = 23235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Long>("android.sensor.frameDuration", long.class); 23245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 23255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2326b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The amount of gain applied to sensor data 2327b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * before processing.</p> 2328b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The sensitivity is the standard ISO sensitivity value, 2329b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * as defined in ISO 12232:2006.</p> 2330b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>The sensitivity must be within {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}, and 2331b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * if if it less than {@link CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY android.sensor.maxAnalogSensitivity}, the camera device 2332b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * is guaranteed to use only analog amplification for applying the gain.</p> 2333b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * <p>If the camera device cannot apply the exact sensitivity 2334b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * requested, it will reduce the gain to the nearest supported 2335b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * value. The final sensitivity used will be available in the 2336b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * output capture result.</p> 23371ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * <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 23381ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * OFF; otherwise the auto-exposure algorithm will override this value.</p> 2339fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Units</b>: ISO arithmetic units</p> 2340fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2341fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE android.sensor.info.sensitivityRange}</p> 23424b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 23434b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 23444b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 23454b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2346b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * 23471ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * @see CaptureRequest#CONTROL_AE_MODE 23481ee1a0ae60c1e7acd4f334f9a31c67ae4e40f73aYin-Chia Yeh * @see CaptureRequest#CONTROL_MODE 23494b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2350b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE 2351b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY 23525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 23536c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 23545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> SENSOR_SENSITIVITY = 23555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.sensor.sensitivity", int.class); 23565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 23575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2358c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern 2359c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p> 2360c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>Each color channel is treated as an unsigned 32-bit integer. 2361c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * The camera device then uses the most significant X bits 2362c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * that correspond to how many bits are in its Bayer raw sensor 2363c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * output.</p> 2364c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>For example, a sensor with RAW10 Bayer output would use the 2365c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * 10 most significant bits from each color channel.</p> 2366c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2367c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * 2368c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE 2369c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin */ 23706c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 2371c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin public static final Key<int[]> SENSOR_TEST_PATTERN_DATA = 2372c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin new Key<int[]>("android.sensor.testPatternData", int[].class); 2373c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin 2374c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin /** 2375c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>When enabled, the sensor sends a test pattern instead of 2376c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * doing a real exposure from the camera.</p> 2377c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>When a test pattern is enabled, all manual sensor controls specified 2378e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * by android.sensor.* will be ignored. All other controls should 2379c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * work as normal.</p> 2380c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p>For example, if manual flash is enabled, flash firing should still 2381c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * occur (and that the test pattern remain unmodified, since the flash 2382c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * would not actually affect it).</p> 2383fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Defaults to OFF.</p> 2384fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2385fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2386fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_OFF OFF}</li> 2387fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR SOLID_COLOR}</li> 2388fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS COLOR_BARS}</li> 2389fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY COLOR_BARS_FADE_TO_GRAY}</li> 2390fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_PN9 PN9}</li> 2391fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SENSOR_TEST_PATTERN_MODE_CUSTOM1 CUSTOM1}</li> 2392fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2393fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 2394fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES android.sensor.availableTestPatternModes}</p> 2395c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2396fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 2397fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CameraCharacteristics#SENSOR_AVAILABLE_TEST_PATTERN_MODES 2398c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_OFF 2399c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR 2400c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS 2401c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY 2402c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_PN9 2403c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1 2404c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin */ 24056c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 2406c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin public static final Key<Integer> SENSOR_TEST_PATTERN_MODE = 2407c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin new Key<Integer>("android.sensor.testPatternMode", int.class); 2408c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin 2409c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin /** 2410ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * <p>Quality of lens shading correction applied 2411ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * to the image data.</p> 2412ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * <p>When set to OFF mode, no lens shading correction will be applied by the 2413ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * camera device, and an identity lens shading map data will be provided 2414ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens 2415fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * shading map with size of <code>[ 4, 3 ]</code>, 2416fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the output {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap} for this case will be an identity 2417fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * map shown below:</p> 2418ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * <pre><code>[ 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2419fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2420fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2421fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2422fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 2423fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 ] 2424ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * </code></pre> 2425fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>When set to other modes, lens shading correction will be applied by the camera 2426fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * device. Applications can request lens shading map data by setting 2427fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide lens 2428fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP android.statistics.lensShadingCorrectionMap}; the returned shading map 2429fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * data will be the one applied by the camera device for this capture request.</p> 2430fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>The shading map data may depend on the auto-exposure (AE) and AWB statistics, therefore 2431fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * the reliability of the map data may be affected by the AE and AWB algorithms. When AE and 2432fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-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> 2433fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * OFF), to get best results, it is recommended that the applications wait for the AE and AWB 2434fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * to be converged before using the returned shading map data.</p> 2435fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2436fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2437fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SHADING_MODE_OFF OFF}</li> 2438fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SHADING_MODE_FAST FAST}</li> 2439fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #SHADING_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 2440fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2441e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * <p><b>Available values for this device:</b><br> 2442e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * {@link CameraCharacteristics#SHADING_AVAILABLE_MODES android.shading.availableModes}</p> 24434b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 24444b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 24454b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 24464b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 2447ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * 2448fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * @see CaptureRequest#CONTROL_AE_MODE 2449fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * @see CaptureRequest#CONTROL_AWB_MODE 24504b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2451e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * @see CameraCharacteristics#SHADING_AVAILABLE_MODES 2452fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * @see CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP 2453ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE 2454ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see #SHADING_MODE_OFF 2455ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see #SHADING_MODE_FAST 2456ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He * @see #SHADING_MODE_HIGH_QUALITY 2457ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He */ 24586c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 2459ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He public static final Key<Integer> SHADING_MODE = 2460ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He new Key<Integer>("android.shading.mode", int.class); 2461ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He 2462ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He /** 2463fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Operating mode for the face detector 2464b67a3b36fd569e63c1b8ca6b2701c34c7a3927c1Eino-Ville Talvala * unit.</p> 2465ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether face detection is enabled, and whether it 24665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * should output just the basic fields or the full set of 2467fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * fields.</p> 2468fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2469fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2470fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #STATISTICS_FACE_DETECT_MODE_OFF OFF}</li> 2471fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #STATISTICS_FACE_DETECT_MODE_SIMPLE SIMPLE}</li> 2472fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #STATISTICS_FACE_DETECT_MODE_FULL FULL}</li> 2473fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2474fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 2475fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}</p> 2476fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>This key is available on all devices.</p> 24770da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 24780da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES 24795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #STATISTICS_FACE_DETECT_MODE_OFF 24805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE 24815a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #STATISTICS_FACE_DETECT_MODE_FULL 24825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 24836c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 24845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> STATISTICS_FACE_DETECT_MODE = 24855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.statistics.faceDetectMode", int.class); 24865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 24875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2488fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>Operating mode for hot pixel map generation.</p> 2489fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-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}. 2490fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * If set to <code>false</code>, no hot pixel map will be returned.</p> 2491fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2492fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}</p> 24934b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 24949d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * 24959d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP 24969d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES 24979d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk */ 24986c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 24999d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE = 25009d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class); 25019d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk 25029d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk /** 2503cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * <p>Whether the camera device will output the lens 2504cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He * shading map in output result metadata.</p> 2505ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>When set to ON, 2506e600d6ad60373821472e6338792109fa3103f7e2Eino-Ville Talvala * android.statistics.lensShadingMap will be provided in 25077a9b30e9e3e45d387d2fc0cb2bd2eb79da7dd268Igor Murashkin * the output result metadata.</p> 2508fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>ON is always supported on devices with the RAW capability.</p> 2509fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2510fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2511fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_OFF OFF}</li> 2512fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #STATISTICS_LENS_SHADING_MAP_MODE_ON ON}</li> 2513fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2514e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * <p><b>Available values for this device:</b><br> 2515e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES android.statistics.info.availableLensShadingMapModes}</p> 25164b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 25174b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 25184b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 25194b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 25204b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * 25214b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2522e4aa2831ce6a07a6454ebd61675d9ac432f8f492Yin-Chia Yeh * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES 2523d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF 2524d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON 2525d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala */ 25266c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 2527d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE = 2528d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala new Key<Integer>("android.statistics.lensShadingMapMode", int.class); 2529d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala 2530d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala /** 2531ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Tonemapping / contrast / gamma curve for the blue 2532e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2533e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 25348490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>See android.tonemap.curveRed for more details.</p> 25354b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 25364b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 25374b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 25384b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 25390da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 25404b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 25415f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#TONEMAP_MODE 25428490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @hide 25435a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 25443ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He public static final Key<float[]> TONEMAP_CURVE_BLUE = 25453ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He new Key<float[]>("android.tonemap.curveBlue", float[].class); 25465a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 25475a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2548ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Tonemapping / contrast / gamma curve for the green 2549e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2550e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 25518490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>See android.tonemap.curveRed for more details.</p> 25524b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 25534b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 25544b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 25554b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 25560da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 25574b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 25585f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He * @see CaptureRequest#TONEMAP_MODE 25598490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @hide 25605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 25613ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He public static final Key<float[]> TONEMAP_CURVE_GREEN = 25623ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He new Key<float[]>("android.tonemap.curveGreen", float[].class); 25635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 25645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2565ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Tonemapping / contrast / gamma curve for the red 2566e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2567e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 2568e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Each channel's curve is defined by an array of control points:</p> 25698490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = 2570fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ] 2571870922be2399766078d0a4e42a0158ecb9eb1f86Zhijun He * 2 <= N <= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre> 2572fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>These are sorted in order of increasing <code>Pin</code>; it is 2573fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * required that input values 0.0 and 1.0 are included in the list to 2574e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * define a complete mapping. For input values between control points, 2575e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * the camera device must linearly interpolate between the control 2576e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * points.</p> 2577e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Each curve can have an independent number of points, and the number 2578e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * of points can be less than max (that is, the request doesn't have to 2579e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * always provide a curve with number of points equivalent to 2580e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p> 2581e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>A few examples, and their corresponding graphical mappings; these 2582e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * only specify the red channel and the precision is limited to 4 2583e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * digits, for conciseness.</p> 2584e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Linear mapping:</p> 25858490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 0, 0, 1.0, 1.0 ] 2586e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 2587e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p> 2588e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Invert mapping:</p> 25898490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 0, 1.0, 1.0, 0 ] 2590e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 2591e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p> 2592e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Gamma 1/2.2 mapping, with 16 control points:</p> 25938490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 2594fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812, 2595fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072, 2596fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685, 2597fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ] 2598e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 2599e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p> 2600e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p> 26018490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>android.tonemap.curveRed = [ 2602fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845, 2603fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130, 2604fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721, 2605fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ] 2606e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * </code></pre> 2607e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 2608fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Range of valid values:</b><br> 2609fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * 0-1 on both input and output coordinates, normalized 2610fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * as a floating-point value such that 0 == black and 1 == white.</p> 26114b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 26124b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 26134b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 26144b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 26150da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * 26164b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 2617e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS 26180da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala * @see CaptureRequest#TONEMAP_MODE 26198490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @hide 26205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 26215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<float[]> TONEMAP_CURVE_RED = 26225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<float[]>("android.tonemap.curveRed", float[].class); 26235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 26245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 26258490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Tonemapping / contrast / gamma curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} 26268490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * is CONTRAST_CURVE.</p> 26278490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>The tonemapCurve consist of three curves for each of red, green, and blue 26288490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * channels respectively. The following example uses the red channel as an 26298490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * example. The same logic applies to green and blue channel. 26308490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * Each channel's curve is defined by an array of control points:</p> 26318490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = 2632fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * [ P0(in, out), P1(in, out), P2(in, out), P3(in, out), ..., PN(in, out) ] 26338490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * 2 <= N <= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre> 26348490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>These are sorted in order of increasing <code>Pin</code>; it is always 26358490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * guaranteed that input values 0.0 and 1.0 are included in the list to 26368490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * define a complete mapping. For input values between control points, 26378490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * the camera device must linearly interpolate between the control 26388490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * points.</p> 26398490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Each curve can have an independent number of points, and the number 26408490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * of points can be less than max (that is, the request doesn't have to 26418490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * always provide a curve with number of points equivalent to 26428490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p> 26438490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>A few examples, and their corresponding graphical mappings; these 26448490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * only specify the red channel and the precision is limited to 4 26458490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * digits, for conciseness.</p> 26468490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Linear mapping:</p> 26478490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ (0, 0), (1.0, 1.0) ] 26488490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 26498490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p> 26508490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Invert mapping:</p> 26518490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ (0, 1.0), (1.0, 0) ] 26528490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 26538490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p> 26548490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Gamma 1/2.2 mapping, with 16 control points:</p> 26558490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ 2656fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.0000, 0.0000), (0.0667, 0.2920), (0.1333, 0.4002), (0.2000, 0.4812), 2657fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.2667, 0.5484), (0.3333, 0.6069), (0.4000, 0.6594), (0.4667, 0.7072), 2658fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.5333, 0.7515), (0.6000, 0.7928), (0.6667, 0.8317), (0.7333, 0.8685), 2659fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.8000, 0.9035), (0.8667, 0.9370), (0.9333, 0.9691), (1.0000, 1.0000) ] 26608490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 26618490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p> 26628490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p> 26638490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <pre><code>curveRed = [ 2664fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.0000, 0.0000), (0.0667, 0.2864), (0.1333, 0.4007), (0.2000, 0.4845), 2665fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.2667, 0.5532), (0.3333, 0.6125), (0.4000, 0.6652), (0.4667, 0.7130), 2666fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.5333, 0.7569), (0.6000, 0.7977), (0.6667, 0.8360), (0.7333, 0.8721), 2667fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * (0.8000, 0.9063), (0.8667, 0.9389), (0.9333, 0.9701), (1.0000, 1.0000) ] 26688490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * </code></pre> 26698490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 26704b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 26714b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 26724b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 26734b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 26748490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * 26754b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 26768490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS 26778490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @see CaptureRequest#TONEMAP_MODE 26788490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh */ 26796c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 26806c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @SyntheticKey 26818490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh public static final Key<android.hardware.camera2.params.TonemapCurve> TONEMAP_CURVE = 26828490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh new Key<android.hardware.camera2.params.TonemapCurve>("android.tonemap.curve", android.hardware.camera2.params.TonemapCurve.class); 26838490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh 26848490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh /** 2685e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>High-level global contrast/gamma/tonemapping control.</p> 2686e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>When switching to an application-defined contrast curve by setting 2687e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined 2688e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * per-channel with a set of <code>(in, out)</code> points that specify the 2689e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * mapping from input high-bit-depth pixel value to the output 2690e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * low-bit-depth value. Since the actual pixel ranges of both input 2691e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * and output may change depending on the camera pipeline, the values 2692e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * are specified by normalized floating-point numbers.</p> 2693e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>More-complex color mapping operations such as 3D color look-up 2694e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * tables, selective chroma enhancement, or other non-linear color 2695e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2696e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * CONTRAST_CURVE.</p> 2697e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * <p>When using either FAST or HIGH_QUALITY, the camera device will 26988490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}. 2699e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * These values are always available, and as close as possible to the 2700e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * actually used nonlinear/nonglobal transforms.</p> 2701fa7c755a920dc0209efa15a65bfdd2881cb42141Zhijun He * <p>If a request is sent with CONTRAST_CURVE with the camera device's 2702e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be 2703e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * roughly the same.</p> 2704fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Possible values:</b> 2705fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <ul> 2706fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #TONEMAP_MODE_CONTRAST_CURVE CONTRAST_CURVE}</li> 2707fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #TONEMAP_MODE_FAST FAST}</li> 2708fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <li>{@link #TONEMAP_MODE_HIGH_QUALITY HIGH_QUALITY}</li> 2709956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <li>{@link #TONEMAP_MODE_GAMMA_VALUE GAMMA_VALUE}</li> 2710956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <li>{@link #TONEMAP_MODE_PRESET_CURVE PRESET_CURVE}</li> 2711fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * </ul></p> 2712fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p><b>Available values for this device:</b><br> 2713fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}</p> 27144b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 27154b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 27164b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 27174b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 27183242f4fb19b77bcd2435cbe710188d012d08b005Igor Murashkin * 27194b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 27206dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES 27218490ace76fd350e53de9554c11fca715c5a37aafYin-Chia Yeh * @see CaptureRequest#TONEMAP_CURVE 2722e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin * @see CaptureRequest#TONEMAP_MODE 27235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #TONEMAP_MODE_CONTRAST_CURVE 27245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #TONEMAP_MODE_FAST 27255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @see #TONEMAP_MODE_HIGH_QUALITY 2726956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see #TONEMAP_MODE_GAMMA_VALUE 2727956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see #TONEMAP_MODE_PRESET_CURVE 27285a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 27296c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 27305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Integer> TONEMAP_MODE = 27315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Integer>("android.tonemap.mode", int.class); 27325a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 27335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2734956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2735956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * GAMMA_VALUE</p> 2736956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>The tonemap curve will be defined the following formula: 2737956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * * OUT = pow(IN, 1.0 / gamma) 2738956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * where IN and OUT is the input pixel value scaled to range [0.0, 1.0], 2739956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * pow is the power function and gamma is the gamma value specified by this 2740956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * key.</p> 2741956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>The same curve will be applied to all color channels. The camera device 2742956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * may clip the input gamma value to its supported range. The actual applied 2743956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * value will be returned in capture result.</p> 2744956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>The valid range of gamma value varies on different devices, but values 2745956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * within [1.0, 5.0] are guaranteed not to be clipped.</p> 2746956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2747956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * 2748956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see CaptureRequest#TONEMAP_MODE 2749956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh */ 2750956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh @PublicKey 2751956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh public static final Key<Float> TONEMAP_GAMMA = 2752956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh new Key<Float>("android.tonemap.gamma", float.class); 2753956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh 2754956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh /** 2755956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is 2756956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * PRESET_CURVE</p> 2757956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>The tonemap curve will be defined by specified standard.</p> 2758956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>sRGB (approximated by 16 control points):</p> 2759956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p> 2760956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>Rec. 709 (approximated by 16 control points):</p> 2761956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p><img alt="Rec. 709 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png" /></p> 2762956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p>Note that above figures show a 16 control points approximation of preset 2763956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * curves. Camera devices may apply a different approximation to the curve.</p> 2764956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p><b>Possible values:</b> 2765956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <ul> 2766956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <li>{@link #TONEMAP_PRESET_CURVE_SRGB SRGB}</li> 2767956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <li>{@link #TONEMAP_PRESET_CURVE_REC709 REC709}</li> 2768956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * </ul></p> 2769956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2770956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * 2771956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see CaptureRequest#TONEMAP_MODE 2772956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see #TONEMAP_PRESET_CURVE_SRGB 2773956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh * @see #TONEMAP_PRESET_CURVE_REC709 2774956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh */ 2775956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh @PublicKey 2776956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh public static final Key<Integer> TONEMAP_PRESET_CURVE = 2777956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh new Key<Integer>("android.tonemap.presetCurve", int.class); 2778956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh 2779956c52b5a09fa6b193b162bdb3aee629323cde2bYin-Chia Yeh /** 2780ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>This LED is nominally used to indicate to the user 27815a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * that the camera is powered on and may be streaming images back to the 27825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * Application Processor. In certain rare circumstances, the OS may 27835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * disable this when video is processed locally and not transmitted to 2784ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * any untrusted applications.</p> 2785ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>In particular, the LED <em>must</em> always be on when the data could be 2786ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * transmitted off the device. The LED <em>should</em> always be on whenever 2787ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * data is stored locally on the device.</p> 2788ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>The LED <em>may</em> be off if a trusted application is using the data that 2789ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * doesn't violate the above rules.</p> 27904b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 27915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * @hide 27925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 27935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> LED_TRANSMIT = 27945a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.led.transmit", boolean.class); 27955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 27965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /** 2797ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Whether black-level compensation is locked 27980956af56a294397325f2695604229ab7550364caEino-Ville Talvala * to its current values, or is free to vary.</p> 2799fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <p>When set to <code>true</code> (ON), the values used for black-level 28000956af56a294397325f2695604229ab7550364caEino-Ville Talvala * compensation will not change until the lock is set to 2801fd3e2892f29ded5a25a0a064275b282ce93ed258Eino-Ville Talvala * <code>false</code> (OFF).</p> 2802ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>Since changes to certain capture parameters (such as 28035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * exposure time) may require resetting of black level 28040956af56a294397325f2695604229ab7550364caEino-Ville Talvala * compensation, the camera device must report whether setting 28050956af56a294397325f2695604229ab7550364caEino-Ville Talvala * the black level lock was successful in the output result 2806ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * metadata.</p> 2807ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <p>For example, if a sequence of requests is as follows:</p> 2808ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <ul> 2809ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 1: Exposure = 10ms, Black level lock = OFF</li> 2810ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 2: Exposure = 10ms, Black level lock = ON</li> 2811ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 3: Exposure = 10ms, Black level lock = ON</li> 2812ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 4: Exposure = 20ms, Black level lock = ON</li> 2813ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 5: Exposure = 20ms, Black level lock = ON</li> 2814ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Request 6: Exposure = 20ms, Black level lock = ON</li> 2815ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * </ul> 28160956af56a294397325f2695604229ab7550364caEino-Ville Talvala * <p>And the exposure change in Request 4 requires the camera 28170956af56a294397325f2695604229ab7550364caEino-Ville Talvala * device to reset the black level offsets, then the output 28180956af56a294397325f2695604229ab7550364caEino-Ville Talvala * result metadata is expected to be:</p> 2819ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <ul> 2820ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 1: Exposure = 10ms, Black level lock = OFF</li> 2821ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 2: Exposure = 10ms, Black level lock = ON</li> 2822ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 3: Exposure = 10ms, Black level lock = ON</li> 2823ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 4: Exposure = 20ms, Black level lock = OFF</li> 2824ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 5: Exposure = 20ms, Black level lock = ON</li> 2825ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * <li>Result 6: Exposure = 20ms, Black level lock = ON</li> 2826ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin * </ul> 28270956af56a294397325f2695604229ab7550364caEino-Ville Talvala * <p>This indicates to the application that on frame 4, black 28280956af56a294397325f2695604229ab7550364caEino-Ville Talvala * levels were reset due to exposure value changes, and pixel 28290956af56a294397325f2695604229ab7550364caEino-Ville Talvala * values may not be consistent across captures.</p> 28300956af56a294397325f2695604229ab7550364caEino-Ville Talvala * <p>The camera device will maintain the lock to the extent 28310956af56a294397325f2695604229ab7550364caEino-Ville Talvala * possible, only overriding the lock to OFF when changes to 28320956af56a294397325f2695604229ab7550364caEino-Ville Talvala * other request parameters require a black level recalculation 28330956af56a294397325f2695604229ab7550364caEino-Ville Talvala * or reset.</p> 28344b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 28354b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * <p><b>Full capability</b> - 28364b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the 28374b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 28384b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * 28394b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 28405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala */ 28416c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin @PublicKey 28425a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala public static final Key<Boolean> BLACK_LEVEL_LOCK = 28435a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala new Key<Boolean>("android.blackLevel.lock", boolean.class); 28445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala 28450e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He /** 28460e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>The amount of exposure time increase factor applied to the original output 28470e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * frame by the application processing before sending for reprocessing.</p> 28480e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>This is optional, and will be supported if the camera device supports YUV_REPROCESSING 28490e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains YUV_REPROCESSING).</p> 28500e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>For some YUV reprocessing use cases, the application may choose to filter the original 28510e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * output frames to effectively reduce the noise to the same level as a frame that was 28520e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * captured with longer exposure time. To be more specific, assuming the original captured 28530e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * images were captured with a sensitivity of S and an exposure time of T, the model in 28540e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * the camera device is that the amount of noise in the image would be approximately what 28550e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * would be expected if the original capture parameters had been a sensitivity of 28560e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * S/effectiveExposureFactor and an exposure time of T*effectiveExposureFactor, rather 28570e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * than S and T respectively. If the captured images were processed by the application 28580e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * before being sent for reprocessing, then the application may have used image processing 28590e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * algorithms and/or multi-frame image fusion to reduce the noise in the 28600e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * application-processed images (input images). By using the effectiveExposureFactor 28610e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * control, the application can communicate to the camera device the actual noise level 28620e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * improvement in the application-processed image. With this information, the camera 28630e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * device can select appropriate noise reduction and edge enhancement parameters to avoid 28640e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * excessive noise reduction ({@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}) and insufficient edge 28650e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * enhancement ({@link CaptureRequest#EDGE_MODE android.edge.mode}) being applied to the reprocessed frames.</p> 28660e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>For example, for multi-frame image fusion use case, the application may fuse 28670e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * multiple output frames together to a final frame for reprocessing. When N image are 28680e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * fused into 1 image for reprocessing, the exposure time increase factor could be up to 28690e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * square root of N (based on a simple photon shot noise model). The camera device will 28700e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * adjust the reprocessing noise reduction and edge enhancement parameters accordingly to 28710e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * produce the best quality images.</p> 28720e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>This is relative factor, 1.0 indicates the application hasn't processed the input 28730e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * buffer in a way that affects its effective exposure time.</p> 28740e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p>This control is only effective for YUV reprocessing capture request. For noise 28750e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * reduction reprocessing, it is only effective when <code>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode} != OFF</code>. 28760e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * Similarly, for edge enhancement reprocessing, it is only effective when 28770e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <code>{@link CaptureRequest#EDGE_MODE android.edge.mode} != OFF</code>.</p> 28780e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p><b>Units</b>: Relative exposure time increase factor.</p> 28790e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p><b>Range of valid values:</b><br> 28800e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * >= 1.0</p> 28810e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * <p><b>Optional</b> - This value may be {@code null} on some devices.</p> 2882513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * <p><b>Limited capability</b> - 2883513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * Present on all camera devices that report being at least {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED HARDWARE_LEVEL_LIMITED} devices in the 2884513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p> 28850e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * 28860e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see CaptureRequest#EDGE_MODE 2887513f7c33eae0084ecd70062d660f2b873032d895Zhijun He * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL 28880e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see CaptureRequest#NOISE_REDUCTION_MODE 28890e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES 28900e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He */ 28910e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He @PublicKey 28920e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He public static final Key<Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR = 28930e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He new Key<Float>("android.reprocess.effectiveExposureFactor", float.class); 28940e99c2260d874eaeb62ddeb75c2f29f26818ad99Zhijun He 28955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~ 28965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala * End generated code 28975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/ 28986c76f58f31635c19c14ae161f96dad2082537860Igor Murashkin 28994b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin 29004b8cd6b44cf800cf5dd88e5afbcff4968398779dIgor Murashkin 29015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala} 2902