camera2: Move noise model to dynamic metadata.
Bug: 16369384
Change-Id: I7a540705176c7be68431a977e2b7218ffa1bddd0
diff --git a/api/current.txt b/api/current.txt
index 074a509..0657a74 100644
--- a/api/current.txt
+++ b/api/current.txt
@@ -12646,7 +12646,6 @@
field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_INFO_TIMESTAMP_CALIBRATION;
field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_INFO_WHITE_LEVEL;
field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_MAX_ANALOG_SENSITIVITY;
- field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_NOISE_PROFILE;
field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_ORIENTATION;
field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_REFERENCE_ILLUMINANT1;
field public static final android.hardware.camera2.CameraCharacteristics.Key SENSOR_REFERENCE_ILLUMINANT2;
@@ -13020,6 +13019,7 @@
field public static final android.hardware.camera2.CaptureResult.Key SENSOR_FRAME_DURATION;
field public static final android.hardware.camera2.CaptureResult.Key SENSOR_GREEN_SPLIT;
field public static final android.hardware.camera2.CaptureResult.Key SENSOR_NEUTRAL_COLOR_POINT;
+ field public static final android.hardware.camera2.CaptureResult.Key SENSOR_NOISE_PROFILE;
field public static final android.hardware.camera2.CaptureResult.Key SENSOR_ROLLING_SHUTTER_SKEW;
field public static final android.hardware.camera2.CaptureResult.Key SENSOR_SENSITIVITY;
field public static final android.hardware.camera2.CaptureResult.Key SENSOR_TEST_PATTERN_DATA;
diff --git a/core/java/android/hardware/camera2/CameraCharacteristics.java b/core/java/android/hardware/camera2/CameraCharacteristics.java
index f18cb7d..6cb6a24 100644
--- a/core/java/android/hardware/camera2/CameraCharacteristics.java
+++ b/core/java/android/hardware/camera2/CameraCharacteristics.java
@@ -1810,33 +1810,6 @@
new Key<Integer>("android.sensor.orientation", int.class);
/**
- * <p>Noise model coefficients for each CFA mosaic channel.</p>
- * <p>This tag contains two noise model coefficients for each CFA channel
- * corresponding to the sensor amplification (S) and sensor readout
- * noise (O). These are given as pairs of coefficients for each channel
- * in the same order as channels listed for the CFA layout tag
- * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}). This is
- * represented as an array of Pair<Double, Double>, where
- * the first member of the Pair at index n is the S coefficient and the
- * second member is the O coefficient for the nth color channel in the CFA.</p>
- * <p>These coefficients are used in a two parameter noise model to describe
- * the amount of noise present in the image for each CFA channel. The
- * noise model used here is:</p>
- * <p>N(x) = sqrt(Sx + O)</p>
- * <p>Where x represents the recorded signal of a CFA channel normalized to
- * the range [0, 1], and S and O are the noise model coeffiecients for
- * that channel.</p>
- * <p>A more detailed description of the noise model can be found in the
- * Adobe DNG specification for the NoiseProfile tag.</p>
- * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
- *
- * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
- */
- @PublicKey
- public static final Key<android.util.Pair<Double,Double>[]> SENSOR_NOISE_PROFILE =
- new Key<android.util.Pair<Double,Double>[]>("android.sensor.noiseProfile", new TypeReference<android.util.Pair<Double,Double>[]>() {{ }});
-
- /**
* <p>Lists the supported sensor test pattern modes for {@link CaptureRequest#SENSOR_TEST_PATTERN_MODE android.sensor.testPatternMode}.</p>
* <p>Optional. Defaults to [OFF].</p>
* <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
diff --git a/core/java/android/hardware/camera2/CaptureResult.java b/core/java/android/hardware/camera2/CaptureResult.java
index c9774ed..20a04f0 100644
--- a/core/java/android/hardware/camera2/CaptureResult.java
+++ b/core/java/android/hardware/camera2/CaptureResult.java
@@ -2242,6 +2242,33 @@
new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class);
/**
+ * <p>Noise model coefficients for each CFA mosaic channel.</p>
+ * <p>This tag contains two noise model coefficients for each CFA channel
+ * corresponding to the sensor amplification (S) and sensor readout
+ * noise (O). These are given as pairs of coefficients for each channel
+ * in the same order as channels listed for the CFA layout tag
+ * (see {@link CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT android.sensor.info.colorFilterArrangement}). This is
+ * represented as an array of Pair<Double, Double>, where
+ * the first member of the Pair at index n is the S coefficient and the
+ * second member is the O coefficient for the nth color channel in the CFA.</p>
+ * <p>These coefficients are used in a two parameter noise model to describe
+ * the amount of noise present in the image for each CFA channel. The
+ * noise model used here is:</p>
+ * <p>N(x) = sqrt(Sx + O)</p>
+ * <p>Where x represents the recorded signal of a CFA channel normalized to
+ * the range [0, 1], and S and O are the noise model coeffiecients for
+ * that channel.</p>
+ * <p>A more detailed description of the noise model can be found in the
+ * Adobe DNG specification for the NoiseProfile tag.</p>
+ * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
+ *
+ * @see CameraCharacteristics#SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
+ */
+ @PublicKey
+ public static final Key<android.util.Pair<Double,Double>[]> SENSOR_NOISE_PROFILE =
+ new Key<android.util.Pair<Double,Double>[]>("android.sensor.noiseProfile", new TypeReference<android.util.Pair<Double,Double>[]>() {{ }});
+
+ /**
* <p>The worst-case divergence between Bayer green channels.</p>
* <p>This value is an estimate of the worst case split between the
* Bayer green channels in the red and blue rows in the sensor color