From: Boram Park Date: Thu, 23 Mar 2017 09:20:10 +0000 (+0900) Subject: correct plane's offset X-Git-Tag: accepted/tizen/mobile/20170324.023938~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=78dfd182075a594eab621b54f8e0788919da12d9;p=platform%2Fadaptation%2Fspreadtrum%2Flibtbm-sprd.git correct plane's offset Change-Id: If5ee84530b1785d40eaec8fbd833ef2036ed753b --- diff --git a/src/tbm_bufmgr_sprd.c b/src/tbm_bufmgr_sprd.c index ab15e62..2de5855 100644 --- a/src/tbm_bufmgr_sprd.c +++ b/src/tbm_bufmgr_sprd.c @@ -1539,14 +1539,19 @@ tbm_sprd_surface_get_plane_data(int width, int height, case TBM_FORMAT_NV12: case TBM_FORMAT_NV21: bpp = 12; - if (plane_idx == 0) { +// if (plane_idx == 0) + { _offset = 0; _pitch = SIZE_ALIGN(width , TBM_SURFACE_ALIGNMENT_PITCH_YUV); _align_height = SIZE_ALIGN(height, TBM_SURFACE_ALIGNMENT_PITCH_YUV); _size = SIZE_ALIGN(_pitch * _align_height, TBM_SURFACE_ALIGNMENT_PLANE); _bo_idx = 0; - } else if (plane_idx == 1) { - _offset = width * height; + if (plane_idx == 0) + break; + } +// else if (plane_idx == 1) + { + _offset = _size; _pitch = SIZE_ALIGN(width , TBM_SURFACE_ALIGNMENT_PITCH_YUV / 2); _align_height = SIZE_ALIGN(height / 2, TBM_SURFACE_ALIGNMENT_PITCH_YUV); _size = SIZE_ALIGN(_pitch * _align_height, TBM_SURFACE_ALIGNMENT_PLANE);