Fixed Issue 3423072: Imported 1080x720 video clips present distorted view in preview

Change-Id: I38f2a042d66f7b639510d503321296e915689f7a
diff --git a/libvideoeditor/lvpp/VideoEditorTools.cpp b/libvideoeditor/lvpp/VideoEditorTools.cpp
index 35ca1c3..3c3a7b8 100755
--- a/libvideoeditor/lvpp/VideoEditorTools.cpp
+++ b/libvideoeditor/lvpp/VideoEditorTools.cpp
@@ -3074,21 +3074,21 @@
     //Y plane

     plane[0].u_width = width;

     plane[0].u_height = height;

-    plane[0].u_stride = plane[0].u_width;

+    plane[0].u_stride = reportedWidth;

     plane[0].u_topleft = 0;

     plane[0].pac_data = buffer;

 

     // U plane

     plane[1].u_width = width/2;

     plane[1].u_height = height/2;

-    plane[1].u_stride = plane[1].u_width;

+    plane[1].u_stride = reportedWidth >> 1;

     plane[1].u_topleft = 0;

     plane[1].pac_data = buffer+(reportedWidth*reportedHeight);

 

     // V Plane

     plane[2].u_width = width/2;

     plane[2].u_height = height/2;

-    plane[2].u_stride = plane[2].u_width;

+    plane[2].u_stride = reportedWidth >> 1;

     plane[2].u_topleft = 0;

     plane[2].pac_data = plane[1].pac_data + ((reportedWidth/2)*(reportedHeight/2));

 }

diff --git a/libvideoeditor/vss/mcs/inc/M4MCS_ErrorCodes.h b/libvideoeditor/vss/mcs/inc/M4MCS_ErrorCodes.h
index 1c66a75..b9d60d2 100755
--- a/libvideoeditor/vss/mcs/inc/M4MCS_ErrorCodes.h
+++ b/libvideoeditor/vss/mcs/inc/M4MCS_ErrorCodes.h
@@ -59,6 +59,10 @@
 #define M4MCS_ERR_INPUT_FILE_CONTAINS_NO_SUPPORTED_STREAM   M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x01)
 /* The input file is invalid/corrupted */
 #define M4MCS_ERR_INVALID_INPUT_FILE                        M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x02)
+/* The input video frame size parameter is undefined */
+#define M4MCS_ERR_INVALID_INPUT_VIDEO_FRAME_SIZE            M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x03)
+/* The input video frame size is non multiple of 16 */
+#define M4MCS_ERR_INPUT_VIDEO_SIZE_NON_X16                  M4OSA_ERR_CREATE( M4_ERR, M4MCS, 0x04)
 
 
 /* ----- SET OUTPUT PARAMS ERRORS ----- */