summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2001-10-21 00:18:22 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2001-10-21 00:18:22 +0000
commitf6a5ce6f826295e677b55aebb9571db5fd17fe22 (patch)
treee2bfd362c831cf3b8441bdb9431e7d9725a5dfbc
parent9813284b8994e87505472857f5dacd903d4e234f (diff)
downloadxine-lib-f6a5ce6f826295e677b55aebb9571db5fd17fe22.tar.gz
xine-lib-f6a5ce6f826295e677b55aebb9571db5fd17fe22.tar.bz2
more memcpy stuff
CVS patchset: 846 CVS date: 2001/10/21 00:18:22
-rw-r--r--src/libffmpeg/xine_decoder.c11
-rw-r--r--src/libvfill/xine_decoder.c7
-rw-r--r--src/video_out/yuv2rgb.c6
-rw-r--r--src/video_out/yuv2rgb_mmx.c11
-rw-r--r--src/xine-engine/memcpy.h4
5 files changed, 22 insertions, 17 deletions
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index 4ff2d3a28..ad680724f 100644
--- a/src/libffmpeg/xine_decoder.c
+++ b/src/libffmpeg/xine_decoder.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: xine_decoder.c,v 1.15 2001/09/26 01:18:19 guenter Exp $
+ * $Id: xine_decoder.c,v 1.16 2001/10/21 00:18:22 miguelfreitas Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -37,6 +37,7 @@
#include "video_out.h"
#include "buffer.h"
#include "metronom.h"
+#include "memcpy.h"
#include "libavcodec/avcodec.h"
#include "libavcodec/dsputil.h"
@@ -196,7 +197,7 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
} else if (this->decoder_ok) {
- memcpy (&this->buf[this->size], buf->content, buf->size);
+ fast_memcpy (&this->buf[this->size], buf->content, buf->size);
this->size += buf->size;
@@ -242,7 +243,7 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
for (y=0; y<this->biHeight; y++) {
- memcpy (dy, sy, this->biWidth);
+ fast_memcpy (dy, sy, this->biWidth);
dy += this->biWidth;
@@ -253,8 +254,8 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
if (this->context.pix_fmt != PIX_FMT_YUV444P) {
- memcpy (du, su, this->biWidth/2);
- memcpy (dv, sv, this->biWidth/2);
+ fast_memcpy (du, su, this->biWidth/2);
+ fast_memcpy (dv, sv, this->biWidth/2);
} else {
diff --git a/src/libvfill/xine_decoder.c b/src/libvfill/xine_decoder.c
index dbe834467..658cfed6b 100644
--- a/src/libvfill/xine_decoder.c
+++ b/src/libvfill/xine_decoder.c
@@ -31,6 +31,7 @@
#include "video_out.h"
#include "buffer.h"
#include "xine_internal.h"
+#include "memcpy.h"
/* The videofill decoder's job in life is to copy the last frame displayed into
* the current display queue, incrementing the PTS value accordingly. It probably
@@ -78,9 +79,9 @@ static void videofill_decode_data (video_decoder_t *this_gen, buf_element_t *buf
image_size = last_img->width * last_img->height;
- memcpy(img->base[0], last_img->base[0], image_size);
- memcpy(img->base[1], last_img->base[1], image_size >> 2);
- memcpy(img->base[2], last_img->base[2], image_size >> 2);
+ fast_memcpy(img->base[0], last_img->base[0], image_size);
+ fast_memcpy(img->base[1], last_img->base[1], image_size >> 2);
+ fast_memcpy(img->base[2], last_img->base[2], image_size >> 2);
img->PTS = 0;
img->bad_frame = 0;
diff --git a/src/video_out/yuv2rgb.c b/src/video_out/yuv2rgb.c
index 573989200..b7b28adfb 100644
--- a/src/video_out/yuv2rgb.c
+++ b/src/video_out/yuv2rgb.c
@@ -22,7 +22,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: yuv2rgb.c,v 1.24 2001/10/09 22:20:11 miguelfreitas Exp $
+ * $Id: yuv2rgb.c,v 1.25 2001/10/21 00:18:22 miguelfreitas Exp $
*/
#include "config.h"
@@ -37,7 +37,7 @@
#include "cpu_accel.h"
#include "monitor.h"
#include "utils.h"
-
+#include "memcpy.h"
static int prof_scale_line = -1;
@@ -1131,7 +1131,7 @@ static void scale_line_1_1 (uint8_t *source, uint8_t *dest,
int width, int step) {
profiler_start_count(prof_scale_line);
- memcpy(dest, source, width);
+ fast_memcpy(dest, source, width);
profiler_stop_count(prof_scale_line);
}
diff --git a/src/video_out/yuv2rgb_mmx.c b/src/video_out/yuv2rgb_mmx.c
index adac1929a..ea4cf9698 100644
--- a/src/video_out/yuv2rgb_mmx.c
+++ b/src/video_out/yuv2rgb_mmx.c
@@ -34,6 +34,7 @@
#include "attributes.h"
#include "cpu_accel.h"
#include "yuv2rgb.h"
+#include "memcpy.h"
#define CPU_MMXEXT 0
#define CPU_MMX 1
@@ -432,7 +433,7 @@ static inline void yuv420_rgb16 (yuv2rgb_t *this,
while (--dst_height > 0 && dy < 32768) {
- memcpy (image, image-rgb_stride, this->dest_width*2);
+ fast_memcpy (image, image-rgb_stride, this->dest_width*2);
dy += this->step_dy;
image += rgb_stride;
@@ -540,7 +541,7 @@ static inline void yuv420_rgb15 (yuv2rgb_t *this,
while (--dst_height > 0 && dy < 32768) {
- memcpy (image, image-rgb_stride, this->dest_width*2);
+ fast_memcpy (image, image-rgb_stride, this->dest_width*2);
dy += this->step_dy;
image += rgb_stride;
@@ -647,7 +648,7 @@ static inline void yuv420_rgb24 (yuv2rgb_t *this,
while (--dst_height > 0 && dy < 32768) {
- memcpy (image, image-rgb_stride, this->dest_width*3);
+ fast_memcpy (image, image-rgb_stride, this->dest_width*3);
dy += this->step_dy;
image += rgb_stride;
@@ -755,7 +756,7 @@ static inline void yuv420_argb32 (yuv2rgb_t *this,
while (--dst_height > 0 && dy < 32768) {
- memcpy (image, image-rgb_stride, this->dest_width*4);
+ fast_memcpy (image, image-rgb_stride, this->dest_width*4);
dy += this->step_dy;
image += rgb_stride;
@@ -863,7 +864,7 @@ static inline void yuv420_abgr32 (yuv2rgb_t *this,
while (--dst_height > 0 && dy < 32768) {
- memcpy (image, image-rgb_stride, this->dest_width*4);
+ fast_memcpy (image, image-rgb_stride, this->dest_width*4);
dy += this->step_dy;
image += rgb_stride;
diff --git a/src/xine-engine/memcpy.h b/src/xine-engine/memcpy.h
index c3383460d..a693f37fe 100644
--- a/src/xine-engine/memcpy.h
+++ b/src/xine-engine/memcpy.h
@@ -22,10 +22,12 @@
#ifndef HAVE_MEMCPY_H
#define HAVE_MEMCPY_H
-
/* optimized/fast memcpy */
extern void *(* fast_memcpy)(void *to, const void *from, size_t len);
+#ifdef HAVE_XINE_INTERNAL_H
/* benchmark available memcpy methods */
void probe_fast_memcpy(config_values_t *config);
#endif
+
+#endif