aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarshit Jain <harshitjain6751@gmail.com>2017-09-09 18:19:08 +0530
committerdev-harsh1998 <harshitjain6751@gmail.com>2017-10-18 12:29:35 +0530
commitc25702cabd9022f9e051cb2b32f56e906316b66d (patch)
tree0efe2d7dbda9a9d99200514f67ac80260da5b918
parent87f841a88d794d3a525943da8336777e9f26fb99 (diff)
a6000: camera: Fix buffer allocation underrun for HDR
* During the first start of camera the buffer available to the "bufferCnt" isnt enough for starting HDR Snapshot and requires a spin between both front and back camera to get it working this commit addresses this issue and HDR works without a spin Change-Id: I0259e7f1970e34ffe5117b1ad1760cc26325c2b9
-rwxr-xr-xcamera/QCamera2/HAL/QCamera2HWI.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/camera/QCamera2/HAL/QCamera2HWI.cpp b/camera/QCamera2/HAL/QCamera2HWI.cpp
index 89e81d8..325f478 100755
--- a/camera/QCamera2/HAL/QCamera2HWI.cpp
+++ b/camera/QCamera2/HAL/QCamera2HWI.cpp
@@ -1586,12 +1586,14 @@ uint8_t QCamera2HardwareInterface::getBufNumRequired(cam_stream_type_t stream_ty
if (minCaptureBuffers == 1 && !mLongshotEnabled) {
// Single ZSL snapshot case
bufferCnt = zslQBuffers + CAMERA_MIN_STREAMING_BUFFERS +
- mParameters.getNumOfExtraBuffersForImageProc();
+ mParameters.getNumOfExtraBuffersForImageProc() +
+ mParameters.getNumOfExtraHDRInBufsIfNeeded();
}
else {
// ZSL Burst or Longshot case
bufferCnt = zslQBuffers + minCircularBufNum +
- mParameters.getNumOfExtraBuffersForImageProc();
+ mParameters.getNumOfExtraBuffersForImageProc() +
+ mParameters.getNumOfExtraHDRInBufsIfNeeded();
}
if (getSensorType() == CAM_SENSOR_YUV &&
!gCamCapability[mCameraId]->use_pix_for_SOC) {