OSDN Git Service

Snap for 4826885 from 4db8bb86f2a27a15a22e14536e81bd35bd382bef to pi-release
[android-x86/system-media.git] / camera / docs / metadata_definitions.xml
index 230ef05..6059fa0 100644 (file)
@@ -39,6 +39,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
     <tag id="REPROC">
         Entry is required for the YUV or PRIVATE reprocessing capability.
     </tag>
+    <tag id="LOGICALCAMERA">
+        Entry is required for logical multi-camera capability.
+    </tag>
     <tag id="FUTURE">
         Entry is  under-specified and is not required for now. This is for book-keeping purpose,
         do not implement or use it, it may be revised for future.
@@ -124,6 +127,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
     <typedef name="reprocessFormatsMap">
       <language name="java">android.hardware.camera2.params.ReprocessFormatsMap</language>
     </typedef>
+    <typedef name="oisSample">
+      <language name="java">android.hardware.camera2.params.OisSample</language>
+    </typedef>
   </types>
 
   <namespace name="android">
@@ -627,6 +633,22 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
                 sequence.
               </notes>
             </value>
+            <value hal_version="3.3">ON_EXTERNAL_FLASH
+              <notes>
+                An external flash has been turned on.
+
+                It informs the camera device that an external flash has been turned on, and that
+                metering (and continuous focus if active) should be quickly recaculated to account
+                for the external flash. Otherwise, this mode acts like ON.
+
+                When the external flash is turned off, AE mode should be changed to one of the
+                other available AE modes.
+
+                If the camera device supports AE external flash mode, android.control.aeState must
+                be FLASH_REQUIRED after the camera device finishes AE scan and it's too dark without
+                flash.
+              </notes>
+            </value>
           </enum>
           <description>The desired mode for the camera device's
           auto-exposure routine.</description>
@@ -974,7 +996,8 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
               ignored.
 
               If all regions have 0 weight, then no specific metering area needs to be used by the
-              camera device.
+              camera device. The capture result will either be a zero weight region as well, or
+              the region selected by the camera device as the focus area of interest.
 
               If the metering region is outside the used android.scaler.cropRegion returned in
               capture result metadata, the camera device will ignore the sections outside the crop
@@ -2245,6 +2268,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
         <entry name="aePrecaptureId" type="int32" visibility="system" deprecated="true">
           <description>The ID sent with the latest
           CAMERA2_TRIGGER_PRECAPTURE_METERING call</description>
+          <deprecation_description>
+            Removed in camera HAL v3
+          </deprecation_description>
           <details>Must be 0 if no
           CAMERA2_TRIGGER_PRECAPTURE_METERING trigger received yet
           by HAL. Always updated even if AE algorithm ignores the
@@ -2323,7 +2349,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           :------------:|:----------------:|:---------:|:-----------------------:
           INACTIVE      |                  | INACTIVE  | Camera device auto exposure algorithm is disabled
 
-          When android.control.aeMode is AE_MODE_ON_*:
+          When android.control.aeMode is AE_MODE_ON*:
 
             State        | Transition Cause                             | New State      | Notes
           :-------------:|:--------------------------------------------:|:--------------:|:-----------------:
@@ -2346,11 +2372,15 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is START | PRECAPTURE     | Start AE precapture metering sequence
           Any state (excluding LOCKED) | android.control.aePrecaptureTrigger is CANCEL| INACTIVE       | Currently active precapture metering sequence is canceled
 
+          If the camera device supports AE external flash mode (ON_EXTERNAL_FLASH is included in
+          android.control.aeAvailableModes), android.control.aeState must be FLASH_REQUIRED after
+          the camera device finishes AE scan and it's too dark without flash.
+
           For the above table, the camera device may skip reporting any state changes that happen
           without application intervention (i.e. mode switch, trigger, locking). Any state that
           can be skipped in that manner is called a transient state.
 
-          For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions
+          For example, for above AE modes (AE_MODE_ON*), in addition to the state transitions
           listed in above table, it is also legal for the camera device to skip one or more
           transient states between two results. See below table for examples:
 
@@ -2543,6 +2573,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
         <entry name="afTriggerId" type="int32" visibility="system" deprecated="true">
           <description>The ID sent with the latest
           CAMERA2_TRIGGER_AUTOFOCUS call</description>
+          <deprecation_description>
+            Removed in camera HAL v3
+          </deprecation_description>
           <details>Must be 0 if no CAMERA2_TRIGGER_AUTOFOCUS trigger
           received yet by HAL. Always updated even if AF algorithm
           ignores the trigger</details>
@@ -2874,7 +2907,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
       <dynamic>
         <clone entry="android.control.enableZsl" kind="controls">
         </clone>
-        <entry name="afSceneChange" type="int32" visibility="public" enum="true" hal_version="3.3">
+        <entry name="afSceneChange" type="byte" visibility="public" enum="true" hal_version="3.3">
           <enum>
             <value>NOT_DETECTED
             <notes>Scene change is not detected within the AF region(s).</notes></value>
@@ -2889,9 +2922,6 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           result. Otherwise the value will be NOT_DETECTED. The threshold for detection is similar
           to what would trigger a new passive focus scan to begin in CONTINUOUS autofocus modes.
 
-          afSceneChange may be DETECTED only if afMode is AF_MODE_CONTINUOUS_VIDEO or
-          AF_MODE_CONTINUOUS_PICTURE. In other AF modes, afSceneChange must be NOT_DETECTED.
-
           This key will be available if the camera device advertises this key via {@link
           android.hardware.camera2.CameraCharacteristics#getAvailableCaptureResultKeys|ACAMERA_REQUEST_AVAILABLE_RESULT_KEYS}.
           </details>
@@ -3307,8 +3337,8 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           Note that this orientation is relative to the orientation of the camera sensor, given
           by android.sensor.orientation.
 
-          To translate from the device orientation given by the Android sensor APIs, the following
-          sample code may be used:
+          To translate from the device orientation given by the Android sensor APIs for camera
+          sensors which are not EXTERNAL, the following sample code may be used:
 
               private int getJpegOrientation(CameraCharacteristics c, int deviceOrientation) {
                   if (deviceOrientation == android.view.OrientationEventListener.ORIENTATION_UNKNOWN) return 0;
@@ -3327,6 +3357,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
 
                   return jpegOrientation;
               }
+
+          For EXTERNAL cameras the sensor orientation will always be set to 0 and the facing will
+          also be set to EXTERNAL. The above code is not relevant in such case.
           </details>
           <tag id="BC" />
         </entry>
@@ -3866,7 +3899,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
             report `(0.03, 0, 0)`.
 
             To transform a pixel coordinates between two cameras facing the same direction, first
-            the source camera android.lens.radialDistortion must be corrected for.  Then the source
+            the source camera android.lens.distortion must be corrected for.  Then the source
             camera android.lens.intrinsicCalibration needs to be applied, followed by the
             android.lens.poseRotation of the source camera, the translation of the source camera
             relative to the destination camera, the android.lens.poseRotation of the destination
@@ -4023,7 +4056,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
             where `(0,0)` is the top-left of the
             preCorrectionActiveArraySize rectangle. Once the pose and
             intrinsic calibration transforms have been applied to a
-            world point, then the android.lens.radialDistortion
+            world point, then the android.lens.distortion
             transform needs to be applied, and the result adjusted to
             be in the android.sensor.info.activeArraySize coordinate
             system (where `(0, 0)` is the top-left of the
@@ -4034,7 +4067,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <tag id="DEPTH" />
         </entry>
         <entry name="radialDistortion" type="float" visibility="public"
-               container="array">
+               deprecated="true" container="array">
           <array>
             <size>6</size>
           </array>
@@ -4042,6 +4075,10 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
             The correction coefficients to correct for this camera device's
             radial and tangential lens distortion.
           </description>
+          <deprecation_description>
+            This field was inconsistently defined in terms of its
+            normalization. Use android.lens.distortion instead.
+          </deprecation_description>
           <units>
             Unitless coefficients.
           </units>
@@ -4093,14 +4130,12 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
             <notes>The value of android.lens.poseTranslation is relative to the optical center of
             the largest camera device facing the same direction as this camera.
 
-            This default value for API levels before Android P.
+            This is the default value for API levels before Android P.
             </notes>
             </value>
             <value>GYROSCOPE
             <notes>The value of android.lens.poseTranslation is relative to the position of the
             primary gyroscope of this Android device.
-
-            This is the value reported by all devices that support the MOTION_TRACKING capability.
             </notes>
             </value>
           </enum>
@@ -4110,13 +4145,60 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <details>
             Different calibration methods and use cases can produce better or worse results
             depending on the selected coordinate origin.
+          </details>
+        </entry>
+        <entry name="distortion" type="float" visibility="public" container="array"
+               hal_version="3.3">
+          <array>
+            <size>5</size>
+          </array>
+          <description>
+            The correction coefficients to correct for this camera device's
+            radial and tangential lens distortion.
+
+            Replaces the deprecated android.lens.radialDistortion field, which was
+            inconsistently defined.
+          </description>
+          <units>
+            Unitless coefficients.
+          </units>
+          <details>
+            Three radial distortion coefficients `[kappa_1, kappa_2,
+            kappa_3]` and two tangential distortion coefficients
+            `[kappa_4, kappa_5]` that can be used to correct the
+            lens's geometric distortion with the mapping equations:
+
+                 x_c = x_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
+                       kappa_4 * (2 * x_i * y_i) + kappa_5 * ( r^2 + 2 * x_i^2 )
+                 y_c = y_i * ( 1 + kappa_1 * r^2 + kappa_2 * r^4 + kappa_3 * r^6 ) +
+                       kappa_5 * (2 * x_i * y_i) + kappa_4 * ( r^2 + 2 * y_i^2 )
+
+            Here, `[x_c, y_c]` are the coordinates to sample in the
+            input image that correspond to the pixel values in the
+            corrected image at the coordinate `[x_i, y_i]`:
+
+                 correctedImage(x_i, y_i) = sample_at(x_c, y_c, inputImage)
+
+            The pixel coordinates are defined in a coordinate system
+            related to the android.lens.intrinsicCalibration
+            calibration fields; see that entry for details of the mapping stages.
+            Both `[x_i, y_i]` and `[x_c, y_c]`
+            have `(0,0)` at the lens optical center `[c_x, c_y]`, and
+            the range of the coordinates depends on the focal length
+            terms of the intrinsic calibration.
+
+            Finally, `r` represents the radial distance from the
+            optical center, `r^2 = x_i^2 + y_i^2`.
 
-            For devices designed to support the MOTION_TRACKING capability, the GYROSCOPE origin
-            makes device calibration and later usage by applications combining camera and gyroscope
-            information together simpler.
+            The distortion model used is the Brown-Conrady model.
           </details>
+          <tag id="DEPTH" />
         </entry>
       </static>
+      <dynamic>
+        <clone entry="android.lens.distortion" kind="static">
+        </clone>
+      </dynamic>
     </section>
     <section name="noiseReduction">
       <controls>
@@ -4252,6 +4334,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           scale 'normalized' coordinates with respect to the crop
           region. This applies to metering input (a{e,f,wb}Region
           and output (face rectangles).</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <details>Normalized coordinates refer to those in the
           (-1000,1000) range mentioned in the
           android.hardware.Camera API.
@@ -4265,6 +4350,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <description>If set to 1, then the camera service always
           switches to FOCUS_MODE_AUTO before issuing a AF
           trigger.</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <details>HAL implementations should implement AF trigger
           modes for AUTO, MACRO, CONTINUOUS_FOCUS, and
           CONTINUOUS_PICTURE modes instead of using this flag. Does
@@ -4276,6 +4364,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           CAMERA2_PIXEL_FORMAT_ZSL instead of
           HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED for the zero
           shutter lag stream</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <details>HAL implementations should use gralloc usage flags
           to determine that a stream will be used for
           zero-shutter-lag, instead of relying on an explicit
@@ -4289,6 +4380,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           metadata for a single capture into multiple buffers,
           returned using multiple process_capture_result calls.
           </description>
+          <deprecation_description>
+          Not used in HALv3 or newer; replaced by better partials mechanism
+          </deprecation_description>
           <details>
           Does not need to be listed in static
           metadata. Support for partial results will be reworked in
@@ -4321,6 +4415,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           final one for the capture, or only a partial that contains a
           subset of the full set of dynamic metadata
           values.</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <range>Optional. Default value is FINAL.</range>
           <details>
           The entries in the result metadata buffers for a
@@ -4348,6 +4445,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           increases with every new result (that is, each new result has a unique
           frameCount value).
           </description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <units>incrementing integer</units>
           <range>Any int.</range>
         </entry>
@@ -4366,6 +4466,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           </array>
           <description>List which camera reprocess stream is used
           for the source of reprocessing data.</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <units>List of camera reprocess stream IDs</units>
           <range>
           Typically, only one entry allowed, must be a valid reprocess stream ID.
@@ -4402,6 +4505,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           </array>
           <description>Lists which camera output streams image data
           from this capture must be sent to</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <units>List of camera stream IDs</units>
           <range>List must only include streams that have been
           created</range>
@@ -4426,6 +4532,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <description>The type of the request; either CAPTURE or
           REPROCESS. For legacy HAL3, this tag is redundant.
           </description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <tag id="HAL2" />
         </entry>
       </controls>
@@ -4573,6 +4682,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           </array>
           <description>How many reprocessing streams of any type
           can be allocated at the same time.</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <range>&amp;gt;= 0</range>
           <details>
           Only used by HAL2.x.
@@ -4616,6 +4728,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <description>A frame counter set by the framework. This value monotonically
           increases with every new result (that is, each new result has a unique
           frameCount value).</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <units>count of frames</units>
           <range>&amp;gt; 0</range>
           <details>Reset on release()</details>
@@ -4982,7 +5097,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
                   - android.lens.poseTranslation
                   - android.lens.poseRotation
                   - android.lens.intrinsicCalibration
-                  - android.lens.radialDistortion
+                  - android.lens.distortion
               * The android.depth.depthIsExclusive entry is listed by this device.
               * As of Android P, the android.lens.poseReference entry is listed by this device.
               * A LIMITED camera with only the DEPTH_OUTPUT capability does not have to support
@@ -5083,40 +5198,68 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
             </value>
             <value optional="true" hal_version="3.3" >MOTION_TRACKING
               <notes>
-              The device supports controls and metadata required for accurate motion tracking for
-              use cases such as augmented reality, electronic image stabilization, and so on.
+              The camera device supports the MOTION_TRACKING value for
+              android.control.captureIntent, which limits maximum exposure time to 20 ms.
+
+              This limits the motion blur of capture images, resulting in better image tracking
+              results for use cases such as image stabilization or augmented reality.
+              </notes>
+            </value>
+            <value optional="true" hal_version="3.3">LOGICAL_MULTI_CAMERA
+              <notes>
+              The camera device is a logical camera backed by two or more physical cameras that are
+              also exposed to the application.
 
-              This means this camera device has accurate optical calibration and timestamps relative
-              to the inertial sensors.
+              Camera application shouldn't assume that there are at most 1 rear camera and 1 front
+              camera in the system. For an application that switches between front and back cameras,
+              the recommendation is to switch between the first rear camera and the first front
+              camera in the list of supported camera devices.
 
               This capability requires the camera device to support the following:
 
-              * Capture request templates {@link
-                android.hardware.camera2.CameraDevice#TEMPLATE_MOTION_TRACKING_PREVIEW} and {@link
-                android.hardware.camera2.CameraDevice#TEMPLATE_MOTION_TRACKING_BEST} are defined.
-              * The stream configurations listed in {@link
-                android.hardware.camera2.CameraDevice#createCaptureSession} for MOTION_TRACKING are
-                supported, either at 30 or 60fps maximum frame rate.
-              * The following camera characteristics and capture result metadata are provided:
-                  - android.lens.intrinsicCalibration
-                  - android.lens.radialDistortion
+              * This camera device must list the following static metadata entries in {@link
+                android.hardware.camera2.CameraCharacteristics}:
+                  - android.logicalMultiCamera.physicalIds
+                  - android.logicalMultiCamera.sensorSyncType
+              * The underlying physical cameras' static metadata must list the following entries,
+                so that the application can correlate pixels from the physical streams:
+                  - android.lens.poseReference
                   - android.lens.poseRotation
                   - android.lens.poseTranslation
-                  - android.lens.poseReference with value GYROSCOPE
-              * The android.sensor.info.timestampSource field has value `REALTIME`. When compared to
-                timestamps from the device's gyroscopes, the clock difference for events occuring at
-                the same actual time instant will be less than 1 ms.
-              * The value of the android.sensor.rollingShutterSkew field is accurate to within 1 ms.
-              * The value of android.sensor.exposureTime is guaranteed to be available in the
-                capture result.
-              * The android.control.captureIntent control supports MOTION_TRACKING to limit maximum
-                exposure to 20 milliseconds.
-              * The stream configurations required for MOTION_TRACKING (listed at {@link
-                android.hardware.camera2.CameraDevice#createCaptureSession}) can operate at least at
-                30fps; optionally, they can operate at 60fps, and '[60, 60]' is listed in
-                android.control.aeAvailableTargetFpsRanges.
+                  - android.lens.intrinsicCalibration
+                  - android.lens.distortion
+              * The SENSOR_INFO_TIMESTAMP_SOURCE of the logical device and physical devices must be
+                the same.
+              * The logical camera device must be LIMITED or higher device.
+
+              Both the logical camera device and its underlying physical devices support the
+              mandatory stream combinations required for their device levels.
+
+              Additionally, for each guaranteed stream combination, the logical camera supports:
+
+              * For each guaranteed stream combination, the logical camera supports replacing one
+                logical {@link android.graphics.ImageFormat#YUV_420_888|AIMAGE_FORMAT_YUV_420_888 YUV_420_888}
+                or raw stream with two physical streams of the same size and format, each from a
+                separate physical camera, given that the size and format are supported by both
+                physical cameras.
+              * If the logical camera doesn't advertise RAW capability, but the underlying physical
+                cameras do, the logical camera will support guaranteed stream combinations for RAW
+                capability, except that the RAW streams will be physical streams, each from a separate
+                physical camera. This is usually the case when the physical cameras have different
+                sensor sizes.
+
+              Using physical streams in place of a logical stream of the same size and format will
+              not slow down the frame rate of the capture, as long as the minimum frame duration
+              of the physical and logical streams are the same.
               </notes>
             </value>
+            <value optional="true" hal_version="3.3" >MONOCHROME
+              <notes>
+              The camera device is a monochrome camera that doesn't contain a color filter array,
+              and the pixel values on U and V planes are all 128.
+              </notes>
+            </value>
+
           </enum>
           <description>List of capabilities that this camera device
           advertises as fully supporting.</description>
@@ -5182,6 +5325,35 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           enum notes. The entry android.depth.maxDepthSamples must be available
           if the DEPTH_POINT_CLOUD format is supported (HAL pixel format BLOB, dataspace
           DEPTH).
+
+          For a camera device with LOGICAL_MULTI_CAMERA capability, it should operate in the
+          same way as a physical camera device based on its hardware level and capabilities.
+          It's recommended that its feature set is superset of that of individual physical cameras.
+
+          * In camera1 API, to maintain application compatibility, for each {logical_camera_id,
+          physical_camera_1_id, physical_camera_2_id, ...} combination, where logical_camera_id
+          is composed of physical_camera_N_id, camera framework will only advertise one camera id
+          (within the combination) that is frontmost in the HAL published camera id list.
+
+          * Camera HAL is strongly recommended to advertise camera devices with best feature,
+          power, performance, and latency tradeoffs at the front of the camera id list.
+
+          For MONOCHROME, the camera device must also advertise BACKWARD_COMPATIBLE capability, and
+          it is exclusive of both RAW and MANUAL_POST_PROCESSING capabilities:
+
+          * To maintain backward compatibility, the camera device must support all
+          BACKWARD_COMPATIBLE required keys. The android.control.awbAvailableModes key only contains
+          AUTO, and android.control.awbState are either CONVERGED or LOCKED depending on
+          android.control.awbLock.
+
+          * A monochrome device doesn't need to advertise DNG related optional metadata tags.
+
+          * android.colorCorrection.mode, android.colorCorrection.transform, and
+          android.colorCorrection.gains are not applicable. So the camera device cannot
+          be a FULL device. However, the HAL can still advertise other individual capabilites.
+
+          * If the device supports tonemap control, only android.tonemap.curveRed is used.
+          CurveGreen and curveBlue are no-ops.
           </hal_details>
         </entry>
         <entry name="availableRequestKeys" type="int32" visibility="ndk_public"
@@ -5292,7 +5464,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           </hal_details>
         </entry>
         <entry name="availableSessionKeys" type="int32" visibility="ndk_public"
-               container="array" hwlevel="legacy" hal_version="3.4">
+               container="array" hwlevel="legacy" hal_version="3.3">
           <array>
             <size>n</size>
           </array>
@@ -5305,7 +5477,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           lifetime. Typical examples include parameters that require a
           time-consuming hardware re-configuration or internal camera pipeline
           change. For performance reasons we advise clients to pass their initial
-          values as part of 
+          values as part of
           {@link SessionConfiguration#setSessionParameters|ACameraDevice_createCaptureSessionWithSessionParameters}.
           Once the camera capture session is enabled it is also recommended to avoid
           changing them from their initial values set in
@@ -5338,6 +5510,11 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
 
           </details>
           <hal_details>
+          If android.control.aeTargetFpsRange is part of the session parameters and constrained high
+          speed mode is enabled, then only modifications of the maximum framerate value will be
+          monitored by the framework and can trigger camera re-configuration. For more information
+          about framerate ranges during constrained high speed sessions see
+          {@link android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}.
           Vendor tags can be listed here. Vendor tag metadata should also
           use the extensions C api (refer to
           android.hardware.camera.device.V3_4.StreamConfiguration.sessionParams for more details).
@@ -5353,6 +5530,42 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys}.
           </hal_details>
         </entry>
+        <entry name="availablePhysicalCameraRequestKeys" type="int32" visibility="hidden"
+               container="array" hwlevel="limited" hal_version="3.3">
+          <array>
+            <size>n</size>
+          </array>
+          <description>A subset of the available request keys that can be overriden for
+          physical devices backing a logical multi-camera.</description>
+          <details>
+          This is a subset of android.request.availableRequestKeys which contains a list
+          of keys that can be overriden using {@link 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.CameraDevice#createCaptureRequest(int, Set)}.
+          </details>
+          <hal_details>
+          Vendor tags can be listed here. Vendor tag metadata should also
+          use the extensions C api (refer to
+          android.hardware.camera.device.V3_4.CaptureRequest.physicalCameraSettings for more
+          details).
+
+          Setting/getting vendor tags will be checked against the metadata
+          vendor extensions API and not against this field.
+
+          The HAL must not consume any request tags in the session parameters that
+          are not listed either here or in the vendor tag list.
+
+          There should be no overlap between this set of keys and the available session keys
+          {@link android.hardware.camera2.CameraCharacteristics#getAvailableSessionKeys} along
+          with any other controls that can have impact on the dual-camera sync.
+
+          The public camera2 API will always make the vendor tags visible
+          via
+          {@link android.hardware.camera2.CameraCharacteristics#getAvailablePhysicalCameraRequestKeys}.
+          </hal_details>
+        </entry>
       </static>
     </section>
     <section name="scaler">
@@ -5426,7 +5639,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
             android.sensor.info.activeArraySize to the sensor cropped pixel area size in this way:
                 1. Translate the requested cropRegion w.r.t., the left top corner of the sensor
                 cropped pixel area by (tx, ty),
-                where `tx = sensorCrop.top * (sensorCrop.height / activeArraySize.height)`
+                where `ty = sensorCrop.top * (sensorCrop.height / activeArraySize.height)`
                 and `tx = sensorCrop.left * (sensorCrop.width / activeArraySize.width)`. The
                 (sensorCrop.top, sensorCrop.left) is the coordinate based off the
                 android.sensor.info.activeArraySize.
@@ -5532,6 +5745,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           </enum>
           <description>The list of image formats that are supported by this
           camera device for output streams.</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <details>
           All camera devices will support JPEG and YUV_420_888 formats.
 
@@ -5567,6 +5783,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <description>The minimum frame duration that is supported
           for each resolution in android.scaler.availableJpegSizes.
           </description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <units>Nanoseconds</units>
           <range>TODO: Remove property.</range>
           <details>
@@ -5586,6 +5805,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
             <size>2</size>
           </array>
           <description>The JPEG resolutions that are supported by this camera device.</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <range>TODO: Remove property.</range>
           <details>
           The resolutions are listed as `(width, height)` pairs. All camera devices will support
@@ -5626,6 +5848,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           android.scaler.availableProcessedSizes), this property lists the
           minimum supportable frame duration for that size.
           </description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <units>Nanoseconds</units>
           <details>
           This should correspond to the frame duration when only that processed
@@ -5647,6 +5872,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           processed output streams, such as YV12, NV12, and
           platform opaque YUV/RGB streams to the GPU or video
           encoders.</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <details>
           The resolutions are listed as `(width, height)` pairs.
 
@@ -5686,6 +5914,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           android.scaler.availableRawSizes), this property lists the minimum
           supportable frame duration for that size.
           </description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
           <units>Nanoseconds</units>
           <details>
           Should correspond to the frame duration when only the raw stream is
@@ -5705,6 +5936,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <description>The resolutions available for use with raw
           sensor output streams, listed as width,
           height</description>
+          <deprecation_description>
+          Not used in HALv3 or newer
+          </deprecation_description>
         </entry>
       </static>
       <dynamic>
@@ -6574,7 +6808,7 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
 
             The currently supported fields that correct for geometric distortion are:
 
-            1. android.lens.radialDistortion.
+            1. android.lens.distortion.
 
             If all of the geometric distortion fields are no-ops, this rectangle will be the same
             as the post-distortion-corrected rectangle given in
@@ -7785,6 +8019,21 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
             LEGACY mode devices will always only support OFF.
             </details>
           </entry>
+          <entry name="availableOisDataModes" type="byte" visibility="public"
+                 type_notes="list of enums" container="array" typedef="enumList" hal_version="3.3">
+            <array>
+              <size>n</size>
+            </array>
+            <description>
+            List of OIS data output modes for android.statistics.oisDataMode that
+            are supported by this camera device.
+            </description>
+            <range>Any value listed in android.statistics.oisDataMode</range>
+            <details>
+            If no OIS data output is available for this camera device, this key will
+            contain only OFF.
+            </details>
+          </entry>
         </namespace>
       </static>
       <dynamic>
@@ -8077,6 +8326,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <description>The best-fit color channel gains calculated
           by the camera device's statistics units for the current output frame.
           </description>
+          <deprecation_description>
+          Never fully implemented or specified; do not use
+          </deprecation_description>
           <details>
           This may be different than the gains used for this frame,
           since statistics processing on data from a new frame
@@ -8103,6 +8355,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           <description>The best-fit color transform matrix estimate
           calculated by the camera device's statistics units for the current
           output frame.</description>
+          <deprecation_description>
+          Never fully implemented or specified; do not use
+          </deprecation_description>
           <details>The camera device will provide the estimate from its
           statistics unit on the white balance transforms to use
           for the next frame. These are the values the camera device believes
@@ -8215,6 +8470,100 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
         <clone entry="android.statistics.lensShadingMapMode" kind="controls">
         </clone>
       </dynamic>
+      <controls>
+        <entry name="oisDataMode" type="byte" visibility="public" enum="true" hal_version="3.3">
+          <enum>
+            <value>OFF
+            <notes>Do not include OIS data in the capture result.</notes></value>
+            <value>ON
+            <notes>Include OIS data in the capture result.</notes>
+            <sdk_notes>android.statistics.oisSamples provides OIS sample data in the
+            output result metadata.
+            </sdk_notes>
+            <ndk_notes>android.statistics.oisTimestamps, android.statistics.oisXShifts,
+            and android.statistics.oisYShifts provide OIS data in the output result metadata.
+            </ndk_notes>
+            </value>
+          </enum>
+          <description>A control for selecting whether OIS position information is included in output
+          result metadata.</description>
+          <range>android.statistics.info.availableOisDataModes</range>
+        </entry>
+      </controls>
+      <dynamic>
+        <clone entry="android.statistics.oisDataMode" kind="controls">
+        </clone>
+        <entry name="oisTimestamps" type="int64" visibility="ndk_public" container="array" hal_version="3.3">
+          <array>
+            <size>n</size>
+          </array>
+          <description>
+          An array of timestamps of OIS samples, in nanoseconds.
+          </description>
+          <units>nanoseconds</units>
+          <details>
+          The array contains the timestamps of OIS samples. The timestamps are in the same
+          timebase as and comparable to android.sensor.timestamp.
+          </details>
+        </entry>
+        <entry name="oisXShifts" type="float" visibility="ndk_public" container="array" hal_version="3.3">
+          <array>
+            <size>n</size>
+          </array>
+          <description>
+          An array of shifts of OIS samples, in x direction.
+          </description>
+          <units>Pixels in active array.</units>
+          <details>
+          The array contains the amount of shifts in x direction, in pixels, based on OIS samples.
+          A positive value is a shift from left to right in active array coordinate system. For
+          example, if the optical center is (1000, 500) in active array coordinates, a shift of
+          (3, 0) puts the new optical center at (1003, 500).
+
+          The number of shifts must match the number of timestamps in
+          android.statistics.oisTimestamps.
+          </details>
+        </entry>
+        <entry name="oisYShifts" type="float" visibility="ndk_public" container="array" hal_version="3.3">
+          <array>
+            <size>n</size>
+          </array>
+          <description>
+          An array of shifts of OIS samples, in y direction.
+          </description>
+          <units>Pixels in active array.</units>
+          <details>
+          The array contains the amount of shifts in y direction, in pixels, based on OIS samples.
+          A positive value is a shift from top to bottom in active array coordinate system. For
+          example, if the optical center is (1000, 500) in active array coordinates, a shift of
+          (0, 5) puts the new optical center at (1000, 505).
+
+          The number of shifts must match the number of timestamps in
+          android.statistics.oisTimestamps.
+          </details>
+        </entry>
+        <entry name="oisSamples" type="float" visibility="java_public" synthetic="true"
+               container="array" typedef="oisSample" hal_version="3.3">
+          <array>
+            <size>n</size>
+          </array>
+          <description>
+          An array of OIS samples.
+          </description>
+          <details>
+          Each OIS sample contains the timestamp and the amount of shifts in x and y direction,
+          in pixels, of the OIS sample.
+
+          A positive value for a shift in x direction is a shift from left to right in active array
+          coordinate system. For example, if the optical center is (1000, 500) in active array
+          coordinates, a shift of (3, 0) puts the new optical center at (1003, 500).
+
+          A positive value for a shift in y direction is a shift from top to bottom in active array
+          coordinate system. For example, if the optical center is (1000, 500) in active array
+          coordinates, a shift of (0, 5) puts the new optical center at (1000, 505).
+          </details>
+        </entry>
+      </dynamic>
     </section>
     <section name="tonemap">
       <controls>
@@ -8273,6 +8622,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           always provide a curve with number of points equivalent to
           android.tonemap.maxCurvePoints).
 
+          For devices with MONOCHROME capability, only red channel is used. Green and blue channels
+          are ignored.
+
           A few examples, and their corresponding graphical mappings; these
           only specify the red channel and the precision is limited to 4
           digits, for conciseness.
@@ -8343,6 +8695,9 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           always provide a curve with number of points equivalent to
           android.tonemap.maxCurvePoints).
 
+          For devices with MONOCHROME capability, only red channel is used. Green and blue channels
+          are ignored.
+
           A few examples, and their corresponding graphical mappings; these
           only specify the red channel and the precision is limited to 4
           digits, for conciseness.
@@ -8718,6 +9073,27 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
                 `RAW`)
               </notes>
             </value>
+            <value hal_version="3.3">
+              EXTERNAL
+              <notes>
+              This camera device is backed by an external camera connected to this Android device.
+
+              The device has capability identical to a LIMITED level device, with the following
+              exceptions:
+
+              * The device may not report lens/sensor related information such as
+                  - android.lens.focalLength
+                  - android.lens.info.hyperfocalDistance
+                  - android.sensor.info.physicalSize
+                  - android.sensor.info.whiteLevel
+                  - android.sensor.blackLevelPattern
+                  - android.sensor.info.colorFilterArrangement
+                  - android.sensor.rollingShutterSkew
+              * The device will report 0 for android.sensor.orientation
+              * The device has less guarantee on stable framerate, as the framerate partly depends
+                on the external camera being used.
+              </notes>
+            </value>
           </enum>
           <description>
           Generally classifies the overall set of the camera device functionality.
@@ -8785,6 +9161,10 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
           Camera HAL3+ must not implement LEGACY mode. It is there for backwards compatibility in
           the `android.hardware.camera2` user-facing API only on legacy HALv1 devices, and is
           implemented by the camera framework code.
+
+          EXTERNAL level devices have lower peformance bar in CTS since the peformance might depend
+          on the external camera being used and is not fully controlled by the device manufacturer.
+          The ITS test suite is exempted for the same reason.
           </hal_details>
         </entry>
         <entry name="version" type="byte" visibility="public" typedef="string" hal_version="3.3">
@@ -9276,5 +9656,132 @@ xsi:schemaLocation="http://schemas.android.com/service/camera/metadata/ metadata
         </entry>
       </static>
     </section>
+    <section name="logicalMultiCamera">
+      <static>
+        <entry name="physicalIds" type="byte" visibility="hidden"
+               container="array" hwlevel="limited" hal_version="3.3">
+          <array>
+            <size>n</size>
+          </array>
+          <description>String containing the ids of the underlying physical cameras.
+          </description>
+          <units>UTF-8 null-terminated string</units>
+          <details>
+            For a logical camera, this is concatenation of all underlying physical camera ids.
+            The null terminator for physical camera id must be preserved so that the whole string
+            can be tokenized using '\0' to generate list of physical camera ids.
+
+            For example, if the physical camera ids of the logical camera are "2" and "3", the
+            value of this tag will be ['2', '\0', '3', '\0'].
+
+            The number of physical camera ids must be no less than 2.
+          </details>
+          <tag id="LOGICALCAMERA" />
+        </entry>
+        <entry name="sensorSyncType" type="byte" visibility="public"
+               enum="true" hwlevel="limited" hal_version="3.3">
+          <enum>
+            <value>APPROXIMATE
+              <notes>
+              A software mechanism is used to synchronize between the physical cameras. As a result,
+              the timestamp of an image from a physical stream is only an approximation of the
+              image sensor start-of-exposure time.
+              </notes>
+            </value>
+            <value>CALIBRATED
+              <notes>
+              The camera device supports frame timestamp synchronization at the hardware level,
+              and the timestamp of a physical stream image accurately reflects its
+              start-of-exposure time.
+              </notes>
+            </value>
+          </enum>
+          <description>The accuracy of frame timestamp synchronization between physical cameras</description>
+          <details>
+          The accuracy of the frame timestamp synchronization determines the physical cameras'
+          ability to start exposure at the same time. If the sensorSyncType is CALIBRATED,
+          the physical camera sensors usually run in master-slave mode so that their shutter
+          time is synchronized. For APPROXIMATE sensorSyncType, the camera sensors usually run in
+          master-master mode, and there could be offset between their start of exposure.
+
+          In both cases, all images generated for a particular capture request still carry the same
+          timestamps, so that they can be used to look up the matching frame number and
+          onCaptureStarted callback.
+          </details>
+          <tag id="LOGICALCAMERA" />
+        </entry>
+      </static>
+    </section>
+    <section name="distortionCorrection">
+      <controls>
+        <entry name="mode" type="byte" visibility="public" enum="true" hal_version="3.3">
+          <enum>
+            <value>OFF
+            <notes>No distortion correction is applied.</notes></value>
+            <value>FAST <notes>Lens distortion correction is applied without reducing frame rate
+            relative to sensor output. It may be the same as OFF if distortion correction would
+            reduce frame rate relative to sensor.</notes></value>
+            <value>HIGH_QUALITY <notes>High-quality distortion correction is applied, at the cost of
+            possibly reduced frame rate relative to sensor output.</notes></value>
+          </enum>
+          <description>Mode of operation for the lens distortion correction block.</description>
+          <range>android.distortionCorrection.availableModes</range>
+          <details>The lens distortion correction block attempts to improve image quality by fixing
+          radial, tangential, or other geometric aberrations in the camera device's optics.  If
+          available, the android.lens.distortion field documents the lens's distortion parameters.
+
+          OFF means no distortion correction is done.
+
+          FAST/HIGH_QUALITY both mean camera device determined distortion correction will be
+          applied. HIGH_QUALITY mode indicates that the camera device will use the highest-quality
+          correction algorithms, even if it slows down capture rate. FAST means the camera device
+          will not slow down capture rate when applying correction. FAST may be the same as OFF if
+          any correction at all would slow down capture rate.  Every output stream will have a
+          similar amount of enhancement applied.
+
+          The correction only applies to processed outputs such as YUV, JPEG, or DEPTH16; it is not
+          applied to any RAW output.  Metadata coordinates such as face rectangles or metering
+          regions are also not affected by correction.
+
+          Applications enabling distortion correction need to pay extra attention when converting
+          image coordinates between corrected output buffers and the sensor array. For example, if
+          the app supports tap-to-focus and enables correction, it then has to apply the distortion
+          model described in android.lens.distortion to the image buffer tap coordinates to properly
+          calculate the tap position on the sensor active array to be used with
+          android.control.afRegions. The same applies in reverse to detected face rectangles if
+          they need to be drawn on top of the corrected output buffers.
+          </details>
+        </entry>
+      </controls>
+      <static>
+        <entry name="availableModes" type="byte" visibility="public"
+        type_notes="list of enums" container="array" typedef="enumList" hal_version="3.3">
+          <array>
+            <size>n</size>
+          </array>
+          <description>
+          List of distortion correction modes for android.distortionCorrection.mode that are
+          supported by this camera device.
+          </description>
+          <range>Any value listed in android.distortionCorrection.mode</range>
+          <details>
+            No device is required to support this API; such devices will always list only 'OFF'.
+            All devices that support this API will list both FAST and HIGH_QUALITY.
+          </details>
+          <hal_details>
+          HAL must support both FAST and HIGH_QUALITY if distortion correction is available
+          on the camera device, but the underlying implementation can be the same for both modes.
+          That is, if the highest quality implementation on the camera device does not slow down
+          capture rate, then FAST and HIGH_QUALITY will generate the same output.
+          </hal_details>
+          <tag id="V1" />
+          <tag id="REPROC" />
+        </entry>
+      </static>
+      <dynamic>
+        <clone entry="android.distortionCorrection.mode" kind="controls" hal_version="3.3">
+        </clone>
+      </dynamic>
+    </section>
   </namespace>
 </metadata>