@@ -3264,14 +3270,28 @@ public final class CaptureRequest extends CameraMetadata<CaptureRequest.Key<?>>
* any correction at all would slow down capture rate. Every output stream will have a
* similar amount of enhancement applied.</p>
* <p>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.</p>
* applied to any RAW output.</p>
* <p>This control will be on by default on devices that support this control. Applications
* disabling distortion correction need to pay extra attention with the coordinate system of
* metering regions, crop region, and face rectangles. When distortion correction is OFF,
* metadata coordinates follow the coordinate system of
* {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}. When distortion is not OFF, metadata
* coordinates follow the coordinate system of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
* coordinates follow the coordinate system of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}. The
* camera device will map these metadata fields to match the corrected image produced by the
* camera device, for both capture requests and results. However, this mapping is not very
* precise, since rectangles do not generally map to rectangles when corrected. Only linear
* scaling between the active array and precorrection active array coordinates is
* performed. Applications that require precise correction of metadata need to undo that
* linear scaling, and apply a more complete correction that takes into the account the app's
* own requirements.</p>
* <p>The full list of metadata that is affected in this way by distortion correction is:</p>
* <p>An array of optical stabilization (OIS) position samples.</p>
* <p>Each OIS sample contains the timestamp and the amount of shifts in x and y direction,
* in pixels, of the OIS sample.</p>
* <p>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).</p>
* <p>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).</p>
* <p>A positive value for a shift in x direction is a shift from left to right in the
* pre-correction active array coordinate system. For example, if the optical center is
* (1000, 500) in pre-correction active array coordinates, a shift of (3, 0) puts the new
* optical center at (1003, 500).</p>
* <p>A positive value for a shift in y direction is a shift from top to bottom in
* pre-correction 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).</p>
* <p>The OIS samples are not affected by whether lens distortion correction is enabled (on
* supporting devices). They are always reported in pre-correction active array coordinates,
* since the scaling of OIS shifts would depend on the specific spot on the sensor the shift
* is needed.</p>
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
*/
@PublicKey
@@ -4578,14 +4610,28 @@ public class CaptureResult extends CameraMetadata<CaptureResult.Key<?>> {
* any correction at all would slow down capture rate. Every output stream will have a
* similar amount of enhancement applied.</p>
* <p>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.</p>
* applied to any RAW output.</p>
* <p>This control will be on by default on devices that support this control. Applications
* disabling distortion correction need to pay extra attention with the coordinate system of
* metering regions, crop region, and face rectangles. When distortion correction is OFF,
* metadata coordinates follow the coordinate system of
* {@link CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE android.sensor.info.preCorrectionActiveArraySize}. When distortion is not OFF, metadata
* coordinates follow the coordinate system of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}.</p>
* coordinates follow the coordinate system of {@link CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE android.sensor.info.activeArraySize}. The
* camera device will map these metadata fields to match the corrected image produced by the
* camera device, for both capture requests and results. However, this mapping is not very
* precise, since rectangles do not generally map to rectangles when corrected. Only linear
* scaling between the active array and precorrection active array coordinates is
* performed. Applications that require precise correction of metadata need to undo that
* linear scaling, and apply a more complete correction that takes into the account the app's
* own requirements.</p>
* <p>The full list of metadata that is affected in this way by distortion correction is:</p>