[Mplayer-cvslog] CVS: main/libavcodec dsputil.c,1.1,1.2 dsputil.h,1.3,1.4 h263.c,1.2,1.3 Makefile,1.2,1.3 motion_est.c,1.2,1.3 mpegvideo.c,1.2,1.3

Nick Kurshev nick at mplayer.dev.hu
Tue Jul 10 10:30:30 CEST 2001


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

Modified Files:
	dsputil.c dsputil.h h263.c Makefile motion_est.c mpegvideo.c 
Log Message:
Sync with mplayer's config semantic

Index: dsputil.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/dsputil.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- dsputil.c	6 Jul 2001 03:32:40 -0000	1.1
+++ dsputil.c	10 Jul 2001 08:30:27 -0000	1.2
@@ -240,7 +240,7 @@
 #define avg2(a,b) ((a+b+1)>>1)
 #define avg4(a,b,c,d) ((a+b+c+d+2)>>2)
 
-#ifndef CONFIG_MMX
+#ifndef HAVE_MMX
 int pix_abs16x16(UINT8 *pix1, UINT8 *pix2, int line_size, int h)
 {
     int s, i;

Index: dsputil.h
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/dsputil.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- dsputil.h	9 Jul 2001 08:33:44 -0000	1.3
+++ dsputil.h	10 Jul 2001 08:30:27 -0000	1.4
@@ -1,6 +1,8 @@
 #ifndef DSPUTIL_H
 #define DSPUTIL_H
 
+#include "config.h"
+#undef USE_LIBAVCODEC
 #include "common.h"
 /*
  * Hmm, stdint.h is intended to provide the intNN_t and uintNNNt types in C99,
@@ -51,14 +53,14 @@
 int pix_abs16x16_y2(unsigned char *blk1, unsigned char *blk2, int lx, int h);
 int pix_abs16x16_xy2(unsigned char *blk1, unsigned char *blk2, int lx, int h);
 
-#ifdef CONFIG_MMX
+#ifdef HAVE_MMX
 int pix_abs16x16_mmx(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_MMX2
+#ifdef HAVE_MMX2
 #define pix_abs16x16 pix_abs16x16_mmx2
 #else
 #define pix_abs16x16 pix_abs16x16_mmx
@@ -66,18 +68,22 @@
 #define pix_abs16x16_x2 pix_abs16x16_x2_mmx
 #define pix_abs16x16_y2 pix_abs16x16_y2_mmx
 #define pix_abs16x16_xy2 pix_abs16x16_xy2_mmx
+#endif
 
-#ifdef CONFIG_3DNOW
+#if defined ( HAVE_3DNOW )
 static inline void emms(void)
 {
 	__asm __volatile ("femms;":::"memory");
 }
-#else
+#elif defined ( HAVE_MMX )
 static inline void emms(void)
 {
 	__asm __volatile ("emms;":::"memory");
 }
-#endif
+#else
+static inline void emms(void)
+{
+}
 #endif
 
 #endif

Index: h263.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/h263.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- h263.c	9 Jul 2001 08:33:44 -0000	1.2
+++ h263.c	10 Jul 2001 08:30:27 -0000	1.3
@@ -20,6 +20,8 @@
  */
 #include <stdlib.h>
 #include <stdio.h>
+#include "config.h"
+#undef USE_LIBAVCODEC
 #include "common.h"
 #include "dsputil.h"
 #include "mpegvideo.h"
@@ -29,7 +31,6 @@
 #define NDEBUG
 #include <assert.h>
 
-#include "config.h"
 #include "fastmemcpy.h"
 
 static void h263_encode_block(MpegEncContext * s, DCTELEM * block,

Index: Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/Makefile,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Makefile	9 Jul 2001 08:33:44 -0000	1.2
+++ Makefile	10 Jul 2001 08:30:27 -0000	1.3
@@ -15,16 +15,10 @@
 # i386 specific stuff
 ifeq ($(TARGET_MMX),yes)
 OBJS += i386/fdct_mmx.o i386/fdctdata.o i386/sad_mmx.o
-CFLAGS += -DCONFIG_MMX
 endif
 
-# MMX2 can also be added
 ifeq ($(TARGET_MMX2),yes)
-CFLAGS += -DCONFIG_MMX2
-endif
-
-ifeq ($(TARGET_3DNOW),yes)
-CFLAGS += -DCONFIG_3DNOW
+OBJS += i386/sad_mmx2.o
 endif
 
 LIB= libavcodec.a

Index: motion_est.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/motion_est.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- motion_est.c	6 Jul 2001 12:02:27 -0000	1.2
+++ motion_est.c	10 Jul 2001 08:30:27 -0000	1.3
@@ -442,9 +442,7 @@
 	dmin = phods_motion_search(s, &mx, &my, range / 2, xmin, ymin, xmax, ymax);
         break;
     }
-#ifdef CONFIG_MMX
     emms();
-#endif
 
     /* intra / predictive decision */
     xx = mb_x * 16;

Index: mpegvideo.c
===================================================================
RCS file: /cvsroot/mplayer/main/libavcodec/mpegvideo.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- mpegvideo.c	9 Jul 2001 08:33:44 -0000	1.2
+++ mpegvideo.c	10 Jul 2001 08:30:27 -0000	1.3
@@ -60,7 +60,7 @@
 int motion_estimation_method = ME_LOG;
 
 /* XXX: should use variable shift ? */
-#ifdef CONFIG_MMX
+#ifdef HAVE_MMX
 #define QMAT_SHIFT 19
 #else
 #define QMAT_SHIFT 25
@@ -71,7 +71,7 @@
     int i;
 
     for(i=0;i<64;i++) {
-#ifdef CONFIG_MMX
+#ifdef HAVE_MMX
         /* We can safely suppose that 16 <= quant_matrix[i] <= 255
            So 16 <= qscale * quant_matrix[i] <= 7905
            so (1 << QMAT_SHIFT) / 16 >= qmat[i] >= (1 << QMAT_SHIFT) / 7905
@@ -952,7 +952,7 @@
     int i, j, level, last_non_zero, q;
     const int *qmat;
 
-#ifndef CONFIG_MMX
+#ifndef HAVE_MMX
     jpeg_fdct_ifast (block);
 #else
     fdct_mmx (block);
@@ -963,7 +963,7 @@
             q = s->y_dc_scale;
         else
             q = s->c_dc_scale;
-#ifndef CONFIG_MMX
+#ifndef HAVE_MMX
         q = q << 3;
 #endif
         
@@ -996,7 +996,7 @@
             } else {
                 qmat1 = default_intra_matrix[j] * s->qscale;
             }
-#ifdef CONFIG_MMX
+#ifdef HAVE_MMX
             val = ((double)block[j] * 8.0) / (double)qmat1;
 #else
             val = ((double)block[j] * 8.0 * 2048.0) / 




More information about the MPlayer-cvslog mailing list