CaptureRequest.java revision e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0
1b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala/*
2b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Copyright (C) 2013 The Android Open Source Project
3b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala *
4b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Licensed under the Apache License, Version 2.0 (the "License");
5b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * you may not use this file except in compliance with the License.
6b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * You may obtain a copy of the License at
7b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala *
8b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala *      http://www.apache.org/licenses/LICENSE-2.0
9b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala *
10b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Unless required by applicable law or agreed to in writing, software
11b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * distributed under the License is distributed on an "AS IS" BASIS,
12b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * See the License for the specific language governing permissions and
14b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * limitations under the License.
15b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */
16b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala
172f1a2e423e0fbb64467d6fcfa4e82c6384f31210Eino-Ville Talvalapackage android.hardware.camera2;
18b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala
1970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvalaimport android.hardware.camera2.impl.CameraMetadataNative;
2070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport android.os.Parcel;
2170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport android.os.Parcelable;
22b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvalaimport android.view.Surface;
23b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala
2470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinimport java.util.HashSet;
256bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkinimport java.util.Objects;
26b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala
27b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala
28b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala/**
2970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>An immutable package of settings and outputs needed to capture a single
3070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * image from the camera device.</p>
31b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala *
32b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>Contains the configuration for the capture hardware (sensor, lens, flash),
3370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * the processing pipeline, the control algorithms, and the output buffers. Also
3470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * contains the list of target Surfaces to send image data to for this
3570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * capture.</p>
36b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala *
3770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * <p>CaptureRequests can be created by using a {@link Builder} instance,
3870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * obtained by calling {@link CameraDevice#createCaptureRequest}</p>
39b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala *
40b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>CaptureRequests are given to {@link CameraDevice#capture} or
41b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * {@link CameraDevice#setRepeatingRequest} to capture images from a camera.</p>
42b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala *
43b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>Each request can specify a different subset of target Surfaces for the
44b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * camera to send the captured data to. All the surfaces used in a request must
45b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * be part of the surface list given to the last call to
4670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * {@link CameraDevice#configureOutputs}, when the request is submitted to the
4770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * camera device.</p>
48b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala *
49b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * <p>For example, a request meant for repeating preview might only include the
50b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * Surface for the preview SurfaceView or SurfaceTexture, while a
51b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * high-resolution still capture would also include a Surface from a ImageReader
52b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * configured for high-resolution JPEG images.</p>
53b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala *
54b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * @see CameraDevice#capture
55b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala * @see CameraDevice#setRepeatingRequest
5670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala * @see CameraDevice#createCaptureRequest
57b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala */
5870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkinpublic final class CaptureRequest extends CameraMetadata implements Parcelable {
5970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin
6070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    private final HashSet<Surface> mSurfaceSet;
6170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    private final CameraMetadataNative mSettings;
6270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
634068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala    private Object mUserTag;
64b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala
65b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala    /**
666bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     * Construct empty request.
676bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     *
686bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     * Used by Binder to unparcel this object only.
6970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin     */
706bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    private CaptureRequest() {
7170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        mSettings = new CameraMetadataNative();
7270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        mSurfaceSet = new HashSet<Surface>();
73b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala    }
74b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala
75b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala    /**
766bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     * Clone from source capture request.
776bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     *
786bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     * Used by the Builder to create an immutable copy.
79b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     */
806bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    @SuppressWarnings("unchecked")
8170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    private CaptureRequest(CaptureRequest source) {
8270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        mSettings = new CameraMetadataNative(source.mSettings);
8370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        mSurfaceSet = (HashSet<Surface>) source.mSurfaceSet.clone();
847b01c5c4d27ebbd739d9e5e0de7eaafbffd8e084Eino-Ville Talvala        mUserTag = source.mUserTag;
85b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala    }
86b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala
87b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala    /**
886bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     * Take ownership of passed-in settings.
896bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     *
906bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     * Used by the Builder to create a mutable CaptureRequest.
91b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala     */
9270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    private CaptureRequest(CameraMetadataNative settings) {
9370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        mSettings = settings;
9470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        mSurfaceSet = new HashSet<Surface>();
9570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin    }
9670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin
976bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    @SuppressWarnings("unchecked")
9870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    @Override
9970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    public <T> T get(Key<T> key) {
10070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        return mSettings.get(key);
1014068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala    }
1024068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala
1034068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala    /**
1044068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala     * Retrieve the tag for this request, if any.
1054068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala     *
1064068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala     * <p>This tag is not used for anything by the camera device, but can be
1074068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala     * used by an application to easily identify a CaptureRequest when it is
1084068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala     * returned by
1094af73c2153747d0624ccc75dfa001cb91982957fEino-Ville Talvala     * {@link CameraDevice.CaptureListener#onCaptureCompleted CaptureListener.onCaptureCompleted}
1104068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala     * </p>
1114068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala     *
1124068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala     * @return the last tag Object set on this request, or {@code null} if
1134068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala     *     no tag has been set.
11470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * @see Builder#setTag
1154068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala     */
1164068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala    public Object getTag() {
11770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        return mUserTag;
1184068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala    }
1194068388beea728bbf9f321b0b5b5c52ce4ab3d06Eino-Ville Talvala
1206bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    /**
1216bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     * Determine whether this CaptureRequest is equal to another CaptureRequest.
1226bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     *
1236bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     * <p>A request is considered equal to another is if it's set of key/values is equal, it's
1246bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     * list of output surfaces is equal, and the user tag is equal.</p>
1256bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     *
1266bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     * @param other Another instance of CaptureRequest.
1276bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     *
1286bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     * @return True if the requests are the same, false otherwise.
1296bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin     */
1306bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    @Override
1316bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    public boolean equals(Object other) {
1326bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin        return other instanceof CaptureRequest
1336bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin                && equals((CaptureRequest)other);
1346bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    }
1356bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin
1366bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    private boolean equals(CaptureRequest other) {
1376bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin        return other != null
1386bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin                && Objects.equals(mUserTag, other.mUserTag)
1396bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin                && mSurfaceSet.equals(other.mSurfaceSet)
1406bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin                && mSettings.equals(other.mSettings);
1416bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    }
1426bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin
1436bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    @Override
1446bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    public int hashCode() {
1456bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin        return mSettings.hashCode();
1466bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin    }
1476bbf9dc5ae7ebc85991dcfe3e18e837b12d3f333Igor Murashkin
14870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin    public static final Parcelable.Creator<CaptureRequest> CREATOR =
14970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin            new Parcelable.Creator<CaptureRequest>() {
15070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin        @Override
15170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin        public CaptureRequest createFromParcel(Parcel in) {
15270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin            CaptureRequest request = new CaptureRequest();
15370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin            request.readFromParcel(in);
15470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
15570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin            return request;
15670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin        }
15770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin
15870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin        @Override
15970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin        public CaptureRequest[] newArray(int size) {
16070725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin            return new CaptureRequest[size];
16170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin        }
16270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin    };
16370725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin
16470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin    /**
16570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin     * Expand this object from a Parcel.
16670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * Hidden since this breaks the immutability of CaptureRequest, but is
16770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * needed to receive CaptureRequests with aidl.
16870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     *
16970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin     * @param in The parcel from which the object should be read
17070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * @hide
17170725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin     */
17270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin    public void readFromParcel(Parcel in) {
17370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        mSettings.readFromParcel(in);
17470725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin
17570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        mSurfaceSet.clear();
17670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin
17770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        Parcelable[] parcelableArray = in.readParcelableArray(Surface.class.getClassLoader());
17870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin
17970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        if (parcelableArray == null) {
18070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala            return;
18170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        }
18270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin
18370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        for (Parcelable p : parcelableArray) {
18470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala            Surface s = (Surface) p;
18570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala            mSurfaceSet.add(s);
18670725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin        }
18770725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin    }
18870725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin
18970725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin    @Override
19070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    public int describeContents() {
19170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        return 0;
19270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    }
19370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
19470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    @Override
19570725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin    public void writeToParcel(Parcel dest, int flags) {
19670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        mSettings.writeToParcel(dest, flags);
19770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        dest.writeParcelableArray(mSurfaceSet.toArray(new Surface[mSurfaceSet.size()]), flags);
19870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    }
19970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
20070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    /**
20170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * A builder for capture requests.
20270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     *
20370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * <p>To obtain a builder instance, use the
20470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * {@link CameraDevice#createCaptureRequest} method, which initializes the
20570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * request fields to one of the templates defined in {@link CameraDevice}.
20670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     *
20770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * @see CameraDevice#createCaptureRequest
20870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * @see #TEMPLATE_PREVIEW
20970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * @see #TEMPLATE_RECORD
21070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * @see #TEMPLATE_STILL_CAPTURE
21170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * @see #TEMPLATE_VIDEO_SNAPSHOT
21270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     * @see #TEMPLATE_MANUAL
21370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala     */
21470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala    public final static class Builder {
21570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
2167a36a0fbb0a5f14047a3680668da954beca05dcbIgor Murashkin        private final CaptureRequest mRequest;
21770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
21870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        /**
21970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * Initialize the builder using the template; the request takes
22070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * ownership of the template.
22170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
22270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @hide
22370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         */
22470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        public Builder(CameraMetadataNative template) {
22570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala            mRequest = new CaptureRequest(template);
22670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        }
22770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
22870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        /**
22970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * <p>Add a surface to the list of targets for this request</p>
23070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
23170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * <p>The Surface added must be one of the surfaces included in the most
23270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * recent call to {@link CameraDevice#configureOutputs}, when the
23370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * request is given to the camera device.</p>
23470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
23570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * <p>Adding a target more than once has no effect.</p>
23670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
23770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @param outputTarget Surface to use as an output target for this request
23870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         */
23970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        public void addTarget(Surface outputTarget) {
24070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala            mRequest.mSurfaceSet.add(outputTarget);
24170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        }
24270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin
24370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        /**
24470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * <p>Remove a surface from the list of targets for this request.</p>
24570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
24670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * <p>Removing a target that is not currently added has no effect.</p>
24770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
24870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @param outputTarget Surface to use as an output target for this request
24970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         */
25070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        public void removeTarget(Surface outputTarget) {
25170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala            mRequest.mSurfaceSet.remove(outputTarget);
25270725500dcf3b666b43d50563d64705aab58d2d3Igor Murashkin        }
25370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
25470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        /**
25570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * Set a capture request field to a value. The field definitions can be
25670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * found in {@link CaptureRequest}.
25770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
25870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @param key The metadata field to write.
25970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @param value The value to set the field to, which must be of a matching
26070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * type to the key.
26170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         */
26270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        public <T> void set(Key<T> key, T value) {
26370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala            mRequest.mSettings.set(key, value);
26470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        }
26570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
26670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        /**
26770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * Get a capture request field value. The field definitions can be
26870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * found in {@link CaptureRequest}.
26970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
27070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @throws IllegalArgumentException if the key was not valid
27170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
27270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @param key The metadata field to read.
27370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @return The value of that key, or {@code null} if the field is not set.
27470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         */
27570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        public <T> T get(Key<T> key) {
27670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala            return mRequest.mSettings.get(key);
27770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        }
27870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
27970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        /**
28070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * Set a tag for this request.
28170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
28270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * <p>This tag is not used for anything by the camera device, but can be
28370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * used by an application to easily identify a CaptureRequest when it is
28470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * returned by
28570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * {@link CameraDevice.CaptureListener#onCaptureCompleted CaptureListener.onCaptureCompleted}
28670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
28770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @param tag an arbitrary Object to store with this request
28870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @see CaptureRequest#getTag
28970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         */
29070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        public void setTag(Object tag) {
29170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala            mRequest.mUserTag = tag;
29270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        }
29370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
29470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        /**
29570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * Build a request using the current target Surfaces and settings.
29670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         *
29770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @return A new capture request instance, ready for submission to the
29870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * camera device.
29970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         */
30070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        public CaptureRequest build() {
30170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala            return new CaptureRequest(mRequest);
30270c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        }
30370c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
30470c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
30570c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        /**
30670c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         * @hide
30770c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala         */
30870c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        public boolean isEmpty() {
30970c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala            return mRequest.mSettings.isEmpty();
31070c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala        }
31170c2207c34cf0e6b3b383b1b1500ff5385aa51a6Eino-Ville Talvala
312b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala    }
313b2675542c2f414154125b534767ae0903fba581eEino-Ville Talvala
3145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /*@O~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
3155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * The key entries below this point are generated from metadata
3165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * definitions in /system/media/camera/docs. Do not modify by hand or
3175a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * modify the comment blocks at the start or end.
3185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~*/
3195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
3200da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala
3215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
3227d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>The mode control selects how the image data is converted from the
3237d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * sensor's native color into linear sRGB color.</p>
3247d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>When auto-white balance is enabled with {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, this
3257d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * control is overridden by the AWB routine. When AWB is disabled, the
3267d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * application controls how the color mapping is performed.</p>
3277d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>We define the expected processing pipeline below. For consistency
3287d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * across devices, this is always the case with TRANSFORM_MATRIX.</p>
3297d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>When either FULL or HIGH_QUALITY is used, the camera device may
3307d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * do additional processing but {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
3317d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} will still be provided by the
3327d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * camera device (in the results) and be roughly correct.</p>
3337d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>Switching to TRANSFORM_MATRIX and using the data provided from
3347d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * FAST or HIGH_QUALITY will yield a picture with the same white point
3357d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * as what was produced by the camera device in the earlier frame.</p>
3367d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>The expected processing pipeline is as follows:</p>
3377d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p><img alt="White balance processing pipeline" src="../../../../images/camera2/metadata/android.colorCorrection.mode/processing_pipeline.png" /></p>
3387d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>The white balance is encoded by two values, a 4-channel white-balance
3397d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * gain vector (applied in the Bayer domain), and a 3x3 color transform
3407d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * matrix (applied after demosaic).</p>
3417d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>The 4-channel white-balance gains are defined as:</p>
3427d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} = [ R G_even G_odd B ]
3437d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * </code></pre>
3447d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>where <code>G_even</code> is the gain for green pixels on even rows of the
3457d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * output, and <code>G_odd</code> is the gain for green pixels on the odd rows.
3467d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * These may be identical for a given camera device implementation; if
3477d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * the camera device does not support a separate gain for even/odd green
3487d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * channels, it will use the <code>G_even</code> value, and write <code>G_odd</code> equal to
3497d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <code>G_even</code> in the output result metadata.</p>
3507d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>The matrices for color transforms are defined as a 9-entry vector:</p>
3517d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <pre><code>{@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform} = [ I0 I1 I2 I3 I4 I5 I6 I7 I8 ]
3527d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * </code></pre>
3537d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>which define a transform from input sensor colors, <code>P_in = [ r g b ]</code>,
3547d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * to output linear sRGB, <code>P_out = [ r' g' b' ]</code>,</p>
3557d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>with colors as follows:</p>
3567d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <pre><code>r' = I0r + I1g + I2b
3577d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * g' = I3r + I4g + I5b
3587d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * b' = I6r + I7g + I8b
3597d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * </code></pre>
3607d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>Both the input and output value ranges must match. Overflow/underflow
3617d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * values are clipped to fit within the range.</p>
3620da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
3637d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * @see CaptureRequest#COLOR_CORRECTION_GAINS
3647d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
3650da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#CONTROL_AWB_MODE
3665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #COLOR_CORRECTION_MODE_TRANSFORM_MATRIX
3675a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #COLOR_CORRECTION_MODE_FAST
3685a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #COLOR_CORRECTION_MODE_HIGH_QUALITY
3695a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
3705a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> COLOR_CORRECTION_MODE =
3715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.colorCorrection.mode", int.class);
3725a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
3735a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
374ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>A color transform matrix to use to transform
375ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * from sensor RGB color space to output linear sRGB color space</p>
37649a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * <p>This matrix is either set by the camera device when the request
3770da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or
3785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * directly by the application in the request when the
3790da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p>
38049a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * <p>In the latter case, the camera device may round the matrix to account
38149a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * for precision issues; the final rounded matrix should be reported back
38249a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * in this matrix result metadata. The transform should keep the magnitude
38349a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * of the output color values within <code>[0, 1.0]</code> (assuming input color
38449a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * values is within the normalized range <code>[0, 1.0]</code>), or clipping may occur.</p>
3850da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
3860da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#COLOR_CORRECTION_MODE
3875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
3885a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Rational[]> COLOR_CORRECTION_TRANSFORM =
3895a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Rational[]>("android.colorCorrection.transform", Rational[].class);
3905a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
3915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
3927d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <p>Gains applying to Bayer raw color channels for
393cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * white-balance.</p>
394ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>The 4-channel white-balance gains are defined in
3957d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * the order of <code>[R G_even G_odd B]</code>, where <code>G_even</code> is the gain
3967d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * for green pixels on even rows of the output, and <code>G_odd</code>
3977d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * is the gain for green pixels on the odd rows. if a HAL
3985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * does not support a separate gain for even/odd green channels,
3997d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * it should use the <code>G_even</code> value, and write <code>G_odd</code> equal to
4007d2a5c5e7350658d0da4eaf75f9380593083e969Igor Murashkin     * <code>G_even</code> in the output result metadata.</p>
401cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * <p>This array is either set by the camera device when the request
4020da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is not TRANSFORM_MATRIX, or
403d5ff06a2ce4a65615ce5e8b8df93f2c3da2a8bbdIgor Murashkin     * directly by the application in the request when the
4040da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode} is TRANSFORM_MATRIX.</p>
405cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * <p>The output should be the gains actually applied by the camera device to
406ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * the current frame.</p>
4070da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
4080da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#COLOR_CORRECTION_MODE
4095a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
4105a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<float[]> COLOR_CORRECTION_GAINS =
4115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<float[]>("android.colorCorrection.gains", float[].class);
4125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
4135a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
4140da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>The desired setting for the camera device's auto-exposure
4150da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * algorithm's antibanding compensation.</p>
4160da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>Some kinds of lighting fixtures, such as some fluorescent
4170da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * lights, flicker at the rate of the power supply frequency
4180da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * (60Hz or 50Hz, depending on country). While this is
4190da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * typically not noticeable to a person, it can be visible to
4200da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * a camera device. If a camera sets its exposure time to the
4210da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * wrong value, the flicker may become visible in the
4220da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * viewfinder as flicker or in a final captured image, as a
4230da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * set of variable-brightness bands across the image.</p>
4240da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>Therefore, the auto-exposure routines of camera devices
4250da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * include antibanding routines that ensure that the chosen
4260da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * exposure value will not cause such banding. The choice of
4270da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * exposure time depends on the rate of flicker, which the
4280da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * camera device can detect automatically, or the expected
4290da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * rate can be selected by the application using this
4300da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * control.</p>
4310da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>A given camera device may not support all of the possible
4320da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * options for the antibanding mode. The
4330da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES android.control.aeAvailableAntibandingModes} key contains
4340da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * the available modes for a given camera device.</p>
4350da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>The default mode is AUTO, which must be supported by all
4360da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * camera devices.</p>
4370da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>If manual exposure control is enabled (by setting
4380da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} or {@link CaptureRequest#CONTROL_MODE android.control.mode} to OFF),
4390da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * then this setting has no effect, and the application must
4400da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * ensure it selects exposure times that do not cause banding
4410da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * issues. The {@link CaptureResult#STATISTICS_SCENE_FLICKER android.statistics.sceneFlicker} key can assist
4420da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * the application in this.</p>
4430da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
4445f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_ANTIBANDING_MODES
445399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * @see CaptureRequest#CONTROL_AE_MODE
446265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CaptureRequest#CONTROL_MODE
447265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CaptureResult#STATISTICS_SCENE_FLICKER
4485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AE_ANTIBANDING_MODE_OFF
4495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AE_ANTIBANDING_MODE_50HZ
4505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AE_ANTIBANDING_MODE_60HZ
4515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AE_ANTIBANDING_MODE_AUTO
4525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
4535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> CONTROL_AE_ANTIBANDING_MODE =
4545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.control.aeAntibandingMode", int.class);
4555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
4565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
457ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Adjustment to AE target image
458ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * brightness</p>
459ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>For example, if EV step is 0.333, '6' will mean an
4605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * exposure compensation of +2 EV; -3 will mean an exposure
461ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * compensation of -1</p>
4625a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
4635a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> CONTROL_AE_EXPOSURE_COMPENSATION =
4645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.control.aeExposureCompensation", int.class);
4655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
4665a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
467ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Whether AE is currently locked to its latest
46849a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * calculated values.</p>
469ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Note that even when AE is locked, the flash may be
47049a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_AUTO_FLASH / ON_ALWAYS_FLASH /
471ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * ON_AUTO_FLASH_REDEYE.</p>
47249a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * <p>If AE precapture is triggered (see {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger})
47349a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * when AE is already locked, the camera device will not change the exposure time
47449a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}) and sensitivity ({@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity})
475d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala     * parameters. The flash may be fired if the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode}
47649a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * is ON_AUTO_FLASH/ON_AUTO_FLASH_REDEYE and the scene is too dark. If the
47749a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is ON_ALWAYS_FLASH, the scene may become overexposed.</p>
47849a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * <p>See {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE lock related state transition details.</p>
47949a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     *
48049a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * @see CaptureRequest#CONTROL_AE_MODE
48149a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
48249a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * @see CaptureResult#CONTROL_AE_STATE
48349a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
48449a3ca9330d213fe35280c0af78a4d21acb98234Zhijun He     * @see CaptureRequest#SENSOR_SENSITIVITY
4855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
4865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Boolean> CONTROL_AE_LOCK =
4875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Boolean>("android.control.aeLock", boolean.class);
4885a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
4895a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
4900da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>The desired mode for the camera device's
4910da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * auto-exposure routine.</p>
4920da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is
4930da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * AUTO.</p>
4940da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>When set to any of the ON modes, the camera device's
4950da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * auto-exposure routine is enabled, overriding the
4960da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * application's selected exposure time, sensor sensitivity,
4970da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * and frame duration ({@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
4980da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and
4990da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}). If one of the FLASH modes
5000da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * is selected, the camera device's flash unit controls are
5010da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * also overridden.</p>
5020da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>The FLASH modes are only available if the camera device
5030da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * has a flash unit ({@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} is <code>true</code>).</p>
5040da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>If flash TORCH mode is desired, this field must be set to
5050da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * ON or OFF, and {@link CaptureRequest#FLASH_MODE android.flash.mode} set to TORCH.</p>
5060da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>When set to any of the ON modes, the values chosen by the
5070da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * camera device auto-exposure routine for the overridden
5080da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * fields for a given capture will be available in its
5090da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * CaptureResult.</p>
5100da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
5115f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * @see CaptureRequest#CONTROL_MODE
512265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
513265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CaptureRequest#FLASH_MODE
514aef3b7ed9f2a27aed9aecef030432d1100a60406Igor Murashkin     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
515aef3b7ed9f2a27aed9aecef030432d1100a60406Igor Murashkin     * @see CaptureRequest#SENSOR_FRAME_DURATION
516399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * @see CaptureRequest#SENSOR_SENSITIVITY
5175a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AE_MODE_OFF
5185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AE_MODE_ON
5195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AE_MODE_ON_AUTO_FLASH
5205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AE_MODE_ON_ALWAYS_FLASH
5215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AE_MODE_ON_AUTO_FLASH_REDEYE
5225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
5235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> CONTROL_AE_MODE =
5245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.control.aeMode", int.class);
5255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
5265a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
527ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>List of areas to use for
528f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk     * metering.</p>
529ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Each area is a rectangle plus weight: xmin, ymin,
530f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk     * xmax, ymax, weight. The rectangle is defined to be inclusive of the
531ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * specified coordinates.</p>
532ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>The coordinate system is based on the active pixel array,
5332629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight     * with (0,0) being the top-left pixel in the active pixel array, and
5340da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
5350da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
5362629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight     * bottom-right pixel in the active pixel array. The weight
537ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * should be nonnegative.</p>
538ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>If all regions have 0 weight, then no specific metering area
539cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * needs to be used by the camera device. If the metering region is
540cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
541cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * will ignore the sections outside the region and output the
542f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk     * used sections in the frame metadata.</p>
5430da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
5440da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#SCALER_CROP_REGION
545265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
5465a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
5475a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<int[]> CONTROL_AE_REGIONS =
5485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<int[]>("android.control.aeRegions", int[].class);
5495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
5505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
551ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Range over which fps can be adjusted to
552ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * maintain exposure</p>
553ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Only constrains AE algorithm, not manual control
5540da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * of {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime}</p>
5550da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
5560da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
5575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
5585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<int[]> CONTROL_AE_TARGET_FPS_RANGE =
5595a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<int[]>("android.control.aeTargetFpsRange", int[].class);
5605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
5615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
562228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * <p>Whether the camera device will trigger a precapture
563228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * metering sequence when it processes this request.</p>
564ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>This entry is normally set to IDLE, or is not
5655a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * included at all in the request settings. When included and
566228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * set to START, the camera device will trigger the autoexposure
567ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * precapture metering sequence.</p>
568ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>The effect of AE precapture trigger depends on the current
569228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * AE mode and state; see {@link CaptureResult#CONTROL_AE_STATE android.control.aeState} for AE precapture
570228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * state transition details.</p>
571228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     *
572228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * @see CaptureResult#CONTROL_AE_STATE
5735a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AE_PRECAPTURE_TRIGGER_IDLE
5745a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AE_PRECAPTURE_TRIGGER_START
5755a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
5765a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> CONTROL_AE_PRECAPTURE_TRIGGER =
5775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.control.aePrecaptureTrigger", int.class);
5785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
5795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
580ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Whether AF is currently enabled, and what
581ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * mode it is set to</p>
582cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * <p>Only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} = AUTO and the lens is not fixed focus
583cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * (i.e. <code>{@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance} &gt; 0</code>).</p>
58478146ecb24871302a4c4dc0a7341044a06d29ee8Zhijun He     * <p>If the lens is controlled by the camera device auto-focus algorithm,
585d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala     * the camera device will report the current AF status in {@link CaptureResult#CONTROL_AF_STATE android.control.afState}
58678146ecb24871302a4c4dc0a7341044a06d29ee8Zhijun He     * in result metadata.</p>
5870da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
588d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala     * @see CaptureResult#CONTROL_AF_STATE
5890da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#CONTROL_MODE
590cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
5915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AF_MODE_OFF
5925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AF_MODE_AUTO
5935a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AF_MODE_MACRO
5945a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AF_MODE_CONTINUOUS_VIDEO
5955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AF_MODE_CONTINUOUS_PICTURE
5965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AF_MODE_EDOF
5975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
5985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> CONTROL_AF_MODE =
5995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.control.afMode", int.class);
6005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
6015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
602ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>List of areas to use for focus
603f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk     * estimation.</p>
604ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Each area is a rectangle plus weight: xmin, ymin,
605f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk     * xmax, ymax, weight. The rectangle is defined to be inclusive of the
606ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * specified coordinates.</p>
607ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>The coordinate system is based on the active pixel array,
6082629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight     * with (0,0) being the top-left pixel in the active pixel array, and
6090da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
6100da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
6112629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight     * bottom-right pixel in the active pixel array. The weight
612ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * should be nonnegative.</p>
613ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>If all regions have 0 weight, then no specific focus area
614cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * needs to be used by the camera device. If the focusing region is
615cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
616cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * will ignore the sections outside the region and output the
617f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk     * used sections in the frame metadata.</p>
6180da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
6190da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#SCALER_CROP_REGION
620265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
6215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
6225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<int[]> CONTROL_AF_REGIONS =
6235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<int[]>("android.control.afRegions", int[].class);
6245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
6255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
626228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * <p>Whether the camera device will trigger autofocus for this request.</p>
627ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>This entry is normally set to IDLE, or is not
628ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * included at all in the request settings.</p>
629228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * <p>When included and set to START, the camera device will trigger the
630228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * autofocus algorithm. If autofocus is disabled, this trigger has no effect.</p>
631228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * <p>When set to CANCEL, the camera device will cancel any active trigger,
632228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * and return to its initial AF state.</p>
633228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * <p>See {@link CaptureResult#CONTROL_AF_STATE android.control.afState} for what that means for each AF mode.</p>
634228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     *
635228f4f92e70d9326d473e02bcdcc8faf9e706a4dZhijun He     * @see CaptureResult#CONTROL_AF_STATE
6365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AF_TRIGGER_IDLE
6375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AF_TRIGGER_START
6385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AF_TRIGGER_CANCEL
6395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
6405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> CONTROL_AF_TRIGGER =
6415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.control.afTrigger", int.class);
6425a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
6435a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
644ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Whether AWB is currently locked to its
6452d5e89778e955b4ff209a93e738761356349d48cZhijun He     * latest calculated values.</p>
646ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Note that AWB lock is only meaningful for AUTO
6475a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * mode; in other modes, AWB is already fixed to a specific
6482d5e89778e955b4ff209a93e738761356349d48cZhijun He     * setting.</p>
6495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
6505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Boolean> CONTROL_AWB_LOCK =
6515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Boolean>("android.control.awbLock", boolean.class);
6525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
6535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
654ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Whether AWB is currently setting the color
6555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * transform fields, and what its illumination target
656cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * is.</p>
657399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * <p>This control is only effective if {@link CaptureRequest#CONTROL_MODE android.control.mode} is AUTO.</p>
658399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * <p>When set to the ON mode, the camera device's auto white balance
659399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * routine is enabled, overriding the application's selected
660399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains} and
661399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p>
662399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * <p>When set to the OFF mode, the camera device's auto white balance
663cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * routine is disabled. The application manually controls the white
664d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala     * balance by {@link CaptureRequest#COLOR_CORRECTION_TRANSFORM android.colorCorrection.transform}, {@link CaptureRequest#COLOR_CORRECTION_GAINS android.colorCorrection.gains}
665399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * and {@link CaptureRequest#COLOR_CORRECTION_MODE android.colorCorrection.mode}.</p>
666399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * <p>When set to any other modes, the camera device's auto white balance
667399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * routine is disabled. The camera device uses each particular illumination
668399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * target for white balance adjustment.</p>
6690da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
670265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CaptureRequest#COLOR_CORRECTION_GAINS
6715f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * @see CaptureRequest#COLOR_CORRECTION_MODE
6725f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM
673265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CaptureRequest#CONTROL_MODE
6745a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AWB_MODE_OFF
6755a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AWB_MODE_AUTO
6765a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AWB_MODE_INCANDESCENT
6775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AWB_MODE_FLUORESCENT
6785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AWB_MODE_WARM_FLUORESCENT
6795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AWB_MODE_DAYLIGHT
6805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AWB_MODE_CLOUDY_DAYLIGHT
6815a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AWB_MODE_TWILIGHT
6825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_AWB_MODE_SHADE
6835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
6845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> CONTROL_AWB_MODE =
6855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.control.awbMode", int.class);
6865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
6875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
688ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>List of areas to use for illuminant
689f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk     * estimation.</p>
690ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Only used in AUTO mode.</p>
691ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Each area is a rectangle plus weight: xmin, ymin,
692f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk     * xmax, ymax, weight. The rectangle is defined to be inclusive of the
693ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * specified coordinates.</p>
694ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>The coordinate system is based on the active pixel array,
6952629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight     * with (0,0) being the top-left pixel in the active pixel array, and
6960da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.width - 1,
6970da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.height - 1) being the
6982629f27362f1a35521501f3a28279ab05b9beb32Timothy Knight     * bottom-right pixel in the active pixel array. The weight
699ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * should be nonnegative.</p>
700cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * <p>If all regions have 0 weight, then no specific auto-white balance (AWB) area
701cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * needs to be used by the camera device. If the AWB region is
702cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
703cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * will ignore the sections outside the region and output the
704f59521d3b182de217b12e6d4ea31bd32e2418564Ruben Brunk     * used sections in the frame metadata.</p>
7050da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
7060da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#SCALER_CROP_REGION
707265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
7085a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
7095a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<int[]> CONTROL_AWB_REGIONS =
7105a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<int[]>("android.control.awbRegions", int[].class);
7115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
7125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
71366d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * <p>Information to the camera device 3A (auto-exposure,
71466d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * auto-focus, auto-white balance) routines about the purpose
71566d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * of this capture, to help the camera device to decide optimal 3A
71666d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * strategy.</p>
717e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He     * <p>This control (except for MANUAL) is only effective if
718e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He     * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF</code> and any 3A routine is active.</p>
719e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He     * <p>ZERO_SHUTTER_LAG must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
720e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He     * contains ZSL. MANUAL must be supported if {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}
721e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He     * contains MANUAL_SENSOR.</p>
7220da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
7230da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#CONTROL_MODE
724e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
7255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_CAPTURE_INTENT_CUSTOM
7265a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_CAPTURE_INTENT_PREVIEW
7275a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_CAPTURE_INTENT_STILL_CAPTURE
7285a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_CAPTURE_INTENT_VIDEO_RECORD
7295a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_CAPTURE_INTENT_VIDEO_SNAPSHOT
7305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_CAPTURE_INTENT_ZERO_SHUTTER_LAG
731e30adb762ad17fc49fd3f7c1aa9ba6bd24bc43a0Zhijun He     * @see #CONTROL_CAPTURE_INTENT_MANUAL
7325a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
7335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> CONTROL_CAPTURE_INTENT =
7345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.control.captureIntent", int.class);
7355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
7365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
7375f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk     * <p>A special color effect to apply.</p>
7385f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk     * <p>When this mode is set, a color effect will be applied
7395f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk     * to images produced by the camera device. The interpretation
7405f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk     * and implementation of these color effects is left to the
7415f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk     * implementor of the camera device, and should not be
7425f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk     * depended on to be consistent (or present) across all
7435f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk     * devices.</p>
7445f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk     * <p>A color effect will only be applied if
7455f1dcfe49dfe7b9a4a40482152638af6ca925a6dRuben Brunk     * {@link CaptureRequest#CONTROL_MODE android.control.mode} != OFF.</p>
7460da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
7470da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#CONTROL_MODE
7485a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_EFFECT_MODE_OFF
7495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_EFFECT_MODE_MONO
7505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_EFFECT_MODE_NEGATIVE
7515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_EFFECT_MODE_SOLARIZE
7525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_EFFECT_MODE_SEPIA
7535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_EFFECT_MODE_POSTERIZE
7545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_EFFECT_MODE_WHITEBOARD
7555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_EFFECT_MODE_BLACKBOARD
7565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_EFFECT_MODE_AQUA
7575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
7585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> CONTROL_EFFECT_MODE =
7595a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.control.effectMode", int.class);
7605a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
7615a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
762ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Overall mode of 3A control
763cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * routines.</p>
764f353742124af698098884b4172644af0851b30caZhijun He     * <p>High-level 3A control. When set to OFF, all 3A control
7655f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * by the camera device is disabled. The application must set the fields for
766f353742124af698098884b4172644af0851b30caZhijun He     * capture parameters itself.</p>
767f353742124af698098884b4172644af0851b30caZhijun He     * <p>When set to AUTO, the individual algorithm controls in
7680da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * android.control.* are in effect, such as {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}.</p>
769f353742124af698098884b4172644af0851b30caZhijun He     * <p>When set to USE_SCENE_MODE, the individual controls in
7705f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * android.control.* are mostly disabled, and the camera device implements
771f353742124af698098884b4172644af0851b30caZhijun He     * one of the scene mode settings (such as ACTION, SUNSET, or PARTY)
7725f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * as it wishes. The camera device scene mode 3A settings are provided by
773f353742124af698098884b4172644af0851b30caZhijun He     * android.control.sceneModeOverrides.</p>
7742d5e89778e955b4ff209a93e738761356349d48cZhijun He     * <p>When set to OFF_KEEP_STATE, it is similar to OFF mode, the only difference
7752d5e89778e955b4ff209a93e738761356349d48cZhijun He     * is that this frame will not be used by camera device background 3A statistics
7762d5e89778e955b4ff209a93e738761356349d48cZhijun He     * update, as if this frame is never captured. This mode can be used in the scenario
7772d5e89778e955b4ff209a93e738761356349d48cZhijun He     * where the application doesn't want a 3A manual control capture to affect
7782d5e89778e955b4ff209a93e738761356349d48cZhijun He     * the subsequent auto 3A capture results.</p>
7790da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
7800da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#CONTROL_AF_MODE
7815a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_MODE_OFF
7825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_MODE_AUTO
7835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_MODE_USE_SCENE_MODE
7842d5e89778e955b4ff209a93e738761356349d48cZhijun He     * @see #CONTROL_MODE_OFF_KEEP_STATE
7855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
7865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> CONTROL_MODE =
7875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.control.mode", int.class);
7885a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
7895a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
790e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * <p>A camera mode optimized for conditions typical in a particular
791e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * capture setting.</p>
792e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * <p>This is the mode that that is active when
793e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code>. Aside from FACE_PRIORITY,
794e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * these modes will disable {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode},
795e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * {@link CaptureRequest#CONTROL_AWB_MODE android.control.awbMode}, and {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} while in use.</p>
796e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * <p>The interpretation and implementation of these scene modes is left
797e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * to the implementor of the camera device. Their behavior will not be
798e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * consistent across all devices, and any given device may only implement
799e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * a subset of these modes.</p>
8000da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
801e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * @see CaptureRequest#CONTROL_AE_MODE
802e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * @see CaptureRequest#CONTROL_AF_MODE
803e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * @see CaptureRequest#CONTROL_AWB_MODE
8040da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#CONTROL_MODE
805e6679366938fd3ed197ba1ff1b2ad0bf2ff4246bRuben Brunk     * @see #CONTROL_SCENE_MODE_DISABLED
8065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_FACE_PRIORITY
8075a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_ACTION
8085a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_PORTRAIT
8095a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_LANDSCAPE
8105a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_NIGHT
8115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_NIGHT_PORTRAIT
8125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_THEATRE
8135a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_BEACH
8145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_SNOW
8155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_SUNSET
8165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_STEADYPHOTO
8175a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_FIREWORKS
8185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_SPORTS
8195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_PARTY
8205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_CANDLELIGHT
8215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #CONTROL_SCENE_MODE_BARCODE
8225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
8235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> CONTROL_SCENE_MODE =
8245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.control.sceneMode", int.class);
8255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
8265a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
827ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Whether video stabilization is
828ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * active</p>
829ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>If enabled, video stabilization can modify the
8300da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} to keep the video stream
831ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * stabilized</p>
8320da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
8330da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#SCALER_CROP_REGION
8345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
8355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Boolean> CONTROL_VIDEO_STABILIZATION_MODE =
8365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Boolean>("android.control.videoStabilizationMode", boolean.class);
8375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
8385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
839ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Operation mode for edge
840cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * enhancement.</p>
8412807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He     * <p>Edge/sharpness/detail enhancement. OFF means no
842cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * enhancement will be applied by the camera device.</p>
8436dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk     * <p>This must be set to one of the modes listed in {@link CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES android.edge.availableEdgeModes}.</p>
8445f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * <p>FAST/HIGH_QUALITY both mean camera device determined enhancement
8452807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He     * will be applied. HIGH_QUALITY mode indicates that the
8465f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * camera device will use the highest-quality enhancement algorithms,
8475f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * even if it slows down capture rate. FAST means the camera device will
8482807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He     * not slow down capture rate when applying edge enhancement.</p>
8496dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk     *
8506dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk     * @see CameraCharacteristics#EDGE_AVAILABLE_EDGE_MODES
8515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #EDGE_MODE_OFF
8525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #EDGE_MODE_FAST
8535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #EDGE_MODE_HIGH_QUALITY
8545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
8555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> EDGE_MODE =
8565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.edge.mode", int.class);
8575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
8585a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
85966d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * <p>The desired mode for for the camera device's flash control.</p>
86066d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * <p>This control is only effective when flash unit is available
861153ac102d36df66853b523ab01763dc457972517Zhijun He     * (<code>{@link CameraCharacteristics#FLASH_INFO_AVAILABLE android.flash.info.available} == true</code>).</p>
86266d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * <p>When this control is used, the {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} must be set to ON or OFF.
86366d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * Otherwise, the camera device auto-exposure related flash control (ON_AUTO_FLASH,
86466d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * ON_ALWAYS_FLASH, or ON_AUTO_FLASH_REDEYE) will override this control.</p>
86566d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * <p>When set to OFF, the camera device will not fire flash for this capture.</p>
86666d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * <p>When set to SINGLE, the camera device will fire flash regardless of the camera
86766d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * device's auto-exposure routine's result. When used in still capture case, this
86866d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * control should be used along with AE precapture metering sequence
86966d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * ({@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger}), otherwise, the image may be incorrectly exposed.</p>
87066d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * <p>When set to TORCH, the flash will be on continuously. This mode can be used
87166d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * for use cases such as preview, auto-focus assist, still capture, or video recording.</p>
872ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * <p>The flash status will be reported by {@link CaptureResult#FLASH_STATE android.flash.state} in the capture result metadata.</p>
87366d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     *
87466d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * @see CaptureRequest#CONTROL_AE_MODE
87566d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
87666d065a6d48cafe390c697c77b44ba5196ee0870Zhijun He     * @see CameraCharacteristics#FLASH_INFO_AVAILABLE
877ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * @see CaptureResult#FLASH_STATE
8785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #FLASH_MODE_OFF
8795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #FLASH_MODE_SINGLE
8805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #FLASH_MODE_TORCH
8815a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
8825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> FLASH_MODE =
8835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.flash.mode", int.class);
8845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
8855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
886eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk     * <p>Set operational mode for hot pixel correction.</p>
8879d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     * <p>Valid modes for this camera device are listed in
8889d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     * {@link CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES android.hotPixel.availableHotPixelModes}.</p>
889eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk     * <p>Hotpixel correction interpolates out, or otherwise removes, pixels
890eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk     * that do not accurately encode the incoming light (i.e. pixels that
891eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk     * are stuck at an arbitrary value).</p>
8929d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     *
8939d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     * @see CameraCharacteristics#HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES
894eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk     * @see #HOT_PIXEL_MODE_OFF
895eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk     * @see #HOT_PIXEL_MODE_FAST
896eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk     * @see #HOT_PIXEL_MODE_HIGH_QUALITY
897eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk     */
898eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk    public static final Key<Integer> HOT_PIXEL_MODE =
899eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk            new Key<Integer>("android.hotPixel.mode", int.class);
900eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk
901eba1b3a843278a92611edf153faa41a01d793b25Ruben Brunk    /**
902ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>GPS coordinates to include in output JPEG
903ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * EXIF</p>
9045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
9055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<double[]> JPEG_GPS_COORDINATES =
9065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<double[]>("android.jpeg.gpsCoordinates", double[].class);
9075a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
9085a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
909ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>32 characters describing GPS algorithm to
910ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * include in EXIF</p>
9115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
9125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<String> JPEG_GPS_PROCESSING_METHOD =
9135a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<String>("android.jpeg.gpsProcessingMethod", String.class);
9145a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
9155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
916ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Time GPS fix was made to include in
917ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * EXIF</p>
9185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
9195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Long> JPEG_GPS_TIMESTAMP =
9205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Long>("android.jpeg.gpsTimestamp", long.class);
9215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
9225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
923ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Orientation of JPEG image to
924ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * write</p>
9255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
9265a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> JPEG_ORIENTATION =
9275a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.jpeg.orientation", int.class);
9285a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
9295a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
930ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Compression quality of the final JPEG
931ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * image</p>
932ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>85-95 is typical usage range</p>
9335a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
9345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Byte> JPEG_QUALITY =
9355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Byte>("android.jpeg.quality", byte.class);
9365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
9375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
938ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Compression quality of JPEG
939ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * thumbnail</p>
9405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
9415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Byte> JPEG_THUMBNAIL_QUALITY =
9425a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Byte>("android.jpeg.thumbnailQuality", byte.class);
9435a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
9445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
9455a9ff379233025bc85ebc41ac5979def09d3ebfaZhijun He     * <p>Resolution of embedded JPEG thumbnail</p>
9465f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * <p>When set to (0, 0) value, the JPEG EXIF will not contain thumbnail,
9475f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * but the captured JPEG will still be a valid image.</p>
9485a9ff379233025bc85ebc41ac5979def09d3ebfaZhijun He     * <p>When a jpeg image capture is issued, the thumbnail size selected should have
9495a9ff379233025bc85ebc41ac5979def09d3ebfaZhijun He     * the same aspect ratio as the jpeg image.</p>
9505a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
9515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<android.hardware.camera2.Size> JPEG_THUMBNAIL_SIZE =
9525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<android.hardware.camera2.Size>("android.jpeg.thumbnailSize", android.hardware.camera2.Size.class);
9535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
9545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
955fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * <p>The ratio of lens focal length to the effective
956fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * aperture diameter.</p>
957fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * <p>This will only be supported on the camera devices that
958fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * have variable aperture lens. The aperture value can only be
959fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * one of the values listed in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES android.lens.info.availableApertures}.</p>
960fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is OFF,
961fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * this can be set along with {@link CaptureRequest#SENSOR_EXPOSURE_TIME android.sensor.exposureTime},
962d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala     * {@link CaptureRequest#SENSOR_SENSITIVITY android.sensor.sensitivity}, and {@link CaptureRequest#SENSOR_FRAME_DURATION android.sensor.frameDuration}
963fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * to achieve manual exposure control.</p>
964fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * <p>The requested aperture value may take several frames to reach the
965fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * requested value; the camera device will report the current (intermediate)
966ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * aperture size in capture result metadata while the aperture is changing.
967ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * While the aperture is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
968fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * <p>When this is supported and {@link CaptureRequest#CONTROL_AE_MODE android.control.aeMode} is one of
969fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * the ON modes, this will be overridden by the camera device
970fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * auto-exposure algorithm, the overridden values are then provided
971fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     * back to the user in the corresponding result.</p>
972fb46c644ceffdd476268c35c7992c4e445bde0a5Zhijun He     *
973399f05d1e7182ef6c88d30d3b98a467b845ca7c4Zhijun He     * @see CaptureRequest#CONTROL_AE_MODE
974265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CameraCharacteristics#LENS_INFO_AVAILABLE_APERTURES
975ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * @see CaptureResult#LENS_STATE
976265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CaptureRequest#SENSOR_EXPOSURE_TIME
977d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala     * @see CaptureRequest#SENSOR_FRAME_DURATION
978265b34ce331cbe296f82ca357645312718c8d4c7Eino-Ville Talvala     * @see CaptureRequest#SENSOR_SENSITIVITY
9795a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
9805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Float> LENS_APERTURE =
9815a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Float>("android.lens.aperture", float.class);
9825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
9835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
984855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * <p>State of lens neutral density filter(s).</p>
985855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * <p>This will not be supported on most camera devices. On devices
986855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * where this is supported, this may only be set to one of the
987855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * values included in {@link CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES android.lens.info.availableFilterDensities}.</p>
988855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * <p>Lens filters are typically used to lower the amount of light the
989855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * sensor is exposed to (measured in steps of EV). As used here, an EV
990855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * step is the standard logarithmic representation, which are
991855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * non-negative, and inversely proportional to the amount of light
992855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * hitting the sensor.  For example, setting this to 0 would result
993855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * in no reduction of the incoming light, and setting this to 2 would
994855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * mean that the filter is set to reduce incoming light by two stops
995855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * (allowing 1/4 of the prior amount of light to the sensor).</p>
996ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * <p>It may take several frames before the lens filter density changes
997ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * to the requested value. While the filter density is still changing,
998ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
999855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     *
1000855bae407d61b5cc6629248e7692927b4dacd92fRuben Brunk     * @see CameraCharacteristics#LENS_INFO_AVAILABLE_FILTER_DENSITIES
1001ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * @see CaptureResult#LENS_STATE
10025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
10035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Float> LENS_FILTER_DENSITY =
10045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Float>("android.lens.filterDensity", float.class);
10055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
10065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1007a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * <p>The current lens focal length; used for optical zoom.</p>
1008a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * <p>This setting controls the physical focal length of the camera
1009a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * device's lens. Changing the focal length changes the field of
1010a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * view of the camera device, and is usually used for optical zoom.</p>
1011a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * <p>Like {@link CaptureRequest#LENS_FOCUS_DISTANCE android.lens.focusDistance} and {@link CaptureRequest#LENS_APERTURE android.lens.aperture}, this
1012a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * setting won't be applied instantaneously, and it may take several
1013ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * frames before the lens can change to the requested focal length.
1014a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * While the focal length is still changing, {@link CaptureResult#LENS_STATE android.lens.state} will
1015a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * be set to MOVING.</p>
1016a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * <p>This is expected not to be supported on most devices.</p>
1017a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     *
1018a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * @see CaptureRequest#LENS_APERTURE
1019a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * @see CaptureRequest#LENS_FOCUS_DISTANCE
1020a20f4c2648d7c597e3178978d17eb5894ef2b2b9Ruben Brunk     * @see CaptureResult#LENS_STATE
10215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
10225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Float> LENS_FOCAL_LENGTH =
10235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Float>("android.lens.focalLength", float.class);
10245a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
10255a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1026ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Distance to plane of sharpest focus,
1027ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * measured from frontmost surface of the lens</p>
1028ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * <p>0 means infinity focus. Used value will be clamped
1029ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * to [0, {@link CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE android.lens.info.minimumFocusDistance}].</p>
1030ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * <p>Like {@link CaptureRequest#LENS_FOCAL_LENGTH android.lens.focalLength}, this setting won't be applied
1031ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * instantaneously, and it may take several frames before the lens
1032ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * can move to the requested focus distance. While the lens is still moving,
1033ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * {@link CaptureResult#LENS_STATE android.lens.state} will be set to MOVING.</p>
1034ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     *
1035ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * @see CaptureRequest#LENS_FOCAL_LENGTH
1036ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * @see CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
1037ca1b73a5f4e8ae4a7cef2cb2127024d0ddb9e0e0Zhijun He     * @see CaptureResult#LENS_STATE
10385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
10395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Float> LENS_FOCUS_DISTANCE =
10405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Float>("android.lens.focusDistance", float.class);
10415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
10425a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
104300849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk     * <p>Sets whether the camera device uses optical image stabilization (OIS)
104400849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk     * when capturing images.</p>
104500849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk     * <p>OIS is used to compensate for motion blur due to small movements of
104600849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk     * the camera during capture. Unlike digital image stabilization, OIS makes
104700849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk     * use of mechanical elements to stabilize the camera sensor, and thus
104800849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk     * allows for longer exposure times before camera shake becomes
104900849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk     * apparent.</p>
105000849b3a430ce164af2db94eeacfd46131de4be8Ruben Brunk     * <p>This is not expected to be supported on most devices.</p>
10515a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #LENS_OPTICAL_STABILIZATION_MODE_OFF
10525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #LENS_OPTICAL_STABILIZATION_MODE_ON
10535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
10545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> LENS_OPTICAL_STABILIZATION_MODE =
10555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.lens.opticalStabilizationMode", int.class);
10565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
10575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1058ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Mode of operation for the noise reduction
1059ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * algorithm</p>
10602807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He     * <p>Noise filtering control. OFF means no noise reduction
1061cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * will be applied by the camera device.</p>
10626dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk     * <p>This must be set to a valid mode in
10636dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk     * {@link CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES android.noiseReduction.availableNoiseReductionModes}.</p>
10645f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * <p>FAST/HIGH_QUALITY both mean camera device determined noise filtering
10655f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * will be applied. HIGH_QUALITY mode indicates that the camera device
10665f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * will use the highest-quality noise filtering algorithms,
10675f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * even if it slows down capture rate. FAST means the camera device should not
10682807936f5dfdeff25e9ace3482100511a69dcf13Zhijun He     * slow down capture rate when applying noise filtering.</p>
10696dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk     *
10706dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk     * @see CameraCharacteristics#NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES
10715a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #NOISE_REDUCTION_MODE_OFF
10725a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #NOISE_REDUCTION_MODE_FAST
10735a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #NOISE_REDUCTION_MODE_HIGH_QUALITY
10745a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
10755a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> NOISE_REDUCTION_MODE =
10765a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.noiseReduction.mode", int.class);
10775a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
10785a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1079ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>An application-specified ID for the current
10805a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * request. Must be maintained unchanged in output
1081ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * frame</p>
10825a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @hide
10835a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
10845a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> REQUEST_ID =
10855a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.request.id", int.class);
10865a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
10875a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1088ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>(x, y, width, height).</p>
1089ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>A rectangle with the top-level corner of (x,y) and size
10905a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * (width, height). The region of the sensor that is used for
10915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * output. Each stream must use this rectangle to produce its
10925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * output, cropping to a smaller region if necessary to
1093ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * maintain the stream's aspect ratio.</p>
1094ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>HAL2.x uses only (x, y, width)</p>
1095ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Any additional per-stream cropping must be done to
1096ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * maximize the final pixel area of the stream.</p>
1097ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>For example, if the crop region is set to a 4:3 aspect
10985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * ratio, then 4:3 streams should use the exact crop
10995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * region. 16:9 streams should further crop vertically
1100ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * (letterbox).</p>
1101ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Conversely, if the crop region is set to a 16:9, then 4:3
11025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * outputs should crop horizontally (pillarbox), and 16:9
11035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * streams should match exactly. These additional crops must
1104ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * be centered within the crop region.</p>
1105ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>The output streams must maintain square pixels at all
11065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * times, no matter what the relative aspect ratios of the
11075a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * crop region and the stream are.  Negative values for
11085a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * corner are allowed for raw output if full pixel array is
11095a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * larger than active pixel array. Width and height may be
11105a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * rounded to nearest larger supportable width, especially
11115a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * for raw output, where only a few fixed scales may be
11125a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * possible. The width and height of the crop region cannot
11135a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * be set to be smaller than floor( activeArraySize.width /
1114d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala     * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom} ) and floor(
1115d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala     * activeArraySize.height /
1116d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala     * {@link CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM android.scaler.availableMaxDigitalZoom}), respectively.</p>
1117d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala     *
1118d8fd67931e17c66e530de5482b63863e6c4301aaEino-Ville Talvala     * @see CameraCharacteristics#SCALER_AVAILABLE_MAX_DIGITAL_ZOOM
11195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
11205a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<android.graphics.Rect> SCALER_CROP_REGION =
11215a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<android.graphics.Rect>("android.scaler.cropRegion", android.graphics.Rect.class);
11225a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
11235a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1124ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Duration each pixel is exposed to
1125ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * light.</p>
1126ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>If the sensor can't expose this exact duration, it should shorten the
1127ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * duration exposed to the nearest possible value (rather than expose longer).</p>
11285a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
11295a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Long> SENSOR_EXPOSURE_TIME =
11305a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Long>("android.sensor.exposureTime", long.class);
11315a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
11325a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1133ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Duration from start of frame exposure to
1134143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * start of next frame exposure.</p>
1135143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <p>The maximum frame rate that can be supported by a camera subsystem is
1136143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * a function of many factors:</p>
1137143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <ul>
1138143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <li>Requested resolutions of output image streams</li>
1139143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <li>Availability of binning / skipping modes on the imager</li>
1140143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <li>The bandwidth of the imager interface</li>
1141143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <li>The bandwidth of the various ISP processing blocks</li>
1142143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * </ul>
1143143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <p>Since these factors can vary greatly between different ISPs and
1144143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * sensors, the camera abstraction tries to represent the bandwidth
1145143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * restrictions with as simple a model as possible.</p>
1146143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <p>The model presented has the following characteristics:</p>
1147143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <ul>
1148143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <li>The image sensor is always configured to output the smallest
1149143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * resolution possible given the application's requested output stream
1150143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * sizes.  The smallest resolution is defined as being at least as large
1151143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * as the largest requested output stream size; the camera pipeline must
1152143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * never digitally upsample sensor data when the crop region covers the
1153143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * whole sensor. In general, this means that if only small output stream
1154143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * resolutions are configured, the sensor can provide a higher frame
1155143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * rate.</li>
1156143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <li>Since any request may use any or all the currently configured
1157143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * output streams, the sensor and ISP must be configured to support
1158143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * scaling a single capture to all the streams at the same time.  This
1159143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * means the camera pipeline must be ready to produce the largest
1160143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * requested output size without any delay.  Therefore, the overall
1161143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * frame rate of a given configured stream set is governed only by the
1162143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * largest requested stream resolution.</li>
1163143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <li>Using more than one output stream in a request does not affect the
1164143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * frame duration.</li>
1165a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * <li>Certain format-streams may need to do additional background processing
1166a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * before data is consumed/produced by that stream. These processors
1167a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * can run concurrently to the rest of the camera pipeline, but
1168a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * cannot process more than 1 capture at a time.</li>
1169143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * </ul>
1170143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <p>The necessary information for the application, given the model above,
1171a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * is provided via the {@link CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS android.scaler.availableMinFrameDurations} field.
1172143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * These are used to determine the maximum frame rate / minimum frame
1173143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * duration that is possible for a given stream configuration.</p>
1174143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <p>Specifically, the application can use the following rules to
1175a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * determine the minimum frame duration it can request from the camera
1176143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * device:</p>
1177143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * <ol>
1178a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * <li>Let the set of currently configured input/output streams
1179a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * be called <code>S</code>.</li>
1180a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * <li>Find the minimum frame durations for each stream in <code>S</code>, by
1181a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * looking it up in {@link CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS android.scaler.availableMinFrameDurations} (with
1182a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * its respective size/format). Let this set of frame durations be called
1183a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * <code>F</code>.</li>
1184a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * <li>For any given request <code>R</code>, the minimum frame duration allowed
1185a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * for <code>R</code> is the maximum out of all values in <code>F</code>. Let the streams
1186a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * used in <code>R</code> be called <code>S_r</code>.</li>
1187143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     * </ol>
1188a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * <p>If none of the streams in <code>S_r</code> have a stall time (listed in
1189a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * {@link CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS android.scaler.availableStallDurations}), then the frame duration in
1190a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * <code>F</code> determines the steady state frame rate that the application will
1191a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * get if it uses <code>R</code> as a repeating request. Let this special kind
1192a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * of request be called <code>Rsimple</code>.</p>
1193a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * <p>A repeating request <code>Rsimple</code> can be <em>occasionally</em> interleaved
1194a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * by a single capture of a new request <code>Rstall</code> (which has at least
1195a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * one in-use stream with a non-0 stall time) and if <code>Rstall</code> has the
1196a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * same minimum frame duration this will not cause a frame rate loss
1197a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * if all buffers from the previous <code>Rstall</code> have already been
1198a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * delivered.</p>
1199a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * <p>For more details about stalling, see
1200a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * {@link CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS android.scaler.availableStallDurations}.</p>
1201143aa0b891b2f8bf8ffabf8c53966c3cf97e9eb0Igor Murashkin     *
1202a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * @see CameraCharacteristics#SCALER_AVAILABLE_MIN_FRAME_DURATIONS
1203a23ffb5f50d5bf72bde9b8fdbcbd0cea037135b3Igor Murashkin     * @see CameraCharacteristics#SCALER_AVAILABLE_STALL_DURATIONS
12045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
12055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Long> SENSOR_FRAME_DURATION =
12065a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Long>("android.sensor.frameDuration", long.class);
12075a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
12085a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1209ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Gain applied to image data. Must be
12105a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * implemented through analog gain only if set to values
1211ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * below 'maximum analog sensitivity'.</p>
1212ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>If the sensor can't apply this exact gain, it should lessen the
1213ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * gain to the nearest possible value (rather than gain more).</p>
1214ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>ISO 12232:2006 REI method</p>
12155a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
12165a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> SENSOR_SENSITIVITY =
12175a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.sensor.sensitivity", int.class);
12185a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
12195a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1220c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * <p>A pixel <code>[R, G_even, G_odd, B]</code> that supplies the test pattern
1221c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * when {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode} is SOLID_COLOR.</p>
1222c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * <p>Each color channel is treated as an unsigned 32-bit integer.
1223c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * The camera device then uses the most significant X bits
1224c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * that correspond to how many bits are in its Bayer raw sensor
1225c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * output.</p>
1226c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * <p>For example, a sensor with RAW10 Bayer output would use the
1227c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * 10 most significant bits from each color channel.</p>
1228c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1229c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     *
1230c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * @see CaptureRequest#SENSOR_TEST_PATTERN_MODE
1231c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     */
1232c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin    public static final Key<int[]> SENSOR_TEST_PATTERN_DATA =
1233c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin            new Key<int[]>("android.sensor.testPatternData", int[].class);
1234c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin
1235c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin    /**
1236c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * <p>When enabled, the sensor sends a test pattern instead of
1237c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * doing a real exposure from the camera.</p>
1238c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * <p>When a test pattern is enabled, all manual sensor controls specified
1239c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * by android.sensor.* should be ignored. All other controls should
1240c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * work as normal.</p>
1241c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * <p>For example, if manual flash is enabled, flash firing should still
1242c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * occur (and that the test pattern remain unmodified, since the flash
1243c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * would not actually affect it).</p>
1244c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
1245c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * @see #SENSOR_TEST_PATTERN_MODE_OFF
1246c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * @see #SENSOR_TEST_PATTERN_MODE_SOLID_COLOR
1247c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS
1248c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * @see #SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY
1249c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * @see #SENSOR_TEST_PATTERN_MODE_PN9
1250c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     * @see #SENSOR_TEST_PATTERN_MODE_CUSTOM1
1251c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin     */
1252c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin    public static final Key<Integer> SENSOR_TEST_PATTERN_MODE =
1253c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin            new Key<Integer>("android.sensor.testPatternMode", int.class);
1254c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin
1255c127f05292919ef1646b08b16dca1fe7c324afd4Igor Murashkin    /**
1256ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * <p>Quality of lens shading correction applied
1257ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * to the image data.</p>
1258ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * <p>When set to OFF mode, no lens shading correction will be applied by the
1259ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * camera device, and an identity lens shading map data will be provided
1260ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens
1261ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * shading map with size specified as <code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]</code>,
1262ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * the output {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} for this case will be an identity map
1263ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * shown below:</p>
1264ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * <pre><code>[ 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
1265ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
1266ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
1267ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
1268ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * 1.0, 1.0, 1.0, 1.0,   1.0, 1.0, 1.0, 1.0,
1269ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
1270ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * </code></pre>
1271ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * <p>When set to other modes, lens shading correction will be applied by the
1272ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * camera device. Applications can request lens shading map data by setting
1273ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide
1274ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * lens shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap}, with size specified
1275ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p>
1276ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     *
1277ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE
1278ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
1279ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
1280ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * @see #SHADING_MODE_OFF
1281ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * @see #SHADING_MODE_FAST
1282ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     * @see #SHADING_MODE_HIGH_QUALITY
1283ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He     */
1284ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He    public static final Key<Integer> SHADING_MODE =
1285ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He            new Key<Integer>("android.shading.mode", int.class);
1286ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He
1287ba93fe6468ef14865ec341bc14fc4a1dc7e88704Zhijun He    /**
1288ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>State of the face detector
1289ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * unit</p>
1290ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Whether face detection is enabled, and whether it
12915a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * should output just the basic fields or the full set of
12925a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * fields. Value must be one of the
12930da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES android.statistics.info.availableFaceDetectModes}.</p>
12940da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
12950da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES
12965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #STATISTICS_FACE_DETECT_MODE_OFF
12975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #STATISTICS_FACE_DETECT_MODE_SIMPLE
12985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #STATISTICS_FACE_DETECT_MODE_FULL
12995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
13005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> STATISTICS_FACE_DETECT_MODE =
13015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.statistics.faceDetectMode", int.class);
13025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
13035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
13049d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     * <p>Operating mode for hotpixel map generation.</p>
13059d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     * <p>If set to ON, a hotpixel map is returned in {@link CaptureResult#STATISTICS_HOT_PIXEL_MAP android.statistics.hotPixelMap}.
13069d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     * If set to OFF, no hotpixel map should be returned.</p>
13079d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     * <p>This must be set to a valid mode from {@link CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES android.statistics.info.availableHotPixelMapModes}.</p>
13089d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     *
13099d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     * @see CaptureResult#STATISTICS_HOT_PIXEL_MAP
13109d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     * @see CameraCharacteristics#STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES
13119d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk     */
13129d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk    public static final Key<Boolean> STATISTICS_HOT_PIXEL_MAP_MODE =
13139d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk            new Key<Boolean>("android.statistics.hotPixelMapMode", boolean.class);
13149d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk
13159d454fd6096dad310a476d50b5e7175e38cdc4eaRuben Brunk    /**
1316cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * <p>Whether the camera device will output the lens
1317cc28a41b48bc687002a9e1fc436d00ca6f0c3692Zhijun He     * shading map in output result metadata.</p>
1318ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>When set to ON,
13190da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} must be provided in
13207a9b30e9e3e45d387d2fc0cb2bd2eb79da7dd268Igor Murashkin     * the output result metadata.</p>
13210da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
13220da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
1323d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala     * @see #STATISTICS_LENS_SHADING_MAP_MODE_OFF
1324d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala     * @see #STATISTICS_LENS_SHADING_MAP_MODE_ON
1325d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala     */
1326d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala    public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE =
1327d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala            new Key<Integer>("android.statistics.lensShadingMapMode", int.class);
1328d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala
1329d96748b02a468e484f864f4e3e4b7819f7dcdbd0Eino-Ville Talvala    /**
1330ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Tonemapping / contrast / gamma curve for the blue
1331e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
1332e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * CONTRAST_CURVE.</p>
13330da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
13340da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
13353242f4fb19b77bcd2435cbe710188d012d08b005Igor Murashkin     * @see CaptureRequest#TONEMAP_CURVE_RED
13365f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * @see CaptureRequest#TONEMAP_MODE
13375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
13383ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He    public static final Key<float[]> TONEMAP_CURVE_BLUE =
13393ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He            new Key<float[]>("android.tonemap.curveBlue", float[].class);
13405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
13415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1342ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Tonemapping / contrast / gamma curve for the green
1343e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
1344e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * CONTRAST_CURVE.</p>
13450da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * <p>See {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} for more details.</p>
13460da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
13473242f4fb19b77bcd2435cbe710188d012d08b005Igor Murashkin     * @see CaptureRequest#TONEMAP_CURVE_RED
13485f2a47f3dedfc7859457067d8cdcdbfc28ee08acZhijun He     * @see CaptureRequest#TONEMAP_MODE
13495a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
13503ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He    public static final Key<float[]> TONEMAP_CURVE_GREEN =
13513ffd70554f85bd1ee54354f2d5c44e1bc0878227Zhijun He            new Key<float[]>("android.tonemap.curveGreen", float[].class);
13525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
13535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1354ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Tonemapping / contrast / gamma curve for the red
1355e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
1356e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * CONTRAST_CURVE.</p>
1357e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>Each channel's curve is defined by an array of control points:</p>
1358e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} =
1359e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * [ P0in, P0out, P1in, P1out, P2in, P2out, P3in, P3out, ..., PNin, PNout ]
1360870922be2399766078d0a4e42a0158ecb9eb1f86Zhijun He     * 2 &lt;= N &lt;= {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}</code></pre>
1361e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>These are sorted in order of increasing <code>Pin</code>; it is always
1362e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * guaranteed that input values 0.0 and 1.0 are included in the list to
1363e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * define a complete mapping. For input values between control points,
1364e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * the camera device must linearly interpolate between the control
1365e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * points.</p>
1366e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>Each curve can have an independent number of points, and the number
1367e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * of points can be less than max (that is, the request doesn't have to
1368e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * always provide a curve with number of points equivalent to
1369e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS android.tonemap.maxCurvePoints}).</p>
1370e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>A few examples, and their corresponding graphical mappings; these
1371e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * only specify the red channel and the precision is limited to 4
1372e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * digits, for conciseness.</p>
1373e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>Linear mapping:</p>
1374e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 0, 0, 1.0, 1.0 ]
1375e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * </code></pre>
1376e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p><img alt="Linear mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png" /></p>
1377e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>Invert mapping:</p>
1378e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [ 0, 1.0, 1.0, 0 ]
1379e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * </code></pre>
1380e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p><img alt="Inverting mapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png" /></p>
1381e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>Gamma 1/2.2 mapping, with 16 control points:</p>
1382e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [
1383e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * 0.0000, 0.0000, 0.0667, 0.2920, 0.1333, 0.4002, 0.2000, 0.4812,
1384e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * 0.2667, 0.5484, 0.3333, 0.6069, 0.4000, 0.6594, 0.4667, 0.7072,
1385e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * 0.5333, 0.7515, 0.6000, 0.7928, 0.6667, 0.8317, 0.7333, 0.8685,
1386e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * 0.8000, 0.9035, 0.8667, 0.9370, 0.9333, 0.9691, 1.0000, 1.0000 ]
1387e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * </code></pre>
1388e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p><img alt="Gamma = 1/2.2 tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png" /></p>
1389e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>Standard sRGB gamma mapping, per IEC 61966-2-1:1999, with 16 control points:</p>
1390e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <pre><code>{@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed} = [
1391e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * 0.0000, 0.0000, 0.0667, 0.2864, 0.1333, 0.4007, 0.2000, 0.4845,
1392e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * 0.2667, 0.5532, 0.3333, 0.6125, 0.4000, 0.6652, 0.4667, 0.7130,
1393e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * 0.5333, 0.7569, 0.6000, 0.7977, 0.6667, 0.8360, 0.7333, 0.8721,
1394e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * 0.8000, 0.9063, 0.8667, 0.9389, 0.9333, 0.9701, 1.0000, 1.0000 ]
1395e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * </code></pre>
1396e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p><img alt="sRGB tonemapping curve" src="../../../../images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png" /></p>
13970da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     *
1398e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * @see CaptureRequest#TONEMAP_CURVE_RED
1399e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * @see CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS
14000da8bf5dbc8912cf70df14bfa655189a04c75476Eino-Ville Talvala     * @see CaptureRequest#TONEMAP_MODE
14015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
14025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<float[]> TONEMAP_CURVE_RED =
14035a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<float[]>("android.tonemap.curveRed", float[].class);
14045a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
14055a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1406e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>High-level global contrast/gamma/tonemapping control.</p>
1407e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>When switching to an application-defined contrast curve by setting
1408e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} to CONTRAST_CURVE, the curve is defined
1409e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * per-channel with a set of <code>(in, out)</code> points that specify the
1410e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * mapping from input high-bit-depth pixel value to the output
1411e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * low-bit-depth value.  Since the actual pixel ranges of both input
1412e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * and output may change depending on the camera pipeline, the values
1413e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * are specified by normalized floating-point numbers.</p>
1414e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>More-complex color mapping operations such as 3D color look-up
1415e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * tables, selective chroma enhancement, or other non-linear color
1416e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * transforms will be disabled when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
1417e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * CONTRAST_CURVE.</p>
14186dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk     * <p>This must be set to a valid mode in
14196dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk     * {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}.</p>
1420e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>When using either FAST or HIGH_QUALITY, the camera device will
1421e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * emit its own tonemap curve in {@link CaptureRequest#TONEMAP_CURVE_RED android.tonemap.curveRed},
1422e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * {@link CaptureRequest#TONEMAP_CURVE_GREEN android.tonemap.curveGreen}, and {@link CaptureRequest#TONEMAP_CURVE_BLUE android.tonemap.curveBlue}.
1423e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * These values are always available, and as close as possible to the
1424e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * actually used nonlinear/nonglobal transforms.</p>
1425e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * <p>If a request is sent with TRANSFORM_MATRIX with the camera device's
1426e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * provided curve in FAST or HIGH_QUALITY, the image's tonemap will be
1427e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * roughly the same.</p>
14283242f4fb19b77bcd2435cbe710188d012d08b005Igor Murashkin     *
14296dc379c7bd34d9707ee2ef819a5a07afc2aa9314Ruben Brunk     * @see CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES
1430e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * @see CaptureRequest#TONEMAP_CURVE_BLUE
1431e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * @see CaptureRequest#TONEMAP_CURVE_GREEN
1432e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * @see CaptureRequest#TONEMAP_CURVE_RED
1433e0060930cbff1af0486466e03605e6e8ee525302Igor Murashkin     * @see CaptureRequest#TONEMAP_MODE
14345a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #TONEMAP_MODE_CONTRAST_CURVE
14355a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #TONEMAP_MODE_FAST
14365a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @see #TONEMAP_MODE_HIGH_QUALITY
14375a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
14385a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Integer> TONEMAP_MODE =
14395a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Integer>("android.tonemap.mode", int.class);
14405a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
14415a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1442ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>This LED is nominally used to indicate to the user
14435a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * that the camera is powered on and may be streaming images back to the
14445a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * Application Processor. In certain rare circumstances, the OS may
14455a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * disable this when video is processed locally and not transmitted to
1446ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * any untrusted applications.</p>
1447ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>In particular, the LED <em>must</em> always be on when the data could be
1448ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * transmitted off the device. The LED <em>should</em> always be on whenever
1449ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * data is stored locally on the device.</p>
1450ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>The LED <em>may</em> be off if a trusted application is using the data that
1451ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * doesn't violate the above rules.</p>
14525a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * @hide
14535a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
14545a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Boolean> LED_TRANSMIT =
14555a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Boolean>("android.led.transmit", boolean.class);
14565a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
14575a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /**
1458ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Whether black-level compensation is locked
14590956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * to its current values, or is free to vary.</p>
1460ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>When set to ON, the values used for black-level
14610956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * compensation will not change until the lock is set to
14620956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * OFF.</p>
1463ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>Since changes to certain capture parameters (such as
14645a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * exposure time) may require resetting of black level
14650956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * compensation, the camera device must report whether setting
14660956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * the black level lock was successful in the output result
1467ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * metadata.</p>
1468ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <p>For example, if a sequence of requests is as follows:</p>
1469ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <ul>
1470ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Request 1: Exposure = 10ms, Black level lock = OFF</li>
1471ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Request 2: Exposure = 10ms, Black level lock = ON</li>
1472ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Request 3: Exposure = 10ms, Black level lock = ON</li>
1473ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Request 4: Exposure = 20ms, Black level lock = ON</li>
1474ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Request 5: Exposure = 20ms, Black level lock = ON</li>
1475ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Request 6: Exposure = 20ms, Black level lock = ON</li>
1476ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * </ul>
14770956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * <p>And the exposure change in Request 4 requires the camera
14780956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * device to reset the black level offsets, then the output
14790956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * result metadata is expected to be:</p>
1480ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <ul>
1481ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Result 1: Exposure = 10ms, Black level lock = OFF</li>
1482ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Result 2: Exposure = 10ms, Black level lock = ON</li>
1483ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Result 3: Exposure = 10ms, Black level lock = ON</li>
1484ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Result 4: Exposure = 20ms, Black level lock = OFF</li>
1485ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Result 5: Exposure = 20ms, Black level lock = ON</li>
1486ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * <li>Result 6: Exposure = 20ms, Black level lock = ON</li>
1487ace5bf04126f7dd49d75fca9218031f0db02e5ddIgor Murashkin     * </ul>
14880956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * <p>This indicates to the application that on frame 4, black
14890956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * levels were reset due to exposure value changes, and pixel
14900956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * values may not be consistent across captures.</p>
14910956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * <p>The camera device will maintain the lock to the extent
14920956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * possible, only overriding the lock to OFF when changes to
14930956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * other request parameters require a black level recalculation
14940956af56a294397325f2695604229ab7550364caEino-Ville Talvala     * or reset.</p>
14955a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     */
14965a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    public static final Key<Boolean> BLACK_LEVEL_LOCK =
14975a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala            new Key<Boolean>("android.blackLevel.lock", boolean.class);
14985a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala
14995a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala    /*~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~
15005a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     * End generated code
15015a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala     *~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~@~O@*/
15025a32b20ccc34fd7d4f048de05c427a7a96786531Eino-Ville Talvala}
1503