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);
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++) {
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;
/* 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);
yval = y - ((short) (R + G + B) / vscale);
if (yval > 0) {
- dest[x + (yval * dstride)] = THE_COLOR;
+ dest[x + (yval * dstride / 4)] = THE_COLOR;
}
}
}
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);
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;