summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChangyeon Lee <cyeon.lee@samsung.com>2020-05-07 13:45:36 +0900
committerChangyeon Lee <cyeon.lee@samsung.com>2020-05-07 20:03:37 +0900
commit18a93acaa6e03040bcbf31908254ae91a557fe51 (patch)
tree3d8e4691bfe79bef93e4028508dd2f5080167e1b
parent176d3043f4de16f861396519cab71203881ca1d2 (diff)
downloadlibtbm-exynos-tgm-18a93acaa6e03040bcbf31908254ae91a557fe51.tar.gz
libtbm-exynos-tgm-18a93acaa6e03040bcbf31908254ae91a557fe51.tar.bz2
libtbm-exynos-tgm-18a93acaa6e03040bcbf31908254ae91a557fe51.zip
fix size of uv plane to equal or larger than half y plane size in NV12/21
kernel pp driver check y and uv plane size Change-Id: Ia59b86c180ddbc29d1f9718f12978f9756528da7
-rw-r--r--src/tbm_bufmgr_exynos.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/tbm_bufmgr_exynos.c b/src/tbm_bufmgr_exynos.c
index deadc54..ffb3dee 100644
--- a/src/tbm_bufmgr_exynos.c
+++ b/src/tbm_bufmgr_exynos.c
@@ -1036,6 +1036,7 @@ tbm_exynos_bufmgr_get_plane_data(tbm_backend_bufmgr_data *bufmgr_data,
int _pitch = 0;
int _size = 0;
int _bo_idx = 0;
+ int _cal_size = 0;
TBM_RETURN_VAL_IF_FAIL(bufmgr_exynos != NULL, TBM_ERROR_INVALID_PARAMETER);
@@ -1114,13 +1115,19 @@ tbm_exynos_bufmgr_get_plane_data(tbm_backend_bufmgr_data *bufmgr_data,
bpp = 12;
_offset = 0;
_pitch = SIZE_ALIGN(width, TBM_SURFACE_ALIGNMENT_PITCH_YUV);
- if (plane_idx == 0) {
+ /*if (plane_idx == 0)*/
+ {
_size = MAX(_calc_yplane_nv12(width, height),
_new_calc_yplane_nv12(width, height));
_bo_idx = 0;
- } else if (plane_idx == 1) {
- _size = MAX(_calc_uvplane_nv12(width, height),
+ if (plane_idx == 0)
+ break;
+ }
+ /*else if (plane_idx == 1)*/
+ {
+ _cal_size = MAX(_calc_uvplane_nv12(width, height),
_new_calc_uvplane_nv12(width, height));
+ _size = MAX((_size >> 1), _cal_size);
_bo_idx = 1;
}
break;