media: platform: mtk-vcodec-mt8167: fix decoder v4l2 framesize alignment

MTK VPU supports h264 microblock size of 16, however, the driver
wrongfully aligns the v4l2 VIDIOC_S_FMT to 64, causing the mismatch
between the internal buffer size and the v4l2 framesize. For example,
qHD (960x540) video would have the buffer in 960x544 while the v4l2
framesize is set as 960x576.

Realign the size with the microblock size.

Bug: 174737545
Change-Id: I44e92fbae4dd49fcbbd920cee11e9cbd379551db
diff --git a/drivers/media/platform/mtk-vcodec-mt8167/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec-mt8167/mtk_vcodec_dec.c
index 72e1254f..e95ea09 100644
--- a/drivers/media/platform/mtk-vcodec-mt8167/mtk_vcodec_dec.c
+++ b/drivers/media/platform/mtk-vcodec-mt8167/mtk_vcodec_dec.c
@@ -768,7 +768,7 @@
 					MTK_VDEC_MAX_W);
 
 		/*
-		 * Find next closer width align 64, heign align 64, size align
+		 * Find next closer width align 16, heign align 16, size align
 		 * 64 rectangle
 		 * Note: This only get default value, the real HW needed value
 		 *       only available when ctx in MTK_STATE_HEADER state
@@ -777,17 +777,17 @@
 		tmp_h = pix_fmt_mp->height;
 		v4l_bound_align_image(&pix_fmt_mp->width,
 					MTK_VDEC_MIN_W,
-					MTK_VDEC_MAX_W, 6,
+					MTK_VDEC_MAX_W, 4,
 					&pix_fmt_mp->height,
 					MTK_VDEC_MIN_H,
-					MTK_VDEC_MAX_H, 6, 9);
+					MTK_VDEC_MAX_H, 4, 6);
 
 		if (pix_fmt_mp->width < tmp_w &&
-			(pix_fmt_mp->width + 64) <= MTK_VDEC_MAX_W)
-			pix_fmt_mp->width += 64;
+			(pix_fmt_mp->width + 16) <= MTK_VDEC_MAX_W)
+			pix_fmt_mp->width += 16;
 		if (pix_fmt_mp->height < tmp_h &&
-			(pix_fmt_mp->height + 64) <= MTK_VDEC_MAX_H)
-			pix_fmt_mp->height += 64;
+			(pix_fmt_mp->height + 16) <= MTK_VDEC_MAX_H)
+			pix_fmt_mp->height += 16;
 
 		mtk_v4l2_debug(0,
 			"before resize width=%d, height=%d, after resize width=%d, height=%d, sizeimage=%d",