State | Transition Cause | New State | Notes |
---|---|---|---|
INACTIVE | INACTIVE | Never changes |
State | Transition Cause | New State | Notes |
---|---|---|---|
INACTIVE | AF_TRIGGER | ACTIVE_SCAN | Start AF sweep, Lens now moving |
ACTIVE_SCAN | AF sweep done | FOCUSED_LOCKED | Focused, Lens now locked |
ACTIVE_SCAN | AF sweep done | NOT_FOCUSED_LOCKED | Not focused, Lens now locked |
ACTIVE_SCAN | AF_CANCEL | INACTIVE | Cancel/reset AF, Lens now locked |
FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF |
FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving |
NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF |
NOT_FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving |
Any state | Mode change | INACTIVE |
State | Transition Cause | New State | Notes |
---|---|---|---|
INACTIVE | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked. |
INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked. |
FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked. |
NOT_FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is good after a scan, lens is not locked. |
State | Transition Cause | New State | Notes |
---|---|---|---|
INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked |
PASSIVE_SCAN | Camera device completes current scan | PASSIVE_FOCUSED | End AF scan, Lens now locked |
PASSIVE_SCAN | Camera device fails current scan | PASSIVE_UNFOCUSED | End AF scan, Lens now locked |
PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, if focus is good. Lens now locked |
PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate transition, if focus is bad. Lens now locked |
PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked |
PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
PASSIVE_UNFOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, lens now locked |
PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked |
FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect |
FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect |
NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
State | Transition Cause | New State | Notes |
---|---|---|---|
INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked |
PASSIVE_SCAN | Camera device completes current scan | PASSIVE_FOCUSED | End AF scan, Lens now locked |
PASSIVE_SCAN | Camera device fails current scan | PASSIVE_UNFOCUSED | End AF scan, Lens now locked |
PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Eventual transition once the focus is good. Lens now locked |
PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Eventual transition if cannot find focus. Lens now locked |
PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked |
PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
PASSIVE_UNFOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate trans. Lens now locked |
PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked |
FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect |
FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect |
NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
State | Transition Cause | New State | Notes |
---|---|---|---|
any state | CAF-->AUTO mode switch | INACTIVE | Mode switch without trigger, initial state must be INACTIVE |
any state | CAF-->AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE | Mode switch with trigger, INACTIVE is skipped |
any state | AUTO-->CAF mode switch | passively reachable states from INACTIVE | Mode switch without trigger, passive transient state is skipped |
Documentation for this section has not yet been entered.
State | Transition Cause | New State | Notes |
---|---|---|---|
INACTIVE | INACTIVE | Never changes |
State | Transition Cause | New State | Notes |
---|---|---|---|
INACTIVE | AF_TRIGGER | ACTIVE_SCAN | Start AF sweep, Lens now moving |
ACTIVE_SCAN | AF sweep done | FOCUSED_LOCKED | Focused, Lens now locked |
ACTIVE_SCAN | AF sweep done | NOT_FOCUSED_LOCKED | Not focused, Lens now locked |
ACTIVE_SCAN | AF_CANCEL | INACTIVE | Cancel/reset AF, Lens now locked |
FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF |
FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving |
NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Cancel/reset AF |
NOT_FOCUSED_LOCKED | AF_TRIGGER | ACTIVE_SCAN | Start new sweep, Lens now moving |
Any state | Mode change | INACTIVE |
State | Transition Cause | New State | Notes |
---|---|---|---|
INACTIVE | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked. |
INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | Focus failed after a scan, lens is now locked. |
FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is already good or good after a scan, lens is now locked. |
NOT_FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | Focus is good after a scan, lens is not locked. |
State | Transition Cause | New State | Notes |
---|---|---|---|
INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked |
PASSIVE_SCAN | Camera device completes current scan | PASSIVE_FOCUSED | End AF scan, Lens now locked |
PASSIVE_SCAN | Camera device fails current scan | PASSIVE_UNFOCUSED | End AF scan, Lens now locked |
PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, if focus is good. Lens now locked |
PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate transition, if focus is bad. Lens now locked |
PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked |
PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
PASSIVE_UNFOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate transition, lens now locked |
PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate transition, lens now locked |
FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect |
FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect |
NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
State | Transition Cause | New State | Notes |
---|---|---|---|
INACTIVE | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
INACTIVE | AF_TRIGGER | NOT_FOCUSED_LOCKED | AF state query, Lens now locked |
PASSIVE_SCAN | Camera device completes current scan | PASSIVE_FOCUSED | End AF scan, Lens now locked |
PASSIVE_SCAN | Camera device fails current scan | PASSIVE_UNFOCUSED | End AF scan, Lens now locked |
PASSIVE_SCAN | AF_TRIGGER | FOCUSED_LOCKED | Eventual transition once the focus is good. Lens now locked |
PASSIVE_SCAN | AF_TRIGGER | NOT_FOCUSED_LOCKED | Eventual transition if cannot find focus. Lens now locked |
PASSIVE_SCAN | AF_CANCEL | INACTIVE | Reset lens position, Lens now locked |
PASSIVE_FOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
PASSIVE_UNFOCUSED | Camera device initiates new scan | PASSIVE_SCAN | Start AF scan, Lens now moving |
PASSIVE_FOCUSED | AF_TRIGGER | FOCUSED_LOCKED | Immediate trans. Lens now locked |
PASSIVE_UNFOCUSED | AF_TRIGGER | NOT_FOCUSED_LOCKED | Immediate trans. Lens now locked |
FOCUSED_LOCKED | AF_TRIGGER | FOCUSED_LOCKED | No effect |
FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
NOT_FOCUSED_LOCKED | AF_TRIGGER | NOT_FOCUSED_LOCKED | No effect |
NOT_FOCUSED_LOCKED | AF_CANCEL | INACTIVE | Restart AF scan |
State | Transition Cause | New State | Notes |
---|---|---|---|
any state | CAF-->AUTO mode switch | INACTIVE | Mode switch without trigger, initial state must be INACTIVE |
any state | CAF-->AUTO mode switch with AF_TRIGGER | trigger-reachable states from INACTIVE | Mode switch with trigger, INACTIVE is skipped |
any state | AUTO-->CAF mode switch | passively reachable states from INACTIVE | Mode switch without trigger, passive transient state is skipped |
Current state of auto-focus (AF) algorithm.
Switching between or enabling AF modes (CaptureRequest.ControlAfMode) always resets the AF state to INACTIVE. Similarly, switching between CaptureRequest.ControlMode, or CaptureRequest.ControlSceneMode if CaptureRequest.ControlMode == USE_SCENE_MODE resets all the algorithm states to INACTIVE.
The camera device can do several state transitions between two results, if it is allowed by the state transition table. For example: INACTIVE may never actually be seen in a result.
The state in the result is the state for this image (in sync with this image): if AF state becomes FOCUSED, then the image data associated with this result should be sharp.
Below are state transition tables for different AF modes.
When CaptureRequest.ControlAfMode is AF_MODE_OFF or AF_MODE_EDOF:
When CaptureRequest.ControlAfMode is AF_MODE_AUTO or AF_MODE_MACRO:
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.
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:
When CaptureRequest.ControlAfMode is AF_MODE_CONTINUOUS_VIDEO:
When CaptureRequest.ControlAfMode is AF_MODE_CONTINUOUS_PICTURE:
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:
Possible values:
This key is available on all devices.