MMFMWK-7895 [MX8MQ] Enable Hantro video tiled and compression format.

Hantro output buffer width alignment requirement is different for tile
output.

Signed-off-by: Song Bing <bing.song@nxp.com>
diff --git a/plugins/vpu/gstvpudec.c b/plugins/vpu/gstvpudec.c
index c5742a9..d98022a 100755
--- a/plugins/vpu/gstvpudec.c
+++ b/plugins/vpu/gstvpudec.c
@@ -437,6 +437,21 @@
     VPU_DecGetInitialInfo(dec->vpu_dec_object->handle, &(dec->vpu_dec_object->init_info));
     dec->vpu_dec_object->frame_size = dec->vpu_dec_object->init_info.nFrameSize;
 
+    width_align = DEFAULT_FRAME_BUFFER_ALIGNMENT_H;
+    if (vpu_dec_object->init_info.nPicWidth % width_align)
+      vpu_dec_object->video_align.padding_right = width_align \
+        - vpu_dec_object->init_info.nPicWidth % width_align;
+
+    for (i = 0; i < GST_VIDEO_MAX_PLANES; i++)
+      vpu_dec_object->video_align.stride_align[i] = width_align - 1;
+
+    vpu_dec_object->width_paded = vpu_dec_object->init_info.nPicWidth \
+                                  + vpu_dec_object->video_align.padding_right;
+
+    GST_DEBUG_OBJECT (vpu_dec_object, "width: %d height: %d paded width: %d paded height: %d\n", \
+        vpu_dec_object->init_info.nPicWidth, vpu_dec_object->init_info.nPicHeight, \
+        vpu_dec_object->width_paded, vpu_dec_object->height_paded);
+
     dec->vpu_dec_object->drm_modifier_pre = dec->vpu_dec_object->drm_modifier;
   }
   GST_DEBUG_OBJECT (dec, "used modifier: %lld", dec->vpu_dec_object->drm_modifier);
diff --git a/plugins/vpu/gstvpudecobject.c b/plugins/vpu/gstvpudecobject.c
index 0a105c4..7dd507e 100755
--- a/plugins/vpu/gstvpudecobject.c
+++ b/plugins/vpu/gstvpudecobject.c
@@ -781,6 +781,8 @@
 
   if (IS_AMPHION())
     width_align = DEFAULT_FRAME_BUFFER_ALIGNMENT_H_AMPHION;
+  else if (IS_HANTRO() && vpu_dec_object->implement_config)
+    width_align = DEFAULT_FRAME_BUFFER_ALIGNMENT_H_HANTRO_TILE;
   else
     width_align = DEFAULT_FRAME_BUFFER_ALIGNMENT_H;
   if (vpu_dec_object->init_info.nPicWidth % width_align)