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));
}