From 956c52b5a09fa6b193b162bdb3aee629323cde2b Mon Sep 17 00:00:00 2001
From: Yin-Chia Yeh
Camera devices that support the MANUAL_POST_PROCESSING capability will always list - * CONTRAST_CURVE and FAST. This includes all FULL level devices.
+ *Camera devices that support the MANUAL_POST_PROCESSING capability will always contain + * at least one of below mode combinations:
+ *This includes all FULL level devices.
*Range of valid values:
* Any value listed in {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode}
Optional - This value may be {@code null} on some devices.
diff --git a/core/java/android/hardware/camera2/CameraMetadata.java b/core/java/android/hardware/camera2/CameraMetadata.java index af7d365..7d7f9b0 100644 --- a/core/java/android/hardware/camera2/CameraMetadata.java +++ b/core/java/android/hardware/camera2/CameraMetadata.java @@ -374,13 +374,19 @@ public abstract class CameraMetadataManual tonemap control
+ *Manual white balance control
+ *Use the gamma value specified in {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma} to peform + * tonemapping.
+ *All color enhancement and tonemapping must be disabled, except + * for applying the tonemapping curve specified by {@link CaptureRequest#TONEMAP_GAMMA android.tonemap.gamma}.
+ *Must not slow down frame rate relative to raw sensor output.
+ * + * @see CaptureRequest#TONEMAP_GAMMA + * @see CaptureRequest#TONEMAP_MODE + */ + public static final int TONEMAP_MODE_GAMMA_VALUE = 3; + + /** + *Use the preset tonemapping curve specified in + * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve} to peform tonemapping.
+ *All color enhancement and tonemapping must be disabled, except + * for applying the tonemapping curve specified by + * {@link CaptureRequest#TONEMAP_PRESET_CURVE android.tonemap.presetCurve}.
+ *Must not slow down frame rate relative to raw sensor output.
+ * + * @see CaptureRequest#TONEMAP_PRESET_CURVE + * @see CaptureRequest#TONEMAP_MODE + */ + public static final int TONEMAP_MODE_PRESET_CURVE = 4; + + // + // Enumeration values for CaptureRequest#TONEMAP_PRESET_CURVE + // + + /** + *Tonemapping curve is defined by sRGB
+ * @see CaptureRequest#TONEMAP_PRESET_CURVE + */ + public static final int TONEMAP_PRESET_CURVE_SRGB = 0; + + /** + *Tonemapping curve is defined by ITU-R BT.709
+ * @see CaptureRequest#TONEMAP_PRESET_CURVE + */ + public static final int TONEMAP_PRESET_CURVE_REC709 = 1; + // // Enumeration values for CaptureResult#CONTROL_AE_STATE // diff --git a/core/java/android/hardware/camera2/CaptureRequest.java b/core/java/android/hardware/camera2/CaptureRequest.java index e1b14cc..f157605 100644 --- a/core/java/android/hardware/camera2/CaptureRequest.java +++ b/core/java/android/hardware/camera2/CaptureRequest.java @@ -2352,6 +2352,8 @@ public final class CaptureRequest extends CameraMetadataAvailable values for this device:
* {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}
Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is + * GAMMA_VALUE
+ *The tonemap curve will be defined the following formula: + * * OUT = pow(IN, 1.0 / gamma) + * where IN and OUT is the input pixel value scaled to range [0.0, 1.0], + * pow is the power function and gamma is the gamma value specified by this + * key.
+ *The same curve will be applied to all color channels. The camera device + * may clip the input gamma value to its supported range. The actual applied + * value will be returned in capture result.
+ *The valid range of gamma value varies on different devices, but values + * within [1.0, 5.0] are guaranteed not to be clipped.
+ *Optional - This value may be {@code null} on some devices.
+ * + * @see CaptureRequest#TONEMAP_MODE + */ + @PublicKey + public static final KeyTonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is + * PRESET_CURVE
+ *The tonemap curve will be defined by specified standard.
+ *sRGB (approximated by 16 control points):
+ * + *Rec. 709 (approximated by 16 control points):
+ * + *Note that above figures show a 16 control points approximation of preset + * curves. Camera devices may apply a different approximation to the curve.
+ *Possible values: + *
Optional - This value may be {@code null} on some devices.
+ * + * @see CaptureRequest#TONEMAP_MODE + * @see #TONEMAP_PRESET_CURVE_SRGB + * @see #TONEMAP_PRESET_CURVE_REC709 + */ + @PublicKey + public static final KeyThis LED is nominally used to indicate to the user
* that the camera is powered on and may be streaming images back to the
* Application Processor. In certain rare circumstances, the OS may
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index 5bf5b29..0011735 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -3543,6 +3543,8 @@ public class CaptureResult extends CameraMetadata
Available values for this device:
* {@link CameraCharacteristics#TONEMAP_AVAILABLE_TONE_MAP_MODES android.tonemap.availableToneMapModes}
Tonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is + * GAMMA_VALUE
+ *The tonemap curve will be defined the following formula: + * * OUT = pow(IN, 1.0 / gamma) + * where IN and OUT is the input pixel value scaled to range [0.0, 1.0], + * pow is the power function and gamma is the gamma value specified by this + * key.
+ *The same curve will be applied to all color channels. The camera device + * may clip the input gamma value to its supported range. The actual applied + * value will be returned in capture result.
+ *The valid range of gamma value varies on different devices, but values + * within [1.0, 5.0] are guaranteed not to be clipped.
+ *Optional - This value may be {@code null} on some devices.
+ * + * @see CaptureRequest#TONEMAP_MODE + */ + @PublicKey + public static final KeyTonemapping curve to use when {@link CaptureRequest#TONEMAP_MODE android.tonemap.mode} is + * PRESET_CURVE
+ *The tonemap curve will be defined by specified standard.
+ *sRGB (approximated by 16 control points):
+ * + *Rec. 709 (approximated by 16 control points):
+ * + *Note that above figures show a 16 control points approximation of preset + * curves. Camera devices may apply a different approximation to the curve.
+ *Possible values: + *
Optional - This value may be {@code null} on some devices.
+ * + * @see CaptureRequest#TONEMAP_MODE + * @see #TONEMAP_PRESET_CURVE_SRGB + * @see #TONEMAP_PRESET_CURVE_REC709 + */ + @PublicKey + public static final KeyThis LED is nominally used to indicate to the user * that the camera is powered on and may be streaming images back to the * Application Processor. In certain rare circumstances, the OS may diff --git a/docs/html/images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png b/docs/html/images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png index ec89e37..a02fd89 100644 Binary files a/docs/html/images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png and b/docs/html/images/camera2/metadata/android.tonemap.curveRed/gamma_tonemap.png differ diff --git a/docs/html/images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png b/docs/html/images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png index cf0c63d..c309ac5 100644 Binary files a/docs/html/images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png and b/docs/html/images/camera2/metadata/android.tonemap.curveRed/inverse_tonemap.png differ diff --git a/docs/html/images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png b/docs/html/images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png index f226a54..414fad4 100644 Binary files a/docs/html/images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png and b/docs/html/images/camera2/metadata/android.tonemap.curveRed/linear_tonemap.png differ diff --git a/docs/html/images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png b/docs/html/images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png new file mode 100644 index 0000000..c147a87 Binary files /dev/null and b/docs/html/images/camera2/metadata/android.tonemap.curveRed/rec709_tonemap.png differ diff --git a/docs/html/images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png b/docs/html/images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png index ded0645..4ce2125 100644 Binary files a/docs/html/images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png and b/docs/html/images/camera2/metadata/android.tonemap.curveRed/srgb_tonemap.png differ -- cgit v1.1