Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37704497
en ru br
ALT Linux repos
S:6.0-alt2.1
D:0.5.0-alt0.14329.1
5.0: 15151-alt5.M50.1
4.1: 11656-alt1.M41.1
4.0: 10629-alt3.M40.0
3.0: 0.4.9-alt2cvs20050406

Group :: Video
RPM: ffmpeg

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: ffmpeg-20050313-deb-arch.patch
Download


diff -ruN ffmpeg.orig/libavcodec/i386/mpegvideo_mmx_template.c ffmpeg/libavcodec/i386/mpegvideo_mmx_template.c
--- ffmpeg.orig/libavcodec/i386/mpegvideo_mmx_template.c	2004-11-05 04:45:41 +0300
+++ ffmpeg/libavcodec/i386/mpegvideo_mmx_template.c	2005-04-08 00:47:38 +0400
@@ -95,7 +95,14 @@
             SPREADW(%%mm3)
             "pxor %%mm7, %%mm7			\n\t" // 0
             "pxor %%mm4, %%mm4			\n\t" // 0
+#if defined(PIC) && !defined(ARCH_X86_64)
+            "push %%"REG_a"			\n\t"
+            "movl %2, %%"REG_a"			\n\t"
+            "movq (%%"REG_a"), %%mm5		\n\t" // qmat[0]
+            "pop %%"REG_a"			\n\t"
+#else
             "movq (%2), %%mm5			\n\t" // qmat[0]
+#endif
             "pxor %%mm6, %%mm6			\n\t"
             "psubw (%3), %%mm6			\n\t" // -bias[0]
             "mov $-128, %%"REG_a"		\n\t"
@@ -128,7 +135,11 @@
             "movd %%mm3, %%"REG_a"		\n\t"
             "movzb %%al, %%"REG_a"		\n\t" // last_non_zero_p1
 	    : "+a" (last_non_zero_p1)
+#if defined(PIC) && !defined(ARCH_X86_64)
+            : "r" (block+64), "m" (qmat), "r" (bias),
+#else
             : "r" (block+64), "r" (qmat), "r" (bias),
+#endif
               "r" (inv_zigzag_direct16+64), "r" (temp_block+64)
         );
         // note the asm is split cuz gcc doesnt like that many operands ...
@@ -157,7 +168,14 @@
             "psubw %%mm1, %%mm0			\n\t" // ABS(block[i])
             "movq (%3, %%"REG_a"), %%mm6	\n\t" // bias[0]
             "paddusw %%mm6, %%mm0		\n\t" // ABS(block[i]) + bias[0]
+#if defined(PIC) && !defined(ARCH_X86_64)
+            "push %%"REG_a"			\n\t"
+            "movl %2, %%"REG_a"			\n\t"
+            "movq (%%"REG_a", %%"REG_a"), %%mm5	\n\t" // qmat[i]
+            "pop %%"REG_a"			\n\t"
+#else
             "movq (%2, %%"REG_a"), %%mm5		\n\t" // qmat[i]
+#endif
             "pmulhw %%mm5, %%mm0		\n\t" // (ABS(block[i])*qmat[0] + bias[0]*qmat[0])>>16
             "por %%mm0, %%mm4			\n\t" 
             "pxor %%mm1, %%mm0			\n\t" 
@@ -179,7 +197,11 @@
             "movd %%mm3, %%"REG_a"		\n\t"
             "movzb %%al, %%"REG_a"		\n\t" // last_non_zero_p1
 	    : "+a" (last_non_zero_p1)
+#if defined(PIC) && !defined(ARCH_X86_64)
+            : "r" (block+64), "m" (qmat+64), "r" (bias+64),
+#else
             : "r" (block+64), "r" (qmat+64), "r" (bias+64),
+#endif
               "r" (inv_zigzag_direct16+64), "r" (temp_block+64)
         );
         // note the asm is split cuz gcc doesnt like that many operands ...
diff -ruN ffmpeg.orig/libavcodec/libpostproc/postprocess_template.c ffmpeg/libavcodec/libpostproc/postprocess_template.c
--- ffmpeg.orig/libavcodec/libpostproc/postprocess_template.c	2005-03-29 19:09:31 +0400
+++ ffmpeg/libavcodec/libpostproc/postprocess_template.c	2005-04-08 00:47:38 +0400
@@ -33,9 +33,11 @@
 #  define ALIGN_MASK "$0xFFFFFFFFFFFFFFF8"
 #else
 #  define REGa  eax
