Fix the 720P corruption issue

BZ: 93083

The height of the ref/recon surface should be 32 alignment on the merrifield platform.
Signed-off-by: jiguoliang <guoliang.ji@intel.com>

Change-Id: I03e9a01b1cb02a9dbbd3f0499ff65381f6fa1f9e
Reviewed-on: http://android.intel.com:8080/97842
Reviewed-by: cactus <cactus@intel.com>
Reviewed-by: Yuan, Shengquan <shengquan.yuan@intel.com>
Reviewed-by: Ji, Guoliang <guoliang.ji@intel.com>
Reviewed-by: Zhao, Leo <leo.zhao@intel.com>
Reviewed-by: Shi, PingX <pingx.shi@intel.com>
Tested-by: Shi, PingX <pingx.shi@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
diff --git a/videoencoder/VideoEncoderBase.cpp b/videoencoder/VideoEncoderBase.cpp
index 04250ab..3442958 100644
--- a/videoencoder/VideoEncoderBase.cpp
+++ b/videoencoder/VideoEncoderBase.cpp
@@ -157,13 +157,15 @@
 
     VASurfaceID surfaces[2];
     VASurfaceAttributeTPI attribute_tpi;
-    uint32_t stride_aligned;
-    if(mAutoReference == false)
+    uint32_t stride_aligned, height_aligned;
+    if(mAutoReference == false){
         stride_aligned = ((mComParams.resolution.width + 15) / 16 ) * 16;
-    else
+        height_aligned = ((mComParams.resolution.height + 15) / 16 ) * 16;
+    }else{
         stride_aligned = ((mComParams.resolution.width + 63) / 64 ) * 64;  //on Merr, stride must be 64 aligned.
+        height_aligned = ((mComParams.resolution.height + 31) / 32 ) * 32;
+    }
 
-    uint32_t height_aligned = ((mComParams.resolution.height + 15) / 16 ) * 16;
 
     attribute_tpi.size = stride_aligned * height_aligned * 3 / 2;
     attribute_tpi.luma_stride = stride_aligned;