From: Changyeon Lee Date: Wed, 27 Apr 2016 07:04:12 +0000 (+0900) Subject: Fix plane data YUV410 YVU410 format X-Git-Tag: submit/tizen/20160427.080802^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9c5946a47b8c5604531168eee7b1ad610dd23522;p=platform%2Fadaptation%2Fsamsung_exynos%2Flibtbm-exynos.git Fix plane data YUV410 YVU410 format Change-Id: I04ad5e46b0163dbe87d8caddd84e884abe6b9b2b --- diff --git a/src/tbm_bufmgr_exynos.c b/src/tbm_bufmgr_exynos.c index e83d5ae..bbff5de 100644 --- a/src/tbm_bufmgr_exynos.c +++ b/src/tbm_bufmgr_exynos.c @@ -1934,7 +1934,31 @@ tbm_exynos_surface_get_plane_data(int width, int height, case TBM_FORMAT_YUV410: case TBM_FORMAT_YVU410: bpp = 9; - _bo_idx = 0; + /*if(plane_idx == 0)*/ + { + _offset = 0; + _pitch = SIZE_ALIGN(width, TBM_SURFACE_ALIGNMENT_PITCH_YUV); + _size = SIZE_ALIGN(_pitch * height, TBM_SURFACE_ALIGNMENT_PLANE); + _bo_idx = 0; + if (plane_idx == 0) + break; + } + /*else if(plane_idx == 1)*/ + { + _offset += _size; + _pitch = SIZE_ALIGN(width / 4, TBM_SURFACE_ALIGNMENT_PITCH_YUV / 4); + _size = SIZE_ALIGN(_pitch * (height / 4), TBM_SURFACE_ALIGNMENT_PLANE); + _bo_idx = 0; + if (plane_idx == 1) + break; + } + /*else if (plane_idx == 2)*/ + { + _offset += _size; + _pitch = SIZE_ALIGN(width / 4, TBM_SURFACE_ALIGNMENT_PITCH_YUV / 4); + _size = SIZE_ALIGN(_pitch * (height / 4), TBM_SURFACE_ALIGNMENT_PLANE); + _bo_idx = 0; + } break; case TBM_FORMAT_YUV411: case TBM_FORMAT_YVU411: