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

Commit de2e4d01 authored by Zhijun He's avatar Zhijun He
Browse files

Camera2: metadata spec update for reprocessing

Change-Id: I37eda90970eace23c42ba9106d4db1587df8d1b4
parent b8a93f3f
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -12625,6 +12625,7 @@ package android.hardware.camera2 {
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> REQUEST_AVAILABLE_CAPABILITIES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_INPUT_STREAMS;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_OUTPUT_PROC;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_OUTPUT_RAW;
@@ -12835,13 +12836,16 @@ package android.hardware.camera2 {
    field public static final int LENS_STATE_STATIONARY = 0; // 0x0
    field public static final int NOISE_REDUCTION_MODE_FAST = 1; // 0x1
    field public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2; // 0x2
    field public static final int NOISE_REDUCTION_MODE_MINIMAL = 3; // 0x3
    field public static final int NOISE_REDUCTION_MODE_OFF = 0; // 0x0
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0; // 0x0
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6; // 0x6
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2; // 0x2
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1; // 0x1
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING = 4; // 0x4
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3; // 0x3
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5; // 0x5
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7; // 0x7
    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
@@ -12951,6 +12955,7 @@ package android.hardware.camera2 {
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> LENS_FOCUS_DISTANCE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> LENS_OPTICAL_STABILIZATION_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> NOISE_REDUCTION_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.graphics.Rect> SCALER_CROP_REGION;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Long> SENSOR_EXPOSURE_TIME;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Long> SENSOR_FRAME_DURATION;
@@ -13030,6 +13035,7 @@ package android.hardware.camera2 {
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> LENS_OPTICAL_STABILIZATION_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> LENS_STATE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> NOISE_REDUCTION_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Byte> REQUEST_PIPELINE_DEPTH;
    field public static final android.hardware.camera2.CaptureResult.Key<android.graphics.Rect> SCALER_CROP_REGION;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Long> SENSOR_EXPOSURE_TIME;
+6 −0
Original line number Diff line number Diff line
@@ -12931,6 +12931,7 @@ package android.hardware.camera2 {
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Float> LENS_INFO_MINIMUM_FOCUS_DISTANCE;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<int[]> REQUEST_AVAILABLE_CAPABILITIES;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_INPUT_STREAMS;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_OUTPUT_PROC;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_OUTPUT_PROC_STALLING;
    field public static final android.hardware.camera2.CameraCharacteristics.Key<java.lang.Integer> REQUEST_MAX_NUM_OUTPUT_RAW;
@@ -13141,13 +13142,16 @@ package android.hardware.camera2 {
    field public static final int LENS_STATE_STATIONARY = 0; // 0x0
    field public static final int NOISE_REDUCTION_MODE_FAST = 1; // 0x1
    field public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2; // 0x2
    field public static final int NOISE_REDUCTION_MODE_MINIMAL = 3; // 0x3
    field public static final int NOISE_REDUCTION_MODE_OFF = 0; // 0x0
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE = 0; // 0x0
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6; // 0x6
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING = 2; // 0x2
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR = 1; // 0x1
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING = 4; // 0x4
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3; // 0x3
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS = 5; // 0x5
    field public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7; // 0x7
    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
@@ -13257,6 +13261,7 @@ package android.hardware.camera2 {
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> LENS_FOCUS_DISTANCE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> LENS_OPTICAL_STABILIZATION_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Integer> NOISE_REDUCTION_MODE;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR;
    field public static final android.hardware.camera2.CaptureRequest.Key<android.graphics.Rect> SCALER_CROP_REGION;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Long> SENSOR_EXPOSURE_TIME;
    field public static final android.hardware.camera2.CaptureRequest.Key<java.lang.Long> SENSOR_FRAME_DURATION;
@@ -13336,6 +13341,7 @@ package android.hardware.camera2 {
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> LENS_OPTICAL_STABILIZATION_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> LENS_STATE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Integer> NOISE_REDUCTION_MODE;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Float> REPROCESS_EFFECTIVE_EXPOSURE_FACTOR;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Byte> REQUEST_PIPELINE_DEPTH;
    field public static final android.hardware.camera2.CaptureResult.Key<android.graphics.Rect> SCALER_CROP_REGION;
    field public static final android.hardware.camera2.CaptureResult.Key<java.lang.Long> SENSOR_EXPOSURE_TIME;
+29 −25
Original line number Diff line number Diff line
@@ -1107,8 +1107,11 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * android.scaler.availableInputOutputFormatsMap. When using an
     * input stream, there must be at least one output stream
     * configured to to receive the reprocessed images.</p>
     * <p>When an input stream and some output streams are used in a reprocessing request,
     * only the input buffer will be used to produce these output stream buffers, and a
     * new sensor image will not be captured.</p>
     * <p>For example, for Zero Shutter Lag (ZSL) still capture use case, the input
     * stream image format will be RAW_OPAQUE, the associated output stream image format
     * stream image format will be OPAQUE, the associated output stream image format
     * should be JPEG.</p>
     * <p><b>Range of valid values:</b><br></p>
     * <p>0 or 1.</p>
@@ -1118,8 +1121,8 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
     *
     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
     * @hide
     */
    @PublicKey
    public static final Key<Integer> REQUEST_MAX_NUM_INPUT_STREAMS =
            new Key<Integer>("android.request.maxNumInputStreams", int.class);

@@ -1195,8 +1198,10 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR MANUAL_SENSOR}</li>
     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING MANUAL_POST_PROCESSING}</li>
     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_RAW RAW}</li>
     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING OPAQUE_REPROCESSING}</li>
     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS READ_SENSOR_SETTINGS}</li>
     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE BURST_CAPTURE}</li>
     *   <li>{@link #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING YUV_REPROCESSING}</li>
     * </ul></p>
     * <p>This key is available on all devices.</p>
     *
@@ -1205,8 +1210,10 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
     * @see #REQUEST_AVAILABLE_CAPABILITIES_MANUAL_POST_PROCESSING
     * @see #REQUEST_AVAILABLE_CAPABILITIES_RAW
     * @see #REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING
     * @see #REQUEST_AVAILABLE_CAPABILITIES_READ_SENSOR_SETTINGS
     * @see #REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE
     * @see #REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING
     */
    @PublicKey
    public static final Key<int[]> REQUEST_AVAILABLE_CAPABILITIES =
@@ -1383,10 +1390,10 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * <p>The mapping of image formats that are supported by this
     * camera device for input streams, to their corresponding output formats.</p>
     * <p>All camera devices with at least 1
     * android.request.maxNumInputStreams will have at least one
     * {@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} will have at least one
     * available input format.</p>
     * <p>The camera device will support the following map of formats,
     * if its dependent capability is supported:</p>
     * if its dependent capability ({@link CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES android.request.availableCapabilities}) is supported:</p>
     * <table>
     * <thead>
     * <tr>
@@ -1397,45 +1404,42 @@ public final class CameraCharacteristics extends CameraMetadata<CameraCharacteri
     * </thead>
     * <tbody>
     * <tr>
     * <td align="left">RAW_OPAQUE</td>
     * <td align="left">OPAQUE</td>
     * <td align="left">JPEG</td>
     * <td align="left">ZSL</td>
     * <td align="left">OPAQUE_REPROCESSING</td>
     * </tr>
     * <tr>
     * <td align="left">RAW_OPAQUE</td>
     * <td align="left">OPAQUE</td>
     * <td align="left">YUV_420_888</td>
     * <td align="left">ZSL</td>
     * </tr>
     * <tr>
     * <td align="left">RAW_OPAQUE</td>
     * <td align="left">RAW16</td>
     * <td align="left">RAW</td>
     * <td align="left">OPAQUE_REPROCESSING</td>
     * </tr>
     * <tr>
     * <td align="left">RAW16</td>
     * <td align="left">YUV_420_888</td>
     * <td align="left">RAW</td>
     * <td align="left">JPEG</td>
     * <td align="left">YUV_REPROCESSING</td>
     * </tr>
     * <tr>
     * <td align="left">RAW16</td>
     * <td align="left">JPEG</td>
     * <td align="left">RAW</td>
     * <td align="left">YUV_420_888</td>
     * <td align="left">YUV_420_888</td>
     * <td align="left">YUV_REPROCESSING</td>
     * </tr>
     * </tbody>
     * </table>
     * <p>For ZSL-capable camera devices, using the RAW_OPAQUE format
     * <p>OPAQUE refers to a device-internal format that is not directly application-visible.
     * An OPAQUE input or output surface can be acquired by
     * OpaqueImageRingBufferQueue#getInputSurface() or
     * OpaqueImageRingBufferQueue#getOutputSurface().
     * For a OPAQUE_REPROCESSING-capable camera device, using the OPAQUE format
     * as either input or output will never hurt maximum frame rate (i.e.
     * StreamConfigurationMap#getOutputStallDuration(int,Size)
     * for a <code>format =</code> RAW_OPAQUE is always 0).</p>
     * StreamConfigurationMap#getOutputStallDuration(klass,Size) is always 0),
     * where klass is android.media.OpaqueImageRingBufferQueue.class.</p>
     * <p>Attempting to configure an input stream with output streams not
     * listed as available in this map is not valid.</p>
     * <p>TODO: typedef to ReprocessFormatMap</p>
     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
     * <p><b>Full capability</b> -
     * Present on all camera devices that report being {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL_FULL HARDWARE_LEVEL_FULL} devices in the
     * {@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} key</p>
     *
     * @see CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
     * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
     * @hide
     */
    public static final Key<int[]> SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP =
+72 −9
Original line number Diff line number Diff line
@@ -438,23 +438,40 @@ public abstract class CameraMetadata<TKey> {
    public static final int REQUEST_AVAILABLE_CAPABILITIES_RAW = 3;

    /**
     * <p>The camera device supports the Zero Shutter Lag use case.</p>
     * <p>The camera device supports the Zero Shutter Lag reprocessing use case.</p>
     * <ul>
     * <li>At least one input stream can be used.</li>
     * <li>RAW_OPAQUE is supported as an output/input format</li>
     * <li>Using RAW_OPAQUE does not cause a frame rate drop
     * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li>
     * <li>OPAQUE is supported as an output/input format, that is,
     *   StreamConfigurationMap#getOutputSizes(klass) and
     *   StreamConfigurationMap#getInputSizes(klass) return non empty Size[] and have common
     *   sizes, where klass is android.media.OpaqueImageRingBufferQueue.class. See
     *   android.scaler.availableInputOutputFormatsMap for detailed information about
     *   OPAQUE format.</li>
     * <li>android.scaler.availableInputOutputFormatsMap has the required map entries.</li>
     * <li>Using OPAQUE does not cause a frame rate drop
     *   relative to the sensor's maximum capture rate (at that
     *   resolution).</li>
     * <li>RAW_OPAQUE will be reprocessable into both YUV_420_888
     *   resolution), see android.scaler.availableInputOutputFormatsMap for more details.</li>
     * <li>OPAQUE will be reprocessable into both YUV_420_888
     *   and JPEG formats.</li>
     * <li>The maximum available resolution for RAW_OPAQUE streams
     * <li>The maximum available resolution for OPAQUE streams
     *   (both input/output) will match the maximum available
     *   resolution of JPEG streams.</li>
     * <li>Only below controls are effective for reprocessing requests and
     *   will be present in capture results, other controls in reprocess
     *   requests will be ignored by the camera device.<ul>
     * <li>android.jpeg.*</li>
     * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
     * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
     * </ul>
     * </li>
     * </ul>
     *
     * @see CaptureRequest#EDGE_MODE
     * @see CaptureRequest#NOISE_REDUCTION_MODE
     * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
     * @hide
     */
    public static final int REQUEST_AVAILABLE_CAPABILITIES_ZSL = 4;
    public static final int REQUEST_AVAILABLE_CAPABILITIES_OPAQUE_REPROCESSING = 4;

    /**
     * <p>The camera device supports accurately reporting the sensor settings for many of
@@ -514,6 +531,45 @@ public abstract class CameraMetadata<TKey> {
     */
    public static final int REQUEST_AVAILABLE_CAPABILITIES_BURST_CAPTURE = 6;

    /**
     * <p>The camera device supports the YUV420_888 reprocessing use case, similar as
     * OPAQUE_REPROCESSING, This capability requires the camera device to support the
     * following:</p>
     * <ul>
     * <li>One input stream is supported, that is, <code>{@link CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS android.request.maxNumInputStreams} == 1</code>.</li>
     * <li>YUV420_888 is supported as a common format for both input and output, that is,
     *   StreamConfigurationMap#getOutputSizes(YUV420_888) and
     *   StreamConfigurationMap#getInputSizes(YUV420_888) return non empty Size[] and have
     *   common sizes.</li>
     * <li>android.scaler.availableInputOutputFormatsMap has the required map entries.</li>
     * <li>Using YUV420_888 does not cause a frame rate drop
     *   relative to the sensor's maximum capture rate (at that
     *   resolution), see android.scaler.availableInputOutputFormatsMap for more details.</li>
     * <li>YUV420_888 will be reprocessable into both YUV_420_888
     *   and JPEG formats.</li>
     * <li>The maximum available resolution for YUV420_888 streams
     *   (both input/output) will match the maximum available
     *   resolution of JPEG streams.</li>
     * <li>Only the below controls are effective for reprocessing requests and will be
     *   present in capture results. The reprocess requests are from the original capture
     *   results that are assocaited with the intermidate YUV420_888 output buffers.
     *   All other controls in the reprocess requests will be ignored by the camera device.<ul>
     * <li>android.jpeg.*</li>
     * <li>{@link CaptureRequest#NOISE_REDUCTION_MODE android.noiseReduction.mode}</li>
     * <li>{@link CaptureRequest#EDGE_MODE android.edge.mode}</li>
     * <li>{@link CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR android.reprocess.effectiveExposureFactor}</li>
     * </ul>
     * </li>
     * </ul>
     *
     * @see CaptureRequest#EDGE_MODE
     * @see CaptureRequest#NOISE_REDUCTION_MODE
     * @see CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
     * @see CameraCharacteristics#REQUEST_MAX_NUM_INPUT_STREAMS
     * @see CameraCharacteristics#REQUEST_AVAILABLE_CAPABILITIES
     */
    public static final int REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING = 7;

    //
    // Enumeration values for CameraCharacteristics#SCALER_CROPPING_TYPE
    //
@@ -1837,6 +1893,13 @@ public abstract class CameraMetadata<TKey> {
     */
    public static final int NOISE_REDUCTION_MODE_HIGH_QUALITY = 2;

    /**
     * <p>MINIMAL noise reduction is applied without reducing frame rate relative to
     * sensor output. </p>
     * @see CaptureRequest#NOISE_REDUCTION_MODE
     */
    public static final int NOISE_REDUCTION_MODE_MINIMAL = 3;

    //
    // Enumeration values for CaptureRequest#SENSOR_TEST_PATTERN_MODE
    //
+66 −3

File changed.

Preview size limit exceeded, changes collapsed.

Loading