videosink: CB1 set coded width to ge2d  [1/1]

PD#SWPL-195573

Problem:
video mosaic

Solution:
1.set coded width to ge2d
2.do not support rotation when dw=0

Verify:
AP222

Change-Id: I7f6e5a89b062ea50b2c78e8cc23bfe1b90dc4941
Signed-off-by: kaiqiang.xiang <kaiqiang.xiang@amlogic.com>
diff --git a/src/ge2drotation.c b/src/ge2drotation.c
index 66afd0a..43195f6 100644
--- a/src/ge2drotation.c
+++ b/src/ge2drotation.c
@@ -320,6 +320,7 @@
     // pge2dinfo->mem_sec = plugin->secure ? 1 : 0;
     int src_width = meta_data->width;
     int src_height = meta_data->height;
+    int canvas_w = meta_data->stride[0];
 
     int dst_width = ROTbuf->gemBuf.width;
     int dst_height = ROTbuf->gemBuf.height;
@@ -330,7 +331,7 @@
     pge2dinfo->src_info[0].memtype = GE2D_CANVAS_ALLOC;
     pge2dinfo->src_info[0].mem_alloc_type = AML_GE2D_MEM_DMABUF;
     pge2dinfo->src_info[0].plane_number = plane;                             /* When allocating memory, it is a continuous block or separate multiple blocks */
-    pge2dinfo->src_info[0].canvas_w = src_width;                             /* input width */
+    pge2dinfo->src_info[0].canvas_w = canvas_w;                              /* input width */
     pge2dinfo->src_info[0].canvas_h = src_height;                            /* input height */
     pge2dinfo->src_info[0].format = PIXEL_FORMAT_YCbCr_420_SP_NV12;
     pge2dinfo->src_info[0].rect.x = 0;                                       /* input process area x */
diff --git a/src/gstamlvideosink.c b/src/gstamlvideosink.c
index 8885ac8..fcc890d 100644
--- a/src/gstamlvideosink.c
+++ b/src/gstamlvideosink.c
@@ -1008,7 +1008,8 @@
     case PROP_VIDEO_ROTATION:
     {
         int rotationDegree = g_value_get_int(value);
-        if (rotationDegree >= WST_ROTATION_0 && rotationDegree <= WST_ROTATION_270)
+        // dw=0 only AFBC, don't support rotation
+        if (sink_priv->dw_mode != 0 && rotationDegree >= WST_ROTATION_0 && rotationDegree <= WST_ROTATION_270)
         {
           GST_DEBUG_OBJECT(sink, "set rotation degree %d", rotationDegree);
           sink_priv->rot_degree = (ROTATION_DEGREE)rotationDegree;
@@ -1800,7 +1801,8 @@
    gint tagDegree = 0;
    ROTATION_DEGREE rotationDegree = WST_ROTATION_0;
 
-   if ((!sink_priv->rot_enable_property) &&
+   // dw=0 only AFBC, don't support rotation
+   if ((!sink_priv->rot_enable_property) && (sink_priv->dw_mode != 0) &&
        (gst_tag_list_get_string(list, GST_TAG_IMAGE_ORIENTATION, &rotation_tag)))
    {
       if (sscanf(rotation_tag, "rotate-%d", &tagDegree))