+#  define REGb  ebx
 #  define REGc  ecx
 #  define REGd  edx
 #  define REG_a  "eax"
+#  define REG_b  "ebx"
 #  define REG_c  "ecx"
 #  define REG_d  "edx"
 #  define REG_SP "esp"
@@ -3199,7 +3201,12 @@
 						"movq (%%"REG_a"), %%mm2	\n\t" // packedYOffset
 						"movq 8(%%"REG_a"), %%mm3	\n\t" // packedYScale
 						"lea (%2,%4), %%"REG_a"	\n\t"
+#if defined(PIC) && !defined(ARCH_X86_64)
+						"push %%"REG_b"         \n\t"
+						"lea (%3,%5), %%"REG_b"	\n\t"
+#else
 						"lea (%3,%5), %%"REG_d"	\n\t"
+#endif
 						"pxor %%mm4, %%mm4	\n\t"
 #ifdef HAVE_MMX2
 #define REAL_SCALED_CPY(src1, src2, dst1, dst2)					\
@@ -3255,12 +3262,22 @@
 #define SCALED_CPY(src1, src2, dst1, dst2)\
    REAL_SCALED_CPY(src1, src2, dst1, dst2)
 
+#if defined(PIC) && !defined(ARCH_X86_64)
+SCALED_CPY((%2)       , (%2, %4)      , (%3)       , (%3, %5))
+SCALED_CPY((%2, %4, 2), (%%REGa, %4, 2), (%3, %5, 2), (%%REGb, %5, 2))
+SCALED_CPY((%2, %4, 4), (%%REGa, %4, 4), (%3, %5, 4), (%%REGb, %5, 4))
+						"lea (%%"REG_a",%4,4), %%"REG_a"	\n\t"
+						"lea (%%"REG_b",%5,4), %%"REG_b"	\n\t"
+SCALED_CPY((%%REGa, %4), (%%REGa, %4, 2), (%%REGb, %5), (%%REGb, %5, 2))
+						"pop %%"REG_b"          \n\t"
+#else
 SCALED_CPY((%2)       , (%2, %4)      , (%3)       , (%3, %5))
 SCALED_CPY((%2, %4, 2), (%%REGa, %4, 2), (%3, %5, 2), (%%REGd, %5, 2))
 SCALED_CPY((%2, %4, 4), (%%REGa, %4, 4), (%3, %5, 4), (%%REGd, %5, 4))
 						"lea (%%"REG_a",%4,4), %%"REG_a"	\n\t"
 						"lea (%%"REG_d",%5,4), %%"REG_d"	\n\t"
 SCALED_CPY((%%REGa, %4), (%%REGa, %4, 2), (%%REGd, %5), (%%REGd, %5, 2))
+#endif
 
 
 						: "=&a" (packedOffsetAndScale)
@@ -3269,7 +3286,11 @@
 						"r"(dst),
 						"r" ((long)srcStride),
 						"r" ((long)dstStride)
+#if defined(PIC) && !defined(ARCH_X86_64)
+						: "%"REG_b
+#else
 						: "%"REG_d
+#endif
 					);
 #else
 				for(i=0; i<8; i++)
@@ -3282,7 +3303,12 @@
 #ifdef HAVE_MMX
 					asm volatile(
 						"lea (%0,%2), %%"REG_a"	\n\t"
+#if defined(PIC) && !defined(ARCH_X86_64)
+						"push %%"REG_b"         \n\t"
+						"lea (%1,%3), %%"REG_b"	\n\t"
+#else
 						"lea (%1,%3), %%"REG_d"	\n\t"
+#endif
 
 #define REAL_SIMPLE_CPY(src1, src2, dst1, dst2)				\
 						"movq " #src1 ", %%mm0	\n\t"\
@@ -3293,18 +3319,32 @@
 #define SIMPLE_CPY(src1, src2, dst1, dst2)\
    REAL_SIMPLE_CPY(src1, src2, dst1, dst2)
 
+#if defined(PIC) && !defined(ARCH_X86_64)
+SIMPLE_CPY((%0)       , (%0, %2)      , (%1)       , (%1, %3))
+SIMPLE_CPY((%0, %2, 2), (%%REGa, %2, 2), (%1, %3, 2), (%%REGb, %3, 2))
+SIMPLE_CPY((%0, %2, 4), (%%REGa, %2, 4), (%1, %3, 4), (%%REGb, %3, 4))
+						"lea (%%"REG_a",%2,4), %%"REG_a"	\n\t"
+						"lea (%%"REG_b",%3,4), %%"REG_b"	\n\t"
+SIMPLE_CPY((%%REGa, %2), (%%REGa, %2, 2), (%%REGb, %3), (%%REGb, %3, 2))
+						"pop %%"REG_b"          \n\t"
+#else
 SIMPLE_CPY((%0)       , (%0, %2)      , (%1)       , (%1, %3))
 SIMPLE_CPY((%0, %2, 2), (%%REGa, %2, 2), (%1, %3, 2), (%%REGd, %3, 2))
 SIMPLE_CPY((%0, %2, 4), (%%REGa, %2, 4), (%1, %3, 4), (%%REGd, %3, 4))
 						"lea (%%"REG_a",%2,4), %%"REG_a"	\n\t"
 						"lea (%%"REG_d",%3,4), %%"REG_d"	\n\t"
 SIMPLE_CPY((%%REGa, %2), (%%REGa, %2, 2), (%%REGd, %3), (%%REGd, %3, 2))
+#endif
 
 						: : "r" (src),
 						"r" (dst),
 						"r" ((long)srcStride),
 						"r" ((long)dstStride)
+#if defined(PIC) && !defined(ARCH_X86_64)
+						: "%"REG_a, "%"REG_b
+#else
 						: "%"REG_a, "%"REG_d
+#endif
 					);
 #else
 				for(i=0; i<8; i++)
diff -ruN ffmpeg.orig/libavcodec/Makefile ffmpeg/libavcodec/Makefile
--- ffmpeg.orig/libavcodec/Makefile	2005-04-08 00:47:17 +0400
+++ ffmpeg/libavcodec/Makefile	2005-04-08 00:47:38 +0400
@@ -114,7 +114,7 @@
 ifeq ($(SHARED_PP),yes)
 EXTRALIBS += -L$(VPATH)/libpostproc -lpostproc
 else
-# LIBS += libpostproc/libpostproc.a ... should be fixed
+LIBS += libpostproc/libpostproc.a # ... should be fixed
 OBJS += libpostproc/postprocess.o
 endif
 endif
@@ -211,7 +211,7 @@
 endif
 TESTS= imgresample-test dct-test motion-test fft-test
 
-all: $(LIB) $(SLIB)
+all: $(LIB) $(SLIB) $(LIBS)
 
 amrlibs:
 	$(MAKE) -C amr spclib fipoplib
@@ -239,6 +239,11 @@
 libpostproc/libpostproc.a:
 	$(MAKE) -C libpostproc
 
+ifeq ($(TARGET_ARCH_PARISC),yes)
+motion_est.o: motion_est.c
+	$(CC) $(CFLAGS) -O1 -c -o $@ $<
+endif
+
 %.o: %.c
 	$(CC) $(CFLAGS) -c -o $@ $< 
 
diff -ruN ffmpeg.orig/configure ffmpeg/configure
--- ffmpeg.orig/configure	2005-04-08 00:47:17 +0400
+++ ffmpeg/configure	2005-04-08 00:48:59 +0400
@@ -141,6 +141,12 @@
   sh4)
     cpu="sh4"
   ;;
+  parisc|parisc64)
+    cpu="parisc"
+  ;;
+  s390)
+    cpu="s390"
+  ;;
   *)
     cpu="unknown"
   ;;
@@ -906,7 +912,7 @@
 EOF
 
 builtin_vector=no
-if $cc -o $TMPO $TMPC 2> /dev/null ; then
+if $cc -o $TMPO $TMPC -msse 2> /dev/null ; then
   builtin_vector=yes
 fi
 
@@ -1216,6 +1222,12 @@
 elif test "$cpu" = "sh4" ; then
   echo "TARGET_ARCH_SH4=yes" >> config.mak
   echo "#define ARCH_SH4 1" >> $TMPH
+elif test "$cpu" = "parisc" ; then
+  echo "TARGET_ARCH_PARISC=yes" >> config.mak
+  echo "#define ARCH_PARISC 1" >> $TMPH
+elif test "$cpu" = "s390" ; then
+  echo "TARGET_ARCH_S390=yes" >> config.mak
+  echo "#define ARCH_S390 1" >> $TMPH
 fi
 echo "#define TUNECPU $TUNECPU" >> $TMPH
 if test "$bigendian" = "yes" ; then
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin