hardware: samsung_slsi: libcamera2: Fix AF and CAF transition bug
This patch is to fix a bug that the transition beween
single AF and continuous AF. In that case, the region
information of single AF affects to CAF. At starting of
CAF, region infos are initialized.
Change-Id: I6cf6c7c86cd84284bc34fdaee1750ab72391fb76
Signed-off-by: Younghwan Joo <yhwan.joo@samsung.com>
diff --git a/libcamera2/ExynosCameraHWInterface2.cpp b/libcamera2/ExynosCameraHWInterface2.cpp
index 966b496..cb66db1 100644
--- a/libcamera2/ExynosCameraHWInterface2.cpp
+++ b/libcamera2/ExynosCameraHWInterface2.cpp
@@ -444,7 +444,7 @@
if ((m_entryProcessingIndex == m_entryInsertionIndex)
&& (entries[m_entryProcessingIndex].status == REQUESTED || entries[m_entryProcessingIndex].status == CAPTURED)) {
- ALOGD("## MarkProcReq skipping(request underrun) - num(%d), insert(%d), processing(%d), frame(%d)",
+ ALOGV("## MarkProcReq skipping(request underrun) - num(%d), insert(%d), processing(%d), frame(%d)",
m_numOfEntries,m_entryInsertionIndex,m_entryProcessingIndex, m_entryFrameOutputIndex);
return -1;
}
@@ -2788,6 +2788,13 @@
lastAfRegion[2] = shot_ext->shot.ctl.aa.afRegions[2];
lastAfRegion[3] = shot_ext->shot.ctl.aa.afRegions[3];
}
+ // clear region infos in case of CAF mode
+ if (m_afMode == AA_AFMODE_CONTINUOUS_VIDEO || m_afMode == AA_AFMODE_CONTINUOUS_PICTURE) {
+ shot_ext->shot.ctl.aa.afRegions[0] = lastAfRegion[0] = 0;
+ shot_ext->shot.ctl.aa.afRegions[1] = lastAfRegion[1] = 0;
+ shot_ext->shot.ctl.aa.afRegions[2] = lastAfRegion[2] = 0;
+ shot_ext->shot.ctl.aa.afRegions[3] = lastAfRegion[3] = 0;
+ }
}
if (m_nightCaptureCnt == 0) {
if (shot_ext->shot.ctl.aa.captureIntent == ANDROID_CONTROL_INTENT_STILL_CAPTURE
@@ -2937,7 +2944,7 @@
if (!m_scp_closing
&& ((matchedFrameCnt == -1) || (processingReqIndex == -1))){
- ALOGD("make bubble shot: matchedFramcnt(%d) processingReqIndex(%d)",
+ ALOGV("make bubble shot: matchedFramcnt(%d) processingReqIndex(%d)",
matchedFrameCnt, processingReqIndex);
selfThread->SetSignal(SIGNAL_SENSOR_START_REQ_PROCESSING);
}