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

Commit 8550137c authored by Zhijun He's avatar Zhijun He Committed by Android Git Automerger
Browse files

am b8fb80dd: Merge "Camera2: Update shading mode spec"

* commit 'b8fb80dd':
  Camera2: Update shading mode spec
parents 5ec96c29 b8fb80dd
Loading
Loading
Loading
Loading
+25 −0
Original line number Diff line number Diff line
@@ -960,6 +960,31 @@ public abstract class CameraMetadata {
     */
    public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2;

    //
    // Enumeration values for CaptureRequest#SHADING_MODE
    //

    /**
     * <p>No lens shading correction is applied</p>
     * @see CaptureRequest#SHADING_MODE
     * @hide
     */
    public static final int SHADING_MODE_OFF = 0;

    /**
     * <p>Must not slow down frame rate relative to sensor raw output</p>
     * @see CaptureRequest#SHADING_MODE
     * @hide
     */
    public static final int SHADING_MODE_FAST = 1;

    /**
     * <p>Frame rate may be reduced by high quality</p>
     * @see CaptureRequest#SHADING_MODE
     * @hide
     */
    public static final int SHADING_MODE_HIGH_QUALITY = 2;

    //
    // Enumeration values for CaptureRequest#STATISTICS_FACE_DETECT_MODE
    //
+33 −0
Original line number Diff line number Diff line
@@ -1147,6 +1147,39 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable {
    public static final Key<Integer> SENSOR_SENSITIVITY =
            new Key<Integer>("android.sensor.sensitivity", int.class);

    /**
     * <p>Quality of lens shading correction applied
     * to the image data.</p>
     * <p>When set to OFF mode, no lens shading correction will be applied by the
     * camera device, and an identity lens shading map data will be provided
     * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens
     * shading map with size specified as <code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]</code>,
     * the output {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} for this case will be an identity map
     * shown below:</p>
     * <pre><code>[ 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
     * 1.0, 1.0, 1.0, 1.0,   1.0, 1.0, 1.0, 1.0,
     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
     * </code></pre>
     * <p>When set to other modes, lens shading correction will be applied by the
     * camera device. Applications can request lens shading map data by setting
     * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide
     * lens shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap}, with size specified
     * by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p>
     *
     * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE
     * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
     * @see #SHADING_MODE_OFF
     * @see #SHADING_MODE_FAST
     * @see #SHADING_MODE_HIGH_QUALITY
     * @hide
     */
    public static final Key<Integer> SHADING_MODE =
            new Key<Integer>("android.shading.mode", int.class);

    /**
     * <p>State of the face detector
     * unit</p>
+33 −0
Original line number Diff line number Diff line
@@ -1377,6 +1377,39 @@ public final class CaptureResult extends CameraMetadata {
    public static final Key<Float> SENSOR_TEMPERATURE =
            new Key<Float>("android.sensor.temperature", float.class);

    /**
     * <p>Quality of lens shading correction applied
     * to the image data.</p>
     * <p>When set to OFF mode, no lens shading correction will be applied by the
     * camera device, and an identity lens shading map data will be provided
     * if <code>{@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} == ON</code>. For example, for lens
     * shading map with size specified as <code>{@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize} = [ 4, 3 ]</code>,
     * the output {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap} for this case will be an identity map
     * shown below:</p>
     * <pre><code>[ 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0,
     * 1.0, 1.0, 1.0, 1.0,   1.0, 1.0, 1.0, 1.0,
     * 1.0, 1.0, 1.0, 1.0,  1.0, 1.0, 1.0, 1.0 ]
     * </code></pre>
     * <p>When set to other modes, lens shading correction will be applied by the
     * camera device. Applications can request lens shading map data by setting
     * {@link CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE android.statistics.lensShadingMapMode} to ON, and then the camera device will provide
     * lens shading map data in {@link CaptureResult#STATISTICS_LENS_SHADING_MAP android.statistics.lensShadingMap}, with size specified
     * by {@link CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE android.lens.info.shadingMapSize}.</p>
     *
     * @see CameraCharacteristics#LENS_INFO_SHADING_MAP_SIZE
     * @see CaptureResult#STATISTICS_LENS_SHADING_MAP
     * @see CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
     * @see #SHADING_MODE_OFF
     * @see #SHADING_MODE_FAST
     * @see #SHADING_MODE_HIGH_QUALITY
     * @hide
     */
    public static final Key<Integer> SHADING_MODE =
            new Key<Integer>("android.shading.mode", int.class);

    /**
     * <p>State of the face detector
     * unit</p>