Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9cf5b95 authored by Chien-Yu Chen's avatar Chien-Yu Chen
Browse files

camera: Add OIS data keys

Test: CTS
Bug: 64847201
Change-Id: I505e1b9e2bcfea515e3292c870808d4c15024567
parent a17274fb
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -15639,6 +15639,7 @@ package android.hardware.camera2 {
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<boolean[]> STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> STATISTICS_INFO_MAX_FACE_COUNT;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> SYNC_MAX_LATENCY;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> TONEMAP_AVAILABLE_TONE_MAP_MODES;
@@ -15902,6 +15903,8 @@ package android.hardware.camera2 {
    field public static final int STATISTICS_FACE_DETECT_MODE_SIMPLE = 1; // 0x1
    field public static final int STATISTICS_LENS_SHADING_MAP_MODE_OFF = 0; // 0x0
    field public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1; // 0x1
    field public static final int STATISTICS_OIS_DATA_MODE_OFF = 0; // 0x0
    field public static final int STATISTICS_OIS_DATA_MODE_ON = 1; // 0x1
    field public static final int STATISTICS_SCENE_FLICKER_50HZ = 1; // 0x1
    field public static final int STATISTICS_SCENE_FLICKER_60HZ = 2; // 0x2
    field public static final int STATISTICS_SCENE_FLICKER_NONE = 0; // 0x0
@@ -15984,6 +15987,7 @@ package android.hardware.camera2 {
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> STATISTICS_FACE_DETECT_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Boolean> STATISTICS_HOT_PIXEL_MAP_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> STATISTICS_LENS_SHADING_MAP_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> STATISTICS_OIS_DATA_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.hardware.camera2.params.TonemapCurve> TONEMAP_CURVE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> TONEMAP_GAMMA;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> TONEMAP_MODE;
@@ -16083,6 +16087,10 @@ package android.hardware.camera2 {
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Boolean> STATISTICS_HOT_PIXEL_MAP_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.LensShadingMap> STATISTICS_LENS_SHADING_CORRECTION_MAP;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> STATISTICS_LENS_SHADING_MAP_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> STATISTICS_OIS_DATA_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<long[]> STATISTICS_OIS_TIMESTAMPS;
    field public static final android.hardware.camera2.CaptureResult.Key<float[]> STATISTICS_OIS_X_SHIFTS;
    field public static final android.hardware.camera2.CaptureResult.Key<float[]> STATISTICS_OIS_Y_SHIFTS;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> STATISTICS_SCENE_FLICKER;
    field public static final android.hardware.camera2.CaptureResult.Key<android.hardware.camera2.params.TonemapCurve> TONEMAP_CURVE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Float> TONEMAP_GAMMA;
+15 −0
Original line number Diff line number Diff line
@@ -2869,6 +2869,21 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
    public static final Key<int[]> STATISTICS_INFO_AVAILABLE_LENS_SHADING_MAP_MODES =
            new Key<int[]>("android.statistics.info.availableLensShadingMapModes", int[].class);

    /**
     * <p>List of OIS data output modes for {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode} that
     * are supported by this camera device.</p>
     * <p>If no OIS data output is available for this camera device, this key will
     * contain only OFF.</p>
     * <p><b>Range of valid values:</b><br>
     * Any value listed in {@link CaptureRequest#STATISTICS_OIS_DATA_MODE android.statistics.oisDataMode}</p>
     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
     *
     * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
     */
    @PublicKey
    public static final Key<int[]> STATISTICS_INFO_AVAILABLE_OIS_DATA_MODES =
            new Key<int[]>("android.statistics.info.availableOisDataModes", int[].class);

    /**
     * <p>Maximum number of supported points in the
     * tonemap curve that can be used for {@link CaptureRequest#TONEMAP_CURVE android.tonemap.curve}.</p>
+16 −0
Original line number Diff line number Diff line
@@ -2565,6 +2565,22 @@ public abstract class CameraMetadata<TKey> {
     */
    public static final int STATISTICS_LENS_SHADING_MAP_MODE_ON = 1;

    //
    // Enumeration values for CaptureRequest#STATISTICS_OIS_DATA_MODE
    //

    /**
     * <p>Do not include OIS data in the capture result.</p>
     * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
     */
    public static final int STATISTICS_OIS_DATA_MODE_OFF = 0;

    /**
     * <p>Include OIS data in the capture result.</p>
     * @see CaptureRequest#STATISTICS_OIS_DATA_MODE
     */
    public static final int STATISTICS_OIS_DATA_MODE_ON = 1;

    //
    // Enumeration values for CaptureRequest#TONEMAP_MODE
    //
+23 −0
Original line number Diff line number Diff line
@@ -2618,6 +2618,29 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
    public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE =
            new Key<Integer>("android.statistics.lensShadingMapMode", int.class);

    /**
     * <p>Whether the camera device outputs the OIS data in output
     * result metadata.</p>
     * <p>When set to ON,
     * {@link CaptureResult#STATISTICS_OIS_TIMESTAMPS android.statistics.oisTimestamps}, android.statistics.oisShiftPixelX,
     * android.statistics.oisShiftPixelY will provide OIS data in the output result metadata.</p>
     * <p><b>Possible values:</b>
     * <ul>
     *   <li>{@link #STATISTICS_OIS_DATA_MODE_OFF OFF}</li>
     *   <li>{@link #STATISTICS_OIS_DATA_MODE_ON ON}</li>
     * </ul></p>
     * <p><b>Available values for this device:</b><br>
     * android.Statistics.info.availableOisDataModes</p>
     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
     *
     * @see CaptureResult#STATISTICS_OIS_TIMESTAMPS
     * @see #STATISTICS_OIS_DATA_MODE_OFF
     * @see #STATISTICS_OIS_DATA_MODE_ON
     */
    @PublicKey
    public static final Key<Integer> STATISTICS_OIS_DATA_MODE =
            new Key<Integer>("android.statistics.oisDataMode", int.class);

    /**
     * <p>Tonemapping / contrast / gamma curve for the blue
     * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is
+70 −0
Original line number Diff line number Diff line
@@ -3910,6 +3910,76 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
    public static final Key<Integer> STATISTICS_LENS_SHADING_MAP_MODE =
            new Key<Integer>("android.statistics.lensShadingMapMode", int.class);

    /**
     * <p>Whether the camera device outputs the OIS data in output
     * result metadata.</p>
     * <p>When set to ON,
     * {@link CaptureResult#STATISTICS_OIS_TIMESTAMPS android.statistics.oisTimestamps}, android.statistics.oisShiftPixelX,
     * android.statistics.oisShiftPixelY will provide OIS data in the output result metadata.</p>
     * <p><b>Possible values:</b>
     * <ul>
     *   <li>{@link #STATISTICS_OIS_DATA_MODE_OFF OFF}</li>
     *   <li>{@link #STATISTICS_OIS_DATA_MODE_ON ON}</li>
     * </ul></p>
     * <p><b>Available values for this device:</b><br>
     * android.Statistics.info.availableOisDataModes</p>
     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
     *
     * @see CaptureResult#STATISTICS_OIS_TIMESTAMPS
     * @see #STATISTICS_OIS_DATA_MODE_OFF
     * @see #STATISTICS_OIS_DATA_MODE_ON
     */
    @PublicKey
    public static final Key<Integer> STATISTICS_OIS_DATA_MODE =
            new Key<Integer>("android.statistics.oisDataMode", int.class);

    /**
     * <p>An array of timestamps of OIS samples, in nanoseconds.</p>
     * <p>The array contains the timestamps of OIS samples. The timestamps are in the same
     * timebase as and comparable to {@link CaptureResult#SENSOR_TIMESTAMP android.sensor.timestamp}.</p>
     * <p><b>Units</b>: nanoseconds</p>
     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
     *
     * @see CaptureResult#SENSOR_TIMESTAMP
     */
    @PublicKey
    public static final Key<long[]> STATISTICS_OIS_TIMESTAMPS =
            new Key<long[]>("android.statistics.oisTimestamps", long[].class);

    /**
     * <p>An array of shifts of OIS samples, in x direction.</p>
     * <p>The array contains the amount of shifts in x direction, in pixels, based on OIS samples.
     * A positive value is a shift from left to right in active array coordinate system. For
     * example, if the optical center is (1000, 500) in active array coordinates, an shift of
     * (3, 0) puts the new optical center at (1003, 500).</p>
     * <p>The number of shifts must match the number of timestamps in
     * {@link CaptureResult#STATISTICS_OIS_TIMESTAMPS android.statistics.oisTimestamps}.</p>
     * <p><b>Units</b>: Pixels in active array.</p>
     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
     *
     * @see CaptureResult#STATISTICS_OIS_TIMESTAMPS
     */
    @PublicKey
    public static final Key<float[]> STATISTICS_OIS_X_SHIFTS =
            new Key<float[]>("android.statistics.oisXShifts", float[].class);

    /**
     * <p>An array of shifts of OIS samples, in y direction.</p>
     * <p>The array contains the amount of shifts in y direction, in pixels, based on OIS samples.
     * A positive value is a shift from top to bottom in active array coordinate system. For
     * example, if the optical center is (1000, 500) in active array coordinates, an shift of
     * (0, 5) puts the new optical center at (1000, 505).</p>
     * <p>The number of shifts must match the number of timestamps in
     * {@link CaptureResult#STATISTICS_OIS_TIMESTAMPS android.statistics.oisTimestamps}.</p>
     * <p><b>Units</b>: Pixels in active array.</p>
     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
     *
     * @see CaptureResult#STATISTICS_OIS_TIMESTAMPS
     */
    @PublicKey
    public static final Key<float[]> STATISTICS_OIS_Y_SHIFTS =
            new Key<float[]>("android.statistics.oisYShifts", float[].class);

    /**
     * <p>Tonemapping / contrast / gamma curve for the blue
     * channel, to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is