From: Wim Taymans Date: Fri, 19 Jul 2013 08:43:38 +0000 (+0200) Subject: Revert "video: respect stride alignment when calculating planes offsets" X-Git-Tag: 1.19.3~511^2~5175 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fad458957963e86e993eba585900c99c92065301;p=platform%2Fupstream%2Fgstreamer.git Revert "video: respect stride alignment when calculating planes offsets" This reverts commit 28e1dadbfaa403679e69f8173d1aa2c7500fd556. Incrementing the offset to make the plane aligned causes the image to be incompatible with what Xv expects. Rather that forcing a memcpy in the xvimagesink we would like to do adjust the left padding instead. --- diff --git a/gst-libs/gst/video/video-info.c b/gst-libs/gst/video/video-info.c index 4f569ed..25fb47a 100644 --- a/gst-libs/gst/video/video-info.c +++ b/gst-libs/gst/video/video-info.c @@ -767,7 +767,6 @@ gst_video_info_align (GstVideoInfo * info, GstVideoAlignment * align) for (i = 0; i < n_planes; i++) { gint vedge, hedge, comp; - guint offset; /* Find the component for this plane, FIXME, we assume the plane number and * component number is the same for now, for scaling the dimensions this is @@ -781,15 +780,10 @@ gst_video_info_align (GstVideoInfo * info, GstVideoAlignment * align) vedge = GST_VIDEO_FORMAT_INFO_SCALE_HEIGHT (vinfo, comp, align->padding_top); - offset = (vedge * info->stride[i]) + - (hedge * GST_VIDEO_FORMAT_INFO_PSTRIDE (vinfo, comp)); - - offset = (offset + align->stride_align[i]) & ~align->stride_align[i]; + GST_DEBUG ("plane %d: comp: %d, hedge %d vedge %d align %d stride %d", i, + comp, hedge, vedge, align->stride_align[i], info->stride[i]); - GST_DEBUG ("plane %d: comp: %d, hedge %d vedge %d align %d stride %d " - "offset %u", i, comp, hedge, vedge, align->stride_align[i], - info->stride[i], offset); - - info->offset[i] += offset; + info->offset[i] += (vedge * info->stride[i]) + + (hedge * GST_VIDEO_FORMAT_INFO_PSTRIDE (vinfo, comp)); } }