Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a9bfdbbb authored by Ruben Brunk's avatar Ruben Brunk
Browse files

camera3: Add camera profile properties.

Change-Id: I39f6067bb1c05b8b00b0205bb367312112407299
parent 8954f6f0
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -674,6 +674,20 @@ public final class CameraCharacteristics extends CameraMetadata {
    public static final Key<Integer> SENSOR_ORIENTATION =
            new Key<Integer>("android.sensor.orientation", int.class);

    /**
     * <p>The number of input samples for each dimension of
     * {@link CaptureResult#SENSOR_PROFILE_HUE_SAT_MAP android.sensor.profileHueSatMap}.</p>
     * <p>The number of input samples for the hue, saturation, and value
     * dimension of {@link CaptureResult#SENSOR_PROFILE_HUE_SAT_MAP android.sensor.profileHueSatMap}. The order of the
     * dimensions given is hue, saturation, value; where hue is the 0th
     * element.</p>
     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
     *
     * @see CaptureResult#SENSOR_PROFILE_HUE_SAT_MAP
     */
    public static final Key<int[]> SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS =
            new Key<int[]>("android.sensor.profileHueSatMapDimensions", int[].class);

    /**
     * <p>Optional. Defaults to [OFF]. Lists the supported test
     * pattern modes for android.test.patternMode.</p>
+30 −0
Original line number Diff line number Diff line
@@ -1455,6 +1455,36 @@ public final class CaptureResult extends CameraMetadata {
    public static final Key<Rational[]> SENSOR_NEUTRAL_COLOR_POINT =
            new Key<Rational[]>("android.sensor.neutralColorPoint", Rational[].class);

    /**
     * <p>A mapping containing a hue shift, saturation scale, and value scale
     * for each pixel.</p>
     * <p>hue_samples, saturation_samples, and value_samples are given in
     * {@link CameraCharacteristics#SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS android.sensor.profileHueSatMapDimensions}.</p>
     * <p>Each entry of this map contains three floats corresponding to the
     * hue shift, saturation scale, and value scale, respectively; where the
     * hue shift has the lowest index. The map entries are stored in the tag
     * in nested loop order, with the value divisions in the outer loop, the
     * hue divisions in the middle loop, and the saturation divisions in the
     * inner loop. All zero input saturation entries are required to have a
     * value scale factor of 1.0.</p>
     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
     *
     * @see CameraCharacteristics#SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS
     */
    public static final Key<float[]> SENSOR_PROFILE_HUE_SAT_MAP =
            new Key<float[]>("android.sensor.profileHueSatMap", float[].class);

    /**
     * <p>A list of x,y samples defining a tone-mapping curve for gamma adjustment.</p>
     * <p>This tag contains a default tone curve that can be applied while
     * processing the image as a starting point for user adjustments.
     * The curve is specified as a list of value pairs in linear gamma.
     * The curve is interpolated using a cubic spline.</p>
     * <p><b>Optional</b> - This value may be {@code null} on some devices.</p>
     */
    public static final Key<float[]> SENSOR_PROFILE_TONE_CURVE =
            new Key<float[]>("android.sensor.profileToneCurve", float[].class);

    /**
     * <p>When enabled, the sensor sends a test pattern instead of
     * doing a real exposure from the camera.</p>