Commit 9e2f23c5 authored by Wim Taymans's avatar Wim Taymans

effectv: fix strides

parent e310ee82
......@@ -322,7 +322,7 @@ gst_agingtv_transform_frame (GstVideoFilter * filter, GstVideoFrame * in_frame,
width = GST_VIDEO_FRAME_WIDTH (in_frame);
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
stride = GST_VIDEO_FRAME_PLANE_STRIDE (in_frame, 0);
video_size = stride * height;
video_size = stride * height / 4;
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
......
......@@ -139,6 +139,7 @@ gst_dicetv_transform_frame (GstVideoFilter * vfilter, GstVideoFrame * in_frame,
g_map_width = filter->g_map_width;
dicemap = filter->dicemap;
video_stride /= 4;
map_i = 0;
for (map_y = 0; map_y < g_map_height; map_y++) {
......
......@@ -129,7 +129,7 @@ gst_revtv_transform_frame (GstVideoFilter * vfilter, GstVideoFrame * in_frame,
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
/* Clear everything to black */
memset (dest, 0, dstride * height * sizeof (guint32));
memset (dest, 0, dstride * height);
GST_OBJECT_LOCK (filter);
linespace = filter->linespace;
......@@ -138,7 +138,7 @@ gst_revtv_transform_frame (GstVideoFilter * vfilter, GstVideoFrame * in_frame,
/* draw the offset lines */
for (y = 0; y < height; y += linespace) {
for (x = 0; x <= width; x++) {
nsrc = src + (y * sstride) + x;
nsrc = src + (y * sstride / 4) + x;
/* Calc Y Value for curpix */
R = ((*nsrc) & 0xff0000) >> (16 - 1);
......@@ -148,7 +148,7 @@ gst_revtv_transform_frame (GstVideoFilter * vfilter, GstVideoFrame * in_frame,
yval = y - ((short) (R + G + B) / vscale);
if (yval > 0) {
dest[x + (yval * dstride)] = THE_COLOR;
dest[x + (yval * dstride / 4)] = THE_COLOR;
}
}
}
......
......@@ -154,8 +154,8 @@ gst_warptv_transform_frame (GstVideoFilter * filter, GstVideoFrame * in_frame,
src = GST_VIDEO_FRAME_PLANE_DATA (in_frame, 0);
dest = GST_VIDEO_FRAME_PLANE_DATA (out_frame, 0);
sstride = GST_VIDEO_FRAME_PLANE_STRIDE (in_frame, 0) / 4;
dstride = GST_VIDEO_FRAME_PLANE_STRIDE (out_frame, 0) / 4;
sstride = GST_VIDEO_FRAME_PLANE_STRIDE (in_frame, 0);
dstride = GST_VIDEO_FRAME_PLANE_STRIDE (out_frame, 0);
width = GST_VIDEO_FRAME_WIDTH (in_frame);
height = GST_VIDEO_FRAME_HEIGHT (in_frame);
......@@ -198,9 +198,9 @@ gst_warptv_transform_frame (GstVideoFilter * filter, GstVideoFrame * in_frame,
else if (dy > maxy)
dy = maxy;
dest[x] = src[dy * sstride + dx];
dest[x] = src[dy * sstride / 4 + dx];
}
dest += dstride;
dest += dstride / 4;
}
warptv->tval = (warptv->tval + 1) & 511;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment