summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChangyeon Lee <cyeon.lee@samsung.com>2017-12-05 19:15:33 +0900
committerChangyeon Lee <cyeon.lee@samsung.com>2017-12-07 13:40:57 +0900
commitb0bd5adce8d2bb4175de9be6ff5b08649796b1c0 (patch)
tree7a29cf03ea9b6897e3631c4982fe0b04839fb453
parent91c7758540d141044ed29f36c861525261fe60b0 (diff)
downloadlibtbm-vc4-b0bd5adce8d2bb4175de9be6ff5b08649796b1c0.tar.gz
libtbm-vc4-b0bd5adce8d2bb4175de9be6ff5b08649796b1c0.tar.bz2
libtbm-vc4-b0bd5adce8d2bb4175de9be6ff5b08649796b1c0.zip
use one bo for NV12 format
Change-Id: I22a0661efcd170f99d78401017f98e832ca08010
-rw-r--r--src/tbm_bufmgr_vc4.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tbm_bufmgr_vc4.c b/src/tbm_bufmgr_vc4.c
index 5a4bddc..f963101 100644
--- a/src/tbm_bufmgr_vc4.c
+++ b/src/tbm_bufmgr_vc4.c
@@ -1820,11 +1820,12 @@ tbm_vc4_surface_get_plane_data(int width, int height,
height));
_bo_idx = 0;
} else if (plane_idx == 1) {
- _offset = 0;
+ _offset = MAX(_calc_yplane_nv12(width, height), _new_calc_yplane_nv12(width,
+ height));
_pitch = SIZE_ALIGN(width, TBM_SURFACE_ALIGNMENT_PITCH_YUV / 2);
_size = MAX(_calc_uvplane_nv12(width, height), _new_calc_uvplane_nv12(width,
height));
- _bo_idx = 1;
+ _bo_idx = 0;
}
break;
case TBM_FORMAT_NV21: