[MPlayer-cvslog] r21542 - in trunk/libmpeg2: attributes.h cpu_accel.c cpu_state.c decode.c header.c idct.c idct_alpha.c idct_altivec.c idct_mmx.c libmpeg-0.4.0.diff libmpeg-0.4.1.diff motion_comp.c motion_comp_mmx.c mpeg2.h mpeg2_internal.h slice.c

henry subversion at mplayerhq.hu
Sat Dec 9 11:34:27 CET 2006


Author: henry
Date: Sat Dec  9 11:34:27 2006
New Revision: 21542

Added:
   trunk/libmpeg2/libmpeg-0.4.1.diff
      - copied, changed from r21541, /trunk/libmpeg2/libmpeg-0.4.0.diff
Removed:
   trunk/libmpeg2/libmpeg-0.4.0.diff
Modified:
   trunk/libmpeg2/attributes.h
   trunk/libmpeg2/cpu_accel.c
   trunk/libmpeg2/cpu_state.c
   trunk/libmpeg2/decode.c
   trunk/libmpeg2/header.c
   trunk/libmpeg2/idct.c
   trunk/libmpeg2/idct_alpha.c
   trunk/libmpeg2/idct_altivec.c
   trunk/libmpeg2/idct_mmx.c
   trunk/libmpeg2/motion_comp.c
   trunk/libmpeg2/motion_comp_mmx.c
   trunk/libmpeg2/mpeg2.h
   trunk/libmpeg2/mpeg2_internal.h
   trunk/libmpeg2/slice.c

Log:
sync to libmpeg2-0.4.1

Modified: trunk/libmpeg2/attributes.h
==============================================================================
--- trunk/libmpeg2/attributes.h	(original)
+++ trunk/libmpeg2/attributes.h	Sat Dec  9 11:34:27 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */

Modified: trunk/libmpeg2/cpu_accel.c
==============================================================================
--- trunk/libmpeg2/cpu_accel.c	(original)
+++ trunk/libmpeg2/cpu_accel.c	Sat Dec  9 11:34:27 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */
@@ -50,7 +50,7 @@
     int AMD;
     uint32_t caps;
 
-#if !defined(PIC) && !defined(__PIC__)
+#if defined(__x86_64__) || (!defined(PIC) && !defined(__PIC__))
 #define cpuid(op,eax,ebx,ecx,edx)	\
     __asm__ ("cpuid"			\
 	     : "=a" (eax),		\
@@ -59,12 +59,12 @@
 	       "=d" (edx)		\
 	     : "a" (op)			\
 	     : "cc")
-#else	/* PIC version : save ebx */
+#else  /* PIC version : save ebx (not needed on x86_64) */
 #define cpuid(op,eax,ebx,ecx,edx)	\
-    __asm__ ("push %%ebx\n\t"		\
+    __asm__ ("pushl %%ebx\n\t"		\
 	     "cpuid\n\t"		\
 	     "movl %%ebx,%1\n\t"	\
-	     "pop %%ebx"		\
+	     "popl %%ebx"		\
 	     : "=a" (eax),		\
 	       "=r" (ebx),		\
 	       "=c" (ecx),		\
@@ -73,6 +73,7 @@
 	     : "cc")
 #endif
 
+#ifndef __x86_64__ /* x86_64 supports the cpuid op */
     __asm__ ("pushf\n\t"
 	     "pushf\n\t"
 	     "pop %0\n\t"
@@ -90,6 +91,7 @@
 
     if (eax == ebx)		/* no cpuid */
 	return 0;
+#endif
 
     cpuid (0x00000000, eax, ebx, ecx, edx);
     if (!eax)			/* vendor string only */
@@ -154,7 +156,7 @@
 }
 
 #ifdef ARCH_PPC
-static inline uint32_t arch_accel (void)
+static uint32_t arch_accel (void)
 {
     static RETSIGTYPE (* oldsig) (int);
 
@@ -184,7 +186,7 @@
 #endif /* ARCH_PPC */
 
 #ifdef ARCH_SPARC
-static inline uint32_t arch_accel (void)
+static uint32_t arch_accel (void)
 {
     static RETSIGTYPE (* oldsig) (int);
 
@@ -220,7 +222,7 @@
 #endif /* ARCH_PPC || ARCH_SPARC */
 
 #ifdef ARCH_ALPHA
-static inline uint32_t arch_accel (void)
+static uint32_t arch_accel (void)
 {
 #ifdef CAN_COMPILE_ALPHA_MVI
     uint64_t no_mvi;

Modified: trunk/libmpeg2/cpu_state.c
==============================================================================
--- trunk/libmpeg2/cpu_state.c	(original)
+++ trunk/libmpeg2/cpu_state.c	Sat Dec  9 11:34:27 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */
@@ -47,19 +47,19 @@
 }
 #endif
 
-#if defined( ARCH_PPC ) && defined( HAVE_ALTIVEC )
-#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ )	/* apple */
-#define LI(a,b) "li r" #a "," #b "\n\t"
-#define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t"
-#define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t"
-#define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t"
-#define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t"
-#else			/* gnu */
+#ifdef ARCH_PPC
+#ifdef HAVE_ALTIVEC_H	/* gnu */
 #define LI(a,b) "li " #a "," #b "\n\t"
 #define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t"
 #define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t"
 #define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t"
 #define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t"
+#else			/* apple */
+#define LI(a,b) "li r" #a "," #b "\n\t"
+#define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t"
+#define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t"
+#define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t"
+#define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t"
 #endif
 
 static void state_save_altivec (cpu_state_t * state)

Modified: trunk/libmpeg2/decode.c
==============================================================================
--- trunk/libmpeg2/decode.c	(original)
+++ trunk/libmpeg2/decode.c	Sat Dec  9 11:34:27 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */

Modified: trunk/libmpeg2/header.c
==============================================================================
--- trunk/libmpeg2/header.c	(original)
+++ trunk/libmpeg2/header.c	Sat Dec  9 11:34:27 2006
@@ -21,7 +21,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */

Modified: trunk/libmpeg2/idct.c
==============================================================================
--- trunk/libmpeg2/idct.c	(original)
+++ trunk/libmpeg2/idct.c	Sat Dec  9 11:34:27 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */
@@ -253,7 +253,7 @@
 	mpeg2_idct_mmx_init ();
     } else
 #endif
-#if defined( ARCH_PPC ) && defined( HAVE_ALTIVEC )
+#ifdef ARCH_PPC
     if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
 	mpeg2_idct_copy = mpeg2_idct_copy_altivec;
 	mpeg2_idct_add = mpeg2_idct_add_altivec;

Modified: trunk/libmpeg2/idct_alpha.c
==============================================================================
--- trunk/libmpeg2/idct_alpha.c	(original)
+++ trunk/libmpeg2/idct_alpha.c	Sat Dec  9 11:34:27 2006
@@ -21,7 +21,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */

Modified: trunk/libmpeg2/idct_altivec.c
==============================================================================
--- trunk/libmpeg2/idct_altivec.c	(original)
+++ trunk/libmpeg2/idct_altivec.c	Sat Dec  9 11:34:27 2006
@@ -41,7 +41,7 @@
 typedef vector signed int vector_s32_t;
 typedef vector unsigned int vector_u32_t;
 
-#if defined( HAVE_ALTIVEC_H ) && !defined( __APPLE_ALTIVEC__ ) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303)
+#if defined(HAVE_ALTIVEC_H) && (__GNUC__ * 100 + __GNUC_MINOR__ < 303)
 /* work around gcc <3.3 vec_mergel bug */
 static inline vector_s16_t my_vec_mergel (vector_s16_t const A,
 					  vector_s16_t const B)
@@ -56,10 +56,10 @@
 #define vec_mergel my_vec_mergel
 #endif
 
-#if defined( __APPLE_CC__ ) && defined( __APPLE_ALTIVEC__ ) /* apple */
-#define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h)
-#else			/* gnu */
+#ifdef HAVE_ALTIVEC_H	/* gnu */
 #define VEC_S16(a,b,c,d,e,f,g,h) {a, b, c, d, e, f, g, h}
+#else			/* apple */
+#define VEC_S16(a,b,c,d,e,f,g,h) (vector_s16_t) (a, b, c, d, e, f, g, h)
 #endif
 
 static const vector_s16_t constants ATTR_ALIGN(16) =

Modified: trunk/libmpeg2/idct_mmx.c
==============================================================================
--- trunk/libmpeg2/idct_mmx.c	(original)
+++ trunk/libmpeg2/idct_mmx.c	Sat Dec  9 11:34:27 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */

Copied: trunk/libmpeg2/libmpeg-0.4.1.diff (from r21541, /trunk/libmpeg2/libmpeg-0.4.0.diff)
==============================================================================
--- /trunk/libmpeg2/libmpeg-0.4.0.diff	(original)
+++ trunk/libmpeg2/libmpeg-0.4.1.diff	Sat Dec  9 11:34:27 2006
@@ -170,21 +170,6 @@
      mpeg2dec->fbuf[0] = &mpeg2dec->fbuf_alloc[0].fbuf;
      mpeg2dec->fbuf[1] = &mpeg2dec->fbuf_alloc[1].fbuf;
      mpeg2dec->fbuf[2] = &mpeg2dec->fbuf_alloc[2].fbuf;
-@@ -272,9 +272,11 @@
-     if (!(buffer[2] & 2))	/* missing marker_bit */
- 	return 1;
- 
--    sequence->display_width = (buffer[1] << 6) | (buffer[2] >> 2);
--    sequence->display_height =
--	((buffer[2]& 1 ) << 13) | (buffer[3] << 5) | (buffer[4] >> 3);
-+    if( (buffer[1] << 6) | (buffer[2] >> 2) )
-+	sequence->display_width = (buffer[1] << 6) | (buffer[2] >> 2);
-+    if( ((buffer[2]& 1 ) << 13) | (buffer[3] << 5) | (buffer[4] >> 3) )
-+	sequence->display_height =
-+	    ((buffer[2]& 1 ) << 13) | (buffer[3] << 5) | (buffer[4] >> 3);
- 
-     return 0;
- }
 @@ -551,6 +558,7 @@
  	if (!(mpeg2dec->sequence.flags & SEQ_FLAG_PROGRESSIVE_SEQUENCE)) {
  	    picture->nb_fields = (buffer[3] & 2) ? 3 : 2;
@@ -203,24 +188,6 @@
  		    k * mpeg2dec->quantizer_matrix[index][j];
 --- libmpeg2/idct.c	2006-06-16 20:12:26.000000000 +0200
 +++ libmpeg2/idct.c	2006-06-16 20:12:50.000000000 +0200
-@@ -66,7 +70,7 @@
- } while (0)
- #endif
- 
--static void inline idct_row (int16_t * const block)
-+static inline void idct_row (int16_t * const block)
- {
-     int d0, d1, d2, d3;
-     int a0, a1, a2, a3, b0, b1, b2, b3;
-@@ -119,7 +123,7 @@
-     block[7] = (a0 - b0) >> 12;
- }
- 
--static void inline idct_col (int16_t * const block)
-+static inline void idct_col (int16_t * const block)
- {
-     int d0, d1, d2, d3;
-     int a0, a1, a2, a3, b0, b1, b2, b3;
 @@ -239,12 +239,15 @@
  
  void mpeg2_idct_init (uint32_t accel)
@@ -257,24 +224,6 @@
  	mpeg2_idct_copy = mpeg2_idct_copy_alpha;
 --- libmpeg2/idct_alpha.c	2006-06-16 20:12:26.000000000 +0200
 +++ libmpeg2/idct_alpha.c	2006-06-16 20:12:50.000000000 +0200
-@@ -59,7 +63,7 @@
- } while (0)
- #endif
- 
--static void inline idct_row (int16_t * const block)
-+static inline void idct_row (int16_t * const block)
- {
-     uint64_t l, r;
-     int_fast32_t d0, d1, d2, d3;
-@@ -116,7 +120,7 @@
-     block[7] = (a0 - b0) >> 12;
- }
- 
--static void inline idct_col (int16_t * const block)
-+static inline void idct_col (int16_t * const block)
- {
-     int_fast32_t d0, d1, d2, d3;
-     int_fast32_t a0, a1, a2, a3, b0, b1, b2, b3;
 @@ -157,6 +161,7 @@
      block[8*7] = (a0 - b0) >> 17;
  }
@@ -324,8 +273,7 @@
 +#ifdef HAVE_MMX
 +    if (accel & MPEG2_ACCEL_X86_MMX)
  	mpeg2_mc = mpeg2_mc_mmx;
--    elseo
-+    else
+     else
  #endif
 -#ifdef ARCH_PPC
 +#if defined(ARCH_PPC) && defined(HAVE_ALTIVEC)
@@ -406,15 +354,6 @@
  
      decoder->quantizer_matrix[0] =
  	decoder->quantizer_prescale[0][quantizer_scale_code];
-@@ -1252,7 +1252,7 @@
- 	      ref[0] + offset, decoder->stride, 16);			      \
-     table[4] (decoder->dest[1] + decoder->offset,			      \
- 	      ref[1] + offset, decoder->stride, 16);			      \
--    table[4] (decoder->dest[2] + (decoder->offset >> 1),		      \
-+    table[4] (decoder->dest[2] + decoder->offset,			      \
- 	      ref[2] + offset, decoder->stride, 16)
- 
- #define bit_buf (decoder->bitstream_buf)
 @@ -1568,6 +1569,18 @@
  
  #define NEXT_MACROBLOCK							\

Modified: trunk/libmpeg2/motion_comp.c
==============================================================================
--- trunk/libmpeg2/motion_comp.c	(original)
+++ trunk/libmpeg2/motion_comp.c	Sat Dec  9 11:34:27 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */

Modified: trunk/libmpeg2/motion_comp_mmx.c
==============================================================================
--- trunk/libmpeg2/motion_comp_mmx.c	(original)
+++ trunk/libmpeg2/motion_comp_mmx.c	Sat Dec  9 11:34:27 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */
@@ -67,7 +67,7 @@
  * unrolling will help
  */
 
-static inline void mmx_zero_reg (void)
+static inline void mmx_zero_reg ()
 {
     /* load 0 into mm0 */
     pxor_r2r (mm0, mm0);

Modified: trunk/libmpeg2/mpeg2.h
==============================================================================
--- trunk/libmpeg2/mpeg2.h	(original)
+++ trunk/libmpeg2/mpeg2.h	Sat Dec  9 11:34:27 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */
@@ -29,7 +29,7 @@
 #define MPEG2_H
 
 #define MPEG2_VERSION(a,b,c) (((a)<<16)|((b)<<8)|(c))
-#define MPEG2_RELEASE MPEG2_VERSION (0, 4, 0)	/* 0.4.0 */
+#define MPEG2_RELEASE MPEG2_VERSION (0, 4, 1)	/* 0.4.1 */
 
 #define SEQ_FLAG_MPEG2 1
 #define SEQ_FLAG_CONSTRAINED_PARAMETERS 2

Modified: trunk/libmpeg2/mpeg2_internal.h
==============================================================================
--- trunk/libmpeg2/mpeg2_internal.h	(original)
+++ trunk/libmpeg2/mpeg2_internal.h	Sat Dec  9 11:34:27 2006
@@ -20,7 +20,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */

Modified: trunk/libmpeg2/slice.c
==============================================================================
--- trunk/libmpeg2/slice.c	(original)
+++ trunk/libmpeg2/slice.c	Sat Dec  9 11:34:27 2006
@@ -21,7 +21,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * Modified for use with MPlayer, see libmpeg-0.4.0.diff for the exact changes.
+ * Modified for use with MPlayer, see libmpeg-0.4.1.diff for the exact changes.
  * detailed changelog at http://svn.mplayerhq.hu/mplayer/trunk/
  * $Id$
  */



More information about the MPlayer-cvslog mailing list