From 062c22ba6013c9c19c7de59c2c30a951c6a87979 Mon Sep 17 00:00:00 2001 From: Shuzhen Wang Date: Tue, 9 Apr 2019 23:05:23 -0700 Subject: [PATCH] Camera: Relax BURST_CAPTURE FPS requirements Allow resolutions larger than 24 megapixels to have fps lower than 10fps. Test: Build Bug: 129693371 Change-Id: Ie0403d80bf4c441e268d266eb30dacc2ea8184b9 --- .../android/hardware/camera2/CameraMetadata.java | 15 ++++++++------- .../camera2/params/StreamConfigurationMap.java | 6 ++++-- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index 3ffc21d2c6e36..04e8cf421baa6 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -609,16 +609,17 @@ public abstract class CameraMetadata { /** *

The camera device supports capturing high-resolution images at >= 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 >= 10 frames - * per second. Here, 'high resolution' means at least 8 megapixels, or the maximum - * resolution of the device, whichever is smaller.

+ * second, in at least the uncompressed YUV format, when post-processing settings are + * set to FAST. Additionally, all image resolutions less than 24 megapixels can be + * captured at >= 10 frames per second. Here, 'high resolution' means at least 8 + * megapixels, or the maximum resolution of the device, whichever is smaller.

*

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 <= 1/20 s, or - * <= 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 >= 1 / minimumFrameDuration - * for the maximum-size YUV_420_888 format. If that maximum size is listed in {@link android.hardware.camera2.params.StreamConfigurationMap#getHighResolutionOutputSizes }, + * <= 1/10 s if the image size is less than 24 megapixels, 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 >= 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 >= 8 megapixels, with a minimum frame duration of <= 1/20 * s.

diff --git a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java index 996f9978a6128..bdba77cc880e1 100644 --- a/core/java/android/hardware/camera2/params/StreamConfigurationMap.java +++ b/core/java/android/hardware/camera2/params/StreamConfigurationMap.java @@ -838,8 +838,10 @@ public final class StreamConfigurationMap { * {@link android.hardware.camera2.CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE} * capability. This does not include the stall duration, so for example, a JPEG or RAW16 output * resolution with a large stall duration but a minimum frame duration that's above 20 fps will - * still be listed in the regular {@link #getOutputSizes} list. All the sizes on this list are - * still guaranteed to operate at a rate of at least 10 fps, not including stall duration.

+ * still be listed in the regular {@link #getOutputSizes} list. All the sizes on this list that + * are less than 24 megapixels are still guaranteed to operate at a rate of at least 10 fps, + * not including stall duration. Sizes on this list that are at least 24 megapixels are allowed + * to operate at less than 10 fps.

* *

For a device that does not support the BURST_CAPTURE capability, this list will be * {@code null}, since resolutions in the {@link #getOutputSizes} list are already not