summaryrefslogtreecommitdiff
path: root/src/xine-engine
diff options
context:
space:
mode:
authorJames Stembridge <jstembridge@users.sourceforge.net>2004-01-07 22:22:54 +0000
committerJames Stembridge <jstembridge@users.sourceforge.net>2004-01-07 22:22:54 +0000
commit1797cb330ae3713163cd775104781bebceb6855c (patch)
treee51aeaac4cb1fbddfa5fe3ac39a5dd017372cd68 /src/xine-engine
parentffc98f0d9de67cb1447cbc5501ad2293d65d6d40 (diff)
downloadxine-lib-1797cb330ae3713163cd775104781bebceb6855c.tar.gz
xine-lib-1797cb330ae3713163cd775104781bebceb6855c.tar.bz2
use frame copying functions
CVS patchset: 6010 CVS date: 2004/01/07 22:22:54
Diffstat (limited to 'src/xine-engine')
-rw-r--r--src/xine-engine/video_out.c29
-rw-r--r--src/xine-engine/xine.c30
2 files changed, 41 insertions, 18 deletions
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index 594a8199a..c23ceb651 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: video_out.c,v 1.184 2004/01/07 19:52:43 mroi Exp $
+ * $Id: video_out.c,v 1.185 2004/01/07 22:22:54 jstembridge Exp $
*
* frame allocation / queuing / scheduling / output functions
*/
@@ -552,15 +552,26 @@ static vo_frame_t * duplicate_frame( vos_t *this, vo_frame_t *img ) {
image_size = img->pitches[0] * img->height;
if (img->format == XINE_IMGFMT_YV12) {
- if (img->base[0])
- xine_fast_memcpy(dupl->base[0], img->base[0], image_size);
- if (img->base[1])
- xine_fast_memcpy(dupl->base[1], img->base[1], img->pitches[1] * ((img->height+1)/2));
- if (img->base[2])
- xine_fast_memcpy(dupl->base[2], img->base[2], img->pitches[2] * ((img->height+1)/2));
+ yv12_to_yv12(
+ /* Y */
+ img->base[0], img->pitches[0],
+ dupl->base[0], dupl->pitches[0],
+ /* U */
+ img->base[1], img->pitches[1],
+ dupl->base[1], dupl->pitches[1],
+ /* V */
+ img->base[2], img->pitches[2],
+ dupl->base[2], dupl->pitches[2],
+ /* width x height */
+ img->width, img->height);
} else {
- if (img->base[0])
- xine_fast_memcpy(dupl->base[0], img->base[0], image_size);
+ yuy2_to_yuy2(
+ /* src */
+ img->base[0], img->pitches[0],
+ /* dst */
+ dupl->base[0], dupl->pitches[0],
+ /* width x height */
+ img->width, img->height);
}
dupl->bad_frame = 0;
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index fcc04cebd..281cb0ac0 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2000-2003 the xine project
+ * Copyright (C) 2000-2004 the xine project
*
* This file is part of xine, a free video player.
*
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.c,v 1.279 2004/01/04 00:00:58 storri Exp $
+ * $Id: xine.c,v 1.280 2004/01/07 22:22:54 jstembridge Exp $
*/
/*
@@ -1500,16 +1500,28 @@ int xine_get_current_frame (xine_stream_t *stream, int *width, int *height,
switch (frame->format) {
case XINE_IMGFMT_YV12:
- memcpy (img, frame->base[0], frame->width*frame->height);
- memcpy (img+frame->width*frame->height, frame->base[1],
- frame->width*frame->height/4);
- memcpy (img+frame->width*frame->height+frame->width*frame->height/4,
- frame->base[2],
- frame->width*frame->height/4);
+ yv12_to_yv12(
+ /* Y */
+ frame->base[0], frame->pitches[0],
+ img, frame->width,
+ /* U */
+ frame->base[1], frame->pitches[1],
+ img+frame->width*frame->height, frame->width/2,
+ /* V */
+ frame->base[2], frame->pitches[2],
+ img+frame->width*frame->height+frame->width*frame->height/4, frame->width/2,
+ /* width x height */
+ frame->width, frame->height);
break;
case XINE_IMGFMT_YUY2:
- memcpy (img, frame->base[0], frame->width * frame->height * 2);
+ yuy2_to_yuy2(
+ /* src */
+ frame->base[0], frame->pitches[0],
+ /* dst */
+ img, frame->width*2,
+ /* width x height */
+ frame->width, frame->height);
break;
default: