summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChangyeon Lee <cyeon.lee@samsung.com>2018-08-03 13:36:41 +0900
committerChangyeon Lee <cyeon.lee@samsung.com>2018-08-09 16:59:55 +0900
commitf66b14193d7e88b1572344712f4ec9649275e77c (patch)
treeb9256c81e1010fdbc938d229437f86e9da6ba0d7
parent36a3a5a2b329ef26b6636ddfc77b38783995cfbb (diff)
downloadlibtbm-exynos-tgm-f66b14193d7e88b1572344712f4ec9649275e77c.tar.gz
libtbm-exynos-tgm-f66b14193d7e88b1572344712f4ec9649275e77c.tar.bz2
libtbm-exynos-tgm-f66b14193d7e88b1572344712f4ec9649275e77c.zip
allocate 2 bos of NV12 format
Change-Id: I24ef8ab11c09856e57e97873a694ccaca181bfdd
-rw-r--r--src/tbm_bufmgr_exynos.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/tbm_bufmgr_exynos.c b/src/tbm_bufmgr_exynos.c
index af79cb1..9ae4285 100644
--- a/src/tbm_bufmgr_exynos.c
+++ b/src/tbm_bufmgr_exynos.c
@@ -918,6 +918,7 @@ _exynos_bo_handle(tbm_bo_exynos bo_exynos, int device)
return bo_handle;
}
+#if 0
static int
_new_calc_plane_nv12(int width, int height)
{
@@ -970,6 +971,7 @@ _new_calc_uvplane_nv12(int width, int height)
height) >> 1) + S5P_FIMV_D_ALIGN_PLANE_SIZE,
TBM_SURFACE_ALIGNMENT_PLANE_NV12);
}
+#endif
static tbm_bufmgr_capability
tbm_exynos_bufmgr_get_capabilities(tbm_backend_bufmgr_data *bufmgr_data, tbm_error_e *error)
@@ -1115,8 +1117,7 @@ tbm_exynos_bufmgr_get_plane_data(tbm_backend_bufmgr_data *bufmgr_data,
{
_offset = 0;
_pitch = SIZE_ALIGN(width, TBM_SURFACE_ALIGNMENT_PITCH_YUV);
- _size = MAX(_calc_yplane_nv12(width, height), _new_calc_yplane_nv12(width,
- height));
+ _size = SIZE_ALIGN((SIZE_ALIGN(width, 16) * SIZE_ALIGN(height, 16) * 3) / 2, 512);
_bo_idx = 0;
if (plane_idx == 0)
break;
@@ -1125,9 +1126,8 @@ tbm_exynos_bufmgr_get_plane_data(tbm_backend_bufmgr_data *bufmgr_data,
{
_offset += _size;
_pitch = SIZE_ALIGN(width, TBM_SURFACE_ALIGNMENT_PITCH_YUV);
- _size = MAX(_calc_uvplane_nv12(width, height), _new_calc_uvplane_nv12(width,
- height));
- _bo_idx = 0;
+ _size = SIZE_ALIGN((SIZE_ALIGN(width, 16) * SIZE_ALIGN(height, 16) * 3) / 2, 512);
+ _bo_idx = 1;
}
break;
case TBM_FORMAT_NV21: