Make width aligned with 16 during calculating marcoblocks

BZ: 97703

For some special width/height encode setting, width isn't aligned with 16, but during calculating marcoblocks
we need to use 16 aligned marcoblcok address

Change-Id: I50fe4bfcf66a1963480764404304780a596841a4
Signed-off-by: Zhao Liang <leo.zhao@intel.com>
Reviewed-on: http://android.intel.com:8080/104295
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/VideoEncoderAVC.cpp b/videoencoder/VideoEncoderAVC.cpp
index f84d11c..8d4b8aa 100644
--- a/videoencoder/VideoEncoderAVC.cpp
+++ b/videoencoder/VideoEncoderAVC.cpp
@@ -1174,9 +1174,9 @@
         }
 
         // starting MB row number for this slice, suppose macroblock 16x16
-        currentSlice->macroblock_address = startRowInMB * mComParams.resolution.width /16;
+        currentSlice->macroblock_address = startRowInMB * ((mComParams.resolution.width + 0xf) & ~0xf) / 16;
         // slice height measured in MB
-        currentSlice->num_macroblocks = actualSliceHeightInMB * mComParams.resolution.width /16;
+        currentSlice->num_macroblocks = actualSliceHeightInMB * ((mComParams.resolution.width + 0xf) & ~0xf) / 16;
         if(task->type == FTYPE_I||task->type == FTYPE_IDR)
             currentSlice->slice_type = 2;
         else if(task->type == FTYPE_P)