[Mplayer-cvslog] CVS: main/libavcodec bswap.h,NONE,1.1 config.h,NONE,1.1 fastmemcpy.h,NONE,1.1 common.c,1.2,1.3 dsputil.h,1.2,1.3 h263.c,1.1,1.2 imgconvert.c,1.1,1.2 imgresample.c,1.1,1.2 Makefile,1.1,1.2 mpeg12.c,1.1,1.2 mpegvideo.c,1.1,1.2

Nick Kurshev nick at mplayer.dev.hu
Mon Jul 9 10:33:46 CEST 2001


Update of /cvsroot/mplayer/main/libavcodec
In directory mplayer:/var/tmp.root/cvs-serv10096

Modified Files:
	common.c dsputil.h h263.c imgconvert.c imgresample.c Makefile 
	mpeg12.c mpegvideo.c 
Added Files:
	bswap.h config.h fastmemcpy.h 
Log Message:
Minor optimization and K7 support

--- NEW FILE ---
#include "../libac3/bswap.h"

--- NEW FILE ---
#include "../config.h"

--- NEW FILE ---
#include "../libvo/fastmemcpy.h"

Index: common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/common.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- common.c	8 Jul 2001 14:10:04 -0000	1.2
+++ common.c	9 Jul 2001 08:33:44 -0000	1.3
@@ -24,6 +24,9 @@
 #include <math.h>
 #include "common.h"
 
+#include "../config.h"
+#include "../libac3/bswap.h"
+
 #define NDEBUG
 #include <assert.h>
 
@@ -220,10 +223,7 @@
         buf_ptr += 4;
         /* handle common case: we can read everything */
         if (buf_ptr <= s->buf_end) {
-            bit_buf = (buf_ptr[-4] << 24) |
-                (buf_ptr[-3] << 16) |
-                (buf_ptr[-2] << 8) |
-                (buf_ptr[-1]);
+	    bit_buf = bswap_32(*((unsigned long*)(&buf_ptr[-4])));
         } else {
             buf_ptr -= 4;
             bit_buf = 0;

Index: dsputil.h
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/dsputil.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dsputil.h	6 Jul 2001 12:02:27 -0000	1.2
+++ dsputil.h	9 Jul 2001 08:33:44 -0000	1.3
@@ -53,13 +53,13 @@
 
 #ifdef CONFIG_MMX
 int pix_abs16x16_mmx(unsigned char *blk1, unsigned char *blk2, int lx, int h);
-int pix_abs16x16_sse(unsigned char *blk1, unsigned char *blk2, int lx, int h);
+int pix_abs16x16_mmx2(unsigned char *blk1, unsigned char *blk2, int lx, int h);
 int pix_abs16x16_x2_mmx(unsigned char *blk1, unsigned char *blk2, int lx, int h);
 int pix_abs16x16_y2_mmx(unsigned char *blk1, unsigned char *blk2, int lx, int h);
 int pix_abs16x16_xy2_mmx(unsigned char *blk1, unsigned char *blk2, int lx, int h);
 
-#ifdef CONFIG_SSE
-#define pix_abs16x16 pix_abs16x16_sse
+#ifdef CONFIG_MMX2
+#define pix_abs16x16 pix_abs16x16_mmx2
 #else
 #define pix_abs16x16 pix_abs16x16_mmx
 #endif
@@ -67,11 +67,17 @@
 #define pix_abs16x16_y2 pix_abs16x16_y2_mmx
 #define pix_abs16x16_xy2 pix_abs16x16_xy2_mmx
 
+#ifdef CONFIG_3DNOW
 static inline void emms(void)
 {
-	asm volatile ("emms;");
+	__asm __volatile ("femms;":::"memory");
 }
-
+#else
+static inline void emms(void)
+{
+	__asm __volatile ("emms;":::"memory");
+}
+#endif
 #endif
 
 #endif

Index: h263.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/h263.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- h263.c	6 Jul 2001 03:32:40 -0000	1.1
+++ h263.c	9 Jul 2001 08:33:44 -0000	1.2
@@ -29,6 +29,9 @@
 #define NDEBUG
 #include <assert.h>
 
+#include "config.h"
+#include "fastmemcpy.h"
+
 static void h263_encode_block(MpegEncContext * s, DCTELEM * block,
 			      int n);
 static void h263_encode_motion(MpegEncContext * s, int val);

Index: imgconvert.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/imgconvert.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- imgconvert.c	6 Jul 2001 03:32:40 -0000	1.1
+++ imgconvert.c	9 Jul 2001 08:33:44 -0000	1.2
@@ -21,6 +21,9 @@
 #include <string.h>
 #include "avcodec.h"
 
+#include "config.h"
+#include "fastmemcpy.h"
+
 /* XXX: totally non optimized */
 
 static void yuv422_to_yuv420p(UINT8 *lum, UINT8 *cb, UINT8 *cr,

Index: imgresample.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/imgresample.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- imgresample.c	6 Jul 2001 03:32:40 -0000	1.1
+++ imgresample.c	9 Jul 2001 08:33:44 -0000	1.2
@@ -22,6 +22,9 @@
 #include <math.h>
 #include "avcodec.h"
 
+#include "config.h"
+#include "fastmemcpy.h"
+
 #define NB_COMPONENTS 3
 
 #define PHASE_BITS 4

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- Makefile	6 Jul 2001 03:32:40 -0000	1.1
+++ Makefile	9 Jul 2001 08:33:44 -0000	1.2
@@ -18,9 +18,13 @@
 CFLAGS += -DCONFIG_MMX
 endif
 
-# SSE can also be added
-ifeq ($(TARGET_SSE),yes)
-CFLAGS += -DCONFIG_SSE
+# MMX2 can also be added
+ifeq ($(TARGET_MMX2),yes)
+CFLAGS += -DCONFIG_MMX2
+endif
+
+ifeq ($(TARGET_3DNOW),yes)
+CFLAGS += -DCONFIG_3DNOW
 endif
 
 LIB= libavcodec.a

Index: mpeg12.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/mpeg12.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mpeg12.c	6 Jul 2001 03:32:40 -0000	1.1
+++ mpeg12.c	9 Jul 2001 08:33:44 -0000	1.2
@@ -24,6 +24,9 @@
 
 #include "mpeg12data.h"
 
+#include "config.h"
+#include "fastmemcpy.h"
+
 //#define DEBUG
 
 #ifdef DEBUG

Index: mpegvideo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/mpegvideo.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- mpegvideo.c	6 Jul 2001 03:32:40 -0000	1.1
+++ mpegvideo.c	9 Jul 2001 08:33:44 -0000	1.2
@@ -23,6 +23,9 @@
 #include "dsputil.h"
 #include "mpegvideo.h"
 
+#include "config.h"
+#include "fastmemcpy.h"
+
 #define EDGE_WIDTH 16
 
 /* enable all paranoid tests for rounding, overflows, etc... */




More information about the MPlayer-cvslog mailing list