MMFMWK-8179 Add RGB input support for vpu encoder plugin

1.add input format (RGBA,RGBx,RGB16,RGB15,BGRA,BGRx,BGR16,UYVY) support
  and remove unsupported YV12 for h1 encoder sink pad.
2.modify the virtual address of each plane to its real plane address
 instead of component.

Signed-off-by: Hou Qi <qi.hou@nxp.com>
diff --git a/ext-includes/vpu_wrapper.h b/ext-includes/vpu_wrapper.h
old mode 100755
new mode 100644
index d491285..8c4803c
--- a/ext-includes/vpu_wrapper.h
+++ b/ext-includes/vpu_wrapper.h
@@ -508,6 +508,13 @@
 	VPU_COLOR_422V=2,
 	VPU_COLOR_444=3,	
 	VPU_COLOR_400=4,
+	VPU_COLOR_422YUYV=13,
+	VPU_COLOR_422UYVY=14,
+	VPU_COLOR_ARGB8888=15,
+	VPU_COLOR_BGRA8888=16,
+	VPU_COLOR_RGB565=17,
+	VPU_COLOR_RGB555=18,
+	VPU_COLOR_BGR565=19,
 }VpuColorFormat;
 
 typedef enum {
diff --git a/plugins/vpu/gstvpu.c b/plugins/vpu/gstvpu.c
old mode 100755
new mode 100644
index e744f2b..0526acd
--- a/plugins/vpu/gstvpu.c
+++ b/plugins/vpu/gstvpu.c
@@ -152,9 +152,9 @@
     vpu_frame->pbufCr = vpu_frame->pbufCb + \
       (GST_VIDEO_FRAME_COMP_DATA (&frame, 2) - GST_VIDEO_FRAME_COMP_DATA (&frame, 1));
 
-    vpu_frame->pbufVirtY = GST_VIDEO_FRAME_COMP_DATA (&frame, 0);
-    vpu_frame->pbufVirtCb = GST_VIDEO_FRAME_COMP_DATA (&frame, 1);
-    vpu_frame->pbufVirtCr = GST_VIDEO_FRAME_COMP_DATA (&frame, 2);
+    vpu_frame->pbufVirtY = GST_VIDEO_FRAME_PLANE_DATA (&frame, 0);
+    vpu_frame->pbufVirtCb = GST_VIDEO_FRAME_PLANE_DATA (&frame, 1);
+    vpu_frame->pbufVirtCr = GST_VIDEO_FRAME_PLANE_DATA (&frame, 2);
 
     gst_video_frame_unmap (&frame);
   }
diff --git a/plugins/vpu/gstvpuenc.c b/plugins/vpu/gstvpuenc.c
old mode 100755
new mode 100644
index e76a05b..171e29a
--- a/plugins/vpu/gstvpuenc.c
+++ b/plugins/vpu/gstvpuenc.c
@@ -112,7 +112,7 @@
 	GST_STATIC_CAPS(
 		"video/x-raw,"
 #ifdef USE_H1_ENC
-		"format = (string) { NV12, I420, YV12, YUY2 }, "
+		"format = (string) { NV12, I420, YUY2, UYVY, RGBA, RGBx, RGB16, RGB15, BGRA, BGRx, BGR16 }, "
 #else
         "format = (string) { NV12, I420, YV12 }, "
 #endif
@@ -736,7 +736,20 @@
       enc->open_param.eColorFormat = VPU_COLOR_420;
     } else if (!g_strcmp0(video_format_str, "YUY2")) {
       enc->open_param.nChromaInterleave = 1;
-      enc->open_param.eColorFormat = VPU_COLOR_422H;
+      enc->open_param.eColorFormat = VPU_COLOR_422YUYV;
+    } else if (!g_strcmp0(video_format_str, "UYVY")) {
+      enc->open_param.nChromaInterleave = 1;
+      enc->open_param.eColorFormat = VPU_COLOR_422UYVY;
+    } else if (!g_strcmp0(video_format_str, "RGBA") || !g_strcmp0(video_format_str, "RGBx")) {
+      enc->open_param.eColorFormat = VPU_COLOR_ARGB8888;
+    } else if (!g_strcmp0(video_format_str, "BGRA") || !g_strcmp0(video_format_str, "BGRx")) {
+      enc->open_param.eColorFormat = VPU_COLOR_BGRA8888;
+    }else if (!g_strcmp0(video_format_str, "RGB16")) {
+      enc->open_param.eColorFormat = VPU_COLOR_RGB565;
+    } else if (!g_strcmp0(video_format_str, "RGB15")) {
+      enc->open_param.eColorFormat = VPU_COLOR_RGB555;
+    } else if (!g_strcmp0(video_format_str, "BGR16")) {
+      enc->open_param.eColorFormat = VPU_COLOR_BGR565;
     }
   }