diff options
author | Zeeshan Ali <zeenix@gmail.com> | 2003-01-30 20:24:26 +0000 |
---|---|---|
committer | Zeeshan Ali <zeenix@gmail.com> | 2003-01-30 20:24:26 +0000 |
commit | 1c6ceb5c0bc0e572a47e0889818d06ea54365355 (patch) | |
tree | b6614304f5c72b05a5654e75ae76a0c476539400 /gst/videocrop | |
parent | 0d1b9d28becf937c3514ad1d79f8736d0741991e (diff) | |
download | gst-plugins-bad-1c6ceb5c0bc0e572a47e0889818d06ea54365355.tar.gz gst-plugins-bad-1c6ceb5c0bc0e572a47e0889818d06ea54365355.tar.bz2 gst-plugins-bad-1c6ceb5c0bc0e572a47e0889818d06ea54365355.zip |
The first attempt to support MAS. Dont expect it to work :)
Original commit message from CVS:
The first attempt to support MAS. Dont expect it to work :)
Diffstat (limited to 'gst/videocrop')
-rw-r--r-- | gst/videocrop/gstvideocrop.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gst/videocrop/gstvideocrop.c b/gst/videocrop/gstvideocrop.c index 0a3fb1a5..20a524b5 100644 --- a/gst/videocrop/gstvideocrop.c +++ b/gst/videocrop/gstvideocrop.c @@ -21,6 +21,10 @@ #include <string.h> +#ifdef __MMX__ +#include <mmx.h> +#endif + #define GST_TYPE_VIDEO_CROP \ (gst_video_crop_get_type()) #define GST_VIDEO_CROP(obj) \ @@ -281,17 +285,22 @@ gst_video_crop_i420 (GstVideoCrop *video_crop, GstBuffer *src_buffer, GstBuffer guint8 *srcY, *srcU, *srcV; guint8 *destY, *destU, *destV; gint width = video_crop->crop_width; + gint crop_height = video_crop->crop_height; gint src_stride = video_crop->width; gint frame_size = video_crop->width * video_crop->height; - gint crop_height; gint j; srcY = GST_BUFFER_DATA (src_buffer) + (src_stride * video_crop->crop_y + video_crop->crop_x); destY = GST_BUFFER_DATA (dest_buffer); - crop_height = video_crop->crop_height; - /* copy Y plane first */ + + for (j = crop_height; j; j--) { + memcpy (destY, srcY, width); + srcY += src_stride; + destY += width; + } + for (j = crop_height; j; j--) { memcpy (destY, srcY, width); srcY += src_stride; |