libcamera2: Video Stabilization Killswitch
Bug: 10819643
Change-Id: I6fc3478308aaaca3ebecbd7f1fe71404554917d1
diff --git a/libcamera2/ExynosCameraHWInterface2.cpp b/libcamera2/ExynosCameraHWInterface2.cpp
index 437c45b..9c4deec 100644
--- a/libcamera2/ExynosCameraHWInterface2.cpp
+++ b/libcamera2/ExynosCameraHWInterface2.cpp
@@ -280,6 +280,7 @@
gralloc_module_t const* ExynosCameraHWInterface2::m_grallocHal;
RequestManager::RequestManager(SignalDrivenThread* main_thread):
+ m_vdisEnable(false),
m_lastAeMode(0),
m_lastAaMode(0),
m_lastAwbMode(0),
@@ -718,7 +719,7 @@
m_lastAeComp = (int)(shot_ext->shot.ctl.aa.aeExpCompensation);
}
- if (request_shot->shot.ctl.aa.videoStabilizationMode) {
+ if (request_shot->shot.ctl.aa.videoStabilizationMode && m_vdisEnable) {
m_vdisBubbleEn = true;
shot_ext->dis_bypass = 0;
shot_ext->dnr_bypass = 0;
@@ -1759,6 +1760,10 @@
AllocatedStream->attachSubStream(STREAM_ID_RECORD, 10);
if (m_subStreams[STREAM_ID_PRVCB].type != SUBSTREAM_TYPE_NONE)
AllocatedStream->attachSubStream(STREAM_ID_PRVCB, 70);
+
+ // set video stabilization killswitch
+ m_requestManager->m_vdisEnable = width > 352 && height > 288;
+
return 0;
} else if (allocCase == 1) {
*stream_id = STREAM_ID_RECORD;
diff --git a/libcamera2/ExynosCameraHWInterface2.h b/libcamera2/ExynosCameraHWInterface2.h
index b54d77a..8085643 100644
--- a/libcamera2/ExynosCameraHWInterface2.h
+++ b/libcamera2/ExynosCameraHWInterface2.h
@@ -311,6 +311,9 @@
void pushSensorQ(int index);
int popSensorQ();
void releaseSensorQ();
+
+ bool m_vdisEnable;
+
private:
MetadataConverter *m_metadataConverter;