[MPlayer-users] won't compile under SuSE Linux 9.1?
Nenad Radulovic
nesha_burton at yahoo.com
Fri Jun 4 21:23:12 CEST 2004
I had a problem compiling MPlayer-1.0pre3 under SuSE
Linux 9.1 (it compiled ok under SuSE 9.0) and I
managed to solve it. I modified some source files,
removing "static" command from some const definitions,
and I created the patch which allows MPlayer to
compile and run under SuSE 9.1 (possibly on all
Linuxes with 2.6.xx kernel).
Here's the patch:
#!/bin/sh
# one ugly script, I know it looks like beginner
stuff, but it works...
echo -e "This is the patch you need in order to
compile MPlayer-1.0pre3"
echo -e "under SuSE Linux 9.1 for X86
architecture.\nMade by Burton ::
email:nesha_burton at yahoo.com\n\n"
if test -f mplayer.c; then
echo "Now patching files..."
else
echo -e "You need to copy/move and execute this script
from within MPlayer-1.0pre3 directory!\a"
exit
fi
echo "72c72" >temporary.tmp
echo "< static uint8_t bit_reverse_512[] = {"
>>temporary.tmp
echo "---" >>temporary.tmp
echo "> uint8_t bit_reverse_512[] = {" >>temporary.tmp
echo "106c106" >>temporary.tmp
echo "< static float __attribute__((aligned(16)))
ps111_1[4]={1,1,1,-1};" >>temporary.tmp
echo "---" >>temporary.tmp
echo "> float __attribute__((aligned(16)))
ps111_1[4]={1,1,1,-1};" >>temporary.tmp
patch ./liba52/imdct.c temporary.tmp
rm temporary.tmp
echo "10,13c10,13" >temporary.tmp
echo "< static uint64_t __attribute__((aligned(8)))
magicF2W= 0x43c0000043c00000LL;" >>temporary.tmp
echo "< static uint64_t __attribute__((aligned(8)))
wm1010= 0xFFFF0000FFFF0000LL;" >>temporary.tmp
echo "< static uint64_t __attribute__((aligned(8)))
wm0101= 0x0000FFFF0000FFFFLL;" >>temporary.tmp
echo "< static uint64_t __attribute__((aligned(8)))
wm1100= 0xFFFFFFFF00000000LL;" >>temporary.tmp
echo "---" >>temporary.tmp
echo "> uint64_t __attribute__((aligned(8))) magicF2W=
0x43c0000043c00000LL;" >>temporary.tmp
echo "> uint64_t __attribute__((aligned(8))) wm1010=
0xFFFF0000FFFF0000LL;" >>temporary.tmp
echo "> uint64_t __attribute__((aligned(8))) wm0101=
0x0000FFFF0000FFFFLL;" >>temporary.tmp
echo "> uint64_t __attribute__((aligned(8))) wm1100=
0xFFFFFFFF00000000LL;" >>temporary.tmp
patch ./liba52/resample_mmx.c temporary.tmp
rm temporary.tmp
echo "34,35c34,35" >temporary.tmp
echo "< static const uint64_t ff_pw_20 __attribute__
((aligned(8))) = 0x0014001400140014ULL;"
>>temporary.tmp
echo "< static const uint64_t ff_pw_3 __attribute__
((aligned(8))) = 0x0003000300030003ULL;"
>>temporary.tmp
echo "---" >>temporary.tmp
echo "> const uint64_t ff_pw_20 __attribute__
((aligned(8))) = 0x0014001400140014ULL;"
>>temporary.tmp
echo "> const uint64_t ff_pw_3 __attribute__
((aligned(8))) = 0x0003000300030003ULL;"
>>temporary.tmp
patch ./libavcodec/i386/dsputil_mmx.c temporary.tmp
rm temporary.tmp
echo "29c29" >temporary.tmp
echo "< static __attribute__ ((aligned(8), unused))
uint64_t bone= 0x0101010101010101LL;" >>temporary.tmp
echo "---" >>temporary.tmp
echo "> __attribute__ ((aligned(8), unused)) uint64_t
bone= 0x0101010101010101LL;" >>temporary.tmp
patch ./libavcodec/i386/motion_est_mmx.c temporary.tmp
rm temporary.tmp
echo "49c49" >temporary.tmp
echo "< static const uint64_t
__attribute__((aligned(8))) d40000=
0x0000000000040000ULL;" >>temporary.tmp
echo "---" >>temporary.tmp
echo "> const uint64_t __attribute__((aligned(8)))
d40000= 0x0000000000040000ULL;" >>temporary.tmp
patch ./libavcodec/i386/simple_idct_mmx.c
temporary.tmp
rm temporary.tmp
echo "109,110c109,110" >temporary.tmp
echo "< static uint64_t __attribute__((aligned(8)))
b00=0x0000000000000000LL;" >>temporary.tmp
echo "< static uint64_t __attribute__((aligned(8)))
b01=0x0101010101010101LL;" >>temporary.tmp
echo "---" >>temporary.tmp
echo "> uint64_t __attribute__((aligned(8)))
b00=0x0000000000000000LL;" >>temporary.tmp
echo "> uint64_t __attribute__((aligned(8)))
b01=0x0101010101010101LL;" >>temporary.tmp
echo "112,113c112,113" >>temporary.tmp
echo "< static uint64_t __attribute__((aligned(8)))
b08=0x0808080808080808LL;" >>temporary.tmp
echo "< static uint64_t __attribute__((aligned(8)))
b80=0x8080808080808080LL;" >>temporary.tmp
echo "---" >>temporary.tmp
echo "> uint64_t __attribute__((aligned(8)))
b08=0x0808080808080808LL;" >>temporary.tmp
echo "> uint64_t __attribute__((aligned(8)))
b80=0x8080808080808080LL;" >>temporary.tmp
echo "122c122" >>temporary.tmp
echo "< static const int deringThreshold= 20;"
>>temporary.tmp
echo "---" >>temporary.tmp
echo "> const int deringThreshold= 20;"
>>temporary.tmp
patch ./libavcodec/libpostproc/postprocess.c
temporary.tmp
rm temporary.tmp
echo "22c22" >temporary.tmp
echo "< static const uint64_t bFF
__attribute__((aligned(8))) = 0xFFFFFFFFFFFFFFFFULL;"
>>temporary.tmp
echo "---" >>temporary.tmp
echo "> const uint64_t bFF
__attribute__((aligned(8))) = 0xFFFFFFFFFFFFFFFFULL;"
>>temporary.tmp
patch ./libvo/osd.c temporary.tmp
rm temporary.tmp
echo "15c15" >temporary.tmp
echo "< static float plus_1f = 1.0;" >>temporary.tmp
echo "---" >>temporary.tmp
echo "> float plus_1f = 1.0;" >>temporary.tmp
patch ./mp3lib/dct64_3dnow.c temporary.tmp
rm temporary.tmp
echo "13,14c13,14" >temporary.tmp
echo "< static unsigned long long
__attribute__((aligned(8))) null_one =
0x0000ffff0000ffffULL;" >>temporary.tmp
echo "< static unsigned long long
__attribute__((aligned(8))) one_null =
0xffff0000ffff0000ULL;" >>temporary.tmp
echo "---" >>temporary.tmp
echo "> unsigned long long __attribute__((aligned(8)))
null_one = 0x0000ffff0000ffffULL;" >>temporary.tmp
echo "> unsigned long long __attribute__((aligned(8)))
one_null = 0xffff0000ffff0000ULL;" >>temporary.tmp
patch ./mp3lib/decode_MMX.c temporary.tmp
rm temporary.tmp
echo "30c30" >temporary.tmp
echo "< static long bo=1;" >>temporary.tmp
echo "---" >>temporary.tmp
echo "> long bo=1;" >>temporary.tmp
patch ./mp3lib/decode_i586.c temporary.tmp
rm temporary.tmp
echo "51c51" >temporary.tmp
echo "< static long intwindiv = 0x47800000;"
>>temporary.tmp
echo "---" >>temporary.tmp
echo "> long intwindiv = 0x47800000;" >>temporary.tmp
patch ./mp3lib/tabinit_MMX.c temporary.tmp
rm temporary.tmp
echo "74,76c74,76" >temporary.tmp
echo "< static const uint64_t mask32b
__attribute__((aligned(8))) = 0x000000FF000000FFULL;"
>>temporary.tmp
echo "< static const uint64_t mask32g
__attribute__((aligned(8))) = 0x0000FF000000FF00ULL;"
>>temporary.tmp
echo "< static const uint64_t mask32r
__attribute__((aligned(8))) = 0x00FF000000FF0000ULL;"
>>temporary.tmp
echo "---" >>temporary.tmp
echo "> const uint64_t mask32b
__attribute__((aligned(8))) = 0x000000FF000000FFULL;"
>>temporary.tmp
echo "> const uint64_t mask32g
__attribute__((aligned(8))) = 0x0000FF000000FF00ULL;"
>>temporary.tmp
echo "> const uint64_t mask32r
__attribute__((aligned(8))) = 0x00FF000000FF0000ULL;"
>>temporary.tmp
echo "83,85c83,85" >>temporary.tmp
echo "< static const uint64_t mask24b
__attribute__((aligned(8))) = 0x00FF0000FF0000FFULL;"
>>temporary.tmp
echo "< static const uint64_t mask24g
__attribute__((aligned(8))) = 0xFF0000FF0000FF00ULL;"
>>temporary.tmp
echo "< static const uint64_t mask24r
__attribute__((aligned(8))) = 0x0000FF0000FF0000ULL;"
>>temporary.tmp
echo "---" >>temporary.tmp
echo "> const uint64_t mask24b
__attribute__((aligned(8))) = 0x00FF0000FF0000FFULL;"
>>temporary.tmp
echo "> const uint64_t mask24g
__attribute__((aligned(8))) = 0xFF0000FF0000FF00ULL;"
>>temporary.tmp
echo "> const uint64_t mask24r
__attribute__((aligned(8))) = 0x0000FF0000FF0000ULL;"
>>temporary.tmp
patch ./postproc/rgb2rgb.c temporary.tmp
rm temporary.tmp
echo "183,185c183,185" >temporary.tmp
echo "< static const uint64_t bgr2YCoeff
__attribute__((aligned(8))) = 0x000000210041000DULL;"
>>temporary.tmp
echo "< static const uint64_t bgr2UCoeff
__attribute__((aligned(8))) = 0x0000FFEEFFDC0038ULL;"
>>temporary.tmp
echo "< static const uint64_t bgr2VCoeff
__attribute__((aligned(8))) = 0x00000038FFD2FFF8ULL;"
>>temporary.tmp
echo "---" >>temporary.tmp
echo "> const uint64_t bgr2YCoeff
__attribute__((aligned(8))) = 0x000000210041000DULL;"
>>temporary.tmp
echo "> const uint64_t bgr2UCoeff
__attribute__((aligned(8))) = 0x0000FFEEFFDC0038ULL;"
>>temporary.tmp
echo "> const uint64_t bgr2VCoeff
__attribute__((aligned(8))) = 0x00000038FFD2FFF8ULL;"
>>temporary.tmp
echo "191,193c191,193" >>temporary.tmp
echo "< static const uint64_t bgr2YOffset
__attribute__((aligned(8))) = 0x1010101010101010ULL;"
>>temporary.tmp
echo "< static const uint64_t bgr2UVOffset
__attribute__((aligned(8)))= 0x8080808080808080ULL;"
>>temporary.tmp
echo "< static const uint64_t w1111
__attribute__((aligned(8))) = 0x0001000100010001ULL;"
>>temporary.tmp
echo "---" >>temporary.tmp
echo "> const uint64_t bgr2YOffset
__attribute__((aligned(8))) = 0x1010101010101010ULL;"
>>temporary.tmp
echo "> const uint64_t bgr2UVOffset
__attribute__((aligned(8)))= 0x8080808080808080ULL;"
>>temporary.tmp
echo "> const uint64_t w1111
__attribute__((aligned(8))) = 0x0001000100010001ULL;"
>>temporary.tmp
patch ./postproc/swscale.c temporary.tmp
rm temporary.tmp
echo "Done."
That's it. To people who wrote the code that I
modified: Please tell me if this would cause any
disfunction or bug in MPlayer.
l8r,
Nesha
__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
http://messenger.yahoo.com/
More information about the MPlayer-users
mailing list