From a0ea191c0a5dbe5100e5ca1e1508a263c17e7a19 Mon Sep 17 00:00:00 2001 From: Sasha Levitskiy Date: Wed, 4 Sep 2013 15:42:06 -0700 Subject: [PATCH] Exynos5: Camera HAL v2: Increase the number of gralloc buffers in allocateStream() Bug: 10415750 Signed-off-by: Sasha Levitskiy Change-Id: Ic4a62619ff49617a0b56650f469e45a099ceeb5c --- libcamera2/ExynosCameraHWInterface2.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/libcamera2/ExynosCameraHWInterface2.cpp b/libcamera2/ExynosCameraHWInterface2.cpp index 714edb7..6c0739b 100644 --- a/libcamera2/ExynosCameraHWInterface2.cpp +++ b/libcamera2/ExynosCameraHWInterface2.cpp @@ -1728,7 +1728,7 @@ int ExynosCameraHWInterface2::allocateStream(uint32_t width, uint32_t height, in *usage = GRALLOC_USAGE_SW_WRITE_OFTEN; if (m_wideAspect) *usage |= GRALLOC_USAGE_PRIVATE_CHROMA; - *max_buffers = 6; + *max_buffers = 7; newParameters.width = width; newParameters.height = height; @@ -1775,7 +1775,7 @@ int ExynosCameraHWInterface2::allocateStream(uint32_t width, uint32_t height, in *usage = GRALLOC_USAGE_SW_WRITE_OFTEN; if (m_wideAspect) *usage |= GRALLOC_USAGE_PRIVATE_CHROMA; - *max_buffers = 6; + *max_buffers = 7; subParameters->type = SUBSTREAM_TYPE_RECORD; subParameters->width = width; @@ -1819,13 +1819,12 @@ int ExynosCameraHWInterface2::allocateStream(uint32_t width, uint32_t height, in m_streamThreadInitialize((SignalDrivenThread*)AllocatedStream); *format_actual = HAL_PIXEL_FORMAT_EXYNOS_YV12; - *max_buffers = 6; *format_actual = HAL_PIXEL_FORMAT_YCbCr_422_I; // YUYV *usage = GRALLOC_USAGE_SW_WRITE_OFTEN; if (m_wideAspect) *usage |= GRALLOC_USAGE_PRIVATE_CHROMA; - *max_buffers = 6; + *max_buffers = 7; newParameters.width = width; newParameters.height = height; @@ -1874,13 +1873,12 @@ int ExynosCameraHWInterface2::allocateStream(uint32_t width, uint32_t height, in m_streamThreadInitialize((SignalDrivenThread*)AllocatedStream); *format_actual = HAL_PIXEL_FORMAT_EXYNOS_YV12; - *max_buffers = 6; *format_actual = HAL_PIXEL_FORMAT_YCbCr_422_I; // YUYV *usage = GRALLOC_USAGE_SW_WRITE_OFTEN; if (m_wideAspect) *usage |= GRALLOC_USAGE_PRIVATE_CHROMA; - *max_buffers = 6; + *max_buffers = 7; newParameters.width = width; newParameters.height = height; @@ -1934,7 +1932,7 @@ int ExynosCameraHWInterface2::allocateStream(uint32_t width, uint32_t height, in *usage = GRALLOC_USAGE_SW_WRITE_OFTEN; if (m_wideAspect) *usage |= GRALLOC_USAGE_PRIVATE_CHROMA; - *max_buffers = 4; + *max_buffers = 5; subParameters->type = SUBSTREAM_TYPE_JPEG; subParameters->width = width; @@ -1972,7 +1970,7 @@ int ExynosCameraHWInterface2::allocateStream(uint32_t width, uint32_t height, in *usage = GRALLOC_USAGE_SW_WRITE_OFTEN; if (m_wideAspect) *usage |= GRALLOC_USAGE_PRIVATE_CHROMA; - *max_buffers = 6; + *max_buffers = 7; subParameters->type = SUBSTREAM_TYPE_PRVCB; subParameters->width = width; -- 2.20.1