[Mplayer-cvslog] CVS: main/libvo mmx.h,1.2,1.3 vo_3dfx.c,1.3,1.4 vo_fbdev.c,1.13,1.14 vo_fsdga.c,1.1,1.2 vo_odivx.c,1.4,1.5 vo_sdl.c,1.8,1.9 vo_syncfb.c,1.3,1.4 vo_x11.c,1.12,1.13 vo_xv.c,1.9,1.10

GEREOFFY arpi_esp at users.sourceforge.net
Wed Apr 11 21:41:40 CEST 2001


Update of /cvsroot/mplayer/main/libvo
In directory usw-pr-cvs1:/tmp/cvs-serv31380

Modified Files:
	mmx.h vo_3dfx.c vo_fbdev.c vo_fsdga.c vo_odivx.c vo_sdl.c 
	vo_syncfb.c vo_x11.c vo_xv.c 
Log Message:
memcpy() moved mmx.h -> fastmemcpy.h

Index: mmx.h
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/mmx.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** mmx.h	2001/04/11 12:47:45	1.2
--- mmx.h	2001/04/11 19:41:38	1.3
***************
*** 28,129 ****
  #define _MMX_H
  
- /*
-  This part of code was taken by from Linux-2.4.3 and slightly modified
- for MMX2 instruction set. I have done it since linux uses page aligned
- blocks but mplayer uses weakly ordered data and original sources can not
- speedup their. Only using prefetch and movntq together have effect! 
- If you have questions please contact with me: Nick Kurshev: nickols_k at mail.ru.
- */
- 
- #ifndef HAVE_MMX2
- //static inline void * __memcpy(void * to, const void * from, unsigned n)
- inline static void * memcpy(void * to, const void * from, unsigned n)
- {
- int d0, d1, d2;
- __asm__ __volatile__(
- 	"rep ; movsl\n\t"
- 	"testb $2,%b4\n\t"
- 	"je 1f\n\t"
- 	"movsw\n"
- 	"1:\ttestb $1,%b4\n\t"
- 	"je 2f\n\t"
- 	"movsb\n"
- 	"2:"
- 	: "=&c" (d0), "=&D" (d1), "=&S" (d2)
- 	:"0" (n/4), "q" (n),"1" ((long) to),"2" ((long) from)
- 	: "memory");
- return (to);
- }
- #else
- //inline static void *__memcpy_mmx2(void *to, const void *from, unsigned len)
- inline static void * memcpy(void * to, const void * from, unsigned n)
- {
- 	void *p;
- 	int i;
- 
-         if(len >= 0x200) /* 512-byte blocks */
- 	{
-   	  p = to;
- 	  i = len >> 6; /* len/64 */
- 	__asm__ __volatile__ (
- 		"1: prefetch (%0)\n"		/* This set is 28 bytes */
- 		"   prefetch 64(%0)\n"
- 		"   prefetch 128(%0)\n"
- 		"   prefetch 192(%0)\n"
- 		"   prefetch 256(%0)\n"
- 		"2:  \n"
- 		".section .fixup, \"ax\"\n"
- 		"3: movw $0x1AEB, 1b\n"	/* jmp on 26 bytes */
- 		"   jmp 2b\n"
- 		".previous\n"
- 		".section __ex_table,\"a\"\n"
- 		"	.align 4\n"
- 		"	.long 1b, 3b\n"
- 		".previous"
- 		: : "r" (from) );
- 		
- 	
- 	for(; i>0; i--)
- 	{
- 		__asm__ __volatile__ (
- 		"1:  prefetch 320(%0)\n"
- 		"2:  movq (%0), %%mm0\n"
- 		"  movq 8(%0), %%mm1\n"
- 		"  movq 16(%0), %%mm2\n"
- 		"  movq 24(%0), %%mm3\n"
- 		"  movntq %%mm0, (%1)\n"
- 		"  movntq %%mm1, 8(%1)\n"
- 		"  movntq %%mm2, 16(%1)\n"
- 		"  movntq %%mm3, 24(%1)\n"
- 		"  movq 32(%0), %%mm0\n"
- 		"  movq 40(%0), %%mm1\n"
- 		"  movq 48(%0), %%mm2\n"
- 		"  movq 56(%0), %%mm3\n"
- 		"  movntq %%mm0, 32(%1)\n"
- 		"  movntq %%mm1, 40(%1)\n"
- 		"  movntq %%mm2, 48(%1)\n"
- 		"  movntq %%mm3, 56(%1)\n"
- 		".section .fixup, \"ax\"\n"
- 		"3: movw $0x05EB, 1b\n"	/* jmp on 5 bytes */
- 		"   jmp 2b\n"
- 		".previous\n"
- 		".section __ex_table,\"a\"\n"
- 		"	.align 4\n"
- 		"	.long 1b, 3b\n"
- 		".previous"
- 		: : "r" (from), "r" (to) : "memory");
- 		from+=64;
- 		to+=64;
- 	}
- 	        __asm__ __volatile__ ("emms":::"memory");
- 	}
- 	/*
- 	 *	Now do the tail of the block
- 	 */
- 	__memcpy(to, from, len&63);
- 	return p;
- }
- #endif
- 
  
  /*	Warning:  at this writing, the version of GAS packaged
--- 28,31 ----

Index: vo_3dfx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_3dfx.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** vo_3dfx.c	2001/04/11 12:47:45	1.3
--- vo_3dfx.c	2001/04/11 19:41:38	1.4
***************
*** 50,54 ****
  #include "drivers/3dfx.h"
  
! #include "mmx.h"
  
  static vo_info_t vo_info = 
--- 50,54 ----
  #include "drivers/3dfx.h"
  
! #include "fastmemcpy.h"
  
  static vo_info_t vo_info = 

Index: vo_fbdev.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fbdev.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** vo_fbdev.c	2001/04/11 12:47:45	1.13
--- vo_fbdev.c	2001/04/11 19:41:38	1.14
***************
*** 25,29 ****
  extern void rgb15to16_mmx(char *s0, char *d0, int count);
  
! #include "mmx.h"
  
  LIBVO_EXTERN(fbdev)
--- 25,29 ----
  extern void rgb15to16_mmx(char *s0, char *d0, int count);
  
! #include "fastmemcpy.h"
  
  LIBVO_EXTERN(fbdev)

Index: vo_fsdga.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_fsdga.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** vo_fsdga.c	2001/03/05 02:24:46	1.1
--- vo_fsdga.c	2001/04/11 19:41:38	1.2
***************
*** 23,26 ****
--- 23,27 ----
  #include <string.h>
  
+ //#include "fastmemcpy.h"
  
  #include "linux/keycodes.h"
***************
*** 64,69 ****
  static Display  *vo_dga_dpy;
  
- 
- #include "mmx.h"
  
  #if defined (HAVE_SSE) || defined (HAVE_3DNOW)
--- 65,68 ----

Index: vo_odivx.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_odivx.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** vo_odivx.c	2001/04/11 12:47:45	1.4
--- vo_odivx.c	2001/04/11 19:41:38	1.5
***************
*** 20,24 ****
  #include "../encore/encore.h"
  
! #include "mmx.h"
  
  static vo_info_t vo_info = 
--- 20,24 ----
  #include "../encore/encore.h"
  
! #include "fastmemcpy.h"
  
  static vo_info_t vo_info = 

Index: vo_sdl.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_sdl.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -r1.8 -r1.9
*** vo_sdl.c	2001/04/11 13:46:56	1.8
--- vo_sdl.c	2001/04/11 19:41:38	1.9
***************
*** 74,79 ****
  #include "video_out_internal.h"
  
  
- #include "mmx.h"
  LIBVO_EXTERN(sdl)
  
--- 74,79 ----
  #include "video_out_internal.h"
  
+ #include "fastmemcpy.h"
  
  LIBVO_EXTERN(sdl)
  

Index: vo_syncfb.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_syncfb.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** vo_syncfb.c	2001/04/11 12:47:45	1.3
--- vo_syncfb.c	2001/04/11 19:41:38	1.4
***************
*** 44,48 ****
  #include "drivers/syncfb/syncfb.h"
  
! #include "mmx.h"
  
  static vo_info_t vo_info =
--- 44,48 ----
  #include "drivers/syncfb/syncfb.h"
  
! #include "fastmemcpy.h"
  
  static vo_info_t vo_info =

Index: vo_x11.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_x11.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -r1.12 -r1.13
*** vo_x11.c	2001/04/11 12:47:45	1.12
--- vo_x11.c	2001/04/11 19:41:38	1.13
***************
*** 37,41 ****
  #include "x11_common.h"
  
! #include "mmx.h"
  
  static vo_info_t vo_info =
--- 37,41 ----
  #include "x11_common.h"
  
! #include "fastmemcpy.h"
  
  static vo_info_t vo_info =

Index: vo_xv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/vo_xv.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** vo_xv.c	2001/04/11 12:47:45	1.9
--- vo_xv.c	2001/04/11 19:41:38	1.10
***************
*** 29,33 ****
  #include "x11_common.h"
  
! #include "mmx.h"
  
  static vo_info_t vo_info =
--- 29,33 ----
  #include "x11_common.h"
  
! #include "fastmemcpy.h"
  
  static vo_info_t vo_info =


_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog



More information about the MPlayer-cvslog mailing list