OSDN Git Service

Merge "Camera: add QCIF resolution exception" into pi-dev
authorYin-Chia Yeh <yinchiayeh@google.com>
Thu, 4 Apr 2019 07:14:38 +0000 (00:14 -0700)
committerandroid-build-merger <android-build-merger@google.com>
Thu, 4 Apr 2019 07:14:38 +0000 (00:14 -0700)
am: 5b09928b22

Change-Id: I20e60ef6d84c969b1651e449f5a076183d38a7c9

1  2 
core/java/android/hardware/Camera.java
core/java/android/hardware/camera2/CameraCharacteristics.java
core/java/android/hardware/camera2/CameraDevice.java

@@@ -429,26 -429,18 +429,34 @@@ public abstract class CameraDevice impl
       * </table><br>
       * </p>
       *
 +     * <p>MONOCHROME-capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES}
 +     * includes {@link CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MONOCHROME MONOCHROME}) devices
 +     * supporting {@link android.graphics.ImageFormat#Y8 Y8} support substituting {@code YUV}
 +     * streams with {@code Y8} in all guaranteed stream combinations for the device's hardware level
 +     * and capabilities.</p>
 +     *
 +     * <p>Devices capable of outputting HEIC formats ({@link StreamConfigurationMap#getOutputFormats}
 +     * contains {@link android.graphics.ImageFormat#HEIC}) will support substituting {@code JPEG}
 +     * streams with {@code HEIC} in all guaranteed stream combinations for the device's hardware
 +     * level and capabilities. Calling createCaptureSession with both JPEG and HEIC outputs is not
 +     * supported.</p>
 +     *
 +     * <p>Clients can access the above mandatory stream combination tables via
 +     * {@link android.hardware.camera2.params.MandatoryStreamCombination}.</p>
 +     *
       * <p>Since the capabilities of camera devices vary greatly, a given camera device may support
       * target combinations with sizes outside of these guarantees, but this can only be tested for
 -     * by attempting to create a session with such targets.</p>
 +     * by calling {@link #isSessionConfigurationSupported} or attempting to create a session with
 +     * such targets.</p>
       *
+      * <p>Exception on 176x144 (QCIF) resolution:
+      * Camera devices usually have a fixed capability for downscaling from larger resolution to
+      * smaller, and the QCIF resolution sometimes is not fully supported due to this
+      * limitation on devices with high-resolution image sensors. Therefore, trying to configure a
+      * QCIF resolution stream together with any other stream larger than 1920x1080 resolution
+      * (either width or height) might not be supported, and capture session creation will fail if it
+      * is not.</p>
+      *
       * @param outputs The new set of Surfaces that should be made available as
       *                targets for captured image data.
       * @param callback The callback to notify about the status of the new capture session.