Fix plane data YUV410 YVU410 format 27/67527/2 accepted/tizen/common/20160427.144319 accepted/tizen/ivi/20160428.002615 accepted/tizen/mobile/20160428.004855 accepted/tizen/tv/20160428.002441 accepted/tizen/wearable/20160428.002742 submit/tizen/20160427.080802
authorChangyeon Lee <cyeon.lee@samsung.com>
Wed, 27 Apr 2016 07:04:12 +0000 (16:04 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Wed, 27 Apr 2016 08:07:15 +0000 (01:07 -0700)
Change-Id: I04ad5e46b0163dbe87d8caddd84e884abe6b9b2b

src/tbm_bufmgr_exynos.c

index e83d5ae..bbff5de 100644 (file)
@@ -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: