Camera: Apply max batch size for high speed video
Currently, capture requests are batch-sized based on 'max fps/preview
fps' for the high speed video. It normally works to achieve efficient
high speed video recording as it is the allowed maximum value.
However, aggregating multiple requests will scarifice performance for
some specific SoCs. They report batch_size_max in the
'availableHighSpeedVideoConfigurations', but the value is honored
nowhere in camera framework.
This patch breaks down the request list based on the reported
batch_size_max.
Bug: 274392420
Test: CameraCTS
Change-Id: I1c0bbad736d0ce70369a18fbd82c034d38b68568
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp
index f7a3cc7..12cbbf6 100644
--- a/services/camera/libcameraservice/device3/Camera3Device.cpp
+++ b/services/camera/libcameraservice/device3/Camera3Device.cpp
@@ -51,6 +51,7 @@
#include <cutils/properties.h>
#include <camera/StringUtils.h>
+#include <android-base/properties.h>
#include <android/hardware/camera/device/3.7/ICameraInjectionSession.h>
#include <android/hardware/camera2/ICameraDeviceUser.h>
@@ -756,8 +757,7 @@
auto firstRequest = requestList->begin();
for (auto& outputStream : (*firstRequest)->mOutputStreams) {
if (outputStream->isVideoStream()) {
- (*firstRequest)->mBatchSize = requestList->size();
- outputStream->setBatchSize(requestList->size());
+ applyMaxBatchSizeLocked(requestList, outputStream);
break;
}
}