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

Hantro can't output tiled when interlace.

Signed-off-by: Song Bing <bing.song@nxp.com>
diff --git a/plugins/vpu/gstvpudec.c b/plugins/vpu/gstvpudec.c
index d98022a..9ce437b 100755
--- a/plugins/vpu/gstvpudec.c
+++ b/plugins/vpu/gstvpudec.c
@@ -422,7 +422,8 @@
     }
   }
 
-  if (IS_HANTRO() && !dec->vpu_dec_object->implement_config)
+  if (IS_HANTRO() && (!dec->vpu_dec_object->implement_config
+        || dec->vpu_dec_object->force_linear))
     dec->vpu_dec_object->drm_modifier = 0;
   //FIXME: handle video track selection.
   if (IS_HANTRO() && dec->vpu_dec_object->drm_modifier_pre != dec->vpu_dec_object->drm_modifier) {
@@ -448,7 +449,7 @@
     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", \
+    GST_DEBUG_OBJECT (dec, "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);
 
diff --git a/plugins/vpu/gstvpudecobject.c b/plugins/vpu/gstvpudecobject.c
index 7dd507e..f03af36 100755
--- a/plugins/vpu/gstvpudecobject.c
+++ b/plugins/vpu/gstvpudecobject.c
@@ -517,6 +517,7 @@
   open_param->nChromaInterleave = 0;
   open_param->nMapType = 0;
   vpu_dec_object->implement_config = FALSE;
+  vpu_dec_object->force_linear = FALSE;
   if ((IS_HANTRO() && (open_param->CodecFormat == VPU_V_HEVC
         || open_param->CodecFormat == VPU_V_VP9
         || open_param->CodecFormat == VPU_V_AVC))
@@ -758,6 +759,10 @@
   if (fmt ==  GST_VIDEO_FORMAT_NV12 && vpu_dec_object->init_info.nBitDepth == 10){
     fmt = GST_VIDEO_FORMAT_NV12_10LE;
   }
+  if (IS_HANTRO() && vpu_dec_object->init_info.nInterlace
+      && vpu_dec_object->implement_config) {
+    vpu_dec_object->force_linear = TRUE;
+  }
 
   GST_INFO_OBJECT(vpu_dec_object, "using %s as video output format", gst_video_format_to_string(fmt));
 
@@ -794,7 +799,7 @@
     height_align = DEFAULT_FRAME_BUFFER_ALIGNMENT_V_AMPHION;
   else
     height_align = DEFAULT_FRAME_BUFFER_ALIGNMENT_V;
-  if (vpu_dec_object->init_info.nInterlace)
+  if (!IS_HANTRO() && vpu_dec_object->init_info.nInterlace)
     height_align <<= 1;
   if (vpu_dec_object->init_info.nPicHeight % height_align)
     vpu_dec_object->video_align.padding_bottom = height_align \
diff --git a/plugins/vpu/gstvpudecobject.h b/plugins/vpu/gstvpudecobject.h
index 8af2975..51e6c7c 100755
--- a/plugins/vpu/gstvpudecobject.h
+++ b/plugins/vpu/gstvpudecobject.h
@@ -96,6 +96,7 @@
   guint64 drm_modifier;
   guint64 drm_modifier_pre;
   gboolean implement_config;
+  gboolean force_linear;
   gboolean use_new_tsm;
   gboolean use_my_pool;
   gboolean use_my_allocator;