Requested 64 bytes stride aligned GrallocBuffer.

BZ: 178523

Issue: Currently we let GrallocBuffer self decide
the strides of allocated buffers and it was found
that those might be always be 64 aligned.

Solution: Requested probable larger buffers and
we guaranteed allocated ones' alignment.

Change-Id: I2de3fd94c764fa84fab340bb03e56405f1520993
Signed-off-by: Jing SUN <jing.a.sun@intel.com>
diff --git a/imageencoder/test/main.cpp b/imageencoder/test/main.cpp
index a1eeb02..ad53c7b 100644
--- a/imageencoder/test/main.cpp
+++ b/imageencoder/test/main.cpp
@@ -282,7 +282,10 @@
 		aligned_source_buffer = (void *)((unsigned int)source_buffer -
 					((unsigned int)source_buffer)%4096 + 4096);
 	} else { /* gralloc */
-		gralloc_buffer = new GraphicBuffer(width, height, VA_FOURCC_NV12,
+		/* TopazHP requires stride must be an integral multiple of 64. */
+		stride = (width+0x3f) & (~0x3f);
+
+		gralloc_buffer = new GraphicBuffer(stride, height, VA_FOURCC_NV12,
 						GraphicBuffer::USAGE_HW_RENDER);
 		if (NULL == gralloc_buffer) {
 			fprintf(stderr, "Allocating GraphicBuffer failed!\n");