gralloc: Consider subsampling in width and height

This change takes subsampling into account when
calculating the plane width and height in samples.
It fixes mapper VTS failure for case YV12SubsampleMetadata.

CRs-Fixed: 2734403
Change-Id: I7f2fae72207d8fb19cede05f78b486524ed2cd49
diff --git a/gralloc/gr_buf_mgr.cpp b/gralloc/gr_buf_mgr.cpp
index dd9a029..6dcf4ad 100644
--- a/gralloc/gr_buf_mgr.cpp
+++ b/gralloc/gr_buf_mgr.cpp
@@ -661,8 +661,8 @@
     plane_info[i].sampleIncrementInBits = static_cast<int64_t>(plane_layout[i].step * 8);
     plane_info[i].strideInBytes = static_cast<int64_t>(plane_layout[i].stride_bytes);
     plane_info[i].totalSizeInBytes = static_cast<int64_t>(plane_layout[i].size);
-    plane_info[i].widthInSamples = handle->unaligned_width;
-    plane_info[i].heightInSamples = handle->unaligned_height;
+    plane_info[i].widthInSamples = handle->unaligned_width >> plane_layout[i].h_subsampling;
+    plane_info[i].heightInSamples = handle->unaligned_height >> plane_layout[i].v_subsampling;
   }
   *out = plane_info;
   return Error::NONE;