From: Sasha Levitskiy Date: Wed, 4 Sep 2013 22:42:06 +0000 (-0700) Subject: Exynos5: Camera HAL v2: Increase the number of gralloc buffers in allocateStream() X-Git-Tag: cm-11.0-XNPH22R-bacon-03d77315ea~1^2~15^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a0ea191c0a5dbe5100e5ca1e1508a263c17e7a19;p=GitHub%2FLineageOS%2Fandroid_hardware_samsung_slsi_exynos5.git Exynos5: Camera HAL v2: Increase the number of gralloc buffers in allocateStream() Bug: 10415750 Signed-off-by: Sasha Levitskiy Change-Id: Ic4a62619ff49617a0b56650f469e45a099ceeb5c --- 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;