Merge "Camera2: update 3A state related metadata key docs"

This commit is contained in:
Zhijun He
2014-02-24 18:40:02 +00:00
committed by Android (Google) Code Review
2 changed files with 174 additions and 15 deletions

View File

@@ -1468,14 +1468,16 @@ public abstract class CameraMetadata {
/** /**
* <p>AE is off or recently reset. When a camera device is opened, it starts in * <p>AE is off or recently reset. When a camera device is opened, it starts in
* this state.</p> * this state. This is a transient state, the camera device may skip reporting
* this state in capture result.</p>
* @see CaptureResult#CONTROL_AE_STATE * @see CaptureResult#CONTROL_AE_STATE
*/ */
public static final int CONTROL_AE_STATE_INACTIVE = 0; public static final int CONTROL_AE_STATE_INACTIVE = 0;
/** /**
* <p>AE doesn't yet have a good set of control values * <p>AE doesn't yet have a good set of control values
* for the current scene.</p> * for the current scene. This is a transient state, the camera device may skip
* reporting this state in capture result.</p>
* @see CaptureResult#CONTROL_AE_STATE * @see CaptureResult#CONTROL_AE_STATE
*/ */
public static final int CONTROL_AE_STATE_SEARCHING = 1; public static final int CONTROL_AE_STATE_SEARCHING = 1;
@@ -1506,7 +1508,8 @@ public abstract class CameraMetadata {
* (through the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} START), * (through the {@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} START),
* and is currently executing it. Once PRECAPTURE * and is currently executing it. Once PRECAPTURE
* completes, AE will transition to CONVERGED or * completes, AE will transition to CONVERGED or
* FLASH_REQUIRED as appropriate.</p> * FLASH_REQUIRED as appropriate. This is a transient state, the
* camera device may skip reporting this state in capture result.</p>
* *
* @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER * @see CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
* @see CaptureResult#CONTROL_AE_STATE * @see CaptureResult#CONTROL_AE_STATE
@@ -1520,7 +1523,8 @@ public abstract class CameraMetadata {
/** /**
* <p>AF off or has not yet tried to scan/been asked * <p>AF off or has not yet tried to scan/been asked
* to scan. When a camera device is opened, it starts in * to scan. When a camera device is opened, it starts in
* this state.</p> * this state. This is a transient state, the camera device may
* skip reporting this state in capture result.</p>
* @see CaptureResult#CONTROL_AF_STATE * @see CaptureResult#CONTROL_AF_STATE
*/ */
public static final int CONTROL_AF_STATE_INACTIVE = 0; public static final int CONTROL_AF_STATE_INACTIVE = 0;
@@ -1528,7 +1532,8 @@ public abstract class CameraMetadata {
/** /**
* <p>if CONTINUOUS_* modes are supported. AF is * <p>if CONTINUOUS_* modes are supported. AF is
* currently doing an AF scan initiated by a continuous * currently doing an AF scan initiated by a continuous
* autofocus mode</p> * autofocus mode. This is a transient state, the camera device may
* skip reporting this state in capture result.</p>
* @see CaptureResult#CONTROL_AF_STATE * @see CaptureResult#CONTROL_AF_STATE
*/ */
public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1; public static final int CONTROL_AF_STATE_PASSIVE_SCAN = 1;
@@ -1536,15 +1541,17 @@ public abstract class CameraMetadata {
/** /**
* <p>if CONTINUOUS_* modes are supported. AF currently * <p>if CONTINUOUS_* modes are supported. AF currently
* believes it is in focus, but may restart scanning at * believes it is in focus, but may restart scanning at
* any time.</p> * any time. This is a transient state, the camera device may skip
* reporting this state in capture result.</p>
* @see CaptureResult#CONTROL_AF_STATE * @see CaptureResult#CONTROL_AF_STATE
*/ */
public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2; public static final int CONTROL_AF_STATE_PASSIVE_FOCUSED = 2;
/** /**
* <p>if AUTO or MACRO modes are supported. AF is doing * <p>if AUTO or MACRO modes are supported. AF is doing
* an AF scan because it was triggered by AF * an AF scan because it was triggered by AF trigger. This is a
* trigger</p> * transient state, the camera device may skip reporting
* this state in capture result.</p>
* @see CaptureResult#CONTROL_AF_STATE * @see CaptureResult#CONTROL_AF_STATE
*/ */
public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3; public static final int CONTROL_AF_STATE_ACTIVE_SCAN = 3;
@@ -1552,7 +1559,7 @@ public abstract class CameraMetadata {
/** /**
* <p>if any AF mode besides OFF is supported. AF * <p>if any AF mode besides OFF is supported. AF
* believes it is focused correctly and is * believes it is focused correctly and is
* locked</p> * locked.</p>
* @see CaptureResult#CONTROL_AF_STATE * @see CaptureResult#CONTROL_AF_STATE
*/ */
public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4; public static final int CONTROL_AF_STATE_FOCUSED_LOCKED = 4;
@@ -1560,7 +1567,7 @@ public abstract class CameraMetadata {
/** /**
* <p>if any AF mode besides OFF is supported. AF has * <p>if any AF mode besides OFF is supported. AF has
* failed to focus successfully and is * failed to focus successfully and is
* locked</p> * locked.</p>
* @see CaptureResult#CONTROL_AF_STATE * @see CaptureResult#CONTROL_AF_STATE
*/ */
public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5; public static final int CONTROL_AF_STATE_NOT_FOCUSED_LOCKED = 5;
@@ -1568,7 +1575,8 @@ public abstract class CameraMetadata {
/** /**
* <p>if CONTINUOUS_* modes are supported. AF finished a * <p>if CONTINUOUS_* modes are supported. AF finished a
* passive scan without finding focus, and may restart * passive scan without finding focus, and may restart
* scanning at any time.</p> * scanning at any time. This is a transient state, the camera
* device may skip reporting this state in capture result.</p>
* @see CaptureResult#CONTROL_AF_STATE * @see CaptureResult#CONTROL_AF_STATE
*/ */
public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6; public static final int CONTROL_AF_STATE_PASSIVE_UNFOCUSED = 6;
@@ -1579,14 +1587,16 @@ public abstract class CameraMetadata {
/** /**
* <p>AWB is not in auto mode. When a camera device is opened, it * <p>AWB is not in auto mode. When a camera device is opened, it
* starts in this state.</p> * starts in this state. This is a transient state, the camera device may
* skip reporting this state in capture result.</p>
* @see CaptureResult#CONTROL_AWB_STATE * @see CaptureResult#CONTROL_AWB_STATE
*/ */
public static final int CONTROL_AWB_STATE_INACTIVE = 0; public static final int CONTROL_AWB_STATE_INACTIVE = 0;
/** /**
* <p>AWB doesn't yet have a good set of control * <p>AWB doesn't yet have a good set of control
* values for the current scene.</p> * values for the current scene. This is a transient state, the camera device
* may skip reporting this state in capture result.</p>
* @see CaptureResult#CONTROL_AWB_STATE * @see CaptureResult#CONTROL_AWB_STATE
*/ */
public static final int CONTROL_AWB_STATE_SEARCHING = 1; public static final int CONTROL_AWB_STATE_SEARCHING = 1;

View File

@@ -370,6 +370,54 @@ public final class CaptureResult extends CameraMetadata {
* </tr> * </tr>
* </tbody> * </tbody>
* </table> * </table>
* <p>For the above table, the camera device may skip reporting any state changes that happen
* without application intervention (i.e. mode switch, trigger, locking). Any state that
* can be skipped in that manner is called a transient state.</p>
* <p>For example, for above AE modes (AE_MODE_ON_*), in addition to the state transitions
* listed in above table, it is also legal for the camera device to skip one or more
* transient states between two results. See below table for examples:</p>
* <table>
* <thead>
* <tr>
* <th align="center">State</th>
* <th align="center">Transition Cause</th>
* <th align="center">New State</th>
* <th align="center">Notes</th>
* </tr>
* </thead>
* <tbody>
* <tr>
* <td align="center">INACTIVE</td>
* <td align="center">Camera device finished AE scan</td>
* <td align="center">CONVERGED</td>
* <td align="center">Values are already good, transient states are skipped by camera device.</td>
* </tr>
* <tr>
* <td align="center">Any state</td>
* <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
* <td align="center">FLASH_REQUIRED</td>
* <td align="center">Converged but too dark w/o flash after a precapture sequence, transient states are skipped by camera device.</td>
* </tr>
* <tr>
* <td align="center">Any state</td>
* <td align="center">{@link CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER android.control.aePrecaptureTrigger} is START, sequence done</td>
* <td align="center">CONVERGED</td>
* <td align="center">Converged after a precapture sequence, transient states are skipped by camera device.</td>
* </tr>
* <tr>
* <td align="center">CONVERGED</td>
* <td align="center">Camera device finished AE scan</td>
* <td align="center">FLASH_REQUIRED</td>
* <td align="center">Converged but too dark w/o flash after a new scan, transient states are skipped by camera device.</td>
* </tr>
* <tr>
* <td align="center">FLASH_REQUIRED</td>
* <td align="center">Camera device finished AE scan</td>
* <td align="center">CONVERGED</td>
* <td align="center">Converged after a new scan, transient states are skipped by camera device.</td>
* </tr>
* </tbody>
* </table>
* *
* @see CaptureRequest#CONTROL_AE_LOCK * @see CaptureRequest#CONTROL_AE_LOCK
* @see CaptureRequest#CONTROL_AE_MODE * @see CaptureRequest#CONTROL_AE_MODE
@@ -431,7 +479,7 @@ public final class CaptureResult extends CameraMetadata {
new Key<int[]>("android.control.afRegions", int[].class); new Key<int[]>("android.control.afRegions", int[].class);
/** /**
* <p>Current state of AF algorithm</p> * <p>Current state of AF algorithm.</p>
* <p>Switching between or enabling AF modes ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) always * <p>Switching between or enabling AF modes ({@link CaptureRequest#CONTROL_AF_MODE android.control.afMode}) always
* resets the AF state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode}, * resets the AF state to INACTIVE. Similarly, switching between {@link CaptureRequest#CONTROL_MODE android.control.mode},
* or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all * or {@link CaptureRequest#CONTROL_SCENE_MODE android.control.sceneMode} if <code>{@link CaptureRequest#CONTROL_MODE android.control.mode} == USE_SCENE_MODE</code> resets all
@@ -529,6 +577,48 @@ public final class CaptureResult extends CameraMetadata {
* </tr> * </tr>
* </tbody> * </tbody>
* </table> * </table>
* <p>For the above table, the camera device may skip reporting any state changes that happen
* without application intervention (i.e. mode switch, trigger, locking). Any state that
* can be skipped in that manner is called a transient state.</p>
* <p>For example, for these AF modes (AF_MODE_AUTO and AF_MODE_MACRO), in addition to the
* state transitions listed in above table, it is also legal for the camera device to skip
* one or more transient states between two results. See below table for examples:</p>
* <table>
* <thead>
* <tr>
* <th align="center">State</th>
* <th align="center">Transition Cause</th>
* <th align="center">New State</th>
* <th align="center">Notes</th>
* </tr>
* </thead>
* <tbody>
* <tr>
* <td align="center">INACTIVE</td>
* <td align="center">AF_TRIGGER</td>
* <td align="center">FOCUSED_LOCKED</td>
* <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
* </tr>
* <tr>
* <td align="center">INACTIVE</td>
* <td align="center">AF_TRIGGER</td>
* <td align="center">NOT_FOCUSED_LOCKED</td>
* <td align="center">Focus failed after a scan, lens is now locked.</td>
* </tr>
* <tr>
* <td align="center">FOCUSED_LOCKED</td>
* <td align="center">AF_TRIGGER</td>
* <td align="center">FOCUSED_LOCKED</td>
* <td align="center">Focus is already good or good after a scan, lens is now locked.</td>
* </tr>
* <tr>
* <td align="center">NOT_FOCUSED_LOCKED</td>
* <td align="center">AF_TRIGGER</td>
* <td align="center">FOCUSED_LOCKED</td>
* <td align="center">Focus is good after a scan, lens is not locked.</td>
* </tr>
* </tbody>
* </table>
* <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_VIDEO:</p> * <p>When {@link CaptureRequest#CONTROL_AF_MODE android.control.afMode} is AF_MODE_CONTINUOUS_VIDEO:</p>
* <table> * <table>
* <thead> * <thead>
@@ -735,6 +825,41 @@ public final class CaptureResult extends CameraMetadata {
* </tr> * </tr>
* </tbody> * </tbody>
* </table> * </table>
* <p>When switch between AF_MODE_CONTINUOUS_* (CAF modes) and AF_MODE_AUTO/AF_MODE_MACRO
* (AUTO modes), the initial INACTIVE or PASSIVE_SCAN states may be skipped by the
* camera device. When a trigger is included in a mode switch request, the trigger
* will be evaluated in the context of the new mode in the request.
* See below table for examples:</p>
* <table>
* <thead>
* <tr>
* <th align="center">State</th>
* <th align="center">Transition Cause</th>
* <th align="center">New State</th>
* <th align="center">Notes</th>
* </tr>
* </thead>
* <tbody>
* <tr>
* <td align="center">any state</td>
* <td align="center">CAF--&gt;AUTO mode switch</td>
* <td align="center">INACTIVE</td>
* <td align="center">Mode switch without trigger, initial state must be INACTIVE</td>
* </tr>
* <tr>
* <td align="center">any state</td>
* <td align="center">CAF--&gt;AUTO mode switch with AF_TRIGGER</td>
* <td align="center">trigger-reachable states from INACTIVE</td>
* <td align="center">Mode switch with trigger, INACTIVE is skipped</td>
* </tr>
* <tr>
* <td align="center">any state</td>
* <td align="center">AUTO--&gt;CAF mode switch</td>
* <td align="center">passively reachable states from INACTIVE</td>
* <td align="center">Mode switch without trigger, passive transient state is skipped</td>
* </tr>
* </tbody>
* </table>
* *
* @see CaptureRequest#CONTROL_AF_MODE * @see CaptureRequest#CONTROL_AF_MODE
* @see CaptureRequest#CONTROL_MODE * @see CaptureRequest#CONTROL_MODE
@@ -905,11 +1030,35 @@ public final class CaptureResult extends CameraMetadata {
* <td align="center">SEARCHING</td> * <td align="center">SEARCHING</td>
* <td align="center">Values not good after unlock</td> * <td align="center">Values not good after unlock</td>
* </tr> * </tr>
* </tbody>
* </table>
* <p>For the above table, the camera device may skip reporting any state changes that happen
* without application intervention (i.e. mode switch, trigger, locking). Any state that
* can be skipped in that manner is called a transient state.</p>
* <p>For example, for this AWB mode (AWB_MODE_AUTO), in addition to the state transitions
* listed in above table, it is also legal for the camera device to skip one or more
* transient states between two results. See below table for examples:</p>
* <table>
* <thead>
* <tr>
* <th align="center">State</th>
* <th align="center">Transition Cause</th>
* <th align="center">New State</th>
* <th align="center">Notes</th>
* </tr>
* </thead>
* <tbody>
* <tr>
* <td align="center">INACTIVE</td>
* <td align="center">Camera device finished AWB scan</td>
* <td align="center">CONVERGED</td>
* <td align="center">Values are already good, transient states are skipped by camera device.</td>
* </tr>
* <tr> * <tr>
* <td align="center">LOCKED</td> * <td align="center">LOCKED</td>
* <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td> * <td align="center">{@link CaptureRequest#CONTROL_AWB_LOCK android.control.awbLock} is OFF</td>
* <td align="center">CONVERGED</td> * <td align="center">CONVERGED</td>
* <td align="center">Values good after unlock</td> * <td align="center">Values good after unlock, transient states are skipped by camera device.</td>
* </tr> * </tr>
* </tbody> * </tbody>
* </table> * </table>