diff --git a/api/current.txt b/api/current.txt
index b3451d0fadd1a..1173035a4b180 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -12354,6 +12354,7 @@ package android.hardware.camera2 {
method public T get(android.hardware.camera2.CameraCharacteristics.Key
This metadata lists the valid modes for {@link CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE android.colorCorrection.aberrationCorrectionMode}. + * If no aberration correction modes are available for a device, this list will solely include + * OFF mode.
+ *For FULL capability device ({@link CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL android.info.supportedHardwareLevel} == FULL), OFF must be
+ * included.
The set of auto-exposure antibanding modes that are * supported by this camera device.
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index 53c8a52e2062a..6c3f7ddaf1b04 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -317,12 +317,19 @@ public abstract class CameraMetadataIf auto white balance is enabled, then the camera device * will accurately report the values applied by AWB in the result.
*A given camera device may also support additional post-processing * controls, but this capability only covers the above list of controls.
* + * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE + * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES * @see CaptureRequest#COLOR_CORRECTION_GAINS * @see CaptureRequest#COLOR_CORRECTION_TRANSFORM * @see CaptureRequest#SHADING_MODE @@ -663,6 +670,30 @@ public abstract class CameraMetadataNo aberration correction is applied.
+ * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE + */ + public static final int COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_OFF = 0; + + /** + *Aberration correction will not slow down capture rate + * relative to sensor raw output.
+ * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE + */ + public static final int COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_FAST = 1; + + /** + *Aberration correction operates at improved quality but reduced + * capture rate (relative to sensor raw output).
+ * @see CaptureRequest#COLOR_CORRECTION_ABERRATION_CORRECTION_MODE + */ + public static final int COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_HIGH_QUALITY = 2; + // // Enumeration values for CaptureRequest#CONTROL_AE_ANTIBANDING_MODE // diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index 27f7e3ada1e9f..e8014b0123649 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -557,6 +557,29 @@ public final class CaptureRequest extends CameraMetadataMode of operation for the chromatic aberration correction algorithm.
+ *This must be set to a valid mode from + * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES android.colorCorrection.availableAberrationCorrectionModes}.
+ *Chromatic (color) aberration is caused by the fact that different wavelengths of light + * can not focus on the same point after exiting from the lens. This metadata defines + * the high level control of chromatic aberration correction algorithm, which aims to + * minimize the chromatic artifacts that may occur along the object boundaries in an + * image.
+ *FAST/HIGH_QUALITY both mean that camera device determined aberration + * correction will be applied. HIGH_QUALITY mode indicates that the camera device will + * use the highest-quality aberration correction algorithms, even if it slows down + * capture rate. FAST means the camera device will not slow down capture rate when + * applying aberration correction.
+ * + * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES + * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_OFF + * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_FAST + * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_HIGH_QUALITY + */ + public static final KeyThe desired setting for the camera device's auto-exposure * algorithm's antibanding compensation.
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java index 533ef5d9212a5..956e64f0ed3aa 100644 --- a/core/java/android/hardware/camera2/CaptureResult.java +++ b/core/java/android/hardware/camera2/CaptureResult.java @@ -402,6 +402,29 @@ public class CaptureResult extends CameraMetadataMode of operation for the chromatic aberration correction algorithm.
+ *This must be set to a valid mode from + * {@link CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES android.colorCorrection.availableAberrationCorrectionModes}.
+ *Chromatic (color) aberration is caused by the fact that different wavelengths of light + * can not focus on the same point after exiting from the lens. This metadata defines + * the high level control of chromatic aberration correction algorithm, which aims to + * minimize the chromatic artifacts that may occur along the object boundaries in an + * image.
+ *FAST/HIGH_QUALITY both mean that camera device determined aberration + * correction will be applied. HIGH_QUALITY mode indicates that the camera device will + * use the highest-quality aberration correction algorithms, even if it slows down + * capture rate. FAST means the camera device will not slow down capture rate when + * applying aberration correction.
+ * + * @see CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_CORRECTION_MODES + * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_OFF + * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_FAST + * @see #COLOR_CORRECTION_ABERRATION_CORRECTION_MODE_HIGH_QUALITY + */ + public static final KeyThe desired setting for the camera device's auto-exposure * algorithm's antibanding compensation.