android camera系统3A模式及其状态转换(二)

 

5.        AF state machines

 

mode = AF_MODE_OFF or AF_MODE_EDOF      
State Transformation cause New state Notes
INACTIVE     AF is disabled
mode = AF_MODE_AUTO or AF_MODE_MACRO      
State Transformation cause New state Notes
INACTIVE AF_TRIGGER ACTIVE_SCAN Start AF sweep      Lens now moving
ACTIVE_SCAN AF sweep done FOCUSED_LOCKED If AF successful Lens now locked
ACTIVE_SCAN AF sweep done NOT_FOCUSED_LOCKED If AF successful      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
All states mode change INACTIVE  
mode = AF_MODE_CONTINUOUS_VIDEO      
State Transformation cause New state Notes
INACTIVE HAL initiates new scan PASSIVE_SCAN Start AF sweep      Lens now moving
INACTIVE AF_TRIGGER NOT_FOCUSED_LOCKED AF state query       Lens now locked
PASSIVE_SCAN HAL completes current scan PASSIVE_FOCUSED End AF scan      Lens now locked
PASSIVE_SCAN AF_TRIGGER FOCUSED_LOCKED Immediate transformation      if focus is good      Lens now locked
PASSIVE_SCAN AF_TRIGGER NOT_FOCUSED_LOCKED Immediate transformation      if focus is bad      Lens now locked
PASSIVE_SCAN AF_CANCEL INACTIVE Reset lens position      Lens now locked
PASSIVE_FOCUSED HAL initiates new scan PASSIVE_SCAN Start AF scan      Lens now moving
PASSIVE_FOCUSED AF_TRIGGER FOCUSED_LOCKED Immediate transformation      if focus is good      Lens now locked
PASSIVE_FOCUSED AF_TRIGGER NOT_FOCUSED_LOCKED Immediate transformation      if focus is bad      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
mode = AF_MODE_CONTINUOUS_PICTURE      
State Transformation cause New state Notes
INACTIVE HAL 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 HAL completes current scan PASSIVE_FOCUSED End AF scan      Lens now locked
PASSIVE_SCAN AF_TRIGGER FOCUSED_LOCKED Eventual transformation once focus good      Lens now locked
PASSIVE_SCAN AF_TRIGGER NOT_FOCUSED_LOCKED Eventual transformation if cannot focus      Lens now locked
PASSIVE_SCAN AF_CANCEL INACTIVE Reset lens position      Lens now locked
PASSIVE_FOCUSED HAL initiates new scan PASSIVE_SCAN Start AF scan      Lens now moving
PASSIVE_FOCUSED AF_TRIGGER FOCUSED_LOCKED Immediate transformation if focus is good      Lens now locked
PASSIVE_FOCUSED AF_TRIGGER NOT_FOCUSED_LOCKED Immediate transformation if focus is bad      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

6.        AE and AWB state machines

AEAWB的状态机基本上是完全相同的。AE有额外的FLASH_REQUIREDPRECAPTURE状态。所以下面行中涉及这两个状态时,AWB状态机忽略之。

  

mode = AE_MODE_OFF / AWB mode not AUTO      
State Transformation cause New state Notes
INACTIVE     AE/AWB disabled
mode = AE_MODE_ON_* / AWB_MODE_AUTO      
State Transformation cause New state Notes
INACTIVE HAL initiates AE/AWB scan SEARCHING  
INACTIVE AE/AWB_LOCK on LOCKED Values locked
SEARCHING HAL finishes AE/AWB scan CONVERGED Good values, not changing
SEARCHING HAL finishes AE scan FLASH_REQUIRED Converged but too dark without flash
SEARCHING AE/AWB_LOCK on LOCKED Values locked
CONVERGED HAL initiates AE/AWB scan SEARCHING Values locked
CONVERGED AE/AWB_LOCK on LOCKED Values locked
FLASH_REQUIRED HAL initiates AE/AWB scan SEARCHING Values locked
FLASH_REQUIRED AE/AWB_LOCK on LOCKED Values locked
LOCKED AE/AWB_LOCK off SEARCHING Values not good after unlock
LOCKED AE/AWB_LOCK off CONVERGED Values good after unlock
LOCKED AE_LOCK off FLASH_REQUIRED Exposure good, but too dark
All AE states PRECAPTURE_START PRECAPTURE Start precapture sequence
PRECAPTURE Sequence done, AE_LOCK off CONVERGED Ready for high-quality capture
PRECAPTURE Sequence done, AE_LOCK on LOCKED Ready for high-quality capture

7.        Enabling manual control

 

在配置3A模块中所涉及的一些控制,允许application直接控制。

对于每个请求,HAL层负责3A控制的模块会检查3A控制字段的状态。如果有3A事例使能,这些事例可能会重置该事例相关的控制变量,重置的值会放置于此次捕获的结果元数据中。例如,如果在一个请求中自动曝光使能,HAL层会重置这个请求中的曝光值,增益和帧周期字段(和潜在的闪光灯字段,依赖于AE模式)。相关控制如下:

Control name Unit Notes
android.control.mode enum: OFF, AUTO, USE_SCENE_MODE High-level 3A control. When set to OFF, all 3A control by the HAL is disabled. The application must set the fields for capture parameters itself.      When set to AUTO, the individual algorithm controls in android.control.* are in effect, such as android.control.afMode.      When set to USE_SCENE_MODE, the individual controls in android.control.* are mostly disabled, and the HAL implements one of the scene mode settings (such as ACTION, SUNSET, or PARTY) as it wishes.
android.control.afMode enum OFF means manual control of lens focusing through android.lens.focusDistance.
android.control.aeMode enum OFF means manual control of exposure/gain/frame duration through android.sensor.exposureTime / .sensitivity / .frameDuration
android.control.awbMode enum OFF means manual control of white balance.

 (全文完)

https://source.android.com/devices/camera/camera3_3Amodes.html#af-state

你可能感兴趣的:(android,camera,android,camera,camera,HAL,3A,HAL,v3)