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

Commit b14a1ac0 authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android (Google) Code Review
Browse files

Merge changes from topic 'remove-high-res' into mnc-dev

* changes:
  Camera2: Fix StreamConfigurationMap#isOutputSupportedFor for depth
  Camera2: Remove HIGH_RESOLUTION level and modify FULL requirements
parents 4d30d342 e365120a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -13500,7 +13500,6 @@ package android.hardware.camera2 {
    field public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2; // 0x2
    field public static final int HOT_PIXEL_MODE_OFF = 0; // 0x0
    field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1; // 0x1
    field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_HIGH_RESOLUTION = 3; // 0x3
    field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2; // 0x2
    field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0; // 0x0
    field public static final int LENS_FACING_BACK = 1; // 0x1
@@ -13853,6 +13852,7 @@ package android.hardware.camera2.params {
  }
  public final class StreamConfigurationMap {
    method public android.util.Size[] getHighResolutionOutputSizes(int);
    method public android.util.Range<java.lang.Integer>[] getHighSpeedVideoFpsRanges();
    method public android.util.Range<java.lang.Integer>[] getHighSpeedVideoFpsRangesFor(android.util.Size);
    method public android.util.Size[] getHighSpeedVideoSizes();
+1 −1
Original line number Diff line number Diff line
@@ -13831,7 +13831,6 @@ package android.hardware.camera2 {
    field public static final int HOT_PIXEL_MODE_HIGH_QUALITY = 2; // 0x2
    field public static final int HOT_PIXEL_MODE_OFF = 0; // 0x0
    field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_FULL = 1; // 0x1
    field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_HIGH_RESOLUTION = 3; // 0x3
    field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2; // 0x2
    field public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED = 0; // 0x0
    field public static final int LENS_FACING_BACK = 1; // 0x1
@@ -14184,6 +14183,7 @@ package android.hardware.camera2.params {
  }
  public final class StreamConfigurationMap {
    method public android.util.Size[] getHighResolutionOutputSizes(int);
    method public android.util.Range<java.lang.Integer>[] getHighSpeedVideoFpsRanges();
    method public android.util.Range<java.lang.Integer>[] getHighSpeedVideoFpsRangesFor(android.util.Size);
    method public android.util.Size[] getHighSpeedVideoSizes();
+2 −17
Original line number Diff line number Diff line
@@ -2679,9 +2679,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * <p>Camera devices will come in three flavors: LEGACY, LIMITED and FULL.</p>
     * <p>A FULL device will support below capabilities:</p>
     * <ul>
     * <li>30fps operation at maximum resolution (== sensor resolution) is preferred, more than
     *   20fps is required, for at least uncompressed YUV
     *   output. ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains BURST_CAPTURE)</li>
     * <li>BURST_CAPTURE capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains BURST_CAPTURE)</li>
     * <li>Per frame control ({@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} <code>==</code> PER_FRAME_CONTROL)</li>
     * <li>Manual sensor control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains MANUAL_SENSOR)</li>
     * <li>Manual post-processing control ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} contains
@@ -2689,7 +2687,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * <li>Arbitrary cropping region ({@link CameraCharacteristics#SCALER_CROPPING_TYPE android.scaler.croppingType} <code>==</code> FREEFORM)</li>
     * <li>At least 3 processed (but not stalling) format output streams
     *   ({@link CameraCharacteristics#REQUEST_MAX_NUM_OUTPUT_PROC android.request.maxNumOutputProc} <code>&gt;=</code> 3)</li>
     * <li>The required stream configuration defined in android.scaler.availableStreamConfigurations</li>
     * <li>The required stream configurations defined in android.scaler.availableStreamConfigurations</li>
     * <li>The required exposure time range defined in {@link CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE android.sensor.info.exposureTimeRange}</li>
     * <li>The required maxFrameDuration defined in {@link CameraCharacteristics#SENSOR_INFO_MAX_FRAME_DURATION android.sensor.info.maxFrameDuration}</li>
     * </ul>
@@ -2709,23 +2707,11 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * post-processing, arbitrary cropping regions, and has relaxed performance constraints.</p>
     * <p>Each higher level supports everything the lower level supports
     * in this order: FULL <code>&gt;</code> LIMITED <code>&gt;</code> LEGACY.</p>
     * <p>A HIGH_RESOLUTION device is equivalent to a FULL device, except that:</p>
     * <ul>
     * <li>At least one output resolution of 8 megapixels or higher in uncompressed YUV is
     *   supported at <code>&gt;=</code> 20 fps.</li>
     * <li>Maximum-size (sensor resolution) uncompressed YUV is supported  at <code>&gt;=</code> 10
     *   fps.</li>
     * <li>For devices that list the RAW capability and support either RAW10 or RAW12 output,
     *   maximum-resolution RAW10 or RAW12 capture will operate at least at the rate of
     *   maximum-resolution YUV capture, and at least one supported output resolution of
     *   8 megapixels or higher in RAW10 or RAW12 is supported <code>&gt;=</code> 20 fps.</li>
     * </ul>
     * <p><b>Possible values:</b>
     * <ul>
     *   <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED LIMITED}</li>
     *   <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_FULL FULL}</li>
     *   <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY LEGACY}</li>
     *   <li>{@link #INFO_SUPPORTED_HARDWARE_LEVEL_HIGH_RESOLUTION HIGH_RESOLUTION}</li>
     * </ul></p>
     * <p>This key is available on all devices.</p>
     *
@@ -2743,7 +2729,6 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED
     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_FULL
     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY
     * @see #INFO_SUPPORTED_HARDWARE_LEVEL_HIGH_RESOLUTION
     */
    @PublicKey
    public static final Key<Integer> INFO_SUPPORTED_HARDWARE_LEVEL =
+22 −34
Original line number Diff line number Diff line
@@ -531,37 +531,32 @@ public abstract class CameraMetadata<TKey> {
    public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5;

    /**
     * <p>The camera device supports capturing maximum-resolution
     * images at &gt;= 20 frames per second, in at least the
     * uncompressed YUV format, when post-processing settings
     * are set to FAST.</p>
     * <p>More specifically, this means that a size matching the
     * camera device's active array size is listed as a
     * supported size for the YUV_420_888 format in
     * {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP android.scaler.streamConfigurationMap}, the minimum frame
     * duration for that format and size is &lt;= 1/20 s, and
     * the {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} entry
     * lists at least one FPS range where the minimum FPS is</p>
     * <blockquote>
     * <p>= 1 / minimumFrameDuration for the maximum-size
     * YUV_420_888 format.</p>
     * </blockquote>
     * <p>In addition, the {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} field is
     * guaranted to have a value between 0 and 4, inclusive.
     * {@link CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE android.control.aeLockAvailable} and
     * {@link CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE android.control.awbLockAvailable} are also guaranteed
     * to be <code>true</code> so burst capture with these two locks ON
     * yields consistent image output.</p>
     * <p>On a camera device that reports the HIGH_RESOLUTION hardware
     * level, meaning the device supports very large capture sizes,
     * BURST_CAPTURE means that at least 8-megapixel images can be
     * captured at <code>&gt;=</code> 20 fps, and maximum-resolution images can be
     * captured at <code>&gt;=</code> 10 fps.</p>
     * <p>The camera device supports capturing high-resolution images at &gt;= 20 frames per
     * second, in at least the uncompressed YUV format, when post-processing settings are set
     * to FAST. Additionally, maximum-resolution images can be captured at &gt;= 10 frames
     * per second.  Here, 'high resolution' means at least 8 megapixels, or the maximum
     * resolution of the device, whichever is smaller.</p>
     * <p>More specifically, this means that a size matching the camera device's active array
     * size is listed as a supported size for the {@link android.graphics.ImageFormat#YUV_420_888 } format in either {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } or {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes },
     * with a minimum frame duration for that format and size of either &lt;= 1/20 s, or
     * &lt;= 1/10 s, respectively; and the {@link CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES android.control.aeAvailableTargetFpsRanges} entry
     * lists at least one FPS range where the minimum FPS is &gt;= 1 / minimumFrameDuration
     * for the maximum-size YUV_420_888 format.  If that maximum size is listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes },
     * then the list of resolutions for YUV_420_888 from {@link android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes } contains at
     * least one resolution &gt;= 8 megapixels, with a minimum frame duration of &lt;= 1/20
     * s.</p>
     * <p>If the device supports the {@link android.graphics.ImageFormat#RAW10 }, {@link android.graphics.ImageFormat#RAW12 }, then those can also be captured at the same rate
     * as the maximum-size YUV_420_888 resolution is.</p>
     * <p>If the device supports the PRIVATE_REPROCESSING capability, then the same guarantees
     * as for the YUV_420_888 format also apply to the {@link android.graphics.ImageFormat#PRIVATE } format.</p>
     * <p>In addition, the {@link CameraCharacteristics#SYNC_MAX_LATENCY android.sync.maxLatency} field is guaranted to have a value between 0
     * and 4, inclusive. {@link CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE android.control.aeLockAvailable} and {@link CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE android.control.awbLockAvailable}
     * are also guaranteed to be <code>true</code> so burst capture with these two locks ON yields
     * consistent image output.</p>
     *
     * @see CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
     * @see CameraCharacteristics#CONTROL_AE_LOCK_AVAILABLE
     * @see CameraCharacteristics#CONTROL_AWB_LOCK_AVAILABLE
     * @see CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
     * @see CameraCharacteristics#SYNC_MAX_LATENCY
     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
     */
@@ -954,13 +949,6 @@ public abstract class CameraMetadata<TKey> {
     */
    public static final int INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY = 2;

    /**
     * <p>This camera device is capable of supporting advanced imaging applications at full rate,
     * and additional high-resolution outputs at lower rates.</p>
     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
     */
    public static final int INFO_SUPPORTED_HARDWARE_LEVEL_HIGH_RESOLUTION = 3;

    //
    // Enumeration values for CameraCharacteristics#SYNC_MAX_LATENCY
    //
+1 −1
Original line number Diff line number Diff line
@@ -398,7 +398,7 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>

    @Override
    public int hashCode() {
        return HashCodeHelpers.hashCode(mSettings, mSurfaceSet, mUserTag);
        return HashCodeHelpers.hashCodeGeneric(mSettings, mSurfaceSet, mUserTag);
    }

    public static final Parcelable.Creator<CaptureRequest> CREATOR =
Loading