summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author TreeHugger Robot <treehugger-gerrit@google.com> 2022-06-14 03:54:12 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2022-06-14 03:54:12 +0000
commit857d672870e0821c348e88dfcad1223739d7a7c3 (patch)
tree4b658feac4f21f3905b3e87a735c9c3880a96a5b
parenta41398efa760d3b525977c09a2ef653ce2052ac1 (diff)
parent36b94109da011aca2811215dd1d0e8c740c07f39 (diff)
Merge "Camera: Update streamConfigurationMap doc for JPEG sizes" into tm-dev am: 0558b51322 am: 36b94109da
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18870021 Change-Id: I362d34435ab91710166e1097bf3d16d3c592bc6b Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--core/java/android/hardware/camera2/CameraCharacteristics.java75
1 files changed, 53 insertions, 22 deletions
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index 9a719ca9ab98..dac55ae08448 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -2356,10 +2356,11 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* <p>A subset of the available request keys that can be overridden for
* physical devices backing a logical multi-camera.</p>
* <p>This is a subset of android.request.availableRequestKeys which contains a list
- * of keys that can be overridden using {@link CaptureRequest.Builder#setPhysicalCameraKey }.
+ * of keys that can be overridden using
+ * {@link android.hardware.camera2.CaptureRequest.Builder#setPhysicalCameraKey }.
* The respective value of such request key can be obtained by calling
- * {@link CaptureRequest.Builder#getPhysicalCameraKey }. Capture requests that contain
- * individual physical device requests must be built via
+ * {@link android.hardware.camera2.CaptureRequest.Builder#getPhysicalCameraKey }.
+ * Capture requests that contain individual physical device requests must be built via
* {@link android.hardware.camera2.CameraDevice#createCaptureRequest(int, Set)}.</p>
* <p><b>Optional</b> - The value for this key may be {@code null} on some devices.</p>
* <p><b>Limited capability</b> -
@@ -2759,7 +2760,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* </table>
* <p>For applications targeting SDK version 31 or newer, if the mobile device declares to be
* media performance class 12 or higher by setting
- * {@link android.os.Build.VERSION_CODES.MEDIA_PERFORMANCE_CLASS } to be 31 or larger,
+ * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger,
* the primary camera devices (first rear/front camera in the camera ID list) will not
* support JPEG sizes smaller than 1080p. If the application configures a JPEG stream
* smaller than 1080p, the camera device will round up the JPEG image size to at least
@@ -2833,7 +2834,7 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* </table>
* <p>For applications targeting SDK version 31 or newer, if the mobile device doesn't declare
* to be media performance class 12 or better by setting
- * {@link android.os.Build.VERSION_CODES.MEDIA_PERFORMANCE_CLASS } to be 31 or larger,
+ * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger,
* or if the camera device isn't a primary rear/front camera, the minimum required output
* stream configurations are the same as for applications targeting SDK version older than
* 31.</p>
@@ -2958,9 +2959,27 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* can provide.</p>
* <p>Please reference the documentation for the image data destination to
* check if it limits the maximum size for image data.</p>
- * <p>The following table describes the minimum required output stream
- * configurations based on the hardware level
- * ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):</p>
+ * <p>For applications targeting SDK version older than 31, the following table
+ * describes the minimum required output stream configurations based on the
+ * hardware level ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel}):
+ * Format | Size | Hardware Level | Notes
+ * :-------------------------------------------------:|:--------------------------------------------:|:--------------:|:--------------:
+ * {@link android.graphics.ImageFormat#JPEG } | {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize} (*1) | Any |
+ * {@link android.graphics.ImageFormat#JPEG } | 1920x1080 (1080p) | Any | if 1080p &lt;= activeArraySize
+ * {@link android.graphics.ImageFormat#JPEG } | 1280x720 (720p) | Any | if 720p &lt;= activeArraySize
+ * {@link android.graphics.ImageFormat#JPEG } | 640x480 (480p) | Any | if 480p &lt;= activeArraySize
+ * {@link android.graphics.ImageFormat#JPEG } | 320x240 (240p) | Any | if 240p &lt;= activeArraySize
+ * {@link android.graphics.ImageFormat#YUV_420_888 } | all output sizes available for JPEG | FULL |
+ * {@link android.graphics.ImageFormat#YUV_420_888 } | all output sizes available for JPEG, up to the maximum video size | LIMITED |
+ * {@link android.graphics.ImageFormat#PRIVATE } | same as YUV_420_888 | Any |</p>
+ * <p>For applications targeting SDK version 31 or newer, if the mobile device declares to be
+ * media performance class 12 or higher by setting
+ * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger,
+ * the primary camera devices (first rear/front camera in the camera ID list) will not
+ * support JPEG sizes smaller than 1080p. If the application configures a JPEG stream
+ * smaller than 1080p, the camera device will round up the JPEG image size to at least
+ * 1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same.
+ * This new minimum required output stream configurations are illustrated by the table below:</p>
* <table>
* <thead>
* <tr>
@@ -2984,32 +3003,38 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* <td align="center">if 1080p &lt;= activeArraySize</td>
* </tr>
* <tr>
- * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
- * <td align="center">1280x720 (720p)</td>
- * <td align="center">Any</td>
+ * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
+ * <td align="center">{@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}</td>
+ * <td align="center">FULL</td>
+ * <td align="center"></td>
+ * </tr>
+ * <tr>
+ * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
+ * <td align="center">1920x1080 (1080p)</td>
+ * <td align="center">FULL</td>
+ * <td align="center">if 1080p &lt;= activeArraySize</td>
+ * </tr>
+ * <tr>
+ * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
+ * <td align="center">1280x720 (720)</td>
+ * <td align="center">FULL</td>
* <td align="center">if 720p &lt;= activeArraySize</td>
* </tr>
* <tr>
- * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
+ * <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
* <td align="center">640x480 (480p)</td>
- * <td align="center">Any</td>
+ * <td align="center">FULL</td>
* <td align="center">if 480p &lt;= activeArraySize</td>
* </tr>
* <tr>
- * <td align="center">{@link android.graphics.ImageFormat#JPEG }</td>
- * <td align="center">320x240 (240p)</td>
- * <td align="center">Any</td>
- * <td align="center">if 240p &lt;= activeArraySize</td>
- * </tr>
- * <tr>
* <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
- * <td align="center">all output sizes available for JPEG</td>
+ * <td align="center">320x240 (240p)</td>
* <td align="center">FULL</td>
- * <td align="center"></td>
+ * <td align="center">if 240p &lt;= activeArraySize</td>
* </tr>
* <tr>
* <td align="center">{@link android.graphics.ImageFormat#YUV_420_888 }</td>
- * <td align="center">all output sizes available for JPEG, up to the maximum video size</td>
+ * <td align="center">all output sizes available for FULL hardware level, up to the maximum video size</td>
* <td align="center">LIMITED</td>
* <td align="center"></td>
* </tr>
@@ -3021,6 +3046,12 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
* </tr>
* </tbody>
* </table>
+ * <p>For applications targeting SDK version 31 or newer, if the mobile device doesn't declare
+ * to be media performance class 12 or better by setting
+ * {@link android.os.Build.VERSION#MEDIA_PERFORMANCE_CLASS } to be 31 or larger,
+ * or if the camera device isn't a primary rear/front camera, the minimum required output
+ * stream configurations are the same as for applications targeting SDK version older than
+ * 31.</p>
* <p>Refer to {@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities} and {@link android.hardware.camera2.CameraDevice#createCaptureSession } for additional mandatory
* stream configurations on a per-capability basis.</p>
* <p>*1: For JPEG format, the sizes may be restricted by below conditions:</p>