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

Commit 500c2341 authored by Zhijun He's avatar Zhijun He Committed by Android Git Automerger
Browse files

am 02d13364: Camera2: Add croppingType tag

* commit '02d133644511dbc14deb833c05713a531100e5d4':
  Camera2: Add croppingType tag
parents 6c8ca847 1498615d
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -12180,6 +12180,7 @@ package android.hardware.camera2 {
    field public static final android.hardware.camera2.CameraMetadata.Key REQUEST_PARTIAL_RESULT_COUNT;
    field public static final android.hardware.camera2.CameraMetadata.Key REQUEST_PIPELINE_MAX_DEPTH;
    field public static final android.hardware.camera2.CameraMetadata.Key SCALER_AVAILABLE_MAX_DIGITAL_ZOOM;
    field public static final android.hardware.camera2.CameraMetadata.Key SCALER_CROPPING_TYPE;
    field public static final android.hardware.camera2.CameraMetadata.Key SCALER_STREAM_CONFIGURATION_MAP;
    field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_AVAILABLE_TEST_PATTERN_MODES;
    field public static final android.hardware.camera2.CameraMetadata.Key SENSOR_BASE_GAIN_FACTOR;
@@ -12391,6 +12392,8 @@ package android.hardware.camera2 {
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_DNG = 5; // 0x5
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 2; // 0x2
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_ZSL = 4; // 0x4
    field public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0; // 0x0
    field public static final int SCALER_CROPPING_TYPE_FREEFORM = 1; // 0x1
    field public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR = 3; // 0x3
    field public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG = 2; // 0x2
    field public static final int SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG = 1; // 0x1
+22 −0
Original line number Diff line number Diff line
@@ -1045,6 +1045,28 @@ public final class CameraCharacteristics extends CameraMetadata {
    public static final Key<android.hardware.camera2.params.StreamConfigurationMap> SCALER_STREAM_CONFIGURATION_MAP =
            new Key<android.hardware.camera2.params.StreamConfigurationMap>("android.scaler.streamConfigurationMap", android.hardware.camera2.params.StreamConfigurationMap.class);

    /**
     * <p>The crop type that this camera device supports.</p>
     * <p>When passing a non-centered crop region ({@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}) to a camera
     * device that only supports CENTER_ONLY cropping, the camera device will move the
     * crop region to the center of the sensor active array ({@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize})
     * and keep the crop region width and height unchanged. The camera device will return the
     * final used crop region in metadata result {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
     * <p>Camera devices that support FREEFORM cropping will support any crop region that
     * is inside of the active array. The camera device will apply the same crop region and
     * return the final used crop region in capture result metadata {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}.</p>
     * <p>FULL capability devices ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} <code>==</code> FULL) will support
     * FREEFORM cropping.</p>
     *
     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
     * @see CaptureRequest#SCALER_CROP_REGION
     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
     * @see #SCALER_CROPPING_TYPE_CENTER_ONLY
     * @see #SCALER_CROPPING_TYPE_FREEFORM
     */
    public static final Key<Integer> SCALER_CROPPING_TYPE =
            new Key<Integer>("android.scaler.croppingType", int.class);

    /**
     * <p>Area of raw data which corresponds to only
     * active pixels.</p>
+16 −0
Original line number Diff line number Diff line
@@ -445,6 +445,22 @@ public abstract class CameraMetadata {
     */
    public static final int REQUEST_AVAILABLE_CAPABILITIES_DNG = 5;

    //
    // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
    //

    /**
     * <p>The camera device will only support centered crop regions.</p>
     * @see CameraCharacteristics#SCALER_CROPPING_TYPE
     */
    public static final int SCALER_CROPPING_TYPE_CENTER_ONLY = 0;

    /**
     * <p>The camera device will support arbitrarily chosen crop regions.</p>
     * @see CameraCharacteristics#SCALER_CROPPING_TYPE
     */
    public static final int SCALER_CROPPING_TYPE_FREEFORM = 1;

    //
    // Enumeration values for CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
    //
+9 −9
Original line number Diff line number Diff line
@@ -569,9 +569,9 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable {
     * should be nonnegative.</p>
     * <p>If all regions have 0 weight, then no specific metering area
     * needs to be used by the camera device. If the metering region is
     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
     * will ignore the sections outside the region and output the
     * used sections in the frame metadata.</p>
     * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
     * the camera device will ignore the sections outside the region and output the
     * used sections in the result metadata.</p>
     *
     * @see CaptureRequest#SCALER_CROP_REGION
     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
@@ -644,9 +644,9 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable {
     * should be nonnegative.</p>
     * <p>If all regions have 0 weight, then no specific focus area
     * needs to be used by the camera device. If the focusing region is
     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
     * will ignore the sections outside the region and output the
     * used sections in the frame metadata.</p>
     * outside the the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture
     * result metadata, the camera device will ignore the sections outside
     * the region and output the used sections in the result metadata.</p>
     *
     * @see CaptureRequest#SCALER_CROP_REGION
     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
@@ -731,9 +731,9 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable {
     * should be nonnegative.</p>
     * <p>If all regions have 0 weight, then no specific auto-white balance (AWB) area
     * needs to be used by the camera device. If the AWB region is
     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
     * will ignore the sections outside the region and output the
     * used sections in the frame metadata.</p>
     * outside the the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
     * the camera device will ignore the sections outside the region and output the
     * used sections in the result metadata.</p>
     *
     * @see CaptureRequest#SCALER_CROP_REGION
     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
+9 −9
Original line number Diff line number Diff line
@@ -369,9 +369,9 @@ public final class CaptureResult extends CameraMetadata {
     * should be nonnegative.</p>
     * <p>If all regions have 0 weight, then no specific metering area
     * needs to be used by the camera device. If the metering region is
     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
     * will ignore the sections outside the region and output the
     * used sections in the frame metadata.</p>
     * outside the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
     * the camera device will ignore the sections outside the region and output the
     * used sections in the result metadata.</p>
     *
     * @see CaptureRequest#SCALER_CROP_REGION
     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
@@ -642,9 +642,9 @@ public final class CaptureResult extends CameraMetadata {
     * should be nonnegative.</p>
     * <p>If all regions have 0 weight, then no specific focus area
     * needs to be used by the camera device. If the focusing region is
     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
     * will ignore the sections outside the region and output the
     * used sections in the frame metadata.</p>
     * outside the the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture
     * result metadata, the camera device will ignore the sections outside
     * the region and output the used sections in the result metadata.</p>
     *
     * @see CaptureRequest#SCALER_CROP_REGION
     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
@@ -1126,9 +1126,9 @@ public final class CaptureResult extends CameraMetadata {
     * should be nonnegative.</p>
     * <p>If all regions have 0 weight, then no specific auto-white balance (AWB) area
     * needs to be used by the camera device. If the AWB region is
     * outside the current {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion}, the camera device
     * will ignore the sections outside the region and output the
     * used sections in the frame metadata.</p>
     * outside the the used {@link CaptureRequest#SCALER_CROP_REGION android.scaler.cropRegion} returned in capture result metadata,
     * the camera device will ignore the sections outside the region and output the
     * used sections in the result metadata.</p>
     *
     * @see CaptureRequest#SCALER_CROP_REGION
     * @see CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE