From e4b700c6f8db40de885970069b8eea772a59a183 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 3 Oct 2008 21:49:25 +0000 Subject: [PATCH 001/134] CVS --> Subversion git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27689 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index ce55855c1a..28b5a4cfc4 100755 --- a/configure +++ b/configure @@ -3,7 +3,7 @@ # Original version (C) 2000 Pontscho/fresh!mindworkz # pontscho@makacs.poliod.hu # -# History / Contributors: check the cvs log ! +# History / Contributors: Check the Subversion log. # # Cleanups all over the place (c) 2001 pl # From 1b697bc8d6514a7c3c203d0770b183b7fc395ec4 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 3 Oct 2008 21:54:21 +0000 Subject: [PATCH 002/134] whitespace cosmetics git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27690 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 92febf4f3e..6af1df11f9 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -9095,7 +9095,6 @@ FIXME: Document this. FIXME: Document this. . . -. .SS nuv (\-nuvopts) . Nuppel video is based on RTJPEG and LZO. @@ -10517,7 +10516,6 @@ Encryption key the demuxer should use. This is the raw binary data of the key converted to a hexadecimal string. . . -. .SS FFmpeg libavformat muxers (\-lavfopts) (also see \-of lavf) . .TP From c378cd84bebb84e085576d36f8ee278f5f145994 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 3 Oct 2008 21:55:05 +0000 Subject: [PATCH 003/134] vo_fbdev now supports -geometry. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27691 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 6af1df11f9..a63b5e482e 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -3080,7 +3080,7 @@ than the screen. .br .I NOTE: This option is only supported by the x11, xmga, xv, xvmc, xvidix, -gl, gl2, directx and tdfxfb video output drivers. +gl, gl2, directx, fbdev and tdfxfb video output drivers. .sp 1 .I EXAMPLE: .PD 0 From 8a0c673c032f548f1f53d0efc263d1ffab32f623 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 3 Oct 2008 22:39:06 +0000 Subject: [PATCH 004/134] Fix vsscanf test. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27692 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure b/configure index 28b5a4cfc4..25401dd37d 100755 --- a/configure +++ b/configure @@ -3441,7 +3441,9 @@ echores "$_strsep" echocheck "vsscanf()" cat > $TMPC << EOF +#define _ISOC99_SOURCE #include +#include int main(void) { vsscanf(0, 0, 0); return 0; } EOF _vsscanf=no From 6c9eadf059e9ef87a7b11ae7cd71b66dfa9855d3 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 3 Oct 2008 22:46:33 +0000 Subject: [PATCH 005/134] spelling cosmetics git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27693 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/configure b/configure index 25401dd37d..b421337866 100755 --- a/configure +++ b/configure @@ -6021,9 +6021,8 @@ if test "$_theora" = auto ; then #include #include int main(void) { - /* theora is in flux, make sure that all interface routines and - * datatypes exist and work the way we expect it, so we don't break - * mplayer */ ++ /* Theora is in flux, make sure that all interface routines and datatypes ++ * exist and work the way we expect it, so we don't break MPlayer. */ ogg_packet op; theora_comment tc; theora_info inf; From c4c2d9421499e396a318f0224ff48f4c63e8e733 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 3 Oct 2008 22:49:53 +0000 Subject: [PATCH 006/134] 100l copy and paste typo fix git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27694 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index b421337866..90da5171b0 100755 --- a/configure +++ b/configure @@ -6021,8 +6021,8 @@ if test "$_theora" = auto ; then #include #include int main(void) { -+ /* Theora is in flux, make sure that all interface routines and datatypes -+ * exist and work the way we expect it, so we don't break MPlayer. */ + /* Theora is in flux, make sure that all interface routines and datatypes + * exist and work the way we expect it, so we don't break MPlayer. */ ogg_packet op; theora_comment tc; theora_info inf; From 78066d185ed46c36775b4311500b18456c5aa08e Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 3 Oct 2008 23:44:40 +0000 Subject: [PATCH 007/134] Remove MinGW cruft. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27695 b3059339-0415-0410-9bf9-f77b7e298cf2 --- TOOLS/netstream.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/TOOLS/netstream.c b/TOOLS/netstream.c index 0009f673f6..4a44e9581a 100644 --- a/TOOLS/netstream.c +++ b/TOOLS/netstream.c @@ -59,11 +59,6 @@ char* out_filename = NULL; char* force_fourcc=NULL; char* passtmpfile="divx2pass.log"; -#ifdef __MINGW32__ -#define usleep sleep -void strsep() {}; -#endif - static unsigned short int port = 10000; typedef struct client_st client_t; From 6685ee530bcfff8544e3d9221fe1791f1282556f Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 09:27:46 +0000 Subject: [PATCH 008/134] Skip setting variables to empty values in the CPU detection code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27696 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) diff --git a/configure b/configure index 90da5171b0..d21e34b2ef 100755 --- a/configure +++ b/configure @@ -1888,10 +1888,6 @@ EOF _arch='IA64' _target_arch='ARCH_IA64 = yes' iproc='ia64' - proc='' - _march='' - _mcpu='' - _optimizing='' ;; x86_64|amd64) @@ -1996,7 +1992,6 @@ EOF else proc=v8 fi - _march='' _mcpu="-mcpu=$proc" _optimizing="$proc" ;; @@ -2007,7 +2002,6 @@ EOF _vis='yes' iproc='sparc' proc='ultrasparc' - _march='' _mcpu="-mcpu=$proc" _optimizing="$proc" ;; @@ -2016,20 +2010,12 @@ EOF _arch='ARM ARMV4L' _target_arch='ARCH_ARMV4L = yes' iproc='arm' - proc='' - _march='' - _mcpu='' - _optimizing='' ;; sh) _arch='SH' _target_arch='ARCH_SH = yes' iproc='sh' - proc='' - _march='' - _mcpu='' - _optimizing='' ;; ppc|ppc64|powerpc|powerpc64) @@ -2037,10 +2023,6 @@ EOF _def_dcbzl='#undef HAVE_DCBZL' _target_arch='ARCH_POWERPC = yes' iproc='ppc' - proc='' - _march='' - _mcpu='' - _optimizing='' echocheck "CPU type" case $system_name in @@ -2148,7 +2130,6 @@ EOF _arch='ALPHA' _target_arch='ARCH_ALPHA = yes' iproc='alpha' - _march='' echocheck "CPU type" cat > $TMPC << EOF @@ -2190,10 +2171,6 @@ EOF _arch='SGI_MIPS' _target_arch='ARCH_SGI_MIPS = yes' iproc='sgi-mips' - proc='' - _march='' - _mcpu='' - _optimizing='' if irix ; then echocheck "CPU type" @@ -2219,60 +2196,35 @@ EOF _arch='PA_RISC' _target_arch='ARCH_PA_RISC = yes' iproc='PA-RISC' - proc='' - _march='' - _mcpu='' - _optimizing='' ;; s390) _arch='S390' _target_arch='ARCH_S390 = yes' iproc='390' - proc='' - _march='' - _mcpu='' - _optimizing='' ;; s390x) _arch='S390X' _target_arch='ARCH_S390X = yes' iproc='390x' - proc='' - _march='' - _mcpu='' - _optimizing='' ;; vax) _arch='VAX' _target_arch='ARCH_VAX = yes' iproc='vax' - proc='' - _march='' - _mcpu='' - _optimizing='' ;; xtensa) _arch='XTENSA' _target_arch='ARCH_XTENSA = yes' iproc='xtensa' - proc='' - _march='' - _mcpu='' - _optimizing='' ;; generic) _arch='GENERIC' _target_arch='ARCH_GENERIC = yes' - iproc='' - proc='' - _march='' - _mcpu='' - _optimizing='' ;; *) From 677ce98c852369c6b1c1aa6f4928c1713c7351cb Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 09:38:10 +0000 Subject: [PATCH 009/134] Merge SPARC and SPARC64 sections in the CPU detection code. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27697 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/configure b/configure index d21e34b2ef..e418f95303 100755 --- a/configure +++ b/configure @@ -1972,11 +1972,14 @@ EOF echores "$proc" ;; - sparc) + sparc|sparc64) _arch='SPARC' _target_arch='ARCH_SPARC = yes' iproc='sparc' - if sunos ; then + if test "$host_arch" = "sparc64" ; then + _vis='yes' + proc='ultrasparc' + elif sunos ; then echocheck "CPU type" karch=`uname -m` case "`echo $karch`" in @@ -1996,16 +1999,6 @@ EOF _optimizing="$proc" ;; - sparc64) - _arch='SPARC' - _target_arch='ARCH_SPARC = yes' - _vis='yes' - iproc='sparc' - proc='ultrasparc' - _mcpu="-mcpu=$proc" - _optimizing="$proc" - ;; - arm|armv4l|armv5tel) _arch='ARM ARMV4L' _target_arch='ARCH_ARMV4L = yes' From 4d040d35d09bcdb488e528fb4c8dcce568fd2556 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 09:52:07 +0000 Subject: [PATCH 010/134] Remove MPlayer-specific MP_WORDSIZE hack. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27698 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/rgb2rgb_template.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index c98c080978..ce72179ea3 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -30,11 +30,6 @@ #include #include /* for __WORDSIZE */ -#ifndef __WORDSIZE -// #warning You have a misconfigured system and will probably lose performance! -#define __WORDSIZE MP_WORDSIZE -#endif - #undef PREFETCH #undef MOVNTQ #undef EMMS From 526cfa28a225aaf274a80f3cd8d968a3485768e8 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 10:16:48 +0000 Subject: [PATCH 011/134] Remove word size check and macro and use __WORDSIZE directly instead. It has been done this way in libswscale for years without apparent ill effect. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27699 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 13 ------------- libmpcodecs/vf_divtc.c | 4 ++-- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/configure b/configure index e418f95303..86b436061d 100755 --- a/configure +++ b/configure @@ -2927,17 +2927,6 @@ fi echores "$_fast_inttypes" -echocheck "word size" -_mp_wordsize="#undef MP_WORDSIZE" -cat > $TMPC << EOF -#include -#include -int main(void) { printf("%d\n", sizeof(size_t)*8); return 0; } -EOF -cc_check && _wordsize=`$TMPEXE` && _mp_wordsize="#define MP_WORDSIZE $_wordsize" -echores "$_wordsize" - - echocheck "malloc.h" cat > $TMPC << EOF #include @@ -8500,8 +8489,6 @@ $_def_confwin32 /* Define this to any prefered value from 386 up to infinity with step 100 */ #define __CPU__ $iproc -$_mp_wordsize - $_def_vcd #ifdef sun diff --git a/libmpcodecs/vf_divtc.c b/libmpcodecs/vf_divtc.c index d2fcb48dbe..6c97463f4b 100644 --- a/libmpcodecs/vf_divtc.c +++ b/libmpcodecs/vf_divtc.c @@ -128,7 +128,7 @@ static unsigned int checksum_plane(unsigned char *p, unsigned char *z, unsigned int shift; uint32_t sum, t; unsigned char *e, *e2; -#if MP_WORDSIZE==64 +#if __WORDSIZE==64 typedef uint64_t wsum_t; #else typedef uint32_t wsum_t; @@ -143,7 +143,7 @@ static unsigned int checksum_plane(unsigned char *p, unsigned char *z, for(wsum=0, e2=e-sizeof(wsum_t)+1; p>32^wsum)); #else t=be2me_32(wsum); From 220ec4f1250b108313abce1ad53532d53d0a5ce9 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 10:18:42 +0000 Subject: [PATCH 012/134] FAAC/FAAD are no longer the only available AAC encoders/decoders. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27700 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 86b436061d..361820a3d6 100755 --- a/configure +++ b/configure @@ -6110,7 +6110,7 @@ fi echores "$_musepack" -echocheck "FAAC (AAC encoder) support" +echocheck "FAAC support" if test "$_faac" = auto ; then cat > $TMPC < @@ -6141,7 +6141,7 @@ _res_comment="in libavcodec: $_faac_lavc" echores "$_faac" -echocheck "FAAD2 (AAC) support" +echocheck "FAAD2 support" if test "$_faad_internal" = auto ; then if x86_32 && test cc_vendor=gnu; then case $cc_version in From b92479505663bed04bf9b4178d46de648266104b Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 10:39:29 +0000 Subject: [PATCH 013/134] Do not set DESTDIR to an empty value so that it can be overridden on the command line. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27701 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 361820a3d6..59dc36995d 100755 --- a/configure +++ b/configure @@ -7762,7 +7762,6 @@ MAN_LANG = $man_lang MAN_LANGS = $man_langs MAN_LANG_ALL = $man_lang_all -DESTDIR = prefix = \$(DESTDIR)$_prefix BINDIR = \$(DESTDIR)$_bindir DATADIR = \$(DESTDIR)$_datadir From 40505981d73365aede3f58efbe356fc87093c1c9 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 10:53:28 +0000 Subject: [PATCH 014/134] Remove unused options --ar and --ranlib. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27702 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/configure b/configure index 59dc36995d..3e57c99925 100755 --- a/configure +++ b/configure @@ -409,8 +409,6 @@ Miscellaneous options: --cc=COMPILER C compiler to build MPlayer [gcc] --host-cc=COMPILER C compiler for tools needed while building [gcc] --as=ASSEMBLER assembler to build MPlayer [as] - --ar=AR librarian to build MPlayer [ar] - --ranlib=RANLIB ranlib to build MPlayer [ranlib] --windres=WINDRES windres to build MPlayer [windres] --target=PLATFORM target platform (i386-linux, arm-linux, etc) --enable-static build a statically linked binary @@ -488,10 +486,8 @@ _iwmmxt=auto _mtrr=auto _altivec=auto _install=install -_ranlib=ranlib _windres=windres _cc=cc -_ar=ar test "$CC" && _cc="$CC" _as=auto _runtime_cpudetection=no @@ -791,12 +787,6 @@ for ac_option do --as=*) _as=`echo $ac_option | cut -d '=' -f 2` ;; - --ar=*) - _ar=`echo $ac_option | cut -d '=' -f 2` - ;; - --ranlib=*) - _ranlib=`echo $ac_option | cut -d '=' -f 2` - ;; --windres=*) _windres=`echo $ac_option | cut -d '=' -f 2` ;; @@ -1385,12 +1375,6 @@ if aix ; then _ld_extra="$_ld_extra -lC" fi -if irix ; then - _ranlib='ar -r' -elif linux ; then - _ranlib='true' -fi - if win32 ; then _exesuf=".exe" # -lwinmm is always needed for osdep/timer-win2.c @@ -7769,11 +7753,9 @@ MANDIR = \$(DESTDIR)$_mandir CONFDIR = \$(DESTDIR)$_confdir LIBDIR = \$(DESTDIR)$_libdir -AR = $_ar CC = $_cc CXX = $_cc HOST_CC = $_host_cc -RANLIB = $_ranlib WINDRES = $_windres INSTALL = $_install INSTALLSTRIP = $_install_strip From e46c293c578ae1726cc2d603a4eb98801bd9cb71 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 10:57:57 +0000 Subject: [PATCH 015/134] Remove unused LIBDIR Makefile variable from config.mak. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27703 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index 3e57c99925..80a8efc19f 100755 --- a/configure +++ b/configure @@ -7751,7 +7751,6 @@ BINDIR = \$(DESTDIR)$_bindir DATADIR = \$(DESTDIR)$_datadir MANDIR = \$(DESTDIR)$_mandir CONFDIR = \$(DESTDIR)$_confdir -LIBDIR = \$(DESTDIR)$_libdir CC = $_cc CXX = $_cc From c43243575c2318b20c974a1533d01295e57c5a0e Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 11:06:50 +0000 Subject: [PATCH 016/134] cosmetics: Move around stuff in config.mak. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27704 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 80a8efc19f..739bfbd9f7 100755 --- a/configure +++ b/configure @@ -7796,16 +7796,6 @@ VO_SRCS = $_vosrc MENCODER = $_mencoder MPLAYER = $_mplayer -#internal libraries -LIBA52 = $_liba52 -LIBA52_INTERNAL = $_liba52_internal -LIBMPEG2 = $_libmpeg2 -MP3LIB = $_mp3lib -TREMOR_INTERNAL = $_tremor_internal - -HAVE_SYS_MMAN_H = $_mman -HAVE_POSIX_SELECT = $_posix_select - NEED_GETTIMEOFDAY = $_need_gettimeofday NEED_GLOB = $_need_glob NEED_MMAP = $_need_mmap @@ -7815,12 +7805,9 @@ NEED_STRSEP = $_need_strsep NEED_SWAB = $_need_swab NEED_VSSCANF = $_need_vsscanf -# audio output -OSS = $_ossaudio -ALSA9 = $_alsa9 -ALSA1X = $_alsa1x - # features +ALSA1X = $_alsa1x +ALSA9 = $_alsa9 APPLE_IR = $_apple_ir APPLE_REMOTE = $_apple_remote AUDIO_INPUT = $_audio_input @@ -7842,9 +7829,13 @@ GIF = $_gif GUI = $_gui GUI_GTK = $_gui_gtk GUI_WIN32 = $_gui_win32 +HAVE_POSIX_SELECT = $_posix_select +HAVE_SYS_MMAN_H = $_mman JOYSTICK = $_joystick JPEG = $_jpeg LADSPA = $_ladspa +LIBA52 = $_liba52 +LIBA52_INTERNAL = $_liba52_internal LIBASS = $_ass LIBDCA = $_libdca LIBDV = $_libdv @@ -7853,6 +7844,7 @@ LIBLZO = $_liblzo LIBMAD = $_mad LIBMENU = $_menu LIBMENU_DVBIN = $_menu_dvbin +LIBMPEG2 = $_libmpeg2 LIBNEMESI = $_nemesi LIBNUT = $_libnut LIBSMBCLIENT = $_smb @@ -7863,9 +7855,11 @@ LIVE555 = $_live MACOSX_BUNDLE = $_macosx_bundle MACOSX_FINDER = $_macosx_finder MP3LAME = $_mp3lame +MP3LIB = $_mp3lib MUSEPACK = $_musepack NATIVE_RTSP = $_native_rtsp NETWORK = $_network +OSS = $_ossaudio PE_EXECUTABLE = $_pe_executable PNG = $_png PVR = $_pvr @@ -7879,6 +7873,7 @@ REAL_CODECS = $_real SPEEX = $_speex STREAM_CACHE = $_stream_cache TOOLAME=$_toolame +TREMOR_INTERNAL = $_tremor_internal TV = $_tv TV_BSDBT848 = $_tv_bsdbt848 TV_DSHOW = $_tv_dshow From 5b3b982baff4fd793d32f4ce2bef3f9eb32d2149 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 11:27:39 +0000 Subject: [PATCH 017/134] cosmetics: Move around some more stuff in config.mak. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27705 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/configure b/configure index 739bfbd9f7..5240975714 100755 --- a/configure +++ b/configure @@ -7739,6 +7739,7 @@ cat > config.mak << EOF # Ensure that locale settings do not interfere with shell commands. export LC_ALL = C +CHARSET = $_charset DOC_LANG = $doc_lang DOC_LANGS = $doc_langs DOC_LANG_ALL = $doc_lang_all @@ -7755,9 +7756,9 @@ CONFDIR = \$(DESTDIR)$_confdir CC = $_cc CXX = $_cc HOST_CC = $_host_cc -WINDRES = $_windres INSTALL = $_install INSTALLSTRIP = $_install_strip +WINDRES = $_windres EXTRA_INC = $_inc_extra EXTRAXX_INC = $_inc_extra $_inc_extraxx @@ -7778,8 +7779,17 @@ EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm EXTRALIBS_MPLAYER = $_libs_mplayer EXTRALIBS_MENCODER = $_libs_mencoder -CHARSET = $_charset +DEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.h,\$^) | sed "s,[0-9a-z._-]*: \(\$(SRC_DIR)/\)*\([a-z0-9]*/\)[^/]* ,\\2&," + +MPDEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.xpm,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &," +MPDEPEND_CMD_CXX = \$(CC) -MM \$(CXXFLAGS) \$(filter-out %.xpm,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &," + +GETCH = $_getch HELP_FILE = $_mp_help +TIMER = $_timer + +AO_SRCS = $_aosrc +VO_SRCS = $_vosrc EXESUF = $_exesuf @@ -7787,12 +7797,6 @@ $_target_arch $_target_arch_x86 `echo $_cpuexts | tr '[a-z] ' '[A-Z]\n' | sed 's/^/HAVE_/;s/$/=yes/'` -GETCH = $_getch -TIMER = $_timer - -AO_SRCS = $_aosrc -VO_SRCS = $_vosrc - MENCODER = $_mencoder MPLAYER = $_mplayer @@ -7831,6 +7835,7 @@ GUI_GTK = $_gui_gtk GUI_WIN32 = $_gui_win32 HAVE_POSIX_SELECT = $_posix_select HAVE_SYS_MMAN_H = $_mman +HAVE_XVMC = $_xvmc JOYSTICK = $_joystick JPEG = $_jpeg LADSPA = $_ladspa @@ -7954,7 +7959,6 @@ CONFIG_ZLIB=$_zlib HAVE_PTHREADS = $_pthreads HAVE_W32THREADS = $_w32threads -HAVE_XVMC = $_xvmc `echo $_libavdecoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` `echo $_libavencoders | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` @@ -7962,12 +7966,6 @@ HAVE_XVMC = $_xvmc `echo $_libavdemuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` `echo $_libavmuxers | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` `echo $_libavbsfs | tr '[a-z] ' '[A-Z]\n' | sed 's/^/CONFIG_/;s/$/=yes/'` - -DEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.h,\$^) | sed "s,[0-9a-z._-]*: \(\$(SRC_DIR)/\)*\([a-z0-9]*/\)[^/]* ,\\2&," - -MPDEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.xpm,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &," -MPDEPEND_CMD_CXX = \$(CC) -MM \$(CXXFLAGS) \$(filter-out %.xpm,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &," - EOF ############################################################################# From 6e916bbf28c95028420a9092828f6dd69b7181c4 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 11:42:39 +0000 Subject: [PATCH 018/134] Remove unused HAVE_SYS_POLL_H definition from config.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27706 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 8 -------- 1 file changed, 8 deletions(-) diff --git a/configure b/configure index 5240975714..45dcfaf464 100755 --- a/configure +++ b/configure @@ -7994,14 +7994,6 @@ cat > $TMPH << EOF #define CONFIGURATION "$_configuration" -/* make sure we never get lavformat's poll() emulation, the results are - horrible if the X libs try to actually use it, see MPlayer-users - Message-ID: <45D49541.8060101@infernix.net> - Date: Thu, 15 Feb 2007 18:15:45 +0100 - Subject: [MPlayer-users] Crash with backtrace when playing back demuxed... -*/ -#define HAVE_SYS_POLL_H 1 - /* yes, we have inttypes.h */ #define HAVE_INTTYPES_H 1 From 02c93f7b98d7634ad0c787675648b6d689b9837c Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 11:47:00 +0000 Subject: [PATCH 019/134] Do not duplicate likely/unlikely #defines from libmpeg2/libavcodec in config.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27707 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 7 ------- 1 file changed, 7 deletions(-) diff --git a/configure b/configure index 45dcfaf464..fa1d595065 100755 --- a/configure +++ b/configure @@ -8033,13 +8033,6 @@ $_def_restrict_keyword /* __builtin_expect branch prediction hint */ $_def_builtin_expect -#ifdef HAVE_BUILTIN_EXPECT -#define likely(x) __builtin_expect ((x) != 0, 1) -#define unlikely(x) __builtin_expect ((x) != 0, 0) -#else -#define likely(x) (x) -#define unlikely(x) (x) -#endif /* attribute(used) as needed by some compilers */ #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300) From b91df4ad96504f4355491e70bc7f6bb45807ba1a Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 12:14:38 +0000 Subject: [PATCH 020/134] cosmetics: Improve some config.h comments. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27708 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/configure b/configure index fa1d595065..28a396b768 100755 --- a/configure +++ b/configure @@ -7997,7 +7997,7 @@ cat > $TMPH << EOF /* yes, we have inttypes.h */ #define HAVE_INTTYPES_H 1 -/* int_fastXY_t emulation */ +/* int_fastXY_t emulation, libmpeg2 + FFmpeg */ $_def_fast_inttypes /* libdvdcss */ @@ -8031,7 +8031,7 @@ $_def_dynamic_plugins /* "restrict" keyword */ $_def_restrict_keyword -/* __builtin_expect branch prediction hint */ +/* __builtin_expect branch prediction hint, libmpeg2 + FFmpeg */ $_def_builtin_expect /* attribute(used) as needed by some compilers */ @@ -8245,11 +8245,11 @@ $_def_corevideo $_def_quartz $_def_quicktime -/* Build our Win32-loader */ +/* Win32-loader support */ $_def_win32_loader /* FFmpeg */ -/* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */ +/* Define this to enable image postprocessing in libavcodec */ $_def_libpostproc $_def_libpostproc_a $_def_libpostproc_so @@ -8331,6 +8331,8 @@ $_def_mp3lib /* enable liba52 support */ $_def_liba52_internal $_def_liba52 + +/* enable libmpeg2 support */ $_def_libmpeg2 /* XAnim DLL support */ @@ -8355,7 +8357,7 @@ $_def_fastmemcpy /* Use UnRAR executable for Vobsubs */ $_def_unrar_exec -/* gui support, please do not edit this option */ +/* gui support */ $_def_gui $_def_gtk2 @@ -8650,7 +8652,8 @@ $_def_gethostbyname2 /* Extension defines */ `ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"` -$_def_altivec_h // enables usage of altivec.h +/* altivec.h support */ +$_def_altivec_h /* libvo options */ #define SCREEN_SIZE_X 1 From 5fa09d26e014356b1efa451a246d844df0df2902 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 12:24:18 +0000 Subject: [PATCH 021/134] 100l: Revert incorrect removal or --ar and --ranlib options. They are still needed for FFmpeg. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27709 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/configure b/configure index 28a396b768..eb5f16b448 100755 --- a/configure +++ b/configure @@ -409,6 +409,8 @@ Miscellaneous options: --cc=COMPILER C compiler to build MPlayer [gcc] --host-cc=COMPILER C compiler for tools needed while building [gcc] --as=ASSEMBLER assembler to build MPlayer [as] + --ar=AR librarian to build MPlayer [ar] + --ranlib=RANLIB ranlib to build MPlayer [ranlib] --windres=WINDRES windres to build MPlayer [windres] --target=PLATFORM target platform (i386-linux, arm-linux, etc) --enable-static build a statically linked binary @@ -486,8 +488,10 @@ _iwmmxt=auto _mtrr=auto _altivec=auto _install=install +_ranlib=ranlib _windres=windres _cc=cc +_ar=ar test "$CC" && _cc="$CC" _as=auto _runtime_cpudetection=no @@ -787,6 +791,12 @@ for ac_option do --as=*) _as=`echo $ac_option | cut -d '=' -f 2` ;; + --ar=*) + _ar=`echo $ac_option | cut -d '=' -f 2` + ;; + --ranlib=*) + _ranlib=`echo $ac_option | cut -d '=' -f 2` + ;; --windres=*) _windres=`echo $ac_option | cut -d '=' -f 2` ;; @@ -1375,6 +1385,12 @@ if aix ; then _ld_extra="$_ld_extra -lC" fi +if irix ; then + _ranlib='ar -r' +elif linux ; then + _ranlib='true' +fi + if win32 ; then _exesuf=".exe" # -lwinmm is always needed for osdep/timer-win2.c @@ -7753,11 +7769,13 @@ DATADIR = \$(DESTDIR)$_datadir MANDIR = \$(DESTDIR)$_mandir CONFDIR = \$(DESTDIR)$_confdir +AR = $_ar CC = $_cc CXX = $_cc HOST_CC = $_host_cc INSTALL = $_install INSTALLSTRIP = $_install_strip +RANLIB = $_ranlib WINDRES = $_windres EXTRA_INC = $_inc_extra From 34e161377a336b1b127ff8014c51285419129629 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 12:39:16 +0000 Subject: [PATCH 022/134] cosmetics: Reorder entries in config.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27710 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 205 +++++++++++++++++++++++++++--------------------------- 1 file changed, 102 insertions(+), 103 deletions(-) diff --git a/configure b/configure index eb5f16b448..13d7981573 100755 --- a/configure +++ b/configure @@ -8010,6 +8010,26 @@ cat > $TMPH << EOF #ifndef MPLAYER_CONFIG_H #define MPLAYER_CONFIG_H +/* Undefine this if you do not want to select mono audio (left or right) + with a stereo MPEG layer 2/3 audio stream. The command line option + -stereo has three possible values (0 for stereo, 1 for left-only, 2 for + right-only), with 0 being the default. + */ +#define CONFIG_FAKE_MONO 1 + +/* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */ +#define MAX_OUTBURST 65536 + +/* set up audio OUTBURST. Do not change this! */ +#define OUTBURST 512 + +/* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */ +#undef FAST_OSD +#undef FAST_OSD_TABLE + +/* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */ +#define MPEG12_POSTPROC 1 + #define CONFIGURATION "$_configuration" /* yes, we have inttypes.h */ @@ -8123,13 +8143,6 @@ $_def_mp3lame $_def_mp3lame_preset $_def_mp3lame_preset_medium -/* Undefine this if you do not want to select mono audio (left or right) - with a stereo MPEG layer 2/3 audio stream. The command line option - -stereo has three possible values (0 for stereo, 1 for left-only, 2 for - right-only), with 0 being the default. - */ -#define CONFIG_FAKE_MONO 1 - /* Undefine this if your sound card driver has no working select(). If you have kernel Oops, player hangups, or just no audio, you should try to recompile MPlayer with this option disabled! */ @@ -8144,12 +8157,6 @@ $_def_langinfo /* define this to use RTC (/dev/rtc) for video timers */ $_def_rtc -/* set up max. outburst. use 65536 for ALSA 0.5, for others 16384 is enough */ -#define MAX_OUTBURST 65536 - -/* set up audio OUTBURST. Do not change this! */ -#define OUTBURST 512 - /* Define this if your system has the header file for the OSS sound interface */ $_def_sys_soundcard @@ -8245,12 +8252,6 @@ $_def_lircc /* DVD navigation support using libdvdnav */ $_def_dvdnav -/* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */ -#define MPEG12_POSTPROC 1 - -/* maximum alignment used by libmpeg2 */ -#define ATTRIBUTE_ALIGNED_MAX 16 - /* Win32 DLL support */ $_def_win32dll #define WIN32_PATH "$_win32codecsdir" @@ -8266,83 +8267,6 @@ $_def_quicktime /* Win32-loader support */ $_def_win32_loader -/* FFmpeg */ -/* Define this to enable image postprocessing in libavcodec */ -$_def_libpostproc -$_def_libpostproc_a -$_def_libpostproc_so - -/* Define this if you enabled thread support for libavcodec */ -$_def_threads -#ifdef HAVE_THREADS -#define ENABLE_THREADS 1 -#else -#define ENABLE_THREADS 0 -#endif - -/* ffmpeg's libavcodec support (requires libavcodec source) */ -$_def_libavcodec -$_def_libavcodec_a -$_def_libavcodec_so -$_def_libavcodec_mpegaudio_hp - -/* ffmpeg's libavformat support (requires libavformat source) */ -$_def_libavformat -$_def_libavformat_a -$_def_libavformat_so - -$_def_libavutil -$_def_libavutil_a -$_def_libavutil_so - -$_def_libswscale -$_def_libswscale_a -$_def_libswscale_so - -/* Use libavcodec's decoders */ -#define CONFIG_DECODERS 1 -#define ENABLE_DECODERS 1 -/* Use libavcodec's encoders */ -#define CONFIG_ENCODERS 1 -#define ENABLE_ENCODERS 1 - -/* Use libavformat's demuxers */ -#define CONFIG_DEMUXERS 1 -#define ENABLE_DEMUXERS 1 -/* Use libavformat's muxers */ -$_def_muxers - -/* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */ -#define HAVE_EBX_AVAILABLE 1 -#ifndef MP_DEBUG -#define HAVE_EBP_AVAILABLE 1 -#endif - -#define CONFIG_GPL 1 -#define ENABLE_SMALL 0 -#define ENABLE_GRAY 0 - -/* Use AMR codecs from libavcodec. */ -$_def_libamr -$_def_libamr_nb -$_def_libamr_wb - -/* Use specific parts from FFmpeg. */ -`ff_config_enable "$_libavdecoders_all" "$_libavdecoders"` -`ff_config_enable "$_libavencoders_all" "$_libavencoders"` -`ff_config_enable "$_libavparsers_all" "$_libavparsers"` -`ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers"` -`ff_config_enable "$_libavmuxers_all" "$_libavmuxers"` -`ff_config_enable "$_libavprotocols_all" "$_libavprotocols"` -`ff_config_enable "$_libavbsfs_all" "$_libavbsfs"` - -$_def_libdirac_lavc -$_def_faac_lavc -$_def_mp3lame_lavc -$_def_libschroedinger_lavc -$_def_x264_lavc -$_def_xvid_lavc - /* Use codec libs included in mplayer CVS / source dist: */ $_def_mp3lib @@ -8353,6 +8277,9 @@ $_def_liba52 /* enable libmpeg2 support */ $_def_libmpeg2 +/* maximum alignment used by libmpeg2 */ +#define ATTRIBUTE_ALIGNED_MAX 16 + /* XAnim DLL support */ $_def_xanim /* Default search path */ @@ -8401,10 +8328,6 @@ $_def_sgiaudio $_def_win32waveout $_def_nas -/* Enable fast OSD/SUB renderer (looks ugly, but uses less CPU power) */ -#undef FAST_OSD -#undef FAST_OSD_TABLE - /* Enable TV Interface support */ $_def_tv @@ -8511,9 +8434,6 @@ $_def_lrintf $_def_round $_def_roundf -/* mkstemp support */ -$_def_mkstemp - /* nanosleep support */ $_def_nanosleep @@ -8731,6 +8651,85 @@ $_def_xshape #define X11_FULLSCREEN 1 #endif +/* FFmpeg */ +/* Define this to enable image postprocessing in libavcodec */ +$_def_libpostproc +$_def_libpostproc_a +$_def_libpostproc_so + +/* ffmpeg's libavcodec support (requires libavcodec source) */ +$_def_libavcodec +$_def_libavcodec_a +$_def_libavcodec_so +$_def_libavcodec_mpegaudio_hp + +/* ffmpeg's libavformat support (requires libavformat source) */ +$_def_libavformat +$_def_libavformat_a +$_def_libavformat_so + +$_def_libavutil +$_def_libavutil_a +$_def_libavutil_so + +$_def_libswscale +$_def_libswscale_a +$_def_libswscale_so + +/* Define this if you enabled thread support for libavcodec */ +$_def_threads +#ifdef HAVE_THREADS +#define ENABLE_THREADS 1 +#else +#define ENABLE_THREADS 0 +#endif + +/* Use libavcodec's decoders */ +#define CONFIG_DECODERS 1 +#define ENABLE_DECODERS 1 +/* Use libavcodec's encoders */ +#define CONFIG_ENCODERS 1 +#define ENABLE_ENCODERS 1 + +/* Use libavformat's demuxers */ +#define CONFIG_DEMUXERS 1 +#define ENABLE_DEMUXERS 1 +/* Use libavformat's muxers */ +$_def_muxers + +/* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */ +#define HAVE_EBX_AVAILABLE 1 +#ifndef MP_DEBUG +#define HAVE_EBP_AVAILABLE 1 +#endif + +#define CONFIG_GPL 1 +#define ENABLE_SMALL 0 +#define ENABLE_GRAY 0 + +/* External libraries used through libavcodec. */ +$_def_faac_lavc +$_def_libamr +$_def_libamr_nb +$_def_libamr_wb +$_def_libdirac_lavc +$_def_libschroedinger_lavc +$_def_mp3lame_lavc +$_def_x264_lavc +$_def_xvid_lavc + +/* mkstemp support */ +$_def_mkstemp + +/* Use specific parts from FFmpeg. */ +`ff_config_enable "$_libavdecoders_all" "$_libavdecoders"` +`ff_config_enable "$_libavencoders_all" "$_libavencoders"` +`ff_config_enable "$_libavparsers_all" "$_libavparsers"` +`ff_config_enable "$_libavdemuxers_all" "$_libavdemuxers"` +`ff_config_enable "$_libavmuxers_all" "$_libavmuxers"` +`ff_config_enable "$_libavprotocols_all" "$_libavprotocols"` +`ff_config_enable "$_libavbsfs_all" "$_libavbsfs"` + #endif /* MPLAYER_CONFIG_H */ EOF From 975e5a97e2afb56e48bf0318ed19f94fb09e2feb Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 13:07:31 +0000 Subject: [PATCH 023/134] cosmetics: more config.h reordering git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27711 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 431 +++++++++++++++++++++++++++--------------------------- 1 file changed, 213 insertions(+), 218 deletions(-) diff --git a/configure b/configure index 13d7981573..4ff899c568 100755 --- a/configure +++ b/configure @@ -8003,10 +8003,13 @@ done echo "Creating config.h" cat > $TMPH << EOF -/* -------- This file has been automatically generated by configure --------- - Note: Any changes in it will be lost when you run configure again. */ +/*---------------------------------------------------------------------------- +** This file has been automatically generated by configure any changes in it +** will be lost when you run configure again. +** Instead of modifying definitions here, use the --enable/--disable options +** of the configure script! See ./configure --help for details. +*---------------------------------------------------------------------------*/ -/* Protect against multiple inclusion */ #ifndef MPLAYER_CONFIG_H #define MPLAYER_CONFIG_H @@ -8032,6 +8035,11 @@ cat > $TMPH << EOF #define CONFIGURATION "$_configuration" +/* Common data directory (for fonts, etc) */ +#define MPLAYER_DATADIR "$_datadir" +#define MPLAYER_CONFDIR "$_confdir" +#define MPLAYER_LIBDIR "$_libdir" + /* yes, we have inttypes.h */ #define HAVE_INTTYPES_H 1 @@ -8057,15 +8065,51 @@ $_def_fast_inttypes /* libdvdread */ #define HAVE_UINTPTR_T 1 +/* C99 *lrint* and round* functions available */ +$_def_llrint +$_def_lrint +$_def_lrintf +$_def_round +$_def_roundf + +/* nanosleep support */ +$_def_nanosleep + /* name of messages charset */ $_def_charset /* Runtime CPU detection */ $_def_runtime_cpudetection +/* Define if your processor stores words with the most significant + byte first (like Motorola and SPARC, unlike Intel and VAX). */ +$_def_words_endian + +/* Define if your processor can access unaligned data in a fast way */ +$_def_fast_unaligned + +`ff_config_enable "$_arch_all" "$_arch" "ARCH"` + +/* Extension defines */ +`ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"` + +/* altivec.h support */ +$_def_altivec_h + +/* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not + have the instruction. */ +$_def_dcbzl + +/* Define this to any prefered value from 386 up to infinity with step 100 */ +#define __CPU__ $iproc + /* Dynamic a/v plugins */ $_def_dynamic_plugins +/* Define this to compile stream-caching support, it can be enabled via + -cache */ +$_def_stream_cache + /* "restrict" keyword */ $_def_restrict_keyword @@ -8079,20 +8123,89 @@ $_def_builtin_expect # define attribute_used #endif -/* extern symbol prefix */ -$_def_extern_prefix - /* compiler support for named assembler arguments */ $_def_named_asm_args +/* assembler handling of .align */ +$_def_asmalign_pot + +/* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/ +$_def_fastmemcpy + +/* Define this if your system has the "malloc.h" header file */ +$_def_malloc + +/* memalign is mapped to malloc if unsupported */ +$_def_memalign +$_def_map_memalign +$_def_memalign_hack + +/* Define this if your system has the "alloca.h" header file */ +$_def_alloca + +/* Define this if your system has the "byteswap.h" header file */ +$_def_byteswap_h + +/* Define this if your system has the "sys/mman.h" header file */ +$_def_mman +$_def_mman_has_map_failed + +/* Define this if your system has the header file for the OSS sound interface */ +$_def_sys_soundcard + +/* Define this if your system has the header file for the OSS sound interface + * in /usr/include */ +$_def_soundcard + +/* Define this if your system has the sysinfo header */ +$_def_sys_sysinfo + +/* do we have gethostbyname2? */ +$_def_gethostbyname2 + +/* Define this if your system has swab */ +$_def_swab + +/* Define this if your system has posix select */ +$_def_posix_select + +/* Define this if your system has gettimeofday */ +$_def_gettimeofday + +/* Define this if your system has glob */ +$_def_glob + +/* Define this if your system has setenv */ +$_def_setenv +#ifndef HAVE_SETENV +int setenv(const char *name, const char *val, int overwrite); +#endif + +/* Define this if your system has strsep */ +$_def_strsep + +/* Define this if your system has vsscanf */ +$_def_vsscanf + +/* Define this if your system has sysi86 */ +$_def_sysi86 +$_def_sysi86_iv + +/* Define this if your system has pthreads */ +$_def_pthreads + +/* Toggles debugging informations */ +$_def_debug + /* enable/disable SIGHANDLER */ $_def_sighandler /* enable/disable automatic gdb attach on crash, requires SIGHANDLER */ $_def_crash_debug -/* Toggles debugging informations */ -$_def_debug +/* enables / disables cdparanoia support */ +$_def_cdparanoia +$_def_cddb /* Indicates that libcdio is available for VCD and CD-DA playback */ $_def_libcdio @@ -8116,14 +8229,37 @@ $_def_dvd_darwin $_def_sol_scsi_h $_def_hpux_scsi_h -/* Common data directory (for fonts, etc) */ -#define MPLAYER_DATADIR "$_datadir" -#define MPLAYER_CONFDIR "$_confdir" -#define MPLAYER_LIBDIR "$_libdir" +/* DVD navigation support using libdvdnav */ +$_def_dvdnav + +$_def_vcd + +#ifdef sun +#define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#elif defined(WIN32) || defined(__OS2__) +#define DEFAULT_CDROM_DEVICE "D:" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#elif defined(__APPLE__) || defined(__DARWIN__) +#define DEFAULT_CDROM_DEVICE "/dev/disk1" +#define DEFAULT_DVD_DEVICE "/dev/rdiskN" +#elif defined(__OpenBSD__) +#define DEFAULT_CDROM_DEVICE "/dev/rcd0a" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#define DEFAULT_CDROM_DEVICE "/dev/acd0" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#elif defined(__DragonFly__) +#define DEFAULT_CDROM_DEVICE "/dev/cd0" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#elif defined(__AMIGAOS4__) +#define DEFAULT_CDROM_DEVICE "a1ide.device:2" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#else +#define DEFAULT_CDROM_DEVICE "/dev/cdrom" +#define DEFAULT_DVD_DEVICE "/dev/dvd" +#endif -/* Define this to compile stream-caching support, it can be enabled via - -cache */ -$_def_stream_cache /* Define if you are using Xvid library */ $_def_xvid @@ -8143,11 +8279,6 @@ $_def_mp3lame $_def_mp3lame_preset $_def_mp3lame_preset_medium -/* Undefine this if your sound card driver has no working select(). - If you have kernel Oops, player hangups, or just no audio, you should - try to recompile MPlayer with this option disabled! */ -$_def_select - /* define this to use iconv(3) function to codepage conversions */ $_def_iconv @@ -8157,36 +8288,10 @@ $_def_langinfo /* define this to use RTC (/dev/rtc) for video timers */ $_def_rtc -/* Define this if your system has the header file for the OSS sound interface */ -$_def_sys_soundcard - -/* Define this if your system has the header file for the OSS sound interface - * in /usr/include */ -$_def_soundcard - -/* Define this if your system has the sysinfo header */ -$_def_sys_sysinfo - -/* Define this if your system has the "malloc.h" header file */ -$_def_malloc - -/* memalign is mapped to malloc if unsupported */ -$_def_memalign -$_def_map_memalign -$_def_memalign_hack - -/* assembler handling of .align */ -$_def_asmalign_pot - -/* Define this if your system has the "alloca.h" header file */ -$_def_alloca - -/* Define this if your system has the "byteswap.h" header file */ -$_def_byteswap_h - -/* Define this if your system has the "sys/mman.h" header file */ -$_def_mman -$_def_mman_has_map_failed +/* Undefine this if your sound card driver has no working select(). + If you have kernel Oops, player hangups, or just no audio, you should + try to recompile MPlayer with this option disabled! */ +$_def_select /* Define this if you have the elf dynamic linker -ldl library */ $_def_dl @@ -8197,43 +8302,15 @@ $_def_kstat /* Define this if you have zlib */ $_def_zlib -/* Define this if you have shm support */ -$_def_shm - -/* Define this if your system has strsep */ -$_def_strsep - -/* Define this if your system has vsscanf */ -$_def_vsscanf - -/* Define this if your system has swab */ -$_def_swab - -/* Define this if your system has posix select */ -$_def_posix_select - -/* Define this if your system has gettimeofday */ -$_def_gettimeofday - -/* Define this if your system has glob */ -$_def_glob - -/* Define this if your system has setenv */ -$_def_setenv -#ifndef HAVE_SETENV -int setenv(const char *name, const char *val, int overwrite); -#endif - -/* Define this if your system has sysi86 */ -$_def_sysi86 -$_def_sysi86_iv - -/* Define this if your system has pthreads */ -$_def_pthreads - /* LIRC (remote control, see www.lirc.org) support: */ $_def_lirc +/* + * LIRCCD (LIRC client daemon) + * See http://www.dolda2000.cjb.net/~fredrik/lirccd/ + */ +$_def_lircc + /* Apple Remote (remote control, see http://docs.info.apple.com/article.html?artnum=302504) support: */ $_def_apple_remote @@ -8243,19 +8320,6 @@ $_def_apple_ir /* Support for maemo (http://www.maemo.org) */ $_def_maemo -/* - * LIRCCD (LIRC client daemon) - * See http://www.dolda2000.cjb.net/~fredrik/lirccd/ - */ -$_def_lircc - -/* DVD navigation support using libdvdnav */ -$_def_dvdnav - -/* Win32 DLL support */ -$_def_win32dll -#define WIN32_PATH "$_win32codecsdir" - /* Mac OS X specific features */ $_def_macosx_finder $_def_macosx_bundle @@ -8264,9 +8328,6 @@ $_def_corevideo $_def_quartz $_def_quicktime -/* Win32-loader support */ -$_def_win32_loader - /* Use codec libs included in mplayer CVS / source dist: */ $_def_mp3lib @@ -8280,6 +8341,42 @@ $_def_libmpeg2 /* maximum alignment used by libmpeg2 */ #define ATTRIBUTE_ALIGNED_MAX 16 +/* liblzo support */ +$_def_liblzo + +/* libmad support */ +$_def_mad + +/* enable OggVorbis support */ +$_def_vorbis +$_def_tremor + +/* enable Speex support */ +$_def_speex + +/* enable musepack support */ +$_def_musepack + +/* enable OggTheora support */ +$_def_theora + +/* enable FAAD (AAC) support */ +$_def_faad +$_def_faad_internal + +/* enable FAAC (AAC encoder) support */ +$_def_faac + +/* enable libdca support */ +$_def_libdca + +/* Win32 DLL support */ +$_def_win32dll +#define WIN32_PATH "$_win32codecsdir" + +/* Win32-loader support */ +$_def_win32_loader + /* XAnim DLL support */ $_def_xanim /* Default search path */ @@ -8290,15 +8387,16 @@ $_def_real /* Default search path */ $_def_real_path +/* enables / disables QTX codecs */ +$_def_qtx +$_def_qtx_win32 + /* LIVE555 Streaming Media library support */ $_def_live /* libnemesi Streaming Media library support */ $_def_nemesi -/* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/ -$_def_fastmemcpy - /* Use UnRAR executable for Vobsubs */ $_def_unrar_exec @@ -8371,72 +8469,9 @@ $_def_radio_bsdbt848 /* Enable Video 4 Linux 2 MPEG PVR support */ $_def_pvr -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -$_def_words_endian - -/* Define if your processor can access unaligned data in a fast way */ -$_def_fast_unaligned - -`ff_config_enable "$_arch_all" "$_arch" "ARCH"` - -/* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not - have the instruction. */ -$_def_dcbzl - /* Define this for Cygwin build for win32 */ $_def_confwin32 -/* Define this to any prefered value from 386 up to infinity with step 100 */ -#define __CPU__ $iproc - -$_def_vcd - -#ifdef sun -#define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(WIN32) || defined(__OS2__) -#define DEFAULT_CDROM_DEVICE "D:" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__APPLE__) || defined(__DARWIN__) -#define DEFAULT_CDROM_DEVICE "/dev/disk1" -#define DEFAULT_DVD_DEVICE "/dev/rdiskN" -#elif defined(__OpenBSD__) -#define DEFAULT_CDROM_DEVICE "/dev/rcd0a" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -#define DEFAULT_CDROM_DEVICE "/dev/acd0" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__DragonFly__) -#define DEFAULT_CDROM_DEVICE "/dev/cd0" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__AMIGAOS4__) -#define DEFAULT_CDROM_DEVICE "a1ide.device:2" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#else -#define DEFAULT_CDROM_DEVICE "/dev/cdrom" -#define DEFAULT_DVD_DEVICE "/dev/dvd" -#endif - - -/*---------------------------------------------------------------------------- -** -** NOTE: Instead of modifying these definitions here, use the -** --enable/--disable options of the ./configure script! -** See ./configure --help for details. -** -*---------------------------------------------------------------------------*/ - -/* C99 *lrint* and round* functions available */ -$_def_llrint -$_def_lrint -$_def_lrintf -$_def_round -$_def_roundf - -/* nanosleep support */ -$_def_nanosleep - /* SMB support */ $_def_smb @@ -8486,34 +8521,11 @@ $_def_fribidi /* enable ENCA usage */ $_def_enca -/* liblzo support */ -$_def_liblzo +/* enables / disables osd menu */ +$_def_menu -/* libmad support */ -$_def_mad - -/* enable OggVorbis support */ -$_def_vorbis -$_def_tremor - -/* enable Speex support */ -$_def_speex - -/* enable musepack support */ -$_def_musepack - -/* enable OggTheora support */ -$_def_theora - -/* enable FAAD (AAC) support */ -$_def_faad -$_def_faad_internal - -/* enable FAAC (AAC encoder) support */ -$_def_faac - -/* enable libdca support */ -$_def_libdca +/* enables / disables subtitles sorting */ +$_def_sortsub /* enable LADSPA plugin support */ $_def_ladspa @@ -8543,9 +8555,8 @@ typedef int socklen_t; /* closesocket() support */ $_def_closesocket -/* enables / disables cdparanoia support */ -$_def_cdparanoia -$_def_cddb +/* enables inet6 support */ +$_def_inet6 /* enables / disables VIDIX usage */ $_def_vidix @@ -8567,32 +8578,10 @@ $_def_vidix_pfx /* enables / disables new input joystick support */ $_def_joystick -/* enables / disables QTX codecs */ -$_def_qtx -$_def_qtx_win32 - -/* enables / disables osd menu */ -$_def_menu - -/* enables / disables subtitles sorting */ -$_def_sortsub - /* XMMS input plugin support */ $_def_xmms #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir" -/* enables inet6 support */ -$_def_inet6 - -/* do we have gethostbyname2? */ -$_def_gethostbyname2 - -/* Extension defines */ -`ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"` - -/* altivec.h support */ -$_def_altivec_h - /* libvo options */ #define SCREEN_SIZE_X 1 #define SCREEN_SIZE_Y 1 @@ -8644,6 +8633,9 @@ $_def_tga $_def_toolame $_def_twolame +/* Define this if you have shm support */ +$_def_shm + /* used by GUI: */ $_def_xshape @@ -8721,6 +8713,9 @@ $_def_xvid_lavc /* mkstemp support */ $_def_mkstemp +/* extern symbol prefix */ +$_def_extern_prefix + /* Use specific parts from FFmpeg. */ `ff_config_enable "$_libavdecoders_all" "$_libavdecoders"` `ff_config_enable "$_libavencoders_all" "$_libavencoders"` From 68fa9667ecdc0c23aaa8b346930aeca983045df2 Mon Sep 17 00:00:00 2001 From: ranma Date: Sat, 4 Oct 2008 15:03:10 +0000 Subject: [PATCH 024/134] Make alsa resume after suspend to disk (would say 'file descriptor is in bad state' before this change) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27712 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_alsa.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c index 987713e6f9..e5372390f8 100644 --- a/libao2/ao_alsa.c +++ b/libao2/ao_alsa.c @@ -765,6 +765,10 @@ static void audio_resume(void) { int err; + if (snd_pcm_state(alsa_handler) == SND_PCM_STATE_SUSPENDED) { + mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_ALSA_PcmInSuspendModeTryingResume); + while ((err = snd_pcm_resume(alsa_handler)) == -EAGAIN) sleep(1); + } if (alsa_can_pause) { if ((err = snd_pcm_pause(alsa_handler, 0)) < 0) { From d68f29e5939368f5c2cffe2dd77d4d0bae950c92 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 15:06:50 +0000 Subject: [PATCH 025/134] Add a comment to lonely 'fi' for clarification. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27713 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 4ff899c568..6b93d69a33 100755 --- a/configure +++ b/configure @@ -6894,7 +6894,7 @@ fi _res_comment="in libavcodec: $_mp3lame_lavc" echores "$_mp3lame" -fi +fi # test "$_mencoder" != no echocheck "mencoder" if test "$_mencoder" = yes ; then From cb8c70d6c2ee1a9aa6465719854175f4ede514fd Mon Sep 17 00:00:00 2001 From: ranma Date: Sat, 4 Oct 2008 15:11:39 +0000 Subject: [PATCH 026/134] Fix "format '%d' expects type 'int', but argument 6 has type 'size_t'" warning. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27714 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_alsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c index e5372390f8..4cb4470271 100644 --- a/libao2/ao_alsa.c +++ b/libao2/ao_alsa.c @@ -707,7 +707,7 @@ static int init(int rate_hz, int channels, int format, int flags) /* end setting sw-params */ mp_msg(MSGT_AO,MSGL_V,"alsa: %d Hz/%d channels/%d bpf/%d bytes buffer/%s\n", - ao_data.samplerate, ao_data.channels, bytes_per_sample, ao_data.buffersize, + ao_data.samplerate, ao_data.channels, (int)bytes_per_sample, ao_data.buffersize, snd_pcm_format_description(alsa_format)); } // end switch alsa_handler (spdif) From 15d516ffdf8e0f4dde6f15b9f03767fb17636a03 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Sat, 4 Oct 2008 16:40:35 +0000 Subject: [PATCH 027/134] Remove g6Dither from libswscale. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27715 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 1 - libswscale/swscale_template.c | 18 ++++++++++-------- libswscale/yuv2rgb.c | 1 - libswscale/yuv2rgb_template.c | 6 ++---- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index ff2d1d49d4..882af25f61 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -207,7 +207,6 @@ DECLARE_ASM_CONST(8, uint64_t, bm01010101)=0x00FF00FF00FF00FFLL; static volatile uint64_t attribute_used __attribute__((aligned(8))) b5Dither; static volatile uint64_t attribute_used __attribute__((aligned(8))) g5Dither; -static volatile uint64_t attribute_used __attribute__((aligned(8))) g6Dither; static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither; const DECLARE_ALIGNED(8, uint64_t, ff_dither4[2]) = { diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index 74f4c57285..e960c7dad3 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -1105,7 +1105,7 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_ /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm2\n\t" - "paddusb "MANGLE(g6Dither)", %%mm4\n\t" + "paddusb "MANGLE(g5Dither)", %%mm4\n\t" "paddusb "MANGLE(r5Dither)", %%mm5\n\t" #endif @@ -1165,7 +1165,7 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_ /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" + "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif @@ -1330,7 +1330,7 @@ FULL_YSCALEYUV2RGB FULL_YSCALEYUV2RGB #ifdef DITHER1XBPP - "paddusb "MANGLE(g6Dither)", %%mm1 \n\t" + "paddusb "MANGLE(g5Dither)", %%mm1 \n\t" "paddusb "MANGLE(r5Dither)", %%mm0 \n\t" "paddusb "MANGLE(b5Dither)", %%mm3 \n\t" #endif @@ -1490,7 +1490,7 @@ FULL_YSCALEYUV2RGB /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" + "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif @@ -1602,7 +1602,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" + "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif @@ -1691,7 +1691,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g6Dither)", %%mm4 \n\t" + "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" #endif @@ -3092,8 +3092,10 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s #ifdef HAVE_MMX b5Dither= ff_dither8[dstY&1]; - g6Dither= ff_dither4[dstY&1]; - g5Dither= ff_dither8[dstY&1]; + if (c->dstFormat == PIX_FMT_RGB555 || c->dstFormat == PIX_FMT_BGR555) + g5Dither= ff_dither8[dstY&1]; + else + g5Dither= ff_dither4[dstY&1]; r5Dither= ff_dither8[(dstY+1)&1]; #endif if (dstY < dstH-2) diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 544d608d62..1f84d1df04 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -58,7 +58,6 @@ DECLARE_ASM_CONST(8, uint64_t, mmx_grnmask) = 0xfcfcfcfcfcfcfcfcULL; // not knowing that these are read in the ASM block. static volatile uint64_t attribute_used __attribute__((aligned(8))) b5Dither; static volatile uint64_t attribute_used __attribute__((aligned(8))) g5Dither; -static volatile uint64_t attribute_used __attribute__((aligned(8))) g6Dither; static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither; #undef HAVE_MMX diff --git a/libswscale/yuv2rgb_template.c b/libswscale/yuv2rgb_template.c index 1f8e225baa..7a45870ba5 100644 --- a/libswscale/yuv2rgb_template.c +++ b/libswscale/yuv2rgb_template.c @@ -144,8 +144,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr long index= -h_size/2; b5Dither= ff_dither8[y&1]; - g6Dither= ff_dither4[y&1]; - g5Dither= ff_dither8[y&1]; + g5Dither= ff_dither4[y&1]; r5Dither= ff_dither8[(y+1)&1]; /* This MMX assembly code deals with a SINGLE scan line at a time, * it converts 8 pixels in each iteration. */ @@ -166,7 +165,7 @@ YUV2RGB #ifdef DITHER1XBPP "paddusb "MANGLE(b5Dither)", %%mm0;" - "paddusb "MANGLE(g6Dither)", %%mm2;" + "paddusb "MANGLE(g5Dither)", %%mm2;" "paddusb "MANGLE(r5Dither)", %%mm1;" #endif /* mask unneeded bits off */ @@ -239,7 +238,6 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr long index= -h_size/2; b5Dither= ff_dither8[y&1]; - g6Dither= ff_dither4[y&1]; g5Dither= ff_dither8[y&1]; r5Dither= ff_dither8[(y+1)&1]; /* This MMX assembly code deals with a SINGLE scan line at a time, From 036b3d0c5171e211ed3aa5f29973bde4268b603c Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 17:15:39 +0000 Subject: [PATCH 028/134] Merge variable declaration and export. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27716 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/configure b/configure index 6b93d69a33..0dfa2ac3ae 100755 --- a/configure +++ b/configure @@ -50,8 +50,7 @@ ############################################################################# # Prevent locale nonsense from breaking basic text processing utils -LC_ALL=C -export LC_ALL +export LC_ALL=C # Store the configure line that was used _configuration="$*" From 6fb9d58116938f5d869f40d6ffc62cf4ef7227f0 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 4 Oct 2008 17:55:42 +0000 Subject: [PATCH 029/134] Revert the removal of the likely/unlikely macros, they are still used. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27717 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 0dfa2ac3ae..fccf0840d6 100755 --- a/configure +++ b/configure @@ -8112,8 +8112,15 @@ $_def_stream_cache /* "restrict" keyword */ $_def_restrict_keyword -/* __builtin_expect branch prediction hint, libmpeg2 + FFmpeg */ +/* __builtin_expect branch prediction hint */ $_def_builtin_expect +#ifdef HAVE_BUILTIN_EXPECT +#define likely(x) __builtin_expect ((x) != 0, 1) +#define unlikely(x) __builtin_expect ((x) != 0, 0) +#else +#define likely(x) (x) +#define unlikely(x) (x) +#endif /* attribute(used) as needed by some compilers */ #if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300) From 99877b2fc6bfa4fe451dee60fbeca3baac6c24e3 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Sat, 4 Oct 2008 18:50:39 +0000 Subject: [PATCH 030/134] Remove b5Dither, g5Dither and r5Dither from libswscale. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27718 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 4 --- libswscale/swscale_template.c | 68 +++++++++++++++++------------------ libswscale/yuv2rgb.c | 6 ---- libswscale/yuv2rgb_template.c | 28 +++++++-------- 4 files changed, 48 insertions(+), 58 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 882af25f61..639de3bb17 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -205,10 +205,6 @@ DECLARE_ASM_CONST(8, uint64_t, bm00000111)=0x0000000000FFFFFFLL; DECLARE_ASM_CONST(8, uint64_t, bm11111000)=0xFFFFFFFFFF000000LL; DECLARE_ASM_CONST(8, uint64_t, bm01010101)=0x00FF00FF00FF00FFLL; -static volatile uint64_t attribute_used __attribute__((aligned(8))) b5Dither; -static volatile uint64_t attribute_used __attribute__((aligned(8))) g5Dither; -static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither; - const DECLARE_ALIGNED(8, uint64_t, ff_dither4[2]) = { 0x0103010301030103LL, 0x0200020002000200LL,}; diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index e960c7dad3..e96263b6b6 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -1091,9 +1091,9 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_ YSCALEYUV2RGBX /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm2\n\t" - "paddusb "MANGLE(g5Dither)", %%mm4\n\t" - "paddusb "MANGLE(r5Dither)", %%mm5\n\t" + "paddusb "BLUE_DITHER"(%0), %%mm2\n\t" + "paddusb "GREEN_DITHER"(%0), %%mm4\n\t" + "paddusb "RED_DITHER"(%0), %%mm5\n\t" #endif WRITERGB15(%4, %5, %%REGa) @@ -1104,9 +1104,9 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_ YSCALEYUV2RGBX /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm2\n\t" - "paddusb "MANGLE(g5Dither)", %%mm4\n\t" - "paddusb "MANGLE(r5Dither)", %%mm5\n\t" + "paddusb "BLUE_DITHER"(%0), %%mm2\n\t" + "paddusb "GREEN_DITHER"(%0), %%mm4\n\t" + "paddusb "RED_DITHER"(%0), %%mm5\n\t" #endif WRITERGB16(%4, %5, %%REGa) @@ -1151,9 +1151,9 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_ YSCALEYUV2RGBX /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" - "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" + "paddusb "BLUE_DITHER"(%0), %%mm2 \n\t" + "paddusb "GREEN_DITHER"(%0), %%mm4 \n\t" + "paddusb "RED_DITHER"(%0), %%mm5 \n\t" #endif WRITERGB15(%4, %5, %%REGa) @@ -1164,9 +1164,9 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_ YSCALEYUV2RGBX /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" - "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" + "paddusb "BLUE_DITHER"(%0), %%mm2 \n\t" + "paddusb "GREEN_DITHER"(%0), %%mm4 \n\t" + "paddusb "RED_DITHER"(%0), %%mm5 \n\t" #endif WRITERGB16(%4, %5, %%REGa) @@ -1468,9 +1468,9 @@ FULL_YSCALEYUV2RGB YSCALEYUV2RGB(%%REGBP, %5) /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" - "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" + "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" + "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" + "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif WRITERGB15(%%REGb, 8280(%5), %%REGBP) @@ -1489,9 +1489,9 @@ FULL_YSCALEYUV2RGB YSCALEYUV2RGB(%%REGBP, %5) /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" - "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" + "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" + "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" + "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif WRITERGB16(%%REGb, 8280(%5), %%REGBP) @@ -1581,9 +1581,9 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * YSCALEYUV2RGB1(%%REGBP, %5) /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" - "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" + "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" + "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" + "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif WRITERGB15(%%REGb, 8280(%5), %%REGBP) "pop %%"REG_BP" \n\t" @@ -1601,9 +1601,9 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * YSCALEYUV2RGB1(%%REGBP, %5) /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" - "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" + "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" + "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" + "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif WRITERGB16(%%REGb, 8280(%5), %%REGBP) @@ -1670,9 +1670,9 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * YSCALEYUV2RGB1b(%%REGBP, %5) /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" - "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" + "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" + "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" + "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif WRITERGB15(%%REGb, 8280(%5), %%REGBP) "pop %%"REG_BP" \n\t" @@ -1690,9 +1690,9 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * YSCALEYUV2RGB1b(%%REGBP, %5) /* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */ #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(g5Dither)", %%mm4 \n\t" - "paddusb "MANGLE(r5Dither)", %%mm5 \n\t" + "paddusb "BLUE_DITHER"(%5), %%mm2 \n\t" + "paddusb "GREEN_DITHER"(%5), %%mm4 \n\t" + "paddusb "RED_DITHER"(%5), %%mm5 \n\t" #endif WRITERGB16(%%REGb, 8280(%5), %%REGBP) @@ -3091,12 +3091,12 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s } #ifdef HAVE_MMX - b5Dither= ff_dither8[dstY&1]; + c->blueDither= ff_dither8[dstY&1]; if (c->dstFormat == PIX_FMT_RGB555 || c->dstFormat == PIX_FMT_BGR555) - g5Dither= ff_dither8[dstY&1]; + c->greenDither= ff_dither8[dstY&1]; else - g5Dither= ff_dither4[dstY&1]; - r5Dither= ff_dither8[(dstY+1)&1]; + c->greenDither= ff_dither4[dstY&1]; + c->redDither= ff_dither8[(dstY+1)&1]; #endif if (dstY < dstH-2) { diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 1f84d1df04..9b64c06dec 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -54,12 +54,6 @@ DECLARE_ASM_CONST(8, uint64_t, mmx_00ffw) = 0x00ff00ff00ff00ffULL; DECLARE_ASM_CONST(8, uint64_t, mmx_redmask) = 0xf8f8f8f8f8f8f8f8ULL; DECLARE_ASM_CONST(8, uint64_t, mmx_grnmask) = 0xfcfcfcfcfcfcfcfcULL; -// The volatile is required because gcc otherwise optimizes some writes away -// not knowing that these are read in the ASM block. -static volatile uint64_t attribute_used __attribute__((aligned(8))) b5Dither; -static volatile uint64_t attribute_used __attribute__((aligned(8))) g5Dither; -static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither; - #undef HAVE_MMX //MMX versions diff --git a/libswscale/yuv2rgb_template.c b/libswscale/yuv2rgb_template.c index 7a45870ba5..b71c918f2a 100644 --- a/libswscale/yuv2rgb_template.c +++ b/libswscale/yuv2rgb_template.c @@ -134,7 +134,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr if(h_size*2 > FFABS(dstStride[0])) h_size-=8; asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); - //printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&b5Dither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], + //printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&c->blueDither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], //srcStride[0],srcStride[1],srcStride[2],dstStride[0]); for (y= 0; y>1)*srcStride[2]; long index= -h_size/2; - b5Dither= ff_dither8[y&1]; - g5Dither= ff_dither4[y&1]; - r5Dither= ff_dither8[(y+1)&1]; + c->blueDither= ff_dither8[y&1]; + c->greenDither= ff_dither4[y&1]; + c->redDither= ff_dither8[(y+1)&1]; /* This MMX assembly code deals with a SINGLE scan line at a time, * it converts 8 pixels in each iteration. */ asm volatile ( @@ -164,9 +164,9 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr YUV2RGB #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm0;" - "paddusb "MANGLE(g5Dither)", %%mm2;" - "paddusb "MANGLE(r5Dither)", %%mm1;" + "paddusb "BLUE_DITHER"(%4), %%mm0;" + "paddusb "GREEN_DITHER"(%4), %%mm2;" + "paddusb "RED_DITHER"(%4), %%mm1;" #endif /* mask unneeded bits off */ "pand "MANGLE(mmx_redmask)", %%mm0;" /* b7b6b5b4 b3_0_0_0 b7b6b5b4 b3_0_0_0 */ @@ -228,7 +228,7 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr if(h_size*2 > FFABS(dstStride[0])) h_size-=8; asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); - //printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&b5Dither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], + //printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&c->blueDither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], //srcStride[0],srcStride[1],srcStride[2],dstStride[0]); for (y= 0; y>1)*srcStride[2]; long index= -h_size/2; - b5Dither= ff_dither8[y&1]; - g5Dither= ff_dither8[y&1]; - r5Dither= ff_dither8[(y+1)&1]; + c->blueDither= ff_dither8[y&1]; + c->greenDither= ff_dither8[y&1]; + c->redDither= ff_dither8[(y+1)&1]; /* This MMX assembly code deals with a SINGLE scan line at a time, * it converts 8 pixels in each iteration. */ asm volatile ( @@ -252,9 +252,9 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr YUV2RGB #ifdef DITHER1XBPP - "paddusb "MANGLE(b5Dither)", %%mm0 \n\t" - "paddusb "MANGLE(g5Dither)", %%mm2 \n\t" - "paddusb "MANGLE(r5Dither)", %%mm1 \n\t" + "paddusb "BLUE_DITHER"(%4), %%mm0 \n\t" + "paddusb "GREEN_DITHER"(%4), %%mm2 \n\t" + "paddusb "RED_DITHER"(%4), %%mm1 \n\t" #endif /* mask unneeded bits off */ From 83b02d5706e648a2991a7b3cbfc41797ec4fe03f Mon Sep 17 00:00:00 2001 From: Gabrov Date: Sun, 5 Oct 2008 13:43:45 +0000 Subject: [PATCH 031/134] synced with r27718 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27719 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/hu/mplayer.1 | 71 ++++++++++++++++++++++++++++++++-------- DOCS/xml/hu/faq.xml | 2 +- DOCS/xml/hu/install.xml | 14 ++++---- DOCS/xml/hu/mencoder.xml | 12 +++---- 4 files changed, 71 insertions(+), 28 deletions(-) diff --git a/DOCS/man/hu/mplayer.1 b/DOCS/man/hu/mplayer.1 index 7ede56e5c8..97d8661750 100644 --- a/DOCS/man/hu/mplayer.1 +++ b/DOCS/man/hu/mplayer.1 @@ -1,4 +1,4 @@ -.\" Synced with r27607 +.\" Synced with r27691 .\" MPlayer (C) 2000-2008 MPlayer Team .\" Ezt a man oldalt Gabucino, Diego Biurrun és Jonas Jermann készíti/készítette .\" Karbantartó: Gabrov @@ -33,7 +33,7 @@ .\" Név .\" -------------------------------------------------------------------------- . -.TH MPlayer 1 "2008. 09. 14." "MPlayer Project" "A film lejátszó" +.TH MPlayer 1 "2008. 10. 05." "MPlayer Project" "A film lejátszó" . .SH NÉV mplayer \- film lejátszó @@ -3092,8 +3092,8 @@ Ha egy k koordináták az ablak bal felsõ sarkához viszonyulnak a képernyõ helyett. .br .I MEGJEGYZÉS: -Ezt az opciót csak az x11, xmga, xv, xvmc, xvidix, gl, gl2, directx és -tdfxfb videó kimeneti vezérlõk támogatják. +Ezt az opciót csak az x11, xmga, xv, xvmc, xvidix, gl, gl2, directx, +fbdev és tdfxfb videó kimeneti vezérlõk támogatják. .sp 1 .I PÉLDA: .PD 0 @@ -4226,6 +4226,8 @@ Minden f .IPs z=<0\-9> Megadja a tömörítési szintet. 0-val nincs tömörítés, 9 a maximális tömörítés. +.IPs outdir= +Megadja a könyvtárat, ahova a PNG fájlokat menteni kell (alapértelmezett: ./). .RE .PD 1 . @@ -4507,8 +4509,21 @@ Ez nem hiba, hanem a nem teljes felbont Ha a is meg van adva, a lowres dekódolás csak akkor lesz használva, ha a videó szélessége nagyobb vagy egyenlõ mint . .RE -.IPs "o\ \ \ \ " -FIXME: nem dokumentált +.B o==<érték>[,=<érték>[,...]] +AVOptions átadása a libavcodec dekódolójának. +Megjegyezzük, hogy az o= kapcsolót feleslegessé tevõ, az összes ismeretlen +opciót az AVOption rendszernek átadó javítást szívesen fogadunk. +Az AVOptions teljes listája megtalálható az FFmpeg kézikönyvében. +Figyelj rá, hogy néhány opció ütközhet a MEncoder kapcsolóival. +.sp 1 +.RS +.I PÉLDA: +.RE +.RSs +.PD 0 +.IPs o=debug=pict +.PD 1 +.RE .IPs "sb= (csak MPEG-2)" Kihagyja a megadott számú makroblokk sort a tetején. .IPs "st= (csak MPEG-2)" @@ -7652,9 +7667,11 @@ N . .TP .B o==<érték>[,=<érték>[,...]] -AVOption átadása a libavcodec-nek -Emlékezz rá, hogy az o= kapcsolót feleslegessé tevõ, az összes ismeretlen -opciót a AVOption rendszernek átadó javítást szívesen fogadunk. +AVOption átadása a libavcodec kódolójának. +Megjegyezzük, hogy az o= kapcsolót feleslegessé tevõ, az összes ismeretlen +opciót az AVOption rendszernek átadó javítást szívesen fogadunk. +Az AVOptions teljes listája megtalálható az FFmpeg kézikönyvében. +Figyelj rá, hogy néhány opció ütközhet a MEncoder kapcsolóival. .sp 1 .RS .I PÉLDA: @@ -10498,8 +10515,21 @@ A folyam tulajdons Kényszeríti a megadott libavformat demuxer-t. . .TP -.B "o\ \ \ \ \ \ " -FIXME: nem dokumentált +.B o==<érték>[,=<érték>[,...]] +AVOptions átadása a libavformat demuxer-ének. +Megjegyezzük, hogy az o= kapcsolót feleslegessé tevõ, az összes ismeretlen +opciót az AVOption rendszernek átadó javítást szívesen fogadunk. +Az AVOptions teljes listája megtalálható az FFmpeg kézikönyvében. +Figyelj rá, hogy néhány opció ütközhet az MPlayer/MEncoder kapcsolóival. +.sp 1 +.RS +.I PÉLDA: +.RE +.RSs +.PD 0 +.IPs o=ignidx +.PD 1 +.RE . .TP .B probesize=<érték> @@ -10555,6 +10585,8 @@ MPEG-4 form MPEG-4 formátum extra fejléc flag-ekkel, melyek az Apple iPod firmware-jének kellenek .IPs "dv\ \ \ " Sony Digital Video konténer +.IPs "matroska\ \ \ " +Matroska .RE .PD 1 .TP @@ -10564,8 +10596,21 @@ jelenleg csak MPEG[12] eset Néha szükséges növelni a "buffer alulcsordulás" elkerüléséhez. . .TP -.B "o\ \ \ \ \ \ " -FIXME: nem dokumentált +.B o==<érték>[,=<érték>[,...]] +AVOptions átadása a libavformat muxer-ének. +Megjegyezzük, hogy az o= kapcsolót feleslegessé tevõ, az összes ismeretlen +opciót az AVOption rendszernek átadó javítást szívesen fogadunk. +Az AVOptions teljes listája megtalálható az FFmpeg kézikönyvében. +Figyelj rá, hogy néhány opció ütközhet a MEncoder kapcsolóival. +.sp 1 +.RS +.I PÉLDA: +.RE +.RSs +.PD 0 +.IPs o=packetsize=100 +.PD 1 +.RE . .TP .B packetsize= diff --git a/DOCS/xml/hu/faq.xml b/DOCS/xml/hu/faq.xml index b998bfbcb8..1bf3e06658 100644 --- a/DOCS/xml/hu/faq.xml +++ b/DOCS/xml/hu/faq.xml @@ -1,5 +1,5 @@ - + Gyakran ismételt kérdések diff --git a/DOCS/xml/hu/install.xml b/DOCS/xml/hu/install.xml index eb6af34c45..d439f71c8f 100644 --- a/DOCS/xml/hu/install.xml +++ b/DOCS/xml/hu/install.xml @@ -1,5 +1,5 @@ - + Telepítés @@ -177,11 +177,9 @@ Lásd a Feliratok és az OSD részt bÅ‘vebben. Mi a helyzet a GUI-val? -A GUI-hoz GTK 1.2.x vagy GTK 2.0 kell (nem teljesen GTK-s, de a panelek igen). -A skinek sPNG formátumúak, így telepített GTK, -libpng (és a fejlesztÅ‘i cuccok, amik -általában gtk-dev -és libpng-dev néven futnak) szükséges. +A GUI-hoz GTK 1.2.x vagy GTK 2.0 kell (nem teljesen GTK-s, de a panelek igen), +így telepített GTK (és a fejlesztÅ‘i +cuccok, amik általában gtk-dev) szükséges. A ./configure-nak az kapcsoló megadásával írhatod elÅ‘, hogy GUI-t is készítsen. Ezután ha a GUI-s változatot akarod futtatni, akkor a gmplayer binárist kell elindítanod. @@ -189,9 +187,9 @@ akarod futtatni, akkor a gmplayer binárist kell elindítanod Mivel az MPlayer nem rendelkezik beépített skin-nel, -le kell töltened Å‘ket, ha a GUI-t használni akarod. Lásd a letöltési oldalt. -Ajánlott egy rendszerszinten elérhetÅ‘ könyvtárba tenni Å‘ket ($PREFIX/share/mplayer/skins), vagy a $HOME/.mplayer/skins-be. Az MPlayer ezekben a könyvtárakban diff --git a/DOCS/xml/hu/mencoder.xml b/DOCS/xml/hu/mencoder.xml index 3a2227f9af..79bf5d1b74 100644 --- a/DOCS/xml/hu/mencoder.xml +++ b/DOCS/xml/hu/mencoder.xml @@ -1,5 +1,5 @@ - + A <application>MEncoder</application> használatának alapjai @@ -327,11 +327,11 @@ A név abból a ténybÅ‘l ered, hogy ez a módszer a fájlt lépés) létrehoz pár ideiglenes, néhány megabájtos fájlt (*.log), ezeket ne töröld le még (az AVI-t letörölheted vagy egyszerűen létre sem hozod, a videó -/dev/null -ba irányításával). A második lépésben, -a két menetes kimenet fájl lesz létrehozva, az ideiglenes fájlok -bitrátájának felhasználásával. Az eredmény fájlnak sokkal jobb lesz a -képminÅ‘sége. Ha most hallasz errÅ‘l elÅ‘ször, nézz meg pár a neten -elérhetÅ‘ leírást. +/dev/null-ba vagy Windows alatt a NUL-ba +irányításával). A második lépésben, a két menetes kimenet fájl lesz létrehozva, +az ideiglenes fájlok bitrátájának felhasználásával. Az eredmény fájlnak +sokkal jobb lesz a képminÅ‘sége. Ha most hallasz errÅ‘l elÅ‘ször, nézz meg +pár a neten elérhetÅ‘ leírást. From 93de0584c5a9b865087f4329fec444cffbc479c7 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 5 Oct 2008 16:47:55 +0000 Subject: [PATCH 032/134] Use HAVE_FAST_64BIT instead of nonstandard __WORDSIZE macro. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27720 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/rgb2rgb_template.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index ce72179ea3..73004d4a7e 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -28,7 +28,6 @@ */ #include -#include /* for __WORDSIZE */ #undef PREFETCH #undef MOVNTQ @@ -1584,7 +1583,7 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u ysrc += lumStride; dst += dstStride; -#elif __WORDSIZE >= 64 +#elif HAVE_FAST_64BIT int i; uint64_t *ldst = (uint64_t *) dst; const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc; @@ -1690,7 +1689,7 @@ static inline void RENAME(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *u #else //FIXME adapt the Alpha ASM code from yv12->yuy2 -#if __WORDSIZE >= 64 +#if HAVE_FAST_64BIT int i; uint64_t *ldst = (uint64_t *) dst; const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc; From 3fa84e024758c819f6543ceb2858296d35036293 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Sun, 5 Oct 2008 20:43:09 +0000 Subject: [PATCH 033/134] Disable mp3lib and liba52-internal for icc. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27721 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/configure b/configure index fccf0840d6..89dafdf10b 100755 --- a/configure +++ b/configure @@ -320,7 +320,7 @@ Codecs: --disable-twolame disable Twolame (MPEG layer 2) encoding [autodetect] --enable-xmms enable XMMS input plugin support [disabled] --enable-libdca enable libdca support [autodetect] - --disable-mp3lib disable builtin mp3lib [enabled] + --disable-mp3lib disable builtin mp3lib [autodetect] --disable-liba52 disable liba52 [autodetect] --disable-liba52-internal disable builtin liba52 [autodetect] --disable-libmpeg2 disable builtin libmpeg2 [autodetect] @@ -577,9 +577,9 @@ _tremor_low=no _libvorbis=auto _speex=auto _theora=auto -_mp3lib=yes +_mp3lib=auto _liba52=auto -_liba52_internal=yes +_liba52_internal=auto _libdca=auto _libmpeg2=auto _faad=auto @@ -6006,6 +6006,9 @@ fi echores "$_theora" echocheck "internal mp3lib support" +if test "$_mp3lib" = auto ; then + test "$cc_vendor" = intel && _mp3lib=no || _mp3lib=yes +fi if test "$_mp3lib" = yes ; then _def_mp3lib='#define CONFIG_MP3LIB 1' _codecmodules="mp3lib $_codecmodules" @@ -6016,6 +6019,9 @@ fi echores "$_mp3lib" echocheck "liba52 support" +if test "$_liba52_internal" = auto ; then + test "$cc_vendor" = intel && _liba52_internal=no || _liba52_internal=yes +fi _def_liba52='#undef CONFIG_LIBA52' _def_liba52_internal="#undef CONFIG_LIBA52_INTERNAL" if test "$_liba52_internal" = yes ; then From 8ecc4934ef77c0b9e4455e00fcd91574ca4c2aeb Mon Sep 17 00:00:00 2001 From: lu_zero Date: Sun, 5 Oct 2008 21:00:16 +0000 Subject: [PATCH 034/134] gcc-apple specific fallback not necessary anymore (btw no apple hardware is less than a Intel core, thus it won't come there w/out disabling all the optimizations) git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27722 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/rgb2rgb_template.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index 73004d4a7e..d7c581b44c 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -52,14 +52,9 @@ #define PREFETCHW "prefetcht0" #define PAVGB "pavgb" #else -#ifdef __APPLE__ -#define PREFETCH "#" -#define PREFETCHW "#" -#else #define PREFETCH " # nop" #define PREFETCHW " # nop" #endif -#endif #ifdef HAVE_3DNOW /* On K6 femms is faster than emms. On K7 femms is directly mapped on emms. */ From 980239fa82e68fad023f752c57d5749b3fc7af82 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 5 Oct 2008 21:44:42 +0000 Subject: [PATCH 035/134] Move find_backwards_asf_guid asfguid.h to asfheader.c, the only place where it is used. Fixes the following warning: ./libmpdemux/asfguid.h:94: warning: 'find_backwards_asf_guid' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27723 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/asfguid.h | 10 ---------- libmpdemux/asfheader.c | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/libmpdemux/asfguid.h b/libmpdemux/asfguid.h index 6430f738e5..e9b8b08567 100644 --- a/libmpdemux/asfguid.h +++ b/libmpdemux/asfguid.h @@ -90,14 +90,4 @@ static int find_asf_guid(char *buf, const char *guid, int cur_pos, int buf_len) return -1; } -static int find_backwards_asf_guid(char *buf, const char *guid, int cur_pos) -{ - int i; - for (i=cur_pos-16; i>0; i--) { - if (memcmp(&buf[i], guid, 16) == 0) - return i + 16 + 8; // point after guid + length - } - return -1; -} - #endif /* MPLAYER_ASFGUID_H */ diff --git a/libmpdemux/asfheader.c b/libmpdemux/asfheader.c index 93bd1354a9..46a7f8831a 100644 --- a/libmpdemux/asfheader.c +++ b/libmpdemux/asfheader.c @@ -352,6 +352,16 @@ static int asf_init_audio_stream(demuxer_t *demuxer,struct asf_priv* asf, sh_aud return 1; } +static int find_backwards_asf_guid(char *buf, const char *guid, int cur_pos) +{ + int i; + for (i=cur_pos-16; i>0; i--) { + if (memcmp(&buf[i], guid, 16) == 0) + return i + 16 + 8; // point after guid + length + } + return -1; +} + int read_asf_header(demuxer_t *demuxer,struct asf_priv* asf){ int hdr_len = asf->header.objh.size - sizeof(asf->header); int hdr_skip = 0; From f49e1f1e8f0cef323dec40f7e29b1ccb38f6f71b Mon Sep 17 00:00:00 2001 From: cehoyos Date: Sun, 5 Oct 2008 23:16:49 +0000 Subject: [PATCH 036/134] Correctly place second const in declaration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27724 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_ty_osd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmpdemux/demux_ty_osd.c b/libmpdemux/demux_ty_osd.c index db9911c865..56d5d7459a 100644 --- a/libmpdemux/demux_ty_osd.c +++ b/libmpdemux/demux_ty_osd.c @@ -574,14 +574,14 @@ static char TY_XDS [ 8 ][ 25 ][ 34 ]; static char TY_XDS_new[ 8 ][ 25 ][ 34 ]; // Array of [ MPAARating|TVRating ][ NumberRatings ] -static const char const *TY_XDS_CHIP[ 2 ][ 8 ] = +static const char * const TY_XDS_CHIP[ 2 ][ 8 ] = { { "(NOT APPLICABLE)", "G", "PG", "PG-13", "R", "NC-17", "X", "(NOT RATED)" }, { "(NOT RATED)", "TV-Y", "TV-Y7", "TV-G", "TV-PG", "TV-14", "TV-MA", "(NOT RATED)" } }; -static const char const *TY_XDS_modes[] = +static const char * const TY_XDS_modes[] = { "CURRENT", // 01h-02h current program "FUTURE ", // 03h-04h future program From d239eb53ae8c858a7cdd3d1bc769ef6aa0a90234 Mon Sep 17 00:00:00 2001 From: gpoirier Date: Mon, 6 Oct 2008 14:09:22 +0000 Subject: [PATCH 037/134] sync w/r27691 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27725 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/fr/mplayer.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCS/man/fr/mplayer.1 b/DOCS/man/fr/mplayer.1 index 5bce784185..0182f5a9e4 100644 --- a/DOCS/man/fr/mplayer.1 +++ b/DOCS/man/fr/mplayer.1 @@ -1,4 +1,4 @@ -.\" synced with r27651 +.\" synced with r27691 .\" Encoding: iso-8859-1 .\" MPlayer (C) 2000-2008 MPlayer Team .\" The English man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann @@ -3241,7 +3241,7 @@ fen .br .I NOTE: Cette option n'est permise que par les pilotes de sortie vidéo x11, xmga, xv, -xvmc, xvidix, gl, gl2, directx et tdfxfb. +xvmc, xvidix, gl, gl2, directx, fbdev et tdfxfb. .sp 1 .I EXEMPLE: .PD 0 From b9509b179580216dadec5d9161d3ae38dc296f3a Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 7 Oct 2008 08:25:47 +0000 Subject: [PATCH 038/134] Remove unnecessary HAVE_AV_CONFIG_H #define. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27726 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_geq.c | 1 - libmpcodecs/vf_qp.c | 2 -- 2 files changed, 3 deletions(-) diff --git a/libmpcodecs/vf_geq.c b/libmpcodecs/vf_geq.c index bc339994ea..21da7e2000 100644 --- a/libmpcodecs/vf_geq.c +++ b/libmpcodecs/vf_geq.c @@ -33,7 +33,6 @@ #include "mp_image.h" #include "vf.h" -#define HAVE_AV_CONFIG_H #include "libavcodec/avcodec.h" #include "libavcodec/eval.h" diff --git a/libmpcodecs/vf_qp.c b/libmpcodecs/vf_qp.c index d8fcb57d97..bbce77e5b0 100644 --- a/libmpcodecs/vf_qp.c +++ b/libmpcodecs/vf_qp.c @@ -33,8 +33,6 @@ #include "vf.h" #include "libvo/fastmemcpy.h" -// Needed to bring in lrintf. -#define HAVE_AV_CONFIG_H #include "libavcodec/avcodec.h" #include "libavcodec/eval.h" From 878e88cd5c422a1b96227bb4977a1690c9c48d7a Mon Sep 17 00:00:00 2001 From: cehoyos Date: Tue, 7 Oct 2008 19:44:39 +0000 Subject: [PATCH 039/134] Change variable types from int to enum PixelFormat. Fixes icc warning #188: enumerated type mixed with another type git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27727 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 10 +++++----- libswscale/swscale_internal.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 639de3bb17..d5191c2cc2 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -1710,8 +1710,8 @@ static int YUV422PToUyvyWrapper(SwsContext *c, uint8_t* src[], int srcStride[], /* {RGB,BGR}{15,16,24,32,32_1} -> {RGB,BGR}{15,16,24,32} */ static int rgb2rgbWrapper(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ - const int srcFormat= c->srcFormat; - const int dstFormat= c->dstFormat; + const enum PixelFormat srcFormat= c->srcFormat; + const enum PixelFormat dstFormat= c->dstFormat; const int srcBpp= (fmt_depth(srcFormat) + 7) >> 3; const int dstBpp= (fmt_depth(dstFormat) + 7) >> 3; const int srcId= fmt_depth(srcFormat) >> 2; /* 1:0, 4:1, 8:2, 15:3, 16:4, 24:6, 32:8 */ @@ -2116,7 +2116,7 @@ static int handle_jpeg(int *format) } } -SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH, int dstFormat, int flags, +SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int dstW, int dstH, enum PixelFormat dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, double *param){ SwsContext *c; @@ -3082,8 +3082,8 @@ void sws_freeContext(SwsContext *c){ * asumed to remain valid. */ struct SwsContext *sws_getCachedContext(struct SwsContext *context, - int srcW, int srcH, int srcFormat, - int dstW, int dstH, int dstFormat, int flags, + int srcW, int srcH, enum PixelFormat srcFormat, + int dstW, int dstH, enum PixelFormat dstFormat, int flags, SwsFilter *srcFilter, SwsFilter *dstFilter, double *param) { static const double default_param[2] = {SWS_PARAM_DEFAULT, SWS_PARAM_DEFAULT}; diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 8290c04ade..4a84d20ac1 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -71,7 +71,7 @@ typedef struct SwsContext{ int chrSrcW, chrSrcH, chrDstW, chrDstH; int lumXInc, chrXInc; int lumYInc, chrYInc; - int dstFormat, srcFormat; ///< format 4:2:0 type is always YV12 + enum PixelFormat dstFormat, srcFormat; ///< format 4:2:0 type is always YV12 int origDstFormat, origSrcFormat; ///< format int chrSrcHSubSample, chrSrcVSubSample; int chrIntHSubSample, chrIntVSubSample; From 9bbe7f113172b06b4626a2258ee5f26674529686 Mon Sep 17 00:00:00 2001 From: aurel Date: Wed, 8 Oct 2008 11:59:01 +0000 Subject: [PATCH 040/134] Change one more variable type from int to enum PixelFormat. This one was missing from r27727. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27728 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index d5191c2cc2..7b8fcc5bd5 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2096,7 +2096,7 @@ int sws_getColorspaceDetails(SwsContext *c, int **inv_table, int *srcRange, int return 0; } -static int handle_jpeg(int *format) +static int handle_jpeg(enum PixelFormat *format) { switch (*format) { case PIX_FMT_YUVJ420P: From ef6c34c0867df03e575f18a259ce2b16070f2271 Mon Sep 17 00:00:00 2001 From: kraymer Date: Wed, 8 Oct 2008 16:22:23 +0000 Subject: [PATCH 041/134] r27182: apply parameter name change of no-correct-pts from r26842 to man page r27208: dvd:// streams accept the device path in the url; patch by Mathieu SCHROETER mathieu.schroeter gamesover ch r27230: Give all shell scripts a .sh suffix for consistency. r27235: moved o option beetwen m* and p* r27236: another alphabetical order correction r27334: -border/-noborder are supported by gl/gl2, too, but only on Windows. r27337: No idea which vos support -noborder how well, though those based on X11 or running on Windows _should_ work. Just remove that line for now. r27342: Remove outdated "X11 only" from xineramascreen option and try to make clearer what it does and what it does not. r27348: add list of supported vo's to -xineramascreen git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27729 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/de/mplayer.1 | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/DOCS/man/de/mplayer.1 b/DOCS/man/de/mplayer.1 index 1533deb383..14b21feecc 100644 --- a/DOCS/man/de/mplayer.1 +++ b/DOCS/man/de/mplayer.1 @@ -3,7 +3,7 @@ .\" Tobias Diedrich gepflegt. .\" Encoding: iso-8859-1 .\" -.\" In sync with r27182 +.\" In sync with r27384 . .\" -------------------------------------------------------------------------- .\" Makrodefinitionen @@ -64,7 +64,7 @@ mencoder \- Movie Encoder . .br .B mplayer -[dvd|dvdnav]://[Titel|[Starttitel]\-Endtitel] +[dvd|dvdnav]://[Titel|[Starttitel]\-Endtitel][/Gerät] [Optionen] . .br @@ -976,7 +976,7 @@ identify=6. Zum Beispiel listet es für eine DVD die Kapitel die zeitliche Länge jedes Titels sowie die Disc-ID. Kombiniere dies mit \-frames 0, um alle Ausgaben zu unterdrücken. -Das Wrapper-Script TOOLS/\:midentify.sh unterdrückt die anderen Ausgaben von +Das Wrapper-Script TOOLS/\:midentify unterdrückt die anderen Ausgaben von MPlayer und führt (hoffentlich) Shell-Escaping für die Dateinamen aus. . @@ -1098,6 +1098,10 @@ gesendet werden (momentan werden nur die Derivate von X11 unterst Nötig, um in DVD-Menüs Schaltflächen auszuwählen. . .TP +.B \-noar +Schaltet Unterstützung für Apple-Infrarotfernbedienung ab. +. +.TP .B \-noconsolecontrols Für Ereignisse wird von MPlayer nicht die Standardeingabe (stdin) verwendet. Das ist nützlich beim Lesen von Daten von der Standardeingabe. @@ -1117,10 +1121,6 @@ Schaltet die Joystickunterst Schaltet Unterstützung für LIRC aus. . .TP -.B \-noar -Schaltet Unterstützung für Apple-Infrarotfernbedienung ab. -. -.TP .B \-nomouseinput Sperrt die Eingabe mittels Mausbuttons (Buttonpress/\:-release) (diese Option wird unter anderem von mozplayerxp verwendet, um ein eigenes Kontextmenü @@ -3028,7 +3028,6 @@ Wird nur von fbdev-, dga2-, svga- und vesa-Videoausgabetreibern unterst Spiele den Film mit Fensterrand und Dekoration. Da dies standardmäßig an ist, benutze \-noborder um die normale Fensterdekoration abzuschalten. -Wird vom directx-Videoausgabetreiber unterstützt. . .TP .B \-brightness <\-100\-100> @@ -3394,7 +3393,7 @@ beispielsweise n mit der plugger-Erweiterung). . .TP -.B \-xineramascreen <\-2\-...> (nur bei X11) +.B \-xineramascreen <\-2\-...> Bei Xinerama-Konfigurationen (z.B.\& bei einem einzigen Desktop, der sich über mehrere Monitore erstreckt) gibt diese Option an, auf welchem Schirm das Video angezeigt werden soll. @@ -3405,6 +3404,10 @@ Die mit der Option \-geometry gesetzte Initialposition ist relativ zum angegebenen Bildschirm. Wird normalerweise nur mit "\-fstype \-fullscreen" oder "\-fstype none" funktionieren. +Diese Option ist nicht geeignet, nur das Startbild zu setzen (und nicht auch +das Bild im Vollbildmodus), \-geometry ist für diesen Zweck momentan die beste +zur Verfügung stehende Option. +Unterstützt von den Videoausgabetreibern gl, gl2, x11 und xv. . .TP .B \-zrbw (nur bei \-vo zr) @@ -11028,6 +11031,10 @@ momentan nur f Manchmal ist es nötig, diese zu erhöhen, um "Buffer Underflows" zu verweiden. . .TP +.B "o\ \ \ \ \ \ " +FIXME: Dokumentiere diese Option. +. +.TP .B packetsize= Größe, ausgedrückt in Bytes, des einheitlichen Pakets für das gewählte Format. Beim Muxing zu MPEG[12]-Implementierungen sind die Standardwerte 2324 für @@ -11041,9 +11048,6 @@ Decodierungszeitstempels (DTS) f (Verzögerung von Demuxing zu Decodierung). . .TP -.B "o\ \ \ \ \ \ " -FIXME: Dokumentiere diese Option. -. . . .\" -------------------------------------------------------------------------- From c51fe849d6237c7de2e1de341761d4f01848a002 Mon Sep 17 00:00:00 2001 From: vitor Date: Wed, 8 Oct 2008 17:46:22 +0000 Subject: [PATCH 042/134] Add a new unscaled PAL8 -> RGB converter. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27730 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 62 +++++++++++++++++++++++++++++------ libswscale/swscale_internal.h | 3 ++ 2 files changed, 55 insertions(+), 10 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 7b8fcc5bd5..35015df78e 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -155,6 +155,13 @@ unsigned swscale_version(void) || isRGB(x) \ || isBGR(x) \ ) +#define usePal(x) ( \ + (x)==PIX_FMT_PAL8 \ + || (x)==PIX_FMT_BGR4_BYTE \ + || (x)==PIX_FMT_RGB4_BYTE \ + || (x)==PIX_FMT_BGR8 \ + || (x)==PIX_FMT_RGB8 \ + ) #define RGB2YUV_SHIFT 15 #define BY ( (int)(0.114*219/255*(1<srcFormat; + const int dstFormat= c->dstFormat; + void (*conv)(const uint8_t *src, uint8_t *dst, long num_pixels, + const uint8_t *palette)=NULL; + int i; + uint8_t *dstPtr= dst[0] + dstStride[0]*srcSliceY; + uint8_t *srcPtr= src[0]; + + if (!usePal(srcFormat)) + av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n", + sws_format_name(srcFormat), sws_format_name(dstFormat)); + + switch(dstFormat){ + case PIX_FMT_RGB32: conv = palette8torgb32; break; + case PIX_FMT_BGR32: conv = palette8tobgr32; break; + case PIX_FMT_RGB24: conv = palette8torgb24; break; + case PIX_FMT_BGR24: conv = palette8tobgr24; break; + default: av_log(c, AV_LOG_ERROR, "internal error %s -> %s converter\n", + sws_format_name(srcFormat), sws_format_name(dstFormat)); break; + } + + + for (i=0; isrcW, c->pal_rgb); + srcPtr+= srcStride[0]; + dstPtr+= dstStride[0]; + } + + return srcSliceH; +} + /* {RGB,BGR}{15,16,24,32,32_1} -> {RGB,BGR}{15,16,24,32} */ static int rgb2rgbWrapper(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ @@ -2301,6 +2341,13 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d && (!needsDither || (c->flags&(SWS_FAST_BILINEAR|SWS_POINT)))) c->swScale= rgb2rgbWrapper; + if ((usePal(srcFormat) && ( + dstFormat == PIX_FMT_RGB32 || + dstFormat == PIX_FMT_RGB24 || + dstFormat == PIX_FMT_BGR32 || + dstFormat == PIX_FMT_BGR24))) + c->swScale= pal2rgbWrapper; + if (srcFormat == PIX_FMT_YUV422P) { if (dstFormat == PIX_FMT_YUYV422) @@ -2654,12 +2701,6 @@ int sws_scale(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ int i; uint8_t* src2[4]= {src[0], src[1], src[2]}; - uint32_t pal[256]; - int use_pal= c->srcFormat == PIX_FMT_PAL8 - || c->srcFormat == PIX_FMT_BGR4_BYTE - || c->srcFormat == PIX_FMT_RGB4_BYTE - || c->srcFormat == PIX_FMT_BGR8 - || c->srcFormat == PIX_FMT_RGB8; if (c->sliceDir == 0 && srcSliceY != 0 && srcSliceY + srcSliceH != c->srcH) { av_log(c, AV_LOG_ERROR, "Slices start in the middle!\n"); @@ -2669,7 +2710,7 @@ int sws_scale(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, if (srcSliceY == 0) c->sliceDir = 1; else c->sliceDir = -1; } - if (use_pal){ + if (usePal(c->srcFormat)){ for (i=0; i<256; i++){ int p, r, g, b,y,u,v; if(c->srcFormat == PIX_FMT_PAL8){ @@ -2697,9 +2738,10 @@ int sws_scale(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, y= av_clip_uint8((RY*r + GY*g + BY*b + ( 33<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT); u= av_clip_uint8((RU*r + GU*g + BU*b + (257<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT); v= av_clip_uint8((RV*r + GV*g + BV*b + (257<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT); - pal[i]= y + (u<<8) + (v<<16); + c->pal_yuv[i]= y + (u<<8) + (v<<16); + c->pal_rgb[i]= b + (g<<8) + (r<<16); } - src2[1]= (uint8_t*)pal; + src2[1]= (uint8_t*)c->pal_yuv; } // copy strides, so they can safely be modified @@ -2717,7 +2759,7 @@ int sws_scale(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int dstStride2[4]= {-dstStride[0], -dstStride[1], -dstStride[2]}; src2[0] += (srcSliceH-1)*srcStride[0]; - if (!use_pal) + if (!usePal(c->srcFormat)) src2[1] += ((srcSliceH>>c->chrSrcVSubSample)-1)*srcStride[1]; src2[2] += ((srcSliceH>>c->chrSrcVSubSample)-1)*srcStride[2]; diff --git a/libswscale/swscale_internal.h b/libswscale/swscale_internal.h index 4a84d20ac1..48995571e0 100644 --- a/libswscale/swscale_internal.h +++ b/libswscale/swscale_internal.h @@ -80,6 +80,9 @@ typedef struct SwsContext{ int sliceDir; double param[2]; + uint32_t pal_yuv[256]; + uint32_t pal_rgb[256]; + int16_t **lumPixBuf; int16_t **chrPixBuf; int16_t *hLumFilter; From 74bb6be453fb896a48d16254cf55449b58052d0b Mon Sep 17 00:00:00 2001 From: vitor Date: Wed, 8 Oct 2008 17:48:23 +0000 Subject: [PATCH 043/134] Do not set src[1] to the palette, it is now in the context git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27731 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 1 - libswscale/swscale_template.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 35015df78e..f3afb16695 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2741,7 +2741,6 @@ int sws_scale(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, c->pal_yuv[i]= y + (u<<8) + (v<<16); c->pal_rgb[i]= b + (g<<8) + (r<<16); } - src2[1]= (uint8_t*)c->pal_yuv; } // copy strides, so they can safely be modified diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index e96263b6b6..4d8a4434ee 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -2926,7 +2926,7 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s const int chrSrcSliceY= srcSliceY >> c->chrSrcVSubSample; const int chrSrcSliceH= -((-srcSliceH) >> c->chrSrcVSubSample); int lastDstY; - uint32_t *pal=NULL; + uint32_t *pal=c->pal_yuv; /* vars which will change and which we need to store back in the context */ int dstY= c->dstY; @@ -2936,7 +2936,6 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s int lastInChrBuf= c->lastInChrBuf; if (isPacked(c->srcFormat)){ - pal= (uint32_t *)src[1]; src[0]= src[1]= src[2]= src[0]; From 78f37058ff6658656f52fe6c82debb48723ba439 Mon Sep 17 00:00:00 2001 From: ulion Date: Thu, 9 Oct 2008 07:46:20 +0000 Subject: [PATCH 044/134] Fix channel order for ffmpeg flac codec. This patch comes from Andrew de Quincey . git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27732 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libaf/reorder_ch.c | 2 ++ libaf/reorder_ch.h | 5 ++++- libmpcodecs/ad_ffmpeg.c | 2 ++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libaf/reorder_ch.c b/libaf/reorder_ch.c index 4eb968842b..1ef05f4838 100644 --- a/libaf/reorder_ch.c +++ b/libaf/reorder_ch.c @@ -1109,6 +1109,7 @@ static int channel_layout_mapping_5ch[AF_CHANNEL_LAYOUT_SOURCE_NUM] = { AF_CHANNEL_LAYOUT_LAVC_LIBA52_5CH_DEFAULT, AF_CHANNEL_LAYOUT_LAVC_DCA_5CH_DEFAULT, AF_CHANNEL_LAYOUT_VORBIS_5CH_DEFAULT, + AF_CHANNEL_LAYOUT_FLAC_5CH_DEFAULT, }; static int channel_layout_mapping_6ch[AF_CHANNEL_LAYOUT_SOURCE_NUM] = { @@ -1119,6 +1120,7 @@ static int channel_layout_mapping_6ch[AF_CHANNEL_LAYOUT_SOURCE_NUM] = { AF_CHANNEL_LAYOUT_LAVC_LIBA52_6CH_DEFAULT, AF_CHANNEL_LAYOUT_LAVC_DCA_6CH_DEFAULT, AF_CHANNEL_LAYOUT_VORBIS_6CH_DEFAULT, + AF_CHANNEL_LAYOUT_FLAC_6CH_DEFAULT, }; void reorder_channel_copy_nch(void *src, diff --git a/libaf/reorder_ch.h b/libaf/reorder_ch.h index f5ed1ea84b..72bfccf1e1 100644 --- a/libaf/reorder_ch.h +++ b/libaf/reorder_ch.h @@ -73,6 +73,8 @@ #define AF_CHANNEL_LAYOUT_LAVC_DCA_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_D #define AF_CHANNEL_LAYOUT_VORBIS_5CH_DEFAULT AF_CHANNEL_LAYOUT_5_0_C #define AF_CHANNEL_LAYOUT_VORBIS_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_C +#define AF_CHANNEL_LAYOUT_FLAC_5CH_DEFAULT AF_CHANNEL_LAYOUT_5_0_A +#define AF_CHANNEL_LAYOUT_FLAC_6CH_DEFAULT AF_CHANNEL_LAYOUT_5_1_A #define AF_CHANNEL_MASK 0xFF #define AF_GET_CH_NUM(A) ((A)&0x7F) @@ -105,7 +107,8 @@ void reorder_channel(void *buf, #define AF_CHANNEL_LAYOUT_LAVC_LIBA52_DEFAULT 4 #define AF_CHANNEL_LAYOUT_LAVC_DCA_DEFAULT 5 #define AF_CHANNEL_LAYOUT_VORBIS_DEFAULT 6 -#define AF_CHANNEL_LAYOUT_SOURCE_NUM 7 +#define AF_CHANNEL_LAYOUT_FLAC_DEFAULT 7 +#define AF_CHANNEL_LAYOUT_SOURCE_NUM 8 #define AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT AF_CHANNEL_LAYOUT_ALSA_DEFAULT /// Optimized channel reorder between different audio sources and targets. diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c index 64702f7825..c0a638db8c 100644 --- a/libmpcodecs/ad_ffmpeg.c +++ b/libmpcodecs/ad_ffmpeg.c @@ -177,6 +177,8 @@ static int decode_audio(sh_audio_t *sh_audio,unsigned char *buf,int minlen,int m src_ch_layout = AF_CHANNEL_LAYOUT_LAVC_LIBA52_DEFAULT; else if (!strcasecmp(codec, "vorbis")) src_ch_layout = AF_CHANNEL_LAYOUT_VORBIS_DEFAULT; + else if (!strcasecmp(codec, "flac")) + src_ch_layout = AF_CHANNEL_LAYOUT_FLAC_DEFAULT; else src_ch_layout = AF_CHANNEL_LAYOUT_MPLAYER_DEFAULT; reorder_channel_nch(buf, src_ch_layout, From a0d55235a7867cf3c42c4b6d0dafc9a677333288 Mon Sep 17 00:00:00 2001 From: cehoyos Date: Thu, 9 Oct 2008 08:36:04 +0000 Subject: [PATCH 045/134] Change variable types from int to enum PixelFormat. Fixes icc warning #188: enumerated type mixed with another type git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27733 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index f3afb16695..577a0dfa9d 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -1716,8 +1716,8 @@ static int YUV422PToUyvyWrapper(SwsContext *c, uint8_t* src[], int srcStride[], static int pal2rgbWrapper(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, int srcSliceH, uint8_t* dst[], int dstStride[]){ - const int srcFormat= c->srcFormat; - const int dstFormat= c->dstFormat; + const enum PixelFormat srcFormat= c->srcFormat; + const enum PixelFormat dstFormat= c->dstFormat; void (*conv)(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)=NULL; int i; From 3ab65de119b118fb17f51c5fb4876e35dd737868 Mon Sep 17 00:00:00 2001 From: flameeyes Date: Thu, 9 Oct 2008 11:10:30 +0000 Subject: [PATCH 046/134] Invert logic for the single-pass in swScale() functions. Instead of having a firstTime variable defaulting to 1, have a warnedAlready defaulting to 0. While this should make no difference in code speed at runtime, it allows to aggregate the four bytes of that variable with clip_table in .bss section, rather than issuing a .data section just for that. As it is, libswscale require no .data section but .data.rel.ro (that can be mitigated by prelinking), so the change might actually save one page of memory at runtime (per process). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27734 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale_template.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index 4d8a4434ee..30075f6027 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -2964,12 +2964,12 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s if (dstStride[0]%8 !=0 || dstStride[1]%8 !=0 || dstStride[2]%8 !=0) { - static int firstTime=1; //FIXME move this into the context perhaps - if (flags & SWS_PRINT_INFO && firstTime) + static int warnedAlready=0; //FIXME move this into the context perhaps + if (flags & SWS_PRINT_INFO && !warnedAlready) { av_log(c, AV_LOG_WARNING, "Warning: dstStride is not aligned!\n" " ->cannot do aligned memory accesses anymore\n"); - firstTime=0; + warnedAlready=1; } } From 46caebfa6ea2971b32a5b4a0cd6ad0211ff58d20 Mon Sep 17 00:00:00 2001 From: flameeyes Date: Thu, 9 Oct 2008 11:11:35 +0000 Subject: [PATCH 047/134] Mark variation-specific interleaveBytes static. These functions are never called by themselves, the alias interleaveBytes is used instead. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27735 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/rgb2rgb_template.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index d7c581b44c..c9a16e2512 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -2429,7 +2429,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_ } } -void RENAME(interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dest, +static void RENAME(interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dest, long width, long height, long src1Stride, long src2Stride, long dstStride){ long h; From 98fb4aebc22fd0404fac69fd97dd931d8618f5b6 Mon Sep 17 00:00:00 2001 From: flameeyes Date: Thu, 9 Oct 2008 11:12:38 +0000 Subject: [PATCH 048/134] Mark dither_2x2_{8,4} static to swscale.c These two tables are not used outside swscale.c even though they are declared also in yuv2rgb.c. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27736 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 4 ++-- libswscale/yuv2rgb.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 577a0dfa9d..2cac8729e2 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -264,12 +264,12 @@ static unsigned char clip_table[768]; static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b); -const uint8_t __attribute__((aligned(8))) dither_2x2_4[2][8]={ +static const uint8_t __attribute__((aligned(8))) dither_2x2_4[2][8]={ { 1, 3, 1, 3, 1, 3, 1, 3, }, { 2, 0, 2, 0, 2, 0, 2, 0, }, }; -const uint8_t __attribute__((aligned(8))) dither_2x2_8[2][8]={ +static const uint8_t __attribute__((aligned(8))) dither_2x2_8[2][8]={ { 6, 2, 6, 2, 6, 2, 6, 2, }, { 0, 4, 0, 4, 0, 4, 0, 4, }, }; diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c index 9b64c06dec..d19430fd17 100644 --- a/libswscale/yuv2rgb.c +++ b/libswscale/yuv2rgb.c @@ -41,8 +41,6 @@ #define DITHER1XBPP // only for MMX -extern const uint8_t dither_2x2_4[2][8]; -extern const uint8_t dither_2x2_8[2][8]; extern const uint8_t dither_8x8_32[8][8]; extern const uint8_t dither_8x8_73[8][8]; extern const uint8_t dither_8x8_220[8][8]; From 3035850d273a4675f52db986beb995fe2a63002a Mon Sep 17 00:00:00 2001 From: flameeyes Date: Thu, 9 Oct 2008 11:13:14 +0000 Subject: [PATCH 049/134] Mark some symbols in swscale.c as constant. These are only used in swscale_template.c (and thus don't need to be made extern), and can be declared as ASM constants. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27737 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 2cac8729e2..950a67a9a4 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -244,18 +244,18 @@ DECLARE_ALIGNED(8, const uint64_t, ff_bgr2YOffset) = 0x1010101010101010ULL; DECLARE_ALIGNED(8, const uint64_t, ff_bgr2UVOffset) = 0x8080808080808080ULL; DECLARE_ALIGNED(8, const uint64_t, ff_w1111) = 0x0001000100010001ULL; -DECLARE_ALIGNED(8, const uint64_t, ff_bgr24toY1Coeff) = 0x0C88000040870C88ULL; -DECLARE_ALIGNED(8, const uint64_t, ff_bgr24toY2Coeff) = 0x20DE4087000020DEULL; -DECLARE_ALIGNED(8, const uint64_t, ff_rgb24toY1Coeff) = 0x20DE0000408720DEULL; -DECLARE_ALIGNED(8, const uint64_t, ff_rgb24toY2Coeff) = 0x0C88408700000C88ULL; -DECLARE_ALIGNED(8, const uint64_t, ff_bgr24toYOffset) = 0x0008400000084000ULL; +DECLARE_ASM_CONST(8, uint64_t, ff_bgr24toY1Coeff) = 0x0C88000040870C88ULL; +DECLARE_ASM_CONST(8, uint64_t, ff_bgr24toY2Coeff) = 0x20DE4087000020DEULL; +DECLARE_ASM_CONST(8, uint64_t, ff_rgb24toY1Coeff) = 0x20DE0000408720DEULL; +DECLARE_ASM_CONST(8, uint64_t, ff_rgb24toY2Coeff) = 0x0C88408700000C88ULL; +DECLARE_ASM_CONST(8, uint64_t, ff_bgr24toYOffset) = 0x0008400000084000ULL; -DECLARE_ALIGNED(8, const uint64_t, ff_bgr24toUV[2][4]) = { +DECLARE_ASM_CONST(8, uint64_t, ff_bgr24toUV[2][4]) = { {0x38380000DAC83838ULL, 0xECFFDAC80000ECFFULL, 0xF6E40000D0E3F6E4ULL, 0x3838D0E300003838ULL}, {0xECFF0000DAC8ECFFULL, 0x3838DAC800003838ULL, 0x38380000D0E33838ULL, 0xF6E4D0E30000F6E4ULL}, }; -DECLARE_ALIGNED(8, const uint64_t, ff_bgr24toUVOffset)= 0x0040400000404000ULL; +DECLARE_ASM_CONST(8, uint64_t, ff_bgr24toUVOffset)= 0x0040400000404000ULL; #endif /* defined(ARCH_X86) */ From 22bb046adc6e385fb408fbefbbb18ea4e8a9dc7b Mon Sep 17 00:00:00 2001 From: cehoyos Date: Thu, 9 Oct 2008 17:08:47 +0000 Subject: [PATCH 050/134] Replace numeric constants by their defines. Fixes icc warning #188: enumerated type mixed with another type git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27738 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_alsa.c | 8 ++++---- libvo/vo_sdl.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/libao2/ao_alsa.c b/libao2/ao_alsa.c index 4cb4470271..cd7b862728 100644 --- a/libao2/ao_alsa.c +++ b/libao2/ao_alsa.c @@ -192,7 +192,7 @@ static int control(int cmd, void *arg) set_vol = vol->left / f_multi + pmin + 0.5; //setting channels - if ((err = snd_mixer_selem_set_playback_volume(elem, 0, set_vol)) < 0) { + if ((err = snd_mixer_selem_set_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, set_vol)) < 0) { mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSettingLeftChannel, snd_strerror(err)); return CONTROL_ERROR; @@ -201,7 +201,7 @@ static int control(int cmd, void *arg) set_vol = vol->right / f_multi + pmin + 0.5; - if ((err = snd_mixer_selem_set_playback_volume(elem, 1, set_vol)) < 0) { + if ((err = snd_mixer_selem_set_playback_volume(elem, SND_MIXER_SCHN_FRONT_RIGHT, set_vol)) < 0) { mp_msg(MSGT_AO,MSGL_ERR,MSGTR_AO_ALSA_ErrorSettingRightChannel, snd_strerror(err)); return CONTROL_ERROR; @@ -221,9 +221,9 @@ static int control(int cmd, void *arg) } } else { - snd_mixer_selem_get_playback_volume(elem, 0, &get_vol); + snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_LEFT, &get_vol); vol->left = (get_vol - pmin) * f_multi; - snd_mixer_selem_get_playback_volume(elem, 1, &get_vol); + snd_mixer_selem_get_playback_volume(elem, SND_MIXER_SCHN_FRONT_RIGHT, &get_vol); vol->right = (get_vol - pmin) * f_multi; mp_msg(MSGT_AO,MSGL_DBG2,"left=%f, right=%f\n",vol->left,vol->right); diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c index 4fca181e24..8e3643970b 100644 --- a/libvo/vo_sdl.c +++ b/libvo/vo_sdl.c @@ -1120,7 +1120,7 @@ static void check_events (void) { struct sdl_priv_s *priv = &sdl_priv; SDL_Event event; - SDLKey keypressed = 0; + SDLKey keypressed = SDLK_UNKNOWN; /* Poll the waiting SDL Events */ while ( SDL_PollEvent(&event) ) { From a6b9c80b256e0eb4a22039e91e23b78e4d49c67c Mon Sep 17 00:00:00 2001 From: cehoyos Date: Thu, 9 Oct 2008 17:10:31 +0000 Subject: [PATCH 051/134] Remove unused line (and fix an icc warning). git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27739 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_audio.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libmpdemux/demux_audio.c b/libmpdemux/demux_audio.c index 57fa0d340c..a1371aa5f1 100644 --- a/libmpdemux/demux_audio.c +++ b/libmpdemux/demux_audio.c @@ -392,7 +392,6 @@ static int demux_audio_open(demuxer_t* demuxer) { l -= 16; if (l >= 2) { w->cbSize = stream_read_word_le(s); - if (w->cbSize < 0) w->cbSize = 0; l -= 2; if (l < w->cbSize) { mp_msg(MSGT_DEMUX,MSGL_ERR,"[demux_audio] truncated extradata (%d < %d)\n", From e61c3a381af0625874ce2fb5f052eb1f4e9676ce Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 9 Oct 2008 22:11:56 +0000 Subject: [PATCH 052/134] cosmetics: Group system header and function definitions together in config.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27740 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 134 +++++++++++++++++++++++++++--------------------------- 1 file changed, 66 insertions(+), 68 deletions(-) diff --git a/configure b/configure index 89dafdf10b..43efb6c6d2 100755 --- a/configure +++ b/configure @@ -8070,6 +8070,71 @@ $_def_fast_inttypes /* libdvdread */ #define HAVE_UINTPTR_T 1 +/* Define this if your system has the "alloca.h" header file */ +$_def_alloca + +/* Define this if your system has the "byteswap.h" header file */ +$_def_byteswap_h + +/* Define this if your system has the "sys/mman.h" header file */ +$_def_mman +$_def_mman_has_map_failed + +/* Define this if your system has the header file for the OSS sound interface */ +$_def_sys_soundcard + +/* Define this if your system has the header file for the OSS sound interface + * in /usr/include */ +$_def_soundcard + +/* Define this if your system has the sysinfo header */ +$_def_sys_sysinfo + +/* Define this if your system has the "malloc.h" header file */ +$_def_malloc + +/* memalign is mapped to malloc if unsupported */ +$_def_memalign +$_def_map_memalign +$_def_memalign_hack + +/* define this to use nl_langinfo function */ +$_def_langinfo + +/* nanosleep support */ +$_def_nanosleep + +/* do we have gethostbyname2? */ +$_def_gethostbyname2 + +/* Define this if your system has swab */ +$_def_swab + +/* Define this if your system has posix select */ +$_def_posix_select + +/* Define this if your system has gettimeofday */ +$_def_gettimeofday + +/* Define this if your system has glob */ +$_def_glob + +/* Define this if your system has setenv */ +$_def_setenv +#ifndef HAVE_SETENV +int setenv(const char *name, const char *val, int overwrite); +#endif + +/* Define this if your system has strsep */ +$_def_strsep + +/* Define this if your system has vsscanf */ +$_def_vsscanf + +/* Define this if your system has sysi86 */ +$_def_sysi86 +$_def_sysi86_iv + /* C99 *lrint* and round* functions available */ $_def_llrint $_def_lrint @@ -8077,9 +8142,6 @@ $_def_lrintf $_def_round $_def_roundf -/* nanosleep support */ -$_def_nanosleep - /* name of messages charset */ $_def_charset @@ -8144,68 +8206,6 @@ $_def_asmalign_pot /* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/ $_def_fastmemcpy -/* Define this if your system has the "malloc.h" header file */ -$_def_malloc - -/* memalign is mapped to malloc if unsupported */ -$_def_memalign -$_def_map_memalign -$_def_memalign_hack - -/* Define this if your system has the "alloca.h" header file */ -$_def_alloca - -/* Define this if your system has the "byteswap.h" header file */ -$_def_byteswap_h - -/* Define this if your system has the "sys/mman.h" header file */ -$_def_mman -$_def_mman_has_map_failed - -/* Define this if your system has the header file for the OSS sound interface */ -$_def_sys_soundcard - -/* Define this if your system has the header file for the OSS sound interface - * in /usr/include */ -$_def_soundcard - -/* Define this if your system has the sysinfo header */ -$_def_sys_sysinfo - -/* do we have gethostbyname2? */ -$_def_gethostbyname2 - -/* Define this if your system has swab */ -$_def_swab - -/* Define this if your system has posix select */ -$_def_posix_select - -/* Define this if your system has gettimeofday */ -$_def_gettimeofday - -/* Define this if your system has glob */ -$_def_glob - -/* Define this if your system has setenv */ -$_def_setenv -#ifndef HAVE_SETENV -int setenv(const char *name, const char *val, int overwrite); -#endif - -/* Define this if your system has strsep */ -$_def_strsep - -/* Define this if your system has vsscanf */ -$_def_vsscanf - -/* Define this if your system has sysi86 */ -$_def_sysi86 -$_def_sysi86_iv - -/* Define this if your system has pthreads */ -$_def_pthreads - /* Toggles debugging informations */ $_def_debug @@ -8294,9 +8294,6 @@ $_def_mp3lame_preset_medium /* define this to use iconv(3) function to codepage conversions */ $_def_iconv -/* define this to use nl_langinfo function */ -$_def_langinfo - /* define this to use RTC (/dev/rtc) for video timers */ $_def_rtc @@ -8682,6 +8679,7 @@ $_def_libswscale_so /* Define this if you enabled thread support for libavcodec */ $_def_threads +$_def_pthreads #ifdef HAVE_THREADS #define ENABLE_THREADS 1 #else From 54a1406b3154d1ae8f6759b00a771d62c749e076 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 10 Oct 2008 05:34:49 +0000 Subject: [PATCH 053/134] cosmetics: Group codec-, network- and gui-related options together in config.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27741 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 78 +++++++++++++++++++++++++++---------------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/configure b/configure index 43efb6c6d2..6c7ff435a8 100755 --- a/configure +++ b/configure @@ -8273,24 +8273,6 @@ $_def_vcd #endif -/* Define if you are using Xvid library */ -$_def_xvid - -/* Define if you are using the X.264 library */ -$_def_x264 - -/* Define if you are using libnut */ -$_def_libnut - -/* Define to include support for libdv-0.9.5 */ -$_def_libdv - -/* Indicates if libmp3lame is available - Note: for mencoder */ -$_def_mp3lame -$_def_mp3lame_preset -$_def_mp3lame_preset_medium - /* define this to use iconv(3) function to codepage conversions */ $_def_iconv @@ -8350,6 +8332,28 @@ $_def_libmpeg2 /* maximum alignment used by libmpeg2 */ #define ATTRIBUTE_ALIGNED_MAX 16 +/* enable FAAD (AAC) support */ +$_def_faad +$_def_faad_internal + +/* enable FAAC (AAC encoder) support */ +$_def_faac + +/* Define if you are using the Xvid library */ +$_def_xvid + +/* Define if you are using the X.264 library */ +$_def_x264 + +/* Define to include support for libdv-0.9.5 */ +$_def_libdv + +/* Indicates if libmp3lame is available + Note: for mencoder */ +$_def_mp3lame +$_def_mp3lame_preset +$_def_mp3lame_preset_medium + /* liblzo support */ $_def_liblzo @@ -8369,13 +8373,6 @@ $_def_musepack /* enable OggTheora support */ $_def_theora -/* enable FAAD (AAC) support */ -$_def_faad -$_def_faad_internal - -/* enable FAAC (AAC encoder) support */ -$_def_faac - /* enable libdca support */ $_def_libdca @@ -8400,11 +8397,12 @@ $_def_real_path $_def_qtx $_def_qtx_win32 -/* LIVE555 Streaming Media library support */ -$_def_live +/* Define if you are using libnut */ +$_def_libnut -/* libnemesi Streaming Media library support */ -$_def_nemesi +/* XMMS input plugin support */ +$_def_xmms +#define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir" /* Use UnRAR executable for Vobsubs */ $_def_unrar_exec @@ -8413,6 +8411,9 @@ $_def_unrar_exec $_def_gui $_def_gtk2 +/* used by GUI: */ +$_def_xshape + /* Audio output drivers */ $_def_ossaudio $_def_ossaudio_devdsp @@ -8481,9 +8482,6 @@ $_def_pvr /* Define this for Cygwin build for win32 */ $_def_confwin32 -/* SMB support */ -$_def_smb - /* termcap flag for getch2.c */ $_def_termcap @@ -8542,6 +8540,15 @@ $_def_ladspa /* enable network */ $_def_network +/* LIVE555 Streaming Media library support */ +$_def_live + +/* libnemesi Streaming Media library support */ +$_def_nemesi + +/* SMB support */ +$_def_smb + /* enable ftp support */ $_def_ftp @@ -8587,10 +8594,6 @@ $_def_vidix_pfx /* enables / disables new input joystick support */ $_def_joystick -/* XMMS input plugin support */ -$_def_xmms -#define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir" - /* libvo options */ #define SCREEN_SIZE_X 1 #define SCREEN_SIZE_Y 1 @@ -8645,9 +8648,6 @@ $_def_twolame /* Define this if you have shm support */ $_def_shm -/* used by GUI: */ -$_def_xshape - #if defined(CONFIG_GL) || defined(CONFIG_X11) || defined(CONFIG_XV) #define X11_FULLSCREEN 1 #endif From 41272e3014696dd2975b919ffdf0119f6cf40b11 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 10 Oct 2008 21:56:03 +0000 Subject: [PATCH 054/134] cosmetics: Move some config.h entries to more sensible places. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27742 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 47 ++++++++++++++++++++++++----------------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/configure b/configure index 6c7ff435a8..48e8d39a4b 100755 --- a/configure +++ b/configure @@ -8073,9 +8073,6 @@ $_def_fast_inttypes /* Define this if your system has the "alloca.h" header file */ $_def_alloca -/* Define this if your system has the "byteswap.h" header file */ -$_def_byteswap_h - /* Define this if your system has the "sys/mman.h" header file */ $_def_mman $_def_mman_has_map_failed @@ -8170,6 +8167,18 @@ $_def_dcbzl /* Define this to any prefered value from 386 up to infinity with step 100 */ #define __CPU__ $iproc +/* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/ +$_def_fastmemcpy + +/* enable/disable SIGHANDLER */ +$_def_sighandler + +/* enable/disable automatic gdb attach on crash, requires SIGHANDLER */ +$_def_crash_debug + +/* Toggles debugging informations */ +$_def_debug + /* Dynamic a/v plugins */ $_def_dynamic_plugins @@ -8203,18 +8212,6 @@ $_def_named_asm_args /* assembler handling of .align */ $_def_asmalign_pot -/* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/ -$_def_fastmemcpy - -/* Toggles debugging informations */ -$_def_debug - -/* enable/disable SIGHANDLER */ -$_def_sighandler - -/* enable/disable automatic gdb attach on crash, requires SIGHANDLER */ -$_def_crash_debug - /* enables / disables cdparanoia support */ $_def_cdparanoia $_def_cddb @@ -8308,9 +8305,15 @@ $_def_apple_remote /* Apple IR Remote (Linux remote control driver) */ $_def_apple_ir +/* enables / disables new input joystick support */ +$_def_joystick + /* Support for maemo (http://www.maemo.org) */ $_def_maemo +/* Define this for Cygwin build for win32 */ +$_def_confwin32 + /* Mac OS X specific features */ $_def_macosx_finder $_def_macosx_bundle @@ -8354,6 +8357,9 @@ $_def_mp3lame $_def_mp3lame_preset $_def_mp3lame_preset_medium +$_def_toolame +$_def_twolame + /* liblzo support */ $_def_liblzo @@ -8479,9 +8485,6 @@ $_def_radio_bsdbt848 /* Enable Video 4 Linux 2 MPEG PVR support */ $_def_pvr -/* Define this for Cygwin build for win32 */ -$_def_confwin32 - /* termcap flag for getch2.c */ $_def_termcap @@ -8591,9 +8594,6 @@ $_def_vidix_drv_sis $_def_vidix_drv_unichrome $_def_vidix_pfx -/* enables / disables new input joystick support */ -$_def_joystick - /* libvo options */ #define SCREEN_SIZE_X 1 #define SCREEN_SIZE_Y 1 @@ -8642,8 +8642,6 @@ $_def_xdpms $_def_aa $_def_caca $_def_tga -$_def_toolame -$_def_twolame /* Define this if you have shm support */ $_def_shm @@ -8686,6 +8684,9 @@ $_def_pthreads #define ENABLE_THREADS 0 #endif +/* Define this if your system has the "byteswap.h" header file */ +$_def_byteswap_h + /* Use libavcodec's decoders */ #define CONFIG_DECODERS 1 #define ENABLE_DECODERS 1 From 4ac23d655fb82977350a7304aae898b343850dd1 Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 11 Oct 2008 08:22:03 +0000 Subject: [PATCH 055/134] Do not provide a prototype for setenv in config.h, we do not provide a prototype for all the other functions that we have in osdep/. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27743 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 3 --- 1 file changed, 3 deletions(-) diff --git a/configure b/configure index 48e8d39a4b..82bf56a13f 100755 --- a/configure +++ b/configure @@ -8118,9 +8118,6 @@ $_def_glob /* Define this if your system has setenv */ $_def_setenv -#ifndef HAVE_SETENV -int setenv(const char *name, const char *val, int overwrite); -#endif /* Define this if your system has strsep */ $_def_strsep From ac3b6d090c0b5c6ee4efecf0b80a6c01bfd4572f Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 12 Oct 2008 12:12:41 +0000 Subject: [PATCH 056/134] Move socklen_t typedef from config.h to stream/network.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27744 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 4 ---- stream/librtsp/rtsp_rtp.c | 1 + stream/network.h | 3 +++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 82bf56a13f..a9e568230b 100755 --- a/configure +++ b/configure @@ -8563,10 +8563,6 @@ $_def_use_aton /* socklen_t support */ $_def_socklen_t -#ifndef HAVE_SOCKLEN_T -#define HAVE_SOCKLEN_T 1 -typedef int socklen_t; -#endif /* closesocket() support */ $_def_closesocket diff --git a/stream/librtsp/rtsp_rtp.c b/stream/librtsp/rtsp_rtp.c index fd01524d89..b782b59cd5 100644 --- a/stream/librtsp/rtsp_rtp.c +++ b/stream/librtsp/rtsp_rtp.c @@ -42,6 +42,7 @@ #include "rtsp.h" #include "rtsp_rtp.h" #include "rtsp_session.h" +#include "stream/network.h" #include "stream/freesdp/common.h" #include "stream/freesdp/parser.h" diff --git a/stream/network.h b/stream/network.h index 76e2e6d520..36b470dfe4 100644 --- a/stream/network.h +++ b/stream/network.h @@ -25,6 +25,9 @@ #ifndef HAVE_CLOSESOCKET #define closesocket close #endif +#ifndef HAVE_SOCKLEN_T +typedef int socklen_t; +#endif #define BUFFER_SIZE 2048 From 73357cc804ea32e3f0d8c440b7d43eb9b12fab1a Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 12 Oct 2008 15:58:44 +0000 Subject: [PATCH 057/134] Add missing support for some multimedia keys to X11 backend code. patch by Jorge Lopez, jorgelt gmail com git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27747 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/x11_common.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libvo/x11_common.c b/libvo/x11_common.c index 287e0b3a0a..233a10bbf1 100644 --- a/libvo/x11_common.c +++ b/libvo/x11_common.c @@ -546,6 +546,12 @@ static void vo_x11_putkey_ext(int keysym) { switch (keysym) { + case XF86XK_MenuKB: + mplayer_put_key(KEY_MENU); + break; + case XF86XK_AudioPlay: + mplayer_put_key(KEY_PLAY); + break; case XF86XK_AudioPause: mplayer_put_key(KEY_PAUSE); break; @@ -558,6 +564,9 @@ static void vo_x11_putkey_ext(int keysym) case XF86XK_AudioNext: mplayer_put_key(KEY_NEXT); break; + case XF86XK_AudioMute: + mplayer_put_key(KEY_MUTE); + break; case XF86XK_AudioLowerVolume: mplayer_put_key(KEY_VOLUME_DOWN); break; From 28d7f776acf2643967b0e79eba1657ac34261688 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 12 Oct 2008 17:14:13 +0000 Subject: [PATCH 058/134] Remove useless HAVE_STRCHR definition from config.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27748 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/configure index a9e568230b..0e6577fc9f 100755 --- a/configure +++ b/configure @@ -8065,7 +8065,6 @@ $_def_fast_inttypes /* libfaad2 */ #define HAVE_MEMCPY 1 -#define HAVE_STRCHR 1 /* libdvdread */ #define HAVE_UINTPTR_T 1 From 8f2b2b1b03dd8334984a955dc4a45150a0bf5e82 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 12 Oct 2008 17:18:15 +0000 Subject: [PATCH 059/134] Filter out .hh and .h files in the C++ dependency generation command. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27749 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 0e6577fc9f..f484aad386 100755 --- a/configure +++ b/configure @@ -7805,7 +7805,7 @@ EXTRALIBS_MENCODER = $_libs_mencoder DEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.h,\$^) | sed "s,[0-9a-z._-]*: \(\$(SRC_DIR)/\)*\([a-z0-9]*/\)[^/]* ,\\2&," MPDEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.xpm,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &," -MPDEPEND_CMD_CXX = \$(CC) -MM \$(CXXFLAGS) \$(filter-out %.xpm,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &," +MPDEPEND_CMD_CXX = \$(CC) -MM \$(CXXFLAGS) \$(filter-out %.hh,\$(filter-out %.h,$^)) | sed -e "s,[0-9a-z._-]*: \([a-z0-9/]*/\)[^/]* ,\1&," -e "s,\(.*\)\.o: ,\1.d &," GETCH = $_getch HELP_FILE = $_mp_help From 785e8bca87d864e11c6d111ea1fb6331c9ba2233 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 12 Oct 2008 22:11:33 +0000 Subject: [PATCH 060/134] Remove redundant declaration of proc_priority. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27750 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cfg-common.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/cfg-common.h b/cfg-common.h index bed59136e4..8257b47859 100644 --- a/cfg-common.h +++ b/cfg-common.h @@ -349,8 +349,6 @@ const m_option_t msgl_config[]={ }; -extern char * proc_priority; - #ifdef WIN32 struct { char* name; From 79e038985a431e03381ca376ce4fddaa962846d6 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 12 Oct 2008 22:12:24 +0000 Subject: [PATCH 061/134] Remove unused variables. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27751 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/sysdep/libdha_win32.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/vidix/sysdep/libdha_win32.c b/vidix/sysdep/libdha_win32.c index ba3bacb5aa..d4ea84fb45 100644 --- a/vidix/sysdep/libdha_win32.c +++ b/vidix/sysdep/libdha_win32.c @@ -51,10 +51,8 @@ void *map_phys_mem(unsigned long base, unsigned long size) { if(!IsWinNT()){ HANDLE hDevice ; PVOID inBuf[1] ; /* buffer for struct pointer to VxD */ - DWORD RetInfo[2] ; /* buffer to receive data from VxD */ DWORD cbBytesReturned ; /* count of bytes returned from VxD */ MAPDEVREQUEST req ; /* map device request structure */ - DWORD *pNicstar, Status, Time ; int i ; char *endptr ; const PCHAR VxDName = "\\\\.\\MAPDEV.VXD" ; const PCHAR VxDNameAlreadyLoaded = "\\\\.\\MAPDEV" ; From 7559876669340a1f94d28e356052c7a9978e1feb Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 14:17:25 +0000 Subject: [PATCH 062/134] Remove check for byteswap.h, it was removed from FFmpeg. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27752 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/configure b/configure index f484aad386..5f65481827 100755 --- a/configure +++ b/configure @@ -2976,21 +2976,6 @@ fi echores "$_alloca" -echocheck "byteswap.h" -cat > $TMPC << EOF -#include -int main(void) { bswap_16(0); return 0; } -EOF -_byteswap_h=no -cc_check && _byteswap_h=yes -if cc_check ; then - _def_byteswap_h='#define HAVE_BYTESWAP_H 1' -else - _def_byteswap_h='#undef HAVE_BYTESWAP_H' -fi -echores "$_byteswap_h" - - echocheck "mman.h" cat > $TMPC << EOF #include @@ -8676,9 +8661,6 @@ $_def_pthreads #define ENABLE_THREADS 0 #endif -/* Define this if your system has the "byteswap.h" header file */ -$_def_byteswap_h - /* Use libavcodec's decoders */ #define CONFIG_DECODERS 1 #define ENABLE_DECODERS 1 From 1d5af8c0da88f3c2992c92e874e336e111a0caec Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 14:38:36 +0000 Subject: [PATCH 063/134] Remove redundant variable declaration, fixes the warning: libvo/vo_winvidix.c:52: warning: redundant redeclaration of 'hWnd' libvo/vo_winvidix.c:50: warning: previous declaration of 'hWnd' was here git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27753 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_winvidix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libvo/vo_winvidix.c b/libvo/vo_winvidix.c index b03b1b2ded..fc2884da5d 100644 --- a/libvo/vo_winvidix.c +++ b/libvo/vo_winvidix.c @@ -47,7 +47,6 @@ static char *vidix_name; static uint32_t image_width; static uint32_t image_height; static uint32_t image_format; -static HWND hWnd; /* Window parameters */ static HWND hWnd=NULL,hWndFS=NULL; static float window_aspect; From 9992cbd580ded5cd4188dde7249db8890fb400f6 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 14:40:58 +0000 Subject: [PATCH 064/134] Surround conditionally used function with corresponding #ifdef, fixes: libvo/vo_gl2.c:681: warning: 'gl_handlekey' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27754 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_gl2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c index 1efe6308df..09d7e23de6 100644 --- a/libvo/vo_gl2.c +++ b/libvo/vo_gl2.c @@ -677,6 +677,7 @@ config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_height, uin return 0; } +#ifndef GL_WIN32 static int gl_handlekey(int key) { if(key=='a'||key=='A') { @@ -688,6 +689,7 @@ static int gl_handlekey(int key) } return 1; } +#endif static void check_events(void) { From e00c1a9e6de39a6b4d5ab683c519bb32602324b4 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 14:47:11 +0000 Subject: [PATCH 065/134] Remove redundantly declared definitions FILE_ANY_ACCESS and CTL_CODE, fixes: vidix/sysdep/libdha_win32.c:34:1: warning: "FILE_ANY_ACCESS" redefined vidix/sysdep/libdha_win32.c:35:1: warning: "CTL_CODE" redefined git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27755 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/sysdep/libdha_win32.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/vidix/sysdep/libdha_win32.c b/vidix/sysdep/libdha_win32.c index d4ea84fb45..4f6075194f 100644 --- a/vidix/sysdep/libdha_win32.c +++ b/vidix/sysdep/libdha_win32.c @@ -31,9 +31,6 @@ typedef struct MapDevRequest /*#include "winioctl.h"*/ #define FILE_DEVICE_UNKNOWN 0x00000022 #define METHOD_NEITHER 3 -#define FILE_ANY_ACCESS 0 -#define CTL_CODE( DeviceType, Function, Method, Access ) ( \ - ((DeviceType)<<16) | ((Access)<<14) | ((Function)<<2) | (Method) ) int IsWinNT(){ From d5f8f8dc748c3422336da200ee0dbf8cfdd2626a Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 14:55:01 +0000 Subject: [PATCH 066/134] Add missing Cygwin header, fixes the warning: get_path.c:151: warning: implicit declaration of function `cygwin_conv_to_full_w in32_path' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27756 b3059339-0415-0410-9bf9-f77b7e298cf2 --- get_path.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/get_path.c b/get_path.c index 76a0169519..16c93551c8 100644 --- a/get_path.c +++ b/get_path.c @@ -20,10 +20,15 @@ #include #endif -#ifdef WIN32 +#ifdef __MINGW32__ #include #endif +#ifdef __CYGWIN__ +#include +#include +#endif + #ifdef __OS2__ #define INCL_DOS #include From c8808af5a0e19e550a1779cb3725a0dcffe0d65b Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 15:13:40 +0000 Subject: [PATCH 067/134] Unconditionally #include osdep/shem.h, fixes the warnings on Cygwin: stream/cache2.c:244: warning: implicit declaration of function `shmem_alloc' stream/cache2.c:265: warning: implicit declaration of function `shmem_free' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27757 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/cache2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream/cache2.c b/stream/cache2.c index 53749afb5d..aff5a93a6f 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -16,6 +16,7 @@ #include #include +#include "osdep/shmem.h" #include "osdep/timer.h" #ifdef WIN32 #include @@ -26,7 +27,6 @@ static DWORD WINAPI ThreadProc(void* s); static void ThreadProc( void *s ); #else #include -#include "osdep/shmem.h" #endif #include "mp_msg.h" From bc7cf2efd85d4f1a88892cff71294adb4bc44a86 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 15:25:34 +0000 Subject: [PATCH 068/134] Remove unused function, fixes the warning: stream/tvi_dshow.c:1311: warning: 'reconnect_pins' defined but not used git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27758 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/tvi_dshow.c | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/stream/tvi_dshow.c b/stream/tvi_dshow.c index 726f469098..e06f4dc346 100644 --- a/stream/tvi_dshow.c +++ b/stream/tvi_dshow.c @@ -1298,52 +1298,6 @@ static void get_capabilities(priv_t * priv) * *--------------------------------------------------------------------------------------- */ -/** - * \brief routine for reconnecting two pins with new media type - * \param pGraph IGraphBuilder interface - * \param chan chain data - * \param pmt [in/out] new mediatype for pin connection - * - * \return S_OK if operation successfult, error code otherwise - * will also return media type of new connection into pmt variable - */ -static HRESULT reconnect_pins(IGraphBuilder *pGraph, chain_t *chain, AM_MEDIA_TYPE *pmt) -{ - AM_MEDIA_TYPE old_mt; - HRESULT hr; - - do { - /* save old media type for reconnection in case of error */ - hr = OLE_CALL_ARGS(chain->pCapturePin, ConnectionMediaType, &old_mt); - if(FAILED(hr)) - return hr; - - hr = OLE_CALL(chain->pCapturePin, Disconnect); - if(FAILED(hr)) - return hr; - - hr = OLE_CALL_ARGS(chain->pSG, SetMediaType, pmt); - if(FAILED(hr)) - return hr; - - hr = OLE_CALL_ARGS(pGraph, Connect, chain->pCapturePin, chain->pSGIn); - if(FAILED(hr)) - { - OLE_CALL_ARGS(chain->pSG, SetMediaType, &old_mt); - OLE_CALL_ARGS(pGraph, Connect, chain->pCapturePin, chain->pSGIn); - break; - } - hr = OLE_CALL_ARGS(chain->pCapturePin, ConnectionMediaType, &old_mt); - - hr = S_OK; - } while(0); - - FreeMediaType(pmt); - CopyMediaType(pmt, &old_mt); - FreeMediaType(&old_mt); - return hr; -} - /** * \brief building in graph audio/video capture chain * From 9214b77133591ef363bd13eda0da68782244dd5d Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 15:51:29 +0000 Subject: [PATCH 069/134] Declare ThreadProc as void, it does not return anything, fixes the warning: stream/cache2.c:364: warning: control reaches end of non-void function git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27759 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/cache2.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/stream/cache2.c b/stream/cache2.c index aff5a93a6f..37889acaa0 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -20,11 +20,9 @@ #include "osdep/timer.h" #ifdef WIN32 #include -static DWORD WINAPI ThreadProc(void* s); #elif defined(__OS2__) #define INCL_DOS #include -static void ThreadProc( void *s ); #else #include #endif @@ -37,6 +35,7 @@ extern int use_gui; int stream_fill_buffer(stream_t *s); int stream_seek_long(stream_t *s,off_t pos); +static void ThreadProc(void *s); typedef struct { // constats: @@ -362,12 +361,9 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){ #if defined(WIN32) || defined(__OS2__) } -#ifdef WIN32 -static DWORD WINAPI ThreadProc(void*s){ -#else // OS2 + static void ThreadProc( void *s ){ #endif -#endif #ifdef CONFIG_GUI use_gui = 0; // mp_msg may not use gui stuff in forked code From 8322f0aef1f97a0b6377fca57ee5131b143e67f6 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 16:06:15 +0000 Subject: [PATCH 070/134] Remove pointless #ifdef around the whole file, it is just a complicated #if 1. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27760 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/com.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/loader/com.h b/loader/com.h index 3e9c1f3692..27f6a916b7 100644 --- a/loader/com.h +++ b/loader/com.h @@ -18,8 +18,6 @@ * Internal functions and structures for COM emulation code. */ -#if !defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) - #ifdef __cplusplus extern "C" { #endif @@ -89,6 +87,4 @@ void STDCALL CoTaskMemFree(void*); }; #endif /* __cplusplus */ -#endif /* WIN32 */ - #endif /* MPLAYER_COM_H */ From 4d644f513c841eaf4617edffb348338a798d37be Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 16:23:55 +0000 Subject: [PATCH 071/134] Replace preprocessor check for WIN32 with checks for __MINGW32__ and __CYGWIN__. This avoids a pointless indirection that only obscures what is really done. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27761 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cfg-common-opts.h | 2 +- cfg-common.h | 4 ++-- configure | 2 +- cpudetect.c | 8 ++++---- get_path.c | 4 ++-- libaf/af_ladspa.c | 11 +++++------ libao2/ao_sdl.c | 2 +- libdvdread/dvd_reader.c | 5 +++-- libdvdread/libdvdread_changes.diff | 25 ++++++++++++++++++++++++- libvo/video_out.c | 2 +- mencoder.c | 10 +++++----- mplayer.c | 22 +++++++++++----------- stream/cache2.c | 20 ++++++++++---------- stream/stream_cddb.c | 8 ++++---- stream/stream_file.c | 2 +- stream/stream_vcd.c | 12 ++++++------ subreader.c | 2 +- vidix/dha.c | 2 +- vidix/nvidia_vid.c | 7 ++++--- 19 files changed, 87 insertions(+), 63 deletions(-) diff --git a/cfg-common-opts.h b/cfg-common-opts.h index 6d6374de08..c067b5b4fb 100644 --- a/cfg-common-opts.h +++ b/cfg-common-opts.h @@ -15,7 +15,7 @@ {"msgcharset", &mp_msg_charset, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, #endif {"include", cfg_include, CONF_TYPE_FUNC_PARAM, CONF_NOSAVE, 0, 0, NULL}, -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) {"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL}, #endif {"noconfig", noconfig_opts, CONF_TYPE_SUBCONFIG, CONF_GLOBAL|CONF_NOCFG|CONF_PRE_PARSE, 0, 0, NULL}, diff --git a/cfg-common.h b/cfg-common.h index 8257b47859..c69deb2cbf 100644 --- a/cfg-common.h +++ b/cfg-common.h @@ -349,7 +349,7 @@ const m_option_t msgl_config[]={ }; -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) struct { char* name; int prio; @@ -366,7 +366,7 @@ struct { { "idle", IDLE_PRIORITY_CLASS}, { NULL, NORMAL_PRIORITY_CLASS} /* default */ }; -#endif /* WIN32 */ +#endif /* defined(__MINGW32__) || defined(__CYGWIN__) */ extern const m_option_t noconfig_opts[]; diff --git a/configure b/configure index 5f65481827..be4c133c43 100755 --- a/configure +++ b/configure @@ -8227,7 +8227,7 @@ $_def_vcd #ifdef sun #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0" #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(WIN32) || defined(__OS2__) +#elif defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) #define DEFAULT_CDROM_DEVICE "D:" #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE #elif defined(__APPLE__) || defined(__DARWIN__) diff --git a/cpudetect.c b/cpudetect.c index 8ec1adefaa..6d18212662 100644 --- a/cpudetect.c +++ b/cpudetect.c @@ -29,7 +29,7 @@ CpuCaps gCpuCaps; #include #endif -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) #include #endif @@ -314,7 +314,7 @@ static void sigill_handler_sse( int signal, struct sigcontext sc ) } #endif /* __linux__ && _POSIX_SOURCE */ -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) LONG CALLBACK win32_sig_handler_sse(EXCEPTION_POINTERS* ep) { if(ep->ExceptionRecord->ExceptionCode==EXCEPTION_ILLEGAL_INSTRUCTION){ @@ -325,7 +325,7 @@ LONG CALLBACK win32_sig_handler_sse(EXCEPTION_POINTERS* ep) } return EXCEPTION_CONTINUE_SEARCH; } -#endif /* WIN32 */ +#endif /* defined(__MINGW32__) || defined(__CYGWIN__) */ #ifdef __OS2__ ULONG _System os2_sig_handler_sse( PEXCEPTIONREPORTRECORD p1, @@ -395,7 +395,7 @@ static void check_os_katmai_support( void ) gCpuCaps.hasSSE = 0; mp_msg(MSGT_CPUDETECT,MSGL_WARN, "No OS support for SSE, disabling to be safe.\n" ); #endif -#elif defined(WIN32) +#elif defined(__MINGW32__) || defined(__CYGWIN__) LPTOP_LEVEL_EXCEPTION_FILTER exc_fil; if ( gCpuCaps.hasSSE ) { mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " ); diff --git a/get_path.c b/get_path.c index 16c93551c8..17520f2a2c 100644 --- a/get_path.c +++ b/get_path.c @@ -145,7 +145,7 @@ char *get_path(const char *filename){ return buff; } -#if defined(WIN32) && defined(CONFIG_WIN32DLL) +#if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL) void set_path_env() { /*make our codec dirs available for LoadLibraryA()*/ @@ -181,4 +181,4 @@ void set_path_env() if (!SetEnvironmentVariableA("PATH", tmppath)) mp_msg(MSGT_WIN32, MSGL_WARN, "Cannot set PATH!"); } -#endif /*WIN32 && CONFIG_WIN32DLL*/ +#endif /* (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL) */ diff --git a/libaf/af_ladspa.c b/libaf/af_ladspa.c index dadbc45548..97b8982503 100644 --- a/libaf/af_ladspa.c +++ b/libaf/af_ladspa.c @@ -296,16 +296,15 @@ static void* mydlopen(const char *filename, int flag) { size_t filenamelen; void *result = NULL; -# ifdef WIN32 /* for windows there's only absolute path support. - * if you have a windows machine, feel free to fix - * this. (path separator, shared objects extension, - * et cetera). - */ +#if defined(__MINGW32__) || defined(__CYGWIN__) + /* For Windows there's only absolute path support. + * If you have a Windows machine, feel free to fix this. + * (path separator, shared objects extension, et cetera). */ af_msg(AF_MSG_VERBOSE, "\ton windows, only absolute pathnames " "are supported\n"); af_msg(AF_MSG_VERBOSE, "\ttrying %s\n", filename); return dlopen(filename, flag); -# endif +#endif filenamelen = strlen(filename); diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c index 292972514c..97a70d4adf 100644 --- a/libao2/ao_sdl.c +++ b/libao2/ao_sdl.c @@ -52,7 +52,7 @@ LIBAO_EXTERN(sdl) #undef USE_SDL_INTERNAL_MIXER // Samplesize used by the SDLlib AudioSpec struct -#if defined(WIN32) || defined(__AMIGAOS4__) +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__AMIGAOS4__) #define SAMPLESIZE 2048 #else #define SAMPLESIZE 1024 diff --git a/libdvdread/dvd_reader.c b/libdvdread/dvd_reader.c index 49140544e4..6e75b27693 100644 --- a/libdvdread/dvd_reader.c +++ b/libdvdread/dvd_reader.c @@ -438,7 +438,7 @@ dvd_reader_t *DVDOpen( const char *path ) verbose = get_verbose(); -#ifdef WIN32 +#if defined(__CYGWIN__) || defined(__MINGW32__) /* Stat doesn't work on devices under mingwin/cygwin. */ if( path[0] && path[1] == ':' && path[2] == '\0' ) { @@ -495,7 +495,8 @@ dvd_reader_t *DVDOpen( const char *path ) /* XXX: We should scream real loud here. */ if( !(path_copy = strdup( path ) ) ) return 0; -#ifndef WIN32 /* don't have fchdir, and getcwd( NULL, ... ) is strange */ +/* don't have fchdir, and getcwd( NULL, ... ) is strange */ +#if !(defined(__CYGWIN__) || defined(__MINGW32__)) /* Resolve any symlinks and get the absolut dir name. */ { char *new_path; diff --git a/libdvdread/libdvdread_changes.diff b/libdvdread/libdvdread_changes.diff index f0177aa5e5..767e5a6bcb 100644 --- a/libdvdread/libdvdread_changes.diff +++ b/libdvdread/libdvdread_changes.diff @@ -42,6 +42,15 @@ /* Loop over all titles and call dvdcss_title to crack the keys. */ static int initAllCSSKeys( dvd_reader_t *dvd ) { +@@ -438,7 +438,7 @@ + + verbose = get_verbose(); + +-#ifdef WIN32 ++#if defined(__CYGWIN__) || defined(__MINGW32__) + /* Stat doesn't work on devices under mingwin/cygwin. */ + if( path[0] && path[1] == ':' && path[2] == '\0' ) + { @@ -494,7 +488,7 @@ char *path_copy; #if defined(SYS_BSD) @@ -51,7 +60,17 @@ FILE *mntfile; #endif -@@ -598,7 +592,7 @@ +@@ -495,7 +495,8 @@ + /* XXX: We should scream real loud here. */ + if( !(path_copy = strdup( path ) ) ) return 0; + +-#ifndef WIN32 /* don't have fchdir, and getcwd( NULL, ... ) is strange */ ++/* don't have fchdir, and getcwd( NULL, ... ) is strange */ ++#if !(defined(__CYGWIN__) || defined(__MINGW32__)) + /* Resolve any symlinks and get the absolut dir name. */ + { + char *new_path; +@@ -597,7 +592,7 @@ } fclose( mntfile ); } @@ -512,3 +531,7 @@ uint16_t next_pgc_nr; uint16_t prev_pgc_nr; uint16_t goup_pgc_nr; +Index: libdvdread/dvd_reader.c +=================================================================== +--- libdvdread/dvd_reader.c (revision 27759) ++++ libdvdread/dvd_reader.c (working copy) diff --git a/libvo/video_out.c b/libvo/video_out.c index 836f7adc1a..5e675042ae 100644 --- a/libvo/video_out.c +++ b/libvo/video_out.c @@ -214,7 +214,7 @@ const vo_functions_t* const video_out_drivers[] = #ifdef CONFIG_X11 &video_out_xvidix, #endif -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) &video_out_winvidix, #endif &video_out_cvidix, diff --git a/mencoder.c b/mencoder.c index 6ddf5e07e1..bc378673f2 100644 --- a/mencoder.c +++ b/mencoder.c @@ -30,7 +30,7 @@ #define SIGQUIT 3 #define SIGPIPE 13 #endif -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) #include #endif @@ -143,7 +143,7 @@ double cur_video_time_usage=0; double cur_vout_time_usage=0; int benchmark=0; -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) char * proc_priority=NULL; #endif @@ -456,9 +456,9 @@ user_correct_pts = 0; #endif #endif -#if defined(WIN32) && defined(CONFIG_WIN32DLL) +#if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL) set_path_env(); -#endif /*WIN32 && CONFIG_WIN32DLL*/ +#endif InitTimer(); @@ -516,7 +516,7 @@ if (frameno_filename) { } } -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) if(proc_priority){ int i; for(i=0; priority_presets_defs[i].name; i++){ diff --git a/mplayer.c b/mplayer.c index 88ea3930f0..92f07fa0a7 100644 --- a/mplayer.c +++ b/mplayer.c @@ -6,7 +6,7 @@ #include #include "config.h" -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) #define _UWIN 1 /*disable Non-underscored versions of non-ANSI functions as otherwise int eof would conflict with eof()*/ #include #endif @@ -87,7 +87,7 @@ int player_idle_mode=0; int quiet=0; int enable_mouse_movements=0; -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) char * proc_priority=NULL; #endif @@ -688,7 +688,7 @@ void exit_player_with_rc(const char* how, int rc){ if (mpctx->user_muted && !mpctx->edl_muted) mixer_mute(&mpctx->mixer); uninit_player(INITIALIZED_ALL); -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) timeEndPeriod(1); #endif #ifdef CONFIG_X11 @@ -1207,7 +1207,7 @@ static void print_status(float a_pos, float a_v, float corr) width = screen_width; else width = 80; -#if defined(WIN32) || defined(__OS2__) +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) /* Windows command line is broken (MinGW's rxvt works, but we * should not depend on that). */ width--; @@ -2571,9 +2571,9 @@ int gui_no_filename=0; m_config_preparse_command_line(mconfig,argc,argv); print_version(); -#if defined(WIN32) && defined(CONFIG_WIN32DLL) +#if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_WIN32DLL) set_path_env(); -#endif /*WIN32 && CONFIG_WIN32DLL*/ +#endif #ifdef CONFIG_TV stream_tv_defaults.immediate = 1; @@ -2617,7 +2617,7 @@ int gui_no_filename=0; } } -#if defined(WIN32) && defined(CONFIG_GUI) +#if (defined(__MINGW32__) || defined(__CYGWIN__)) && defined(CONFIG_GUI) void *runningmplayer = FindWindow("MPlayer GUI for Windows", "MPlayer for Windows"); if(runningmplayer && filename && use_gui){ COPYDATASTRUCT csData; @@ -2632,7 +2632,7 @@ int gui_no_filename=0; } #endif -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) // request 1ms timer resolution timeBeginPeriod(1); if(proc_priority){ @@ -2652,7 +2652,7 @@ int gui_no_filename=0; use_gui=0; } #else -#ifndef WIN32 +#if !defined(__MINGW32__) && !defined(__CYGWIN__) if(use_gui && !vo_init()){ mp_msg(MSGT_CPLAYER,MSGL_WARN,MSGTR_GuiNeedsX); use_gui=0; @@ -3085,7 +3085,7 @@ if (edl_output_filename) { char *buf = strdup(filename), *psub; char *pdot = strrchr(buf, '.'); char *pslash = strrchr(buf, '/'); -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) if (!pslash) pslash = strrchr(buf, '\\'); #endif if (pdot && (!pslash || pdot > pslash)) @@ -3096,7 +3096,7 @@ if (edl_output_filename) { char *bname; int l; bname = strrchr(buf,'/'); -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) if(!bname) bname = strrchr(buf,'\\'); #endif if(bname) bname++; diff --git a/stream/cache2.c b/stream/cache2.c index 37889acaa0..dd2423d765 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -18,7 +18,7 @@ #include "osdep/shmem.h" #include "osdep/timer.h" -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) #include #elif defined(__OS2__) #define INCL_DOS @@ -239,7 +239,7 @@ static void cache_execute_control(cache_vars_t *s) { cache_vars_t* cache_init(int size,int sector){ int num; -#if !defined(WIN32) && !defined(__OS2__) +#if !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__OS2__) cache_vars_t* s=shmem_alloc(sizeof(cache_vars_t)); #else cache_vars_t* s=malloc(sizeof(cache_vars_t)); @@ -253,14 +253,14 @@ cache_vars_t* cache_init(int size,int sector){ }//32kb min_size s->buffer_size=num*sector; s->sector_size=sector; -#if !defined(WIN32) && !defined(__OS2__) +#if !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__OS2__) s->buffer=shmem_alloc(s->buffer_size); #else s->buffer=malloc(s->buffer_size); #endif if(s->buffer == NULL){ -#if !defined(WIN32) && !defined(__OS2__) +#if !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__OS2__) shmem_free(s,sizeof(cache_vars_t)); #else free(s); @@ -276,7 +276,7 @@ cache_vars_t* cache_init(int size,int sector){ void cache_uninit(stream_t *s) { cache_vars_t* c = s->cache_data; if(!s->cache_pid) return; -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) TerminateThread((HANDLE)s->cache_pid,0); #elif defined(__OS2__) DosKillThread( s->cache_pid ); @@ -286,7 +286,7 @@ void cache_uninit(stream_t *s) { waitpid(s->cache_pid,NULL,0); #endif if(!c) return; -#if defined(WIN32) || defined(__OS2__) +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) free(c->stream); free(c->buffer); free(s->cache_data); @@ -327,17 +327,17 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){ min = s->buffer_size - s->fill_limit; } -#if !defined(WIN32) && !defined(__OS2__) +#if !defined(__MINGW32__) && !defined(__CYGWIN__) && !defined(__OS2__) if((stream->cache_pid=fork())){ #else { -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) DWORD threadId; #endif stream_t* stream2=malloc(sizeof(stream_t)); memcpy(stream2,s->stream,sizeof(stream_t)); s->stream=stream2; -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) stream->cache_pid = CreateThread(NULL,0,ThreadProc,s,0,&threadId); #else // OS2 stream->cache_pid = _beginthread( ThreadProc, NULL, 256 * 1024, s ); @@ -359,7 +359,7 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){ return 1; // parent exits } -#if defined(WIN32) || defined(__OS2__) +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) } static void ThreadProc( void *s ){ diff --git a/stream/stream_cddb.c b/stream/stream_cddb.c index 5236a4ca9c..4702f86d8c 100644 --- a/stream/stream_cddb.c +++ b/stream/stream_cddb.c @@ -22,7 +22,7 @@ #include #include #include -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) #ifdef __MINGW32__ #define mkdir(a,b) mkdir(a) #endif @@ -44,7 +44,7 @@ #include #elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) #include -#elif defined(WIN32) +#elif defined(__MINGW32__) || defined(__CYGWIN__) #include #elif (__bsdi__) #include @@ -72,7 +72,7 @@ int read_toc(const char *dev) { int first = 0, last = -1; int i; -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) HANDLE drive; DWORD r; CDROM_TOC toc; @@ -326,7 +326,7 @@ cddb_read_cache(cddb_data_t *cddb_data) { sprintf( file_name, "%s%08lx", cddb_data->cache_dir, cddb_data->disc_id); file_fd = open(file_name, O_RDONLY -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) | O_BINARY #endif ); diff --git a/stream/stream_file.c b/stream/stream_file.c index 9b21d80d04..1abc2e1c9e 100644 --- a/stream/stream_file.c +++ b/stream/stream_file.c @@ -113,7 +113,7 @@ static int open_f(stream_t *stream,int mode, void* opts, int* file_format) { return STREAM_ERROR; } -#if defined(WIN32) || defined(__OS2__) +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) // extract '/' from '/x:/path' if( filename[ 0 ] == '/' && filename[ 1 ] && filename[ 2 ] == ':' ) filename++; diff --git a/stream/stream_vcd.c b/stream/stream_vcd.c index 4202a9786d..34844bcea9 100644 --- a/stream/stream_vcd.c +++ b/stream/stream_vcd.c @@ -1,7 +1,7 @@ #include "config.h" -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) #include #endif @@ -14,7 +14,7 @@ #include #include #include -#ifndef WIN32 +#if !defined(__MINGW32__) && !defined(__CYGWIN__) #include #endif #include @@ -23,7 +23,7 @@ #include "vcd_read_fbsd.h" #elif defined(__APPLE__) #include "vcd_read_darwin.h" -#elif defined(WIN32) +#elif defined(__MINGW32__) || defined(__CYGWIN__) #include "vcd_read_win32.h" #else #include "vcd_read.h" @@ -81,13 +81,13 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) int bsize = VCD_SECTOR_SIZE; #endif -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) HANDLE hd; char device[] = "\\\\.\\?:"; #endif if(mode != STREAM_READ -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) || GetVersion() > 0x80000000 // Win9x #endif ) { @@ -102,7 +102,7 @@ static int open_s(stream_t *stream,int mode, void* opts, int* file_format) { p->device = strdup(DEFAULT_CDROM_DEVICE); } -#ifdef WIN32 +#if defined(__MINGW32__) || defined(__CYGWIN__) device[4] = p->device[0]; /* open() can't be used for devices so do it the complicated way */ hd = CreateFile(device, GENERIC_READ, FILE_SHARE_READ, NULL, diff --git a/subreader.c b/subreader.c index c64ff460cc..72e050380f 100644 --- a/subreader.c +++ b/subreader.c @@ -1836,7 +1836,7 @@ char** sub_filenames(const char* path, char *fname) subcnt = 0; tmp = strrchr(fname,'/'); -#if defined(WIN32) || defined(__OS2__) +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) if(!tmp)tmp = strrchr(fname,'\\'); if(!tmp)tmp = strrchr(fname,':'); #endif diff --git a/vidix/dha.c b/vidix/dha.c index 28dc8c8c09..638be29328 100644 --- a/vidix/dha.c +++ b/vidix/dha.c @@ -48,7 +48,7 @@ #endif #include -#if defined(WIN32) +#if defined(__MINGW32__) || defined(__CYGWIN__) #include "sysdep/libdha_win32.c" #elif defined (__EMX__) #include "sysdep/libdha_os2.c" diff --git a/vidix/nvidia_vid.c b/vidix/nvidia_vid.c index c53fa93d64..a045b397fe 100644 --- a/vidix/nvidia_vid.c +++ b/vidix/nvidia_vid.c @@ -614,13 +614,14 @@ static void rivatv_overlay_colorkey (rivatv_info* info, unsigned int chromakey){ switch (info->depth) { case 15: key = ((r >> 3) << 10) | ((g >> 3) << 5) | ((b >> 3)); -#ifndef WIN32 + +#if !defined(__MINGW32__) && !defined(__CYGWIN__) key = key | 0x00008000; #endif break; case 16: // XXX unchecked key = ((r >> 3) << 11) | ((g >> 2) << 5) | ((b >> 3)); -#ifndef WIN32 +#if !defined(__MINGW32__) && !defined(__CYGWIN__) key = key | 0x00008000; #endif break; @@ -629,7 +630,7 @@ static void rivatv_overlay_colorkey (rivatv_info* info, unsigned int chromakey){ break; case 32: key = chromakey; -#ifndef WIN32 +#if !defined(__MINGW32__) && !defined(__CYGWIN__) key = key | 0x80000000; #endif break; From 885a7962ec11d90f06d81999c719b9128e2de6c7 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 16:26:05 +0000 Subject: [PATCH 072/134] Remove global definition of WIN32 in config.h for Cygwin. Instead just define it for libdvdcss, where it is strictly needed. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27762 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/configure b/configure index be4c133c43..c4197fd1c4 100755 --- a/configure +++ b/configure @@ -1403,10 +1403,6 @@ if mingw32 ; then _need_shmem=no fi -if cygwin ; then - _def_confwin32='#define WIN32' -fi - if amigaos ; then _select=no _sighandler=no @@ -5460,7 +5456,7 @@ if test "$_libdvdcss_internal" = yes ; then _def_dvd_darwin='#define DARWIN_DVD_IOCTL' _ld_extra="$_ld_extra -framework IOKit" elif cygwin ; then - cflags_libdvdcss="-DSYS_CYGWIN" + cflags_libdvdcss="-DSYS_CYGWIN -DWIN32" elif beos ; then cflags_libdvdcss="-DSYS_BEOS" elif os2 ; then @@ -8292,9 +8288,6 @@ $_def_joystick /* Support for maemo (http://www.maemo.org) */ $_def_maemo -/* Define this for Cygwin build for win32 */ -$_def_confwin32 - /* Mac OS X specific features */ $_def_macosx_finder $_def_macosx_bundle From 7b64ef7fd40fc398a216faf0b86407e9a6c341f6 Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 22:25:35 +0000 Subject: [PATCH 073/134] Set HAVE_FAST_UNALIGNED for PowerPC as well, patch by Emanuele Giaquinta. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27763 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 1 + 1 file changed, 1 insertion(+) diff --git a/configure b/configure index c4197fd1c4..40a08da166 100755 --- a/configure +++ b/configure @@ -2010,6 +2010,7 @@ EOF _arch='POWERPC PPC' _def_dcbzl='#undef HAVE_DCBZL' _target_arch='ARCH_POWERPC = yes' + _def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1' iproc='ppc' echocheck "CPU type" From 505834ccb83a00c3d1d4289cba8442991dcb0b3d Mon Sep 17 00:00:00 2001 From: ods15 Date: Mon, 13 Oct 2008 22:32:20 +0000 Subject: [PATCH 074/134] =?UTF-8?q?Fix=20double=20free=20in=20demux=5Fnut,?= =?UTF-8?q?=20patch=20by=20Onur=20K=C3=BC=C3=A7=C3=BCk.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27764 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_nut.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libmpdemux/demux_nut.c b/libmpdemux/demux_nut.c index 6ebec33d10..53d80b0f68 100644 --- a/libmpdemux/demux_nut.c +++ b/libmpdemux/demux_nut.c @@ -86,8 +86,6 @@ static demuxer_t * demux_open_nut(demuxer_t * demuxer) { while ((ret = nut_read_headers(nut, &s, NULL)) == NUT_ERR_EAGAIN); if (ret) { mp_msg(MSGT_HEADER, MSGL_ERR, "NUT error: %s\n", nut_error(ret)); - nut_demuxer_uninit(nut); - free(priv); return NULL; } From b9ce738825abc4ca9d9e05b8349c567e52361ecc Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 13 Oct 2008 23:10:42 +0000 Subject: [PATCH 075/134] Remove unused variable ncomps. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27765 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_zrmjpeg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpcodecs/vd_zrmjpeg.c b/libmpcodecs/vd_zrmjpeg.c index d991e7b65c..fb73d06511 100644 --- a/libmpcodecs/vd_zrmjpeg.c +++ b/libmpcodecs/vd_zrmjpeg.c @@ -109,7 +109,7 @@ static int get_int2(unsigned char *buf) { static unsigned int guess_mjpeg_type(unsigned char *data, unsigned int size, int d_height) { unsigned int p; - int marker, length, height, ncomps, i, hf[3], vf[3]; + int marker, length, height, i, hf[3], vf[3]; unsigned int app0 = 0, header = 0; /* The initial marker must be SIO */ From b282622c71a29cfa33f7ff6eab25df4e71664027 Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 14 Oct 2008 08:56:48 +0000 Subject: [PATCH 076/134] Remove duplicate extern declaration, fixes the warning: libmpcodecs/vf_zrmjpeg.c:73: warning: redundant redeclaration of 'avcodec_initialized' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27766 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_zrmjpeg.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/libmpcodecs/vf_zrmjpeg.c b/libmpcodecs/vf_zrmjpeg.c index 82001a8d72..b86d7147bd 100644 --- a/libmpcodecs/vf_zrmjpeg.c +++ b/libmpcodecs/vf_zrmjpeg.c @@ -57,8 +57,6 @@ #undef free #undef realloc -extern int avcodec_initialized; - /* some convenient #define's, is this portable enough? */ /// Printout with vf_zrmjpeg: prefix at VERBOSE level #define VERBOSE(...) mp_msg(MSGT_DECVIDEO, MSGL_V, "vf_zrmjpeg: " __VA_ARGS__) From 49faefb6698332252ab115d3d1a8ce882f7d3873 Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 14 Oct 2008 09:04:40 +0000 Subject: [PATCH 077/134] Remove useless '#undef realloc', realloc is not referenced anywhere near. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27767 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_zrmjpeg.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libmpcodecs/vf_zrmjpeg.c b/libmpcodecs/vf_zrmjpeg.c index b86d7147bd..a94e63723e 100644 --- a/libmpcodecs/vf_zrmjpeg.c +++ b/libmpcodecs/vf_zrmjpeg.c @@ -55,7 +55,6 @@ #undef malloc #undef free -#undef realloc /* some convenient #define's, is this portable enough? */ /// Printout with vf_zrmjpeg: prefix at VERBOSE level From b60ab0c001a2b7f9bb7bbbe4779c575357e1b9f1 Mon Sep 17 00:00:00 2001 From: gpoirier Date: Tue, 14 Oct 2008 09:31:19 +0000 Subject: [PATCH 078/134] update x264's section with r999 of x264 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27768 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 40 ++++++++++++++++++++++++---------------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index a63b5e482e..177ee191ce 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -10044,7 +10044,7 @@ exhaustive search (very slow, and no better than umh) radius of exhaustive or multi-hexagon motion search (default: 16) . .TP -.B subq=<1\-7> +.B subq=<1\-9> Adjust subpel refinement quality. This parameter controls quality versus speed tradeoffs involved in the motion estimation decision process. @@ -10069,12 +10069,18 @@ Then selects the best type. Then finishes the quarterpixel refinement for that type. .IPs 5 Runs best quality quarterpixel precision motion estimation on all -candidate macroblock types, before selecting the best type (default). +candidate macroblock types, before selecting the best type. +Also refines the two motion vectors used in bidirectional macroblocks, +rather than reusing vectors from the forward and backward searches. .IPs 6 Enables rate-distortion optimization of macroblock types in -I- and P-frames. +I- and P-frames (default). .IPs 7 -Enables rate-distortion optimization of motion vectors and intra modes. (best) +Enables rate-distortion optimization of macroblock types in all frames. +.IPs 8 +Enables rate-distortion optimization of motion vectors in I- and P-frames. +.IPs 9 +Enables rate-distortion optimization of motion vectors in all frames (best). .RE .PD 1 .RS @@ -10096,18 +10102,7 @@ Without this option, a whole macroblock must use the same reference. Requires frameref>1. . .TP -.B (no)brdo -Enables rate-distortion optimization of macroblock types in B-frames. -Requires subq>=6. -. -.TP -.B (no)bime -Refine the two motion vectors used in bidirectional macroblocks, -rather than re-using vectors from the forward and backward searches. -This option has no effect without B-frames. -. -.TP -.B trellis=<0\-2> +.B trellis=<0\-2> (cabac only) rate-distortion optimal quantization .PD 0 .RSs @@ -10121,6 +10116,19 @@ enabled during all mode decisions (slow, requires subq>=6) .PD 1 . .TP +.B psy-rd=rd[:trell] +Sets the strength of the psychovisual optimization. +.PD 0 +.RSs +.IPs rd=<0.0\-10.0> +rate-distortion strength (requires subq>=6) (default: 1.0) +.IPs trell=<0.0\-10.0> +trellis (requires trellis, experimental) (default: 0.0) +.RE +.PD 1 +. +. +.TP .B deadzone_inter=<0\-32> Set the size of the inter luma quantization deadzone for non-trellis quantization (default: 21). From 1a85bf593b1b58f17fe1aa970612126cddcffb7f Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 14 Oct 2008 16:04:09 +0000 Subject: [PATCH 079/134] #include necessary libavcodec header and remove duplicated struct declaration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27769 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_zrmjpeg.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/libmpcodecs/vf_zrmjpeg.c b/libmpcodecs/vf_zrmjpeg.c index a94e63723e..0d45666aa4 100644 --- a/libmpcodecs/vf_zrmjpeg.c +++ b/libmpcodecs/vf_zrmjpeg.c @@ -49,8 +49,7 @@ * be2me_32, otherwise the linker will complain that it doesn't exist */ #define HAVE_AV_CONFIG_H #include "libavcodec/avcodec.h" -#include "libavcodec/dsputil.h" -#include "libavcodec/mpegvideo.h" +#include "libavcodec/mjpegenc.h" //#include "jpeg_enc.h" /* this file is not present yet */ #undef malloc @@ -69,21 +68,6 @@ // set when init is done, so that initialization is not done twice. extern int avcodec_initialized; -/// structure copied from mjpeg.c -/* zrmjpeg_encode_mb needs access to these tables for the black & white - * option */ -typedef struct MJpegContext { - uint8_t huff_size_dc_luminance[12]; - uint16_t huff_code_dc_luminance[12]; - uint8_t huff_size_dc_chrominance[12]; - uint16_t huff_code_dc_chrominance[12]; - - uint8_t huff_size_ac_luminance[256]; - uint16_t huff_code_ac_luminance[256]; - uint8_t huff_size_ac_chrominance[256]; - uint16_t huff_code_ac_chrominance[256]; -} MJpegContext; - /// The get_pixels() routine to use. The real routine comes from dsputil static void (*get_pixels)(DCTELEM *restrict block, const uint8_t *pixels, int line_size); From a65b36be9d9b2746f3ae52aa5360c0ea606ee37a Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 14 Oct 2008 21:15:59 +0000 Subject: [PATCH 080/134] Update VIDIX vs. svgalib documentation. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27770 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/en/video.xml | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/DOCS/xml/en/video.xml b/DOCS/xml/en/video.xml index 358ac69e58..5d58a9fbb3 100644 --- a/DOCS/xml/en/video.xml +++ b/DOCS/xml/en/video.xml @@ -1549,19 +1549,14 @@ to enable driver autodetection. Since VIDIX requires direct hardware access you can either run it as root or set the SUID bit on the MPlayer binary (Warning: This is a security risk!). -Alternatively, if you are running Linux kernel 2.4.x, you can use a -special kernel module, like this: +Alternatively, you can use a special kernel module, like this: Download the development version - of svgalib (for example 1.9.17), OR - download a version made by Alex especially for usage with - MPlayer (it doesn't need the svgalib source to - compile) from - here. + of svgalib (1.9.x). Compile the module in the @@ -1579,7 +1574,8 @@ special kernel module, like this: Then run configure again and pass the parameter as well as - , + , + where /path/to/svgalib_helper/sources/ has to be adjusted to wherever you extracted svgalib_helper sources. From aa16036d1007d7b964612490ca359be9465f2630 Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 14 Oct 2008 21:41:25 +0000 Subject: [PATCH 081/134] Remove section about containers. Its contents are non-informative, redundant, outdated and generally not worth the trouble. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27771 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/en/containers.xml | 520 ---------------------------------- DOCS/xml/en/documentation.xml | 1 - 2 files changed, 521 deletions(-) delete mode 100644 DOCS/xml/en/containers.xml diff --git a/DOCS/xml/en/containers.xml b/DOCS/xml/en/containers.xml deleted file mode 100644 index f3d4c6d124..0000000000 --- a/DOCS/xml/en/containers.xml +++ /dev/null @@ -1,520 +0,0 @@ - - - -Containers - - -It is important to clarify a common mistake. When people see a file with a -.AVI extension, they immediately conclude that it is -not an MPEG file. That is not true. At least not entirely. Contrary to -popular belief such a file can contain MPEG-1 video. - - - -You see, a codec is not the same as a -container format. -Examples of video codecs are: MPEG-1, MPEG-2, -MPEG-4 (DivX), Indeo5, 3ivx. -Examples of container formats are: -MPG, AVI, ASF. - - - -In theory, you can put an OpenDivX video and MP3 audio -into an MPG container. However, most -players will not play it, since they expect MPEG-1 video and MP2 audio (unlike -AVI, MPG -does not have the necessary fields to describe its video and audio streams). -Or you might put MPEG-1 video into an AVI file. -FFmpeg and -MEncoder -can create these files. - - - - - - - -Video formats - - -MPEG files - - -MPEG files come in different guises: - - - - - MPG: This is the most basic form of the - MPEG file formats. It contains MPEG-1 video, and MP2 (MPEG-1 layer 2) or - rarely MP1 audio. - - - DAT: This is the very same format as MPG with a different extension. It - is used on Video CDs. Due to the way VCDs - are created and Linux is designed, the DAT files cannot be played nor copied - from VCDs as regular files. You have to use - to play a Video CD. - - - VOB: This is the MPEG file format on DVDs. - It is the same as MPG, plus the capability to contain subtitles or non-MPEG - (AC-3) audio. It contains encoded MPEG-2 video and usually AC-3 audio, but DTS, - MP2 and uncompressed LPCM are allowed, too. Read the - DVD section! - - - TY: This is a TiVo MPEG stream. It contains MPEG PES data for audio and - video streams, as well as extra information like closed captions. The - container is not an MPEG program stream, but a closed format created by - TiVo. For more information on TiVo stream format, please refer to - - the TyStudio page. - - - - -Series of frames form independent groups in MPEG files. This means that you -can cut/join an MPEG file with standard file tools (like -dd, cut), and it remains completely -functional. - - - -One important feature of MPEG files is that they have a field to describe the -aspect ratio of the video stream within. For example SVCDs have 480x480 -resolution video, and in the header that field is set to 4:3, so that it is -played at 640x480. AVI files often lack this field, so they have to be -rescaled during encoding or played with the -option. - - - - - - -AVI files - - -Designed by Microsoft, -AVI (Audio Video Interleaved) -is a widespread multipurpose format currently used mostly for MPEG-4 (DivX and -DivX4) video. It has many known drawbacks and shortcomings (for example in -streaming). -It supports one video stream and 0 to 99 audio streams and can be as big as -2GB, but there exists an extension allowing bigger files called -OpenDML. Microsoft currently strongly -discourages its use and encourages ASF/WMV. Not that anybody cares. - - - -There is a hack that allows AVI files to contain an Ogg Vorbis audio -stream, but makes them incompatible with standard AVI. -MPlayer supports playing these files. Seeking is -also implemented but severely hampered by badly encoded files with -confusing headers. Unfortunately the only encoder currently capable of -creating these files, NanDub, has this problem. - - - -DV cameras create raw DV streams that DV grabbing utilities convert to two -different types of AVI files. The AVI will then contain either separate -audio and video streams that MPlayer can play or -the raw DV stream for which support is under development. - - - -There are two kinds of AVI files: - - - Interleaved: Audio and video content is - interleaved. This is the standard usage. Recommended and mostly used. Some - tools create interleaved AVIs with bad sync. - MPlayer detects these as interleaved, and this - climaxes in loss of A/V sync, probably at seeking. - These files should be played as non-interleaved - (with the option). - - - Non-interleaved: First comes the whole - video stream, then the whole audio stream. It thus needs a lot of seeking, - making playing from network or CD-ROM difficult. - - - - - -MPlayer supports two kinds of timings for AVI -files: - - - bps-based: It is based on the - bitrate/samplerate of the video/audio stream. This method is used by - most players, including avifile - and Windows Media Player. Files with broken - headers, and files created with VBR audio but not VBR-compliant encoder - will result in A/V desync with this method (mostly at seeking). - - - interleaving-based: It does not use the - bitrate value of the header, instead it uses the relative position of - interleaved audio and video chunks, - making badly encoded files with VBR audio playable. - - - - - -Any audio and video codec is allowed, but note that VBR audio is not well -supported by most players. The file format makes it possible to use VBR -audio, but most players expect CBR audio, thus they fail with VBR. VBR is -uncommon and Microsoft's AVI specs only describe CBR audio. I also noticed -that most AVI encoders/multiplexers create bad files when using VBR audio. -There are only two known exceptions: NanDub and -MEncoder. - - - - - - -ASF/WMV files - - -ASF (Active Streaming Format) comes from Microsoft. They developed two -variants of ASF, v1.0 and v2.0. v1.0 is used by their media tools -(Windows Media Player and -Windows Media Encoder) -and is very secret. v2.0 is published and patented :). Of course they differ, -there is no compatibility at all (it is just another legal game). -MPlayer supports only v1.0, as nobody has ever seen -v2.0 files :). Note that ASF files nowadays come with the extension -.WMA or .WMV. - - - - - - -QuickTime/MOV files - - -These formats were designed by Apple and can contain any codec, CBR or VBR. -They usually have a .QT or .MOV -extension. Note that since the MPEG-4 group chose QuickTime as the recommended -file format for MPEG-4, their MOV files come with a .MPG or -.MP4 extension (Interestingly the video and audio -streams in these files are real MPG and AAC files. You can even extract them -with the and options.). - - - - - - -VIVO files - - -MPlayer happily demuxes VIVO file formats. The -biggest disadvantage of the format is that it has no index block, nor a -fixed packet size or sync bytes and most files lack even keyframes, so -forget seeking! - - - -The video codec of VIVO/1.0 files is standard -h.263. -The video codec of VIVO/2.0 files is a modified, nonstandard -h.263v2. The audio is the same, it may be -g.723 (standard), or -Vivo Siren. - - - - - - -FLI files - - -FLI is a very old file format used by -Autodesk Animator, but it is a common file format for short animations on the -net. -MPlayer demuxes and decodes FLI movies and is -even able to seek within them (useful when looping with the - option). FLI files do not have keyframes, so the -picture will be messy for a short time after seeking. - - - - - - -RealMedia (RM) files - - -Yes, MPlayer can read (demux) RealMedia -(.rm) files. - - - - - - -NuppelVideo files - - -NuppelVideo -is a TV grabber tool (AFAIK:). MPlayer can read -its .NUV files (only NuppelVideo 5.0). Those files can -contain uncompressed YV12, YV12+RTJpeg compressed, YV12 RTJpeg+lzo -compressed, and YV12+lzo compressed frames. -MPlayer decodes (and also -encodes -them with MEncoder to MPEG-4 (DivX)/etc!) them all. -Seeking works. - - - - - - -yuv4mpeg files - - -yuv4mpeg / yuv4mpeg2 -is a file format used by the -mjpegtools programs. -You can grab, produce, filter or encode video in this format using these tools. -The file format is really a sequence of uncompressed YUV 4:2:0 images. - - - - - - -FILM files - - -This format is used on old Sega Saturn CD-ROM games. - - - - - - -RoQ files - - -RoQ files are multimedia files used in some ID games such as Quake III and -Return to Castle Wolfenstein. - - - - - - -OGG/OGM files - - -This is a new file format from the -Xiph.Org Foundation. -It can contain any video or audio codec, CBR or VBR. You'll need -libogg and -libvorbis installed before -compiling MPlayer to be able to play it. - - - - - - -SDP files - - -SDP is an -IETF standard format for describing video and/or audio RTP streams. -(The "LIVE555 Streaming Media" -are required.) - - - - - - -PVA files - - -PVA is an MPEG-like format used by DVB TV boards' software (e.g.: -MultiDec, -WinTV under Windows). - - - - - - -NSV files - - -NSV (NullSoft Video) is the file format used by the -Winamp player to stream audio and video. -Video is VP3, VP5 or VP6, audio is MP3, AAC or VLB. -The audio only version of NSV has the .nsa extension. -MPlayer can play both NSV streams and files. -Please note that most files from the -Winamp site use VLB audio, that -can't be decoded yet. Moreover streams from that site need an extra -depacketization layer that still has to be implemented (those files are -unplayable anyway because they use VLB audio). - - - - - - -Matroska files - - -Matroska is an open container format. -Read more on the official site. - - - - - - -NUT files - - -NUT is the container format developed by MPlayer and -FFmpeg folks. Both projects support it. -Read more on the official -site. - - - - - - -GIF files - - -The GIF format is a common format for web -graphics. There are two versions of the GIF spec, GIF87a and GIF89a. -The main difference is that GIF89a allows for animation. -MPlayer supports both formats through use of -libungif or -another libgif-compatible library. Non-animated GIFs will be displayed as -single frame videos. (Use the and - options to display these longer.) - - - -MPlayer currently does not support seeking in GIF -files. GIF files do not necessarily have a fixed frame size, nor a fixed -framerate. Rather, each frame is of independent size and is supposed to be -positioned in a certain place on a field of fixed-size. The framerate is -controlled by an optional block before each frame that specifies the next -frame's delay in centiseconds. - - - -Standard GIF files contain 24-bit RGB frames with at most an 8-bit indexed -palette. These frames are usually LZW-compressed, although some GIF encoders -produce uncompressed frames to avoid patent issues with LZW compression. - - - -If your distribution does not come with -libungif, download a copy from the -libungif -homepage. For detailed technical information, have a look at the -GIF89a specification. - - - - - - - - - -Audio formats - - -MPlayer is a movie -and not a media player, although it can play -some audio file formats (they are listed in the sections below). This is not -a recommended usage of MPlayer, you better use XMMS. - - - - - -MP3 files - - -You may have problems playing certain MP3 files that -MPlayer will misdetect as MPEGs and play -incorrectly or not at all. This cannot be fixed without dropping support -for certain broken MPEG files and thus will remain like this for the -foreseeable future. The flag described in the -man page may help you in these cases. - - - - - - -OGG/OGM files (Vorbis) - - -Requires properly installed -libogg and -libvorbis. - - - - - - -CD audio - - -MPlayer can use cdparanoia -to play CDDA (Audio CD). The scope of this section does not contain enumerating -cdparanoia's features. - - - -See the man page's option which can be used to pass -options to cdparanoia. - - - - - - -XMMS - - -MPlayer can use XMMS input -plugins to play many file formats. There are plugins for SNES game tunes, SID -tunes (from Commodore 64), many Amiga formats, .xm, .it, VQF, Musepack, Bonk, -shorten and many others. You can find them at the -XMMS input plugin page. - - - -For this feature you need to have XMMS and compile -MPlayer with -./configure --enable-xmms. - - - - - diff --git a/DOCS/xml/en/documentation.xml b/DOCS/xml/en/documentation.xml index 76fc19f162..0d808d72a5 100644 --- a/DOCS/xml/en/documentation.xml +++ b/DOCS/xml/en/documentation.xml @@ -168,7 +168,6 @@ can be distributed under the terms of the GNU General Public License Version 2. &cd-dvd.xml; &faq.xml; -&containers.xml; &codecs.xml; &video.xml; &audio.xml; From c27f7192370cff9c70b84fed7f6904015db60c34 Mon Sep 17 00:00:00 2001 From: faust3 Date: Tue, 14 Oct 2008 22:28:19 +0000 Subject: [PATCH 082/134] Honour differences between src and dst stride for packed yuv patch by Laurent git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27772 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_directx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c index b87c811b76..c41d71959a 100644 --- a/libvo/vo_directx.c +++ b/libvo/vo_directx.c @@ -1276,7 +1276,7 @@ static uint32_t put_image(mp_image_t *mpi){ } else //packed { - fast_memcpy( image, mpi->planes[0], image_height * dstride); + mem2agpcpy_pic(image, mpi->planes[0], w * (mpi->bpp / 8), h, dstride, mpi->stride[0]); } return VO_TRUE; } From 07589781f454a0fa320a2925cc043465b1b512da Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 14 Oct 2008 22:28:52 +0000 Subject: [PATCH 083/134] Remove some pointless and/or outdated codec documentation sections. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27773 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/en/codecs.xml | 204 ----------------------------------------- 1 file changed, 204 deletions(-) diff --git a/DOCS/xml/en/codecs.xml b/DOCS/xml/en/codecs.xml index 909efa2ef9..057591daba 100644 --- a/DOCS/xml/en/codecs.xml +++ b/DOCS/xml/en/codecs.xml @@ -14,64 +14,6 @@ Some binary codecs for use with MPlayer are available in the of our homepage. - -The most important ones above all: - - - - - MPEG-1 (VCD) and - MPEG-2 (DVD) video - - - native decoders for all DivX variants, - 3ivX, Microsoft MPEG-4 v1, v2 and other MPEG-4 variants - - - native decoder for Windows Media Video 7/8 - (WMV1/WMV2), and Win32 DLL decoder - for Windows Media Video 9 - (WMV3), - both used in .wmv files - - - native Sorenson 1 (SVQ1) decoder - - - native Sorenson 3 (SVQ3) decoder - - - 3ivx v1, v2 decoder - - - Cinepak and Intel Indeo codecs - (3.1,3.2,4.1,5.0) - - - MJPEG, AVID, VCR2, ASV2 and other hardware - formats - - - VIVO 1.0, 2.0, I263 and other H.263(+) - variants - - - FLI/FLC - - - RealVideo 1.0 & 2.0 from - libavcodec, and - RealVideo 3.0 & 4.0 codecs using - RealPlayer libraries - - - native decoder for HuffYUV - - - Various old simple RLE-like formats - - - If you have a Win32 codec not listed here which is not supported yet, please read the codec importing HOWTO @@ -196,103 +138,6 @@ There are also many advanced features in the H.264 specification which have nothing to do with video quality per se; many of these are not yet implemented in x264. - - -Encoder features - CAVLC/CABAC - Multi-references - - Intra: all macroblock types (16x16, 8x8, and 4x4 with all predictions) - - - Inter P: all partitions (from 16x16 down to 4x4) - - - Inter B: partitions from 16x16 down to 8x8 (including SKIP/DIRECT) - - - Ratecontrol: constant quantizer, constant bitrate, single or multipass ABR, - optional VBV - - Scene cut detection - Adaptive B-frame placement - - B-frames as references / arbitrary frame order - - 8x8 and 4x4 adaptive spatial transform - Lossless mode - Custom quantization matrices - Parallel encoding of multiple slices - Interlacing - - - - - -What is H.264? - - -H.264 is one name for a new digital video codec jointly developed -by the ITU and MPEG. -It can also be correctly referred to by the cumbersome names of -"ISO/IEC 14496-10" or "MPEG-4 Part 10". -More frequently, it is referred to as "MPEG-4 AVC" or just "AVC". - - - -Whatever you call it, H.264 may be worth trying because it can typically match -the quality of MPEG-4 ASP with 5%-30% less bitrate. -Actual results will depend on both the source material and the encoder. -The gains from using H.264 do not come for free: Decoding H.264 -streams seems to have steep CPU and memory requirements. -For instance, on a 1733 MHz Athlon, a DVD-resolution 1500kbps H.264 -video requires around 35% CPU to decode. -By comparison, decoding a DVD-resolution 1500kbps MPEG-4 ASP stream -requires around 10% CPU. -This means that decoding high-definition streams is almost out of -the question for most users. -It also means that even a decent DVD rip may sometimes stutter on -processors slower than 2.0 GHz or so. - - - -At least with x264, -encoding requirements are not much worse than what you are used to -with MPEG-4 ASP. -For instance, on a 1733 MHz Athlon a typical DVD encode would run -at 5-15fps. - - - -This document is not intended to explain the details of H.264, -but if you are interested in a brief overview, you may want to read -The H.264/AVC Advanced Video Coding Standard: Overview and Introduction to the Fidelity Range Extensions. - - - - - -How can I play H.264 videos with - <application>MPlayer</application>? - - -MPlayer uses -libavcodec's H.264 decoder. -libavcodec has had at -least minimally usable H.264 decoding since around July 2004, -however major changes and improvements have been implemented since -that time, both in terms of more functionality supported and in -terms of improved CPU usage. -Just to be certain, it is always a good idea to use a recent Subversion -checkout. - - - -If you want a quick and easy way to know whether there have been -recent changes to libavcodec's -H.264 decoding, you might keep an eye on -FFmpeg Subversion repository's web interface. - @@ -342,55 +187,6 @@ satisfied the requirements for x264. Audio codecs - -The most important audio codecs above all: - - MPEG layer 1/2/3 (MP1/2/3) audio (native - code, with MMX/SSE/3DNow! optimization) - - - Windows Media Audio 7 and 8 (AKA WMAv1 and WMAv2) - (native code, with - libavcodec) - - - Windows Media Audio 9 (WMAv3) (using DMO DLL) - - - AC-3 Dolby audio (native code, with - MMX/SSE/3DNow! optimization) - - - AC-3 passing through sound card hardware - - - AAC - - - Ogg Vorbis audio codec (native library) - - - RealAudio: DNET (low bitrate AC-3), Cook, Sipro and ATRAC3 - - - QuickTime: Qualcomm and QDesign audio codecs - - - VIVO audio (g723, Vivo Siren) - - - Voxware audio (using DirectShow DLL) - - - alaw and ulaw, various GSM, ADPCM and PCM formats and other simple old - audio codecs - - - Adaptive Multi-Rate (AMR) speech codecs - - - - Software AC-3 decoding From 883557290d9e5ee140c8a603d05f49949b63cf0b Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 14 Oct 2008 23:00:04 +0000 Subject: [PATCH 084/134] cosmetics: Consistently name all header #define variables. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27774 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 80 +++++++++++++++++++++++++++---------------------------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/configure b/configure index 40a08da166..bc22927054 100755 --- a/configure +++ b/configure @@ -2397,13 +2397,13 @@ EOF if $(cc_check -maltivec -mabi=altivec) ; then _altivec_gcc_flags="-maltivec -mabi=altivec" # check if should be included - _def_altivec_h='#undef HAVE_ALTIVEC_H' + def_altivec_h='#undef HAVE_ALTIVEC_H' cat > $TMPC << EOF #include int main(void) { return 0; } EOF if $(cc_check $_altivec_gcc_flags) ; then - _def_altivec_h='#define HAVE_ALTIVEC_H 1' + def_altivec_h='#define HAVE_ALTIVEC_H 1' inc_altivec_h='#include ' else cat > $TMPC << EOF @@ -2770,9 +2770,9 @@ echores "$_socklib" if test $_winsock2_h = yes ; then _ld_sock="-lws2_32" - _def_winsock2_h='#define HAVE_WINSOCK2_H 1' + def_winsock2_h='#define HAVE_WINSOCK2_H 1' else - _def_winsock2_h='#undef HAVE_WINSOCK2_H' + def_winsock2_h='#undef HAVE_WINSOCK2_H' fi @@ -2931,12 +2931,12 @@ EOF _malloc=no cc_check && _malloc=yes if test "$_malloc" = yes ; then - _def_malloc='#define HAVE_MALLOC_H 1' + def_malloc_h='#define HAVE_MALLOC_H 1' else - _def_malloc='#undef HAVE_MALLOC_H' + def_malloc_h='#undef HAVE_MALLOC_H' fi # malloc.h emits a warning in FreeBSD and OpenBSD -freebsd || openbsd || dragonfly && _def_malloc='#undef HAVE_MALLOC_H' +freebsd || openbsd || dragonfly && def_malloc_h='#undef HAVE_MALLOC_H' echores "$_malloc" @@ -2966,9 +2966,9 @@ EOF _alloca=no cc_check && _alloca=yes if cc_check ; then - _def_alloca='#define HAVE_ALLOCA_H 1' + def_alloca_h='#define HAVE_ALLOCA_H 1' else - _def_alloca='#undef HAVE_ALLOCA_H' + def_alloca_h='#undef HAVE_ALLOCA_H' fi echores "$_alloca" @@ -2982,9 +2982,9 @@ EOF _mman=no cc_check && _mman=yes if test "$_mman" = yes ; then - _def_mman='#define HAVE_SYS_MMAN_H 1' + def_mman_h='#define HAVE_SYS_MMAN_H 1' else - _def_mman='#undef HAVE_SYS_MMAN_H' + def_mman_h='#undef HAVE_SYS_MMAN_H' os2 && _need_mmap=yes fi echores "$_mman" @@ -3133,8 +3133,8 @@ echores "$_iconv" echocheck "soundcard.h" _soundcard_h=no -_def_soundcard='#undef HAVE_SOUNDCARD_H' -_def_sys_soundcard='#undef HAVE_SYS_SOUNDCARD_H' +def_soundcard_h='#undef HAVE_SOUNDCARD_H' +def_sys_soundcard_h='#undef HAVE_SYS_SOUNDCARD_H' for _soundcard_header in "sys/soundcard.h" "soundcard.h"; do cat > $TMPC << EOF #include <$_soundcard_header> @@ -3145,9 +3145,9 @@ done if test "$_soundcard_h" = yes ; then if test $_soundcard_header = "sys/soundcard.h"; then - _def_sys_soundcard='#define HAVE_SYS_SOUNDCARD_H 1' + def_sys_soundcard_h='#define HAVE_SYS_SOUNDCARD_H 1' else - _def_soundcard='#define HAVE_SOUNDCARD_H 1' + def_soundcard_h='#define HAVE_SOUNDCARD_H 1' fi fi echores "$_soundcard_h" @@ -3295,8 +3295,8 @@ echores "$_termcap" echocheck "termios" _def_termios='#undef HAVE_TERMIOS' -_def_termios_h='#undef HAVE_TERMIOS_H' -_def_termios_sys_h='#undef HAVE_SYS_TERMIOS_H' +def_termios_h='#undef HAVE_TERMIOS_H' +def_termios_sys_h='#undef HAVE_SYS_TERMIOS_H' if test "$_termios" = auto ; then _termios=no for _termios_header in "sys/termios.h" "termios.h"; do @@ -3311,9 +3311,9 @@ fi if test "$_termios" = yes ; then _def_termios='#define HAVE_TERMIOS 1' if test "$_termios_header" = "termios.h" ; then - _def_termios_h='#define HAVE_TERMIOS_H 1' + def_termios_h='#define HAVE_TERMIOS_H 1' else - _def_termios_sys_h='#define HAVE_SYS_TERMIOS_H 1' + def_termios_sys_h='#define HAVE_SYS_TERMIOS_H 1' fi fi echores "$_termios" @@ -3494,9 +3494,9 @@ EOF _sys_sysinfo=no cc_check && _sys_sysinfo=yes if test "$_sys_sysinfo" = yes ; then - _def_sys_sysinfo='#define HAVE_SYS_SYSINFO_H 1' + def_sys_sysinfo_h='#define HAVE_SYS_SYSINFO_H 1' else - _def_sys_sysinfo='#undef HAVE_SYS_SYSINFO_H' + def_sys_sysinfo_h='#undef HAVE_SYS_SYSINFO_H' fi echores "$_sys_sysinfo" @@ -5258,8 +5258,8 @@ _def_alsa='#undef CONFIG_ALSA' _def_alsa5='#undef CONFIG_ALSA5' _def_alsa9='#undef CONFIG_ALSA9' _def_alsa1x='#undef CONFIG_ALSA1X' -_def_sys_asoundlib_h='#undef HAVE_SYS_ASOUNDLIB_H' -_def_alsa_asoundlib_h='#undef HAVE_ALSA_ASOUNDLIB_H' +def_sys_asoundlib_h='#undef HAVE_SYS_ASOUNDLIB_H' +def_alsa_asoundlib_h='#undef HAVE_ALSA_ASOUNDLIB_H' if test "$_alsaver" ; then _alsa=yes if test "$_alsaver" = '0.5.x' ; then @@ -5267,7 +5267,7 @@ if test "$_alsaver" ; then _aosrc="$_aosrc ao_alsa5.c" _aomodules="alsa5 $_aomodules" _def_alsa5='#define CONFIG_ALSA5 1' - _def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' + def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' _res_comment="using alsa 0.5.x and sys/asoundlib.h" elif test "$_alsaver" = '0.9.x-sys' ; then _alsa9=yes @@ -5275,7 +5275,7 @@ if test "$_alsaver" ; then _aomodules="alsa $_aomodules" _def_alsa='#define CONFIG_ALSA 1' _def_alsa9='#define CONFIG_ALSA9 1' - _def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' + def_sys_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' _res_comment="using alsa 0.9.x and sys/asoundlib.h" elif test "$_alsaver" = '0.9.x-alsa' ; then _alsa9=yes @@ -5283,7 +5283,7 @@ if test "$_alsaver" ; then _aomodules="alsa $_aomodules" _def_alsa='#define CONFIG_ALSA 1' _def_alsa9='#define CONFIG_ALSA9 1' - _def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1' + def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1' _res_comment="using alsa 0.9.x and alsa/asoundlib.h" elif test "$_alsaver" = '1.0.x-sys' ; then _alsa1x=yes @@ -5291,7 +5291,7 @@ if test "$_alsaver" ; then _aomodules="alsa $_aomodules" _def_alsa='#define CONFIG_ALSA 1' _def_alsa1x="#define CONFIG_ALSA1X 1" - _def_alsa_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' + def_alsa_asoundlib_h='#define HAVE_SYS_ASOUNDLIB_H 1' _res_comment="using alsa 1.0.x and sys/asoundlib.h" elif test "$_alsaver" = '1.0.x-alsa' ; then _alsa1x=yes @@ -5299,7 +5299,7 @@ if test "$_alsaver" ; then _aomodules="alsa $_aomodules" _def_alsa='#define CONFIG_ALSA 1' _def_alsa1x="#define CONFIG_ALSA1X 1" - _def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1' + def_alsa_asoundlib_h='#define HAVE_ALSA_ASOUNDLIB_H 1' _res_comment="using alsa 1.0.x and alsa/asoundlib.h" else _alsa=no @@ -8052,24 +8052,24 @@ $_def_fast_inttypes #define HAVE_UINTPTR_T 1 /* Define this if your system has the "alloca.h" header file */ -$_def_alloca +$def_alloca_h /* Define this if your system has the "sys/mman.h" header file */ -$_def_mman +$def_mman_h $_def_mman_has_map_failed /* Define this if your system has the header file for the OSS sound interface */ -$_def_sys_soundcard +$def_sys_soundcard_h /* Define this if your system has the header file for the OSS sound interface * in /usr/include */ -$_def_soundcard +$def_soundcard_h /* Define this if your system has the sysinfo header */ -$_def_sys_sysinfo +$def_sys_sysinfo_h /* Define this if your system has the "malloc.h" header file */ -$_def_malloc +$def_malloc_h /* memalign is mapped to malloc if unsupported */ $_def_memalign @@ -8136,7 +8136,7 @@ $_def_fast_unaligned `ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"` /* altivec.h support */ -$_def_altivec_h +$def_altivec_h /* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not have the instruction. */ @@ -8410,8 +8410,8 @@ $_def_pulse $_def_jack $_def_openal $_def_openal_h -$_def_sys_asoundlib_h -$_def_alsa_asoundlib_h +$def_sys_asoundlib_h +$def_alsa_asoundlib_h $_def_sunaudio $_def_sgiaudio $_def_win32waveout @@ -8465,8 +8465,8 @@ $_def_termcap /* termios flag for getch2.c */ $_def_termios -$_def_termios_h -$_def_termios_sys_h +$def_termios_h +$def_termios_sys_h /* enable PNG support */ $_def_png @@ -8534,7 +8534,7 @@ $_def_ftp $_def_vstream /* enable winsock2 instead of Unix functions*/ -$_def_winsock2_h +$def_winsock2_h /* define this to use inet_aton() instead of inet_pton() */ $_def_use_aton From 6e40bc14c9aa6d0cc569ed56904ef7e94cc66767 Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 14 Oct 2008 23:15:10 +0000 Subject: [PATCH 085/134] cosmetics: Move _def_fast_unaligned to the FFmpeg section of config.h. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27775 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure b/configure index bc22927054..a7bff7b18a 100755 --- a/configure +++ b/configure @@ -8127,9 +8127,6 @@ $_def_runtime_cpudetection byte first (like Motorola and SPARC, unlike Intel and VAX). */ $_def_words_endian -/* Define if your processor can access unaligned data in a fast way */ -$_def_fast_unaligned - `ff_config_enable "$_arch_all" "$_arch" "ARCH"` /* Extension defines */ @@ -8674,6 +8671,9 @@ $_def_muxers #define HAVE_EBP_AVAILABLE 1 #endif +/* Define if your processor can access unaligned data in a fast way */ +$_def_fast_unaligned + #define CONFIG_GPL 1 #define ENABLE_SMALL 0 #define ENABLE_GRAY 0 From 392be5a106f710c518bd9c6fb042c2de1e557d36 Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 14 Oct 2008 23:20:10 +0000 Subject: [PATCH 086/134] misc updates for the Xvid, x264 and AAC sections git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27776 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/en/codecs.xml | 103 +++++++++------------------------ DOCS/xml/en/encoding-guide.xml | 2 +- 2 files changed, 29 insertions(+), 76 deletions(-) diff --git a/DOCS/xml/en/codecs.xml b/DOCS/xml/en/codecs.xml index 057591daba..ad873d4877 100644 --- a/DOCS/xml/en/codecs.xml +++ b/DOCS/xml/en/codecs.xml @@ -15,7 +15,7 @@ of our homepage. -If you have a Win32 codec not listed here which is not supported yet, +If you have a Win32 codec which is not supported yet, please read the codec importing HOWTO and help us add support for it. @@ -58,22 +58,8 @@ Just run ./configure and compile. Xvid is a free software MPEG-4 ASP -compliant video codec, which features two pass encoding and full MPEG-4 ASP -support, making it a lot more efficient than the well-known DivX codec. -It yields very good video quality and good performance due to CPU -optimizations for most modern processors. - - - -It began as a forked development of the OpenDivX codec. -This happened when ProjectMayo changed OpenDivX to closed source -DivX4, and the non-ProjectMayo people working on OpenDivX got angry, -then started Xvid. So both projects have the same origin. - - - -Note that Xvid is not necessary to decode Xvid-encoded video. -libavcodec is used by +compliant video codec. Note that Xvid is not necessary to decode Xvid-encoded +video. libavcodec is used by default as it offers better speed. @@ -126,57 +112,27 @@ default as it offers better speed. <systemitem class="library">x264</systemitem> - -What is <systemitem class="library">x264</systemitem>? - x264 -is a library for creating H.264 video streams. -It is not 100% complete, but supports most of H.264's features which impact -quality. -There are also many advanced features in the H.264 specification -which have nothing to do with video quality per se; many of these -are not yet implemented in x264. - - - - - -How can I encode videos using <application>MEncoder</application> - and <systemitem class="library">x264</systemitem>? - - -If you have the GIT client installed, the latest x264 -sources can be gotten with this command: -git clone git://git.videolan.org/x264.git +is a library for creating H.264 video. MPlayer sources are updated whenever an x264 API change occurs, so it is always suggested to use -MPlayer from Subversion as well. -Perhaps this situation will change when and if an -x264 "release" occurs. -Meanwhile, x264 should -be considered a bit unstable, in the sense that its programming -interface is subject to change. +MPlayer from Subversion. -x264 is built and -installed in the standard way: -./configure && make && sudo make install -This installs libx264.a in /usr/local/lib and x264.h is placed in -/usr/local/include. +If you have a GIT client installed, the latest x264 +sources can be gotten with this command: +git clone git://git.videolan.org/x264.git -With the x264 library -and header placed in the standard locations, building -MPlayer with -x264 support is easy. -Just run the standard: -./configure && make && sudo make install -The ./configure script will autodetect that you have -satisfied the requirements for x264. +Then build and install in the standard way: +./configure && make && make install + +Now rerun ./configure for +MPlayer to pick up +x264 support. - @@ -286,21 +242,23 @@ only white noise). AAC codec -AAC (Advanced Audio Coding) is an audio codec sometimes found in MOV and MP4 -files. An open source decoder called FAAD is available from -. -MPlayer includes a CVS snapshot of libfaad 2.1 -beta, so you do not need to get it separately. +An open source AAC decoder called FAAD2 is available from +. +MPlayer includes a copy of it in its source tree. +If you want to use the external library instead, install it and pass + to ./configure. -If you use gcc 3.2 which fails to compile our internal FAAD or want to use -the external library for some other reason, download the library from the -download page -and pass -to ./configure. -You do not need all of faad2 to decode AAC files, libfaad is enough. Build -it like this: +FAAD2 binaries are not available from audiocoding.com, but you can (apt-)get +Debian packages from +Christian Marillat, +Mandrake/Mandriva RPMs from the P.L.F +and Fedora RPMs from Livna. + + +If you choose to build from source, you do not need all of FAAD2 to decode +AAC files, libfaad is enough. Build it like this: cd faad2/ sh bootstrap @@ -309,11 +267,6 @@ cd libfaad make make install -Binaries are not available from audiocoding.com, but you can (apt-)get Debian -packages from -Christian Marillat's homepage, -Mandrake/Mandriva RPMs from the P.L.F -and Fedora RPMs from Livna. diff --git a/DOCS/xml/en/encoding-guide.xml b/DOCS/xml/en/encoding-guide.xml index a5f5d6f8fd..a4a9fac526 100644 --- a/DOCS/xml/en/encoding-guide.xml +++ b/DOCS/xml/en/encoding-guide.xml @@ -3815,7 +3815,7 @@ and development advancements, you may get very different results. x264 is a free library for encoding H.264/AVC video streams. Before starting to encode, you need to -set up MEncoder to support it. +set up MEncoder to support it. From af9d6f2d0e8bfc6ab17de9c8f11c62aee25519f0 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 13:33:29 +0000 Subject: [PATCH 087/134] sun --> __sun in config.h preprocessor check git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27777 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index a7bff7b18a..356a3b0449 100755 --- a/configure +++ b/configure @@ -8218,7 +8218,7 @@ $_def_dvdnav $_def_vcd -#ifdef sun +#ifdef __sun #define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0" #define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE #elif defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) From 3679961515158db1a485e588550ca22ba40d72d7 Mon Sep 17 00:00:00 2001 From: flameeyes Date: Thu, 16 Oct 2008 13:34:30 +0000 Subject: [PATCH 088/134] Convert asm keyword into __asm__. Neither the asm() nor the __asm__() keyword is part of the C99 standard, but while GCC accepts the former in C89 syntax, it is not accepted in C99 unless GNU extensions are turned on (with -fasm). The latter form is accepted in any syntax as an extension (without requiring further command-line options). Sun Studio C99 compiler also does not accept asm() while accepting __asm__(), albeit reporting warnings that it's not valid C99 syntax. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27778 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/rgb2rgb_template.c | 236 +++++++++++++++++----------------- libswscale/swscale-example.c | 4 +- libswscale/swscale.c | 8 +- libswscale/swscale_template.c | 84 ++++++------ libswscale/yuv2rgb_template.c | 24 ++-- libswscale/yuv2rgb_vis.c | 4 +- 6 files changed, 180 insertions(+), 180 deletions(-) diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index c9a16e2512..5f9de959c6 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -81,12 +81,12 @@ static inline void RENAME(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, long s #endif end = s + src_size; #ifdef HAVE_MMX - asm volatile(PREFETCH" %0"::"m"(*s):"memory"); + __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory"); mm_end = end - 23; - asm volatile("movq %0, %%mm7"::"m"(mask32):"memory"); + __asm__ volatile("movq %0, %%mm7"::"m"(mask32):"memory"); while (s < mm_end) { - asm volatile( + __asm__ volatile( PREFETCH" 32%1 \n\t" "movd %1, %%mm0 \n\t" "punpckldq 3%1, %%mm0 \n\t" @@ -110,8 +110,8 @@ static inline void RENAME(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, long s dest += 32; s += 24; } - asm volatile(SFENCE:::"memory"); - asm volatile(EMMS:::"memory"); + __asm__ volatile(SFENCE:::"memory"); + __asm__ volatile(EMMS:::"memory"); #endif while (s < end) { @@ -141,11 +141,11 @@ static inline void RENAME(rgb32tobgr24)(const uint8_t *src, uint8_t *dst, long s #endif end = s + src_size; #ifdef HAVE_MMX - asm volatile(PREFETCH" %0"::"m"(*s):"memory"); + __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory"); mm_end = end - 31; while (s < mm_end) { - asm volatile( + __asm__ volatile( PREFETCH" 32%1 \n\t" "movq %1, %%mm0 \n\t" "movq 8%1, %%mm1 \n\t" @@ -196,8 +196,8 @@ static inline void RENAME(rgb32tobgr24)(const uint8_t *src, uint8_t *dst, long s dest += 24; s += 32; } - asm volatile(SFENCE:::"memory"); - asm volatile(EMMS:::"memory"); + __asm__ volatile(SFENCE:::"memory"); + __asm__ volatile(EMMS:::"memory"); #endif while (s < end) { @@ -231,12 +231,12 @@ static inline void RENAME(rgb15to16)(const uint8_t *src, uint8_t *dst, long src_ const uint8_t *mm_end; end = s + src_size; #ifdef HAVE_MMX - asm volatile(PREFETCH" %0"::"m"(*s)); - asm volatile("movq %0, %%mm4"::"m"(mask15s)); + __asm__ volatile(PREFETCH" %0"::"m"(*s)); + __asm__ volatile("movq %0, %%mm4"::"m"(mask15s)); mm_end = end - 15; while (sflags & SWS_ACCURATE_RND){ while(p--){ - asm volatile( + __asm__ volatile( YSCALEYUV2YV121_ACCURATE :: "r" (src[p]), "r" (dst[p] + counter[p]), "g" (-counter[p]) @@ -1011,7 +1011,7 @@ static inline void RENAME(yuv2yuv1)(SwsContext *c, int16_t *lumSrc, int16_t *chr } }else{ while(p--){ - asm volatile( + __asm__ volatile( YSCALEYUV2YV121 :: "r" (src[p]), "r" (dst[p] + counter[p]), "g" (-counter[p]) @@ -1220,7 +1220,7 @@ static inline void RENAME(yuv2packed2)(SwsContext *c, uint16_t *buf0, uint16_t * { #ifdef HAVE_MMX case PIX_FMT_RGB32: - asm volatile( + __asm__ volatile( FULL_YSCALEYUV2RGB @@ -1244,7 +1244,7 @@ FULL_YSCALEYUV2RGB ); break; case PIX_FMT_BGR24: - asm volatile( + __asm__ volatile( FULL_YSCALEYUV2RGB @@ -1293,7 +1293,7 @@ FULL_YSCALEYUV2RGB ); break; case PIX_FMT_BGR555: - asm volatile( + __asm__ volatile( FULL_YSCALEYUV2RGB #ifdef DITHER1XBPP @@ -1326,7 +1326,7 @@ FULL_YSCALEYUV2RGB ); break; case PIX_FMT_BGR565: - asm volatile( + __asm__ volatile( FULL_YSCALEYUV2RGB #ifdef DITHER1XBPP @@ -1434,7 +1434,7 @@ FULL_YSCALEYUV2RGB { //Note 8280 == DSTW_OFFSET but the preprocessor can't handle that there :( case PIX_FMT_RGB32: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1448,7 +1448,7 @@ FULL_YSCALEYUV2RGB ); return; case PIX_FMT_BGR24: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1461,7 +1461,7 @@ FULL_YSCALEYUV2RGB ); return; case PIX_FMT_RGB555: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1482,7 +1482,7 @@ FULL_YSCALEYUV2RGB ); return; case PIX_FMT_RGB565: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1502,7 +1502,7 @@ FULL_YSCALEYUV2RGB ); return; case PIX_FMT_YUYV422: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1546,7 +1546,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * switch(dstFormat) { case PIX_FMT_RGB32: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1560,7 +1560,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * ); return; case PIX_FMT_BGR24: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1574,7 +1574,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * ); return; case PIX_FMT_RGB555: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1594,7 +1594,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * ); return; case PIX_FMT_RGB565: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1615,7 +1615,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * ); return; case PIX_FMT_YUYV422: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1635,7 +1635,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * switch(dstFormat) { case PIX_FMT_RGB32: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1649,7 +1649,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * ); return; case PIX_FMT_BGR24: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1663,7 +1663,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * ); return; case PIX_FMT_RGB555: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1683,7 +1683,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * ); return; case PIX_FMT_RGB565: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1704,7 +1704,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * ); return; case PIX_FMT_YUYV422: - asm volatile( + __asm__ volatile( "mov %%"REG_b", "ESP_OFFSET"(%5) \n\t" "mov %4, %%"REG_b" \n\t" "push %%"REG_BP" \n\t" @@ -1734,7 +1734,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t * static inline void RENAME(yuy2ToY)(uint8_t *dst, uint8_t *src, long width, uint32_t *unused) { #ifdef HAVE_MMX - asm volatile( + __asm__ volatile( "movq "MANGLE(bm01010101)", %%mm2 \n\t" "mov %0, %%"REG_a" \n\t" "1: \n\t" @@ -1759,7 +1759,7 @@ static inline void RENAME(yuy2ToY)(uint8_t *dst, uint8_t *src, long width, uint3 static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, long width, uint32_t *unused) { #ifdef HAVE_MMX - asm volatile( + __asm__ volatile( "movq "MANGLE(bm01010101)", %%mm4 \n\t" "mov %0, %%"REG_a" \n\t" "1: \n\t" @@ -1796,7 +1796,7 @@ static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, static inline void RENAME(uyvyToY)(uint8_t *dst, uint8_t *src, long width, uint32_t *unused) { #ifdef HAVE_MMX - asm volatile( + __asm__ volatile( "mov %0, %%"REG_a" \n\t" "1: \n\t" "movq (%1, %%"REG_a",2), %%mm0 \n\t" @@ -1820,7 +1820,7 @@ static inline void RENAME(uyvyToY)(uint8_t *dst, uint8_t *src, long width, uint3 static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, long width, uint32_t *unused) { #ifdef HAVE_MMX - asm volatile( + __asm__ volatile( "movq "MANGLE(bm01010101)", %%mm4 \n\t" "mov %0, %%"REG_a" \n\t" "1: \n\t" @@ -1917,20 +1917,20 @@ static inline void RENAME(bgr24ToY_mmx)(uint8_t *dst, uint8_t *src, long width, { if(srcFormat == PIX_FMT_BGR24){ - asm volatile( + __asm__ volatile( "movq "MANGLE(ff_bgr24toY1Coeff)", %%mm5 \n\t" "movq "MANGLE(ff_bgr24toY2Coeff)", %%mm6 \n\t" : ); }else{ - asm volatile( + __asm__ volatile( "movq "MANGLE(ff_rgb24toY1Coeff)", %%mm5 \n\t" "movq "MANGLE(ff_rgb24toY2Coeff)", %%mm6 \n\t" : ); } - asm volatile( + __asm__ volatile( "movq "MANGLE(ff_bgr24toYOffset)", %%mm4 \n\t" "mov %2, %%"REG_a" \n\t" "pxor %%mm7, %%mm7 \n\t" @@ -1968,7 +1968,7 @@ static inline void RENAME(bgr24ToY_mmx)(uint8_t *dst, uint8_t *src, long width, static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, uint8_t *src, long width, int srcFormat) { - asm volatile( + __asm__ volatile( "movq 24+%4, %%mm6 \n\t" "mov %3, %%"REG_a" \n\t" "pxor %%mm7, %%mm7 \n\t" @@ -2184,7 +2184,7 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW filter-= counter*2; filterPos-= counter/2; dst-= counter/2; - asm volatile( + __asm__ volatile( #if defined(PIC) "push %%"REG_b" \n\t" #endif @@ -2230,7 +2230,7 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW filter-= counter*4; filterPos-= counter/2; dst-= counter/2; - asm volatile( + __asm__ volatile( #if defined(PIC) "push %%"REG_b" \n\t" #endif @@ -2288,7 +2288,7 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW //filter-= counter*filterSize/2; filterPos-= counter/2; dst-= counter/2; - asm volatile( + __asm__ volatile( "pxor %%mm7, %%mm7 \n\t" ASMALIGN(4) "1: \n\t" @@ -2456,7 +2456,7 @@ static inline void RENAME(hyscale)(SwsContext *c, uint16_t *dst, long dstWidth, #endif if (canMMX2BeUsed) { - asm volatile( + __asm__ volatile( #if defined(PIC) "mov %%"REG_b", %5 \n\t" #endif @@ -2521,7 +2521,7 @@ FUNNY_Y_CODE long xInc_shr16 = xInc >> 16; uint16_t xInc_mask = xInc & 0xffff; //NO MMX just normal asm ... - asm volatile( + __asm__ volatile( "xor %%"REG_a", %%"REG_a" \n\t" // i "xor %%"REG_d", %%"REG_d" \n\t" // xx "xorl %%ecx, %%ecx \n\t" // 2*xalpha @@ -2729,7 +2729,7 @@ inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth, #endif if (canMMX2BeUsed) { - asm volatile( + __asm__ volatile( #if defined(PIC) "mov %%"REG_b", %6 \n\t" #endif @@ -2806,7 +2806,7 @@ FUNNY_UV_CODE #endif /* HAVE_MMX2 */ long xInc_shr16 = (long) (xInc >> 16); uint16_t xInc_mask = xInc & 0xffff; - asm volatile( + __asm__ volatile( "xor %%"REG_a", %%"REG_a" \n\t" // i "xor %%"REG_d", %%"REG_d" \n\t" // xx "xorl %%ecx, %%ecx \n\t" // 2*xalpha @@ -3256,8 +3256,8 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s } #ifdef HAVE_MMX - asm volatile(SFENCE:::"memory"); - asm volatile(EMMS:::"memory"); + __asm__ volatile(SFENCE:::"memory"); + __asm__ volatile(EMMS:::"memory"); #endif /* store changed local vars back in the context */ c->dstY= dstY; diff --git a/libswscale/yuv2rgb_template.c b/libswscale/yuv2rgb_template.c index b71c918f2a..c9a75ece9f 100644 --- a/libswscale/yuv2rgb_template.c +++ b/libswscale/yuv2rgb_template.c @@ -133,7 +133,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr h_size= (c->dstW+7)&~7; if(h_size*2 > FFABS(dstStride[0])) h_size-=8; - asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); + __asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); //printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&c->blueDither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], //srcStride[0],srcStride[1],srcStride[2],dstStride[0]); for (y= 0; yredDither= ff_dither8[(y+1)&1]; /* This MMX assembly code deals with a SINGLE scan line at a time, * it converts 8 pixels in each iteration. */ - asm volatile ( + __asm__ volatile ( /* load data for start of next scan line */ "movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */ "movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */ @@ -210,7 +210,7 @@ YUV2RGB ); } - asm volatile (EMMS); + __asm__ volatile (EMMS); return srcSliceH; } @@ -227,7 +227,7 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr h_size= (c->dstW+7)&~7; if(h_size*2 > FFABS(dstStride[0])) h_size-=8; - asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); + __asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); //printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&c->blueDither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], //srcStride[0],srcStride[1],srcStride[2],dstStride[0]); for (y= 0; yredDither= ff_dither8[(y+1)&1]; /* This MMX assembly code deals with a SINGLE scan line at a time, * it converts 8 pixels in each iteration. */ - asm volatile ( + __asm__ volatile ( /* load data for start of next scan line */ "movd (%2, %0), %%mm0;" /* Load 4 Cb 00 00 00 00 u3 u2 u1 u0 */ "movd (%3, %0), %%mm1;" /* Load 4 Cr 00 00 00 00 v3 v2 v1 v0 */ @@ -299,7 +299,7 @@ YUV2RGB ); } - asm volatile (EMMS); + __asm__ volatile (EMMS); return srcSliceH; } @@ -315,7 +315,7 @@ static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStr h_size= (c->dstW+7)&~7; if(h_size*3 > FFABS(dstStride[0])) h_size-=8; - asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); + __asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); for (y= 0; ydstW+7)&~7; if(h_size*4 > FFABS(dstStride[0])) h_size-=8; - asm volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); + __asm__ volatile ("pxor %mm4, %mm4;" /* zero mm4 */ ); for (y= 0; y Date: Thu, 16 Oct 2008 17:01:40 +0000 Subject: [PATCH 089/134] Rename stream/netstream.h to stream/stream_netstream.h; netstream.h to make it clearer that netstream.h belongs to stream_netstream.c. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27779 b3059339-0415-0410-9bf9-f77b7e298cf2 --- TOOLS/netstream.c | 2 +- stream/stream_netstream.c | 2 +- stream/{netstream.h => stream_netstream.h} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename stream/{netstream.h => stream_netstream.h} (100%) diff --git a/TOOLS/netstream.c b/TOOLS/netstream.c index 4a44e9581a..8bc09b9a9d 100644 --- a/TOOLS/netstream.c +++ b/TOOLS/netstream.c @@ -44,7 +44,7 @@ #include "mpbswap.h" /// Netstream packets def and some helpers -#include "stream/netstream.h" +#include "stream/stream_netstream.h" // linking hacks char *info_name; diff --git a/stream/stream_netstream.c b/stream/stream_netstream.c index 5a3de1ce58..84e10a2c81 100644 --- a/stream/stream_netstream.c +++ b/stream/stream_netstream.c @@ -59,7 +59,7 @@ #include "mpbswap.h" #include "network.h" -#include "netstream.h" +#include "stream_netstream.h" #include "tcp.h" static struct stream_priv_s { diff --git a/stream/netstream.h b/stream/stream_netstream.h similarity index 100% rename from stream/netstream.h rename to stream/stream_netstream.h From 2093097cfbf6b9a1d36d23c94f68df0a80f57003 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 18:08:18 +0000 Subject: [PATCH 090/134] Remove pointless attribute_used from variable declaration. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27780 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmenu/vf_menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmenu/vf_menu.c b/libmenu/vf_menu.c index d0f8ef0a67..a160c3fcb6 100644 --- a/libmenu/vf_menu.c +++ b/libmenu/vf_menu.c @@ -33,7 +33,7 @@ static struct vf_priv_s* st_priv = NULL; static mp_image_t* pause_mpi = NULL; static int go2pause = 0; /// if nonzero display menu at startup -int attribute_used menu_startup = 0; +int menu_startup = 0; struct vf_priv_s { menu_t* root; From 2b9e1bf0facd5291e2b7f2b3af9167f1bdf85dc0 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 18:13:06 +0000 Subject: [PATCH 091/134] Move attribute_used declaration from config.h to mangle.h where it is useful. config.h should only contain definitions, no logic. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27781 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 7 ------- mangle.h | 6 ++++++ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 356a3b0449..a82c271fd2 100755 --- a/configure +++ b/configure @@ -8174,13 +8174,6 @@ $_def_builtin_expect #define unlikely(x) (x) #endif -/* attribute(used) as needed by some compilers */ -#if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300) -# define attribute_used __attribute__((used)) -#else -# define attribute_used -#endif - /* compiler support for named assembler arguments */ $_def_named_asm_args diff --git a/mangle.h b/mangle.h index 687ca4f4ac..d8e2089a5f 100644 --- a/mangle.h +++ b/mangle.h @@ -7,6 +7,12 @@ #ifndef MPLAYER_MANGLE_H #define MPLAYER_MANGLE_H +#if (__GNUC__ * 100 + __GNUC_MINOR__ >= 300) +#define attribute_used __attribute__((used)) +#else +#define attribute_used +#endif + /* Feel free to add more to the list, eg. a.out IMO */ #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(__OS2__) || \ (defined(__OpenBSD__) && !defined(__ELF__)) || defined(__APPLE__) From beef14987b61b016b633e5a6163647639b75ab31 Mon Sep 17 00:00:00 2001 From: faust3 Date: Thu, 16 Oct 2008 18:13:26 +0000 Subject: [PATCH 092/134] fixed overlay x and y calculation git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27782 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_xvidix.c | 41 +++-------------------------------------- 1 file changed, 3 insertions(+), 38 deletions(-) diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c index 206f0228a9..704db31bde 100644 --- a/libvo/vo_xvidix.c +++ b/libvo/vo_xvidix.c @@ -124,44 +124,9 @@ static void set_window(int force_update) vo_dwidth = drwWidth; vo_dheight = drwHeight; -#ifdef CONFIG_XINERAMA - if (XineramaIsActive(mDisplay)) - { - XineramaScreenInfo *screens; - int num_screens; - int i = 0; - - screens = XineramaQueryScreens(mDisplay, &num_screens); - - /* find the screen we are on */ - while (i < num_screens && - ((screens[i].x_org < drwcX) || (screens[i].y_org < drwcY) || - (screens[i].x_org + screens[i].width >= drwcX) || - (screens[i].y_org + screens[i].height >= drwcY))) - { - i++; - } - - if (i < num_screens) - { - /* save the screen we are on */ - xinerama_screen = i; - } else - { - /* oops.. couldnt find the screen we are on - * because the upper left corner left the - * visual range. assume we are still on the - * same screen - */ - i = xinerama_screen; - } - - /* set drwcX and drwcY to the right values */ - drwcX = drwcX - screens[i].x_org; - drwcY = drwcY - screens[i].y_org; - XFree(screens); - } -#endif + update_xinerama_info(); + drwcX -= xinerama_x; + drwcY -= xinerama_y; if (vo_panscan > 0.0f && vo_fs) { From 11e54c5b679385fc0a91a0360dce84a279682a9f Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 18:14:35 +0000 Subject: [PATCH 093/134] cosmetics: Merge some preprocessor checks. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27783 b3059339-0415-0410-9bf9-f77b7e298cf2 --- get_path.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/get_path.c b/get_path.c index 17520f2a2c..1cb7bd8207 100644 --- a/get_path.c +++ b/get_path.c @@ -18,18 +18,12 @@ #include #include #include -#endif - -#ifdef __MINGW32__ +#elif __MINGW32__ #include -#endif - -#ifdef __CYGWIN__ +#elif __CYGWIN__ #include #include -#endif - -#ifdef __OS2__ +#elif __OS2__ #define INCL_DOS #include #endif From a290af1657a7c024e903a875fe1a886407aadc16 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 18:19:36 +0000 Subject: [PATCH 094/134] Move X11_FULLSCREEN definition to x11_common.h where it belongs. config.h should only contain option definitions, no logic. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27784 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 3 --- libvo/vo_dxr2.c | 3 --- libvo/x11_common.h | 6 ++++++ 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/configure b/configure index a82c271fd2..0a528aa33c 100755 --- a/configure +++ b/configure @@ -8607,9 +8607,6 @@ $_def_tga /* Define this if you have shm support */ $_def_shm -#if defined(CONFIG_GL) || defined(CONFIG_X11) || defined(CONFIG_XV) -#define X11_FULLSCREEN 1 -#endif /* FFmpeg */ /* Define this to enable image postprocessing in libavcodec */ diff --git a/libvo/vo_dxr2.c b/libvo/vo_dxr2.c index 93ad86f610..36281aa145 100644 --- a/libvo/vo_dxr2.c +++ b/libvo/vo_dxr2.c @@ -20,10 +20,7 @@ #include "sub.h" #include "get_path.h" #include "libmpdemux/mpeg_packetizer.h" - -#ifdef X11_FULLSCREEN #include "x11_common.h" -#endif #include diff --git a/libvo/x11_common.h b/libvo/x11_common.h index 7272378f9a..50bed0f599 100644 --- a/libvo/x11_common.h +++ b/libvo/x11_common.h @@ -4,6 +4,12 @@ #include #include +#include "config.h" + +#if defined(CONFIG_GL) || defined(CONFIG_X11) || defined(CONFIG_XV) +#define X11_FULLSCREEN 1 +#endif + #ifdef X11_FULLSCREEN #define vo_wm_LAYER 1 From af21f25f31c0f157d1476f4aa951767a182b2356 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 18:24:18 +0000 Subject: [PATCH 095/134] Move SCREEN_SIZE_X/Y definition to libmpcodecs/vd.c where it is used. config.h should only contain option definitions, no logic. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27785 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 -- libmpcodecs/vd.c | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 0a528aa33c..ab0a770b87 100755 --- a/configure +++ b/configure @@ -8556,8 +8556,6 @@ $_def_vidix_drv_unichrome $_def_vidix_pfx /* libvo options */ -#define SCREEN_SIZE_X 1 -#define SCREEN_SIZE_Y 1 $_def_x11 $_def_xv $_def_xvmc diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c index 281e67ba0c..67f6b3e7e0 100644 --- a/libmpcodecs/vd.c +++ b/libmpcodecs/vd.c @@ -134,6 +134,9 @@ int vo_gamma_hue = 1000; extern vd_functions_t* mpvdec; // FIXME! +#define SCREEN_SIZE_X 1 +#define SCREEN_SIZE_Y 1 + int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt){ int i,j; unsigned int out_fmt=0; From 7136bb0105e37607c98a6290a3355f9490a70993 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 18:26:01 +0000 Subject: [PATCH 096/134] Move likely/unlikely macros to libmpdemux/demuxer.h where they are used. config.h should only contain option definitions, no logic. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27786 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 7 ------- libmpdemux/demuxer.h | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/configure b/configure index ab0a770b87..1448ae024a 100755 --- a/configure +++ b/configure @@ -8166,13 +8166,6 @@ $_def_restrict_keyword /* __builtin_expect branch prediction hint */ $_def_builtin_expect -#ifdef HAVE_BUILTIN_EXPECT -#define likely(x) __builtin_expect ((x) != 0, 1) -#define unlikely(x) __builtin_expect ((x) != 0, 0) -#else -#define likely(x) (x) -#define unlikely(x) (x) -#endif /* compiler support for named assembler arguments */ $_def_named_asm_args diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h index edd13c404f..a97f3746db 100644 --- a/libmpdemux/demuxer.h +++ b/libmpdemux/demuxer.h @@ -11,6 +11,14 @@ #include "libass/ass_types.h" #endif +#ifdef HAVE_BUILTIN_EXPECT +#define likely(x) __builtin_expect ((x) != 0, 1) +#define unlikely(x) __builtin_expect ((x) != 0, 0) +#else +#define likely(x) (x) +#define unlikely(x) (x) +#endif + #define MAX_PACKS 4096 #ifdef CONFIG_TV_BSDBT848 #define MAX_PACK_BYTES 0x2000000 From 629db77d89d6bdead91fd18faa6445632a750e94 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 18:28:38 +0000 Subject: [PATCH 097/134] Move DEFAULT_CDROM_DEVICE/DEFAULT_DVD_DEVICE to stream.h where it belongs. config.h should only contain option definitions, no logic. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27787 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 27 --------------------------- stream/stream.h | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/configure b/configure index 1448ae024a..20d0e74657 100755 --- a/configure +++ b/configure @@ -8204,33 +8204,6 @@ $_def_dvdnav $_def_vcd -#ifdef __sun -#define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) -#define DEFAULT_CDROM_DEVICE "D:" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__APPLE__) || defined(__DARWIN__) -#define DEFAULT_CDROM_DEVICE "/dev/disk1" -#define DEFAULT_DVD_DEVICE "/dev/rdiskN" -#elif defined(__OpenBSD__) -#define DEFAULT_CDROM_DEVICE "/dev/rcd0a" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -#define DEFAULT_CDROM_DEVICE "/dev/acd0" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__DragonFly__) -#define DEFAULT_CDROM_DEVICE "/dev/cd0" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__AMIGAOS4__) -#define DEFAULT_CDROM_DEVICE "a1ide.device:2" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#else -#define DEFAULT_CDROM_DEVICE "/dev/cdrom" -#define DEFAULT_DVD_DEVICE "/dev/dvd" -#endif - - /* define this to use iconv(3) function to codepage conversions */ $_def_iconv diff --git a/stream/stream.h b/stream/stream.h index 4e872195a5..4eab9b5d85 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -65,6 +65,33 @@ #define STREAM_CTRL_GET_ANGLE 10 #define STREAM_CTRL_SET_ANGLE 11 +#ifdef __sun +#define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#elif defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) +#define DEFAULT_CDROM_DEVICE "D:" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#elif defined(__APPLE__) || defined(__DARWIN__) +#define DEFAULT_CDROM_DEVICE "/dev/disk1" +#define DEFAULT_DVD_DEVICE "/dev/rdiskN" +#elif defined(__OpenBSD__) +#define DEFAULT_CDROM_DEVICE "/dev/rcd0a" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#define DEFAULT_CDROM_DEVICE "/dev/acd0" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#elif defined(__DragonFly__) +#define DEFAULT_CDROM_DEVICE "/dev/cd0" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#elif defined(__AMIGAOS4__) +#define DEFAULT_CDROM_DEVICE "a1ide.device:2" +#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE +#else +#define DEFAULT_CDROM_DEVICE "/dev/cdrom" +#define DEFAULT_DVD_DEVICE "/dev/dvd" +#endif + + #ifdef CONFIG_NETWORK #include "network.h" #endif From 6b52a2e974ba3c3065d13a16cc2fa69f96745d0d Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 18:59:27 +0000 Subject: [PATCH 098/134] Change all occurrences of asm and __asm to __asm__, same as was done for FFmpeg. Neither variant is valid C99 syntax, but __asm__ is the most portable variant. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27788 b3059339-0415-0410-9bf9-f77b7e298cf2 --- TOOLS/fastmemcpybench.c | 2 +- configure | 6 +- cpudetect.c | 14 ++--- cpuinfo.c | 6 +- drivers/radeon_vid.c | 4 +- liba52/downmix.c | 56 ++++++++--------- liba52/imdct.c | 20 +++--- liba52/imdct_3dnow.h | 4 +- liba52/liba52_changes.diff | 122 ++++++++++++++++++------------------- liba52/resample_mmx.c | 22 +++---- liba52/test.c | 2 +- libmpcodecs/dec_video.c | 4 +- libmpcodecs/pullup.c | 6 +- libmpcodecs/vf_decimate.c | 2 +- libmpcodecs/vf_divtc.c | 2 +- libmpcodecs/vf_eq.c | 4 +- libmpcodecs/vf_eq2.c | 4 +- libmpcodecs/vf_filmdint.c | 22 +++---- libmpcodecs/vf_fspp.c | 16 ++--- libmpcodecs/vf_halfpack.c | 4 +- libmpcodecs/vf_ilpack.c | 6 +- libmpcodecs/vf_ivtc.c | 4 +- libmpcodecs/vf_noise.c | 10 +-- libmpcodecs/vf_pp7.c | 6 +- libmpcodecs/vf_sab.c | 2 +- libmpcodecs/vf_scale.c | 2 +- libmpcodecs/vf_spp.c | 10 +-- libmpcodecs/vf_tfields.c | 16 ++--- libmpcodecs/vf_unsharp.c | 4 +- libmpcodecs/vf_uspp.c | 4 +- libmpcodecs/vf_yadif.c | 6 +- libvo/aclib_template.c | 2 +- libvo/osd_template.c | 42 ++++++------- loader/win32.c | 2 +- loader/wine/winnt.h | 2 +- mp3lib/dct64_3dnow.c | 2 +- mp3lib/dct64_k7.c | 2 +- mp3lib/dct64_mmx.c | 2 +- mp3lib/dct64_sse.c | 20 +++--- mp3lib/decode_i586.c | 2 +- mp3lib/decode_mmx.c | 2 +- vidix/AsmMacros.h | 9 +-- vidix/sysdep/pci_os2.c | 2 +- 43 files changed, 238 insertions(+), 243 deletions(-) diff --git a/TOOLS/fastmemcpybench.c b/TOOLS/fastmemcpybench.c index 1e3cc14ce3..1ce5434bb8 100644 --- a/TOOLS/fastmemcpybench.c +++ b/TOOLS/fastmemcpybench.c @@ -86,7 +86,7 @@ static unsigned int GetTimer(){ static inline unsigned long long int read_tsc( void ) { unsigned long long int retval; - __asm __volatile ("rdtsc":"=A"(retval)::"memory"); + __asm__ __volatile ("rdtsc":"=A"(retval)::"memory"); return retval; } diff --git a/configure b/configure index 20d0e74657..818b4d8539 100755 --- a/configure +++ b/configure @@ -2124,8 +2124,8 @@ EOF cat > $TMPC << EOF int main(void) { unsigned long ver, mask; - asm ("implver %0" : "=r" (ver)); - asm ("amask %1, %0" : "=r" (mask) : "r" (-1)); + __asm__ ("implver %0" : "=r" (ver)); + __asm__ ("amask %1, %0" : "=r" (mask) : "r" (-1)); printf("%ld-%x\n", ver, ~mask); return 0; } @@ -2374,7 +2374,7 @@ echocheck ".align is a power of two" if test "$_asmalign_pot" = auto ; then _asmalign_pot=no cat > $TMPC << EOF -int main(void) { asm (".align 3"); return 0; } +int main(void) { __asm__ (".align 3"); return 0; } EOF cc_check && _asmalign_pot=yes fi diff --git a/cpudetect.c b/cpudetect.c index 6d18212662..488061cd85 100644 --- a/cpudetect.c +++ b/cpudetect.c @@ -85,14 +85,14 @@ static void do_cpuid(unsigned int ax, unsigned int *p) { #if 0 - __asm __volatile( + __asm__ __volatile( "cpuid;" : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) : "0" (ax) ); #else // code from libavcodec: - __asm __volatile + __asm__ __volatile__ ("mov %%"REG_b", %%"REG_S"\n\t" "cpuid\n\t" "xchg %%"REG_b", %%"REG_S @@ -400,7 +400,7 @@ static void check_os_katmai_support( void ) if ( gCpuCaps.hasSSE ) { mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " ); exc_fil = SetUnhandledExceptionFilter(win32_sig_handler_sse); - __asm __volatile ("xorps %xmm0, %xmm0"); + __asm__ __volatile ("xorps %xmm0, %xmm0"); SetUnhandledExceptionFilter(exc_fil); mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" ); } @@ -409,7 +409,7 @@ static void check_os_katmai_support( void ) if ( gCpuCaps.hasSSE ) { mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " ); DosSetExceptionHandler( &RegRec ); - __asm __volatile ("xorps %xmm0, %xmm0"); + __asm__ __volatile ("xorps %xmm0, %xmm0"); DosUnsetExceptionHandler( &RegRec ); mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" ); } @@ -432,8 +432,8 @@ static void check_os_katmai_support( void ) if ( gCpuCaps.hasSSE ) { mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " ); -// __asm __volatile ("xorps %%xmm0, %%xmm0"); - __asm __volatile ("xorps %xmm0, %xmm0"); +// __asm__ __volatile ("xorps %%xmm0, %%xmm0"); + __asm__ __volatile ("xorps %xmm0, %xmm0"); mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" ); } @@ -532,7 +532,7 @@ void GetCpuCaps( CpuCaps *caps) } else { canjump = 1; - asm volatile ("mtspr 256, %0\n\t" + __asm__ volatile ("mtspr 256, %0\n\t" "vand %%v0, %%v0, %%v0" : : "r" (-1)); diff --git a/cpuinfo.c b/cpuinfo.c index ac02ffa510..e6526ea62c 100644 --- a/cpuinfo.c +++ b/cpuinfo.c @@ -49,9 +49,9 @@ cpuid(int func) { cpuid_regs_t regs; #define CPUID ".byte 0x0f, 0xa2; " #ifdef __x86_64__ - asm("mov %%rbx, %%rsi\n\t" + __asm__("mov %%rbx, %%rsi\n\t" #else - asm("mov %%ebx, %%esi\n\t" + __asm__("mov %%ebx, %%esi\n\t" #endif CPUID"\n\t" #ifdef __x86_64__ @@ -70,7 +70,7 @@ rdtsc(void) { uint64_t i; #define RDTSC ".byte 0x0f, 0x31; " - asm volatile (RDTSC : "=A"(i) : ); + __asm__ volatile (RDTSC : "=A"(i) : ); return i; } diff --git a/drivers/radeon_vid.c b/drivers/radeon_vid.c index 5a6bafd7dc..f07b7bbeb6 100644 --- a/drivers/radeon_vid.c +++ b/drivers/radeon_vid.c @@ -129,7 +129,7 @@ static int swap_fourcc __initdata = 0; static inline double FastSin(double x) { register double res; - __asm __volatile("fsin":"=t"(res):"0"(x)); + __asm__ __volatile("fsin":"=t"(res):"0"(x)); return res; } #undef sin @@ -138,7 +138,7 @@ static inline double FastSin(double x) static inline double FastCos(double x) { register double res; - __asm __volatile("fcos":"=t"(res):"0"(x)); + __asm__ __volatile("fcos":"=t"(res):"0"(x)); return res; } #undef cos diff --git a/liba52/downmix.c b/liba52/downmix.c index 13220db719..ffb149b760 100644 --- a/liba52/downmix.c +++ b/liba52/downmix.c @@ -689,7 +689,7 @@ void upmix_C (sample_t * samples, int acmod, int output) #if defined(ARCH_X86) || defined(ARCH_X86_64) static void mix2to1_SSE (sample_t * dest, sample_t * src, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %2, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -712,7 +712,7 @@ static void mix2to1_SSE (sample_t * dest, sample_t * src, sample_t bias) static void mix3to1_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -733,7 +733,7 @@ static void mix3to1_SSE (sample_t * samples, sample_t bias) static void mix4to1_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -755,7 +755,7 @@ static void mix4to1_SSE (sample_t * samples, sample_t bias) static void mix5to1_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -778,7 +778,7 @@ static void mix5to1_SSE (sample_t * samples, sample_t bias) static void mix3to2_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -801,7 +801,7 @@ static void mix3to2_SSE (sample_t * samples, sample_t bias) static void mix21to2_SSE (sample_t * left, sample_t * right, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %2, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -824,7 +824,7 @@ static void mix21to2_SSE (sample_t * left, sample_t * right, sample_t bias) static void mix21toS_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -848,7 +848,7 @@ static void mix21toS_SSE (sample_t * samples, sample_t bias) static void mix31to2_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -872,7 +872,7 @@ static void mix31to2_SSE (sample_t * samples, sample_t bias) static void mix31toS_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -898,7 +898,7 @@ static void mix31toS_SSE (sample_t * samples, sample_t bias) static void mix22toS_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -923,7 +923,7 @@ static void mix22toS_SSE (sample_t * samples, sample_t bias) static void mix32to2_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -947,7 +947,7 @@ static void mix32to2_SSE (sample_t * samples, sample_t bias) static void mix32toS_SSE (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %1, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -974,7 +974,7 @@ static void mix32toS_SSE (sample_t * samples, sample_t bias) static void move2to1_SSE (sample_t * src, sample_t * dest, sample_t bias) { - asm volatile( + __asm__ volatile( "movlps %2, %%xmm7 \n\t" "shufps $0x00, %%xmm7, %%xmm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -997,7 +997,7 @@ static void move2to1_SSE (sample_t * src, sample_t * dest, sample_t bias) static void zero_MMX(sample_t * samples) { - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "pxor %%mm0, %%mm0 \n\t" ASMALIGN(4) @@ -1223,7 +1223,7 @@ static void upmix_MMX (sample_t * samples, int acmod, int output) static void mix2to1_3dnow (sample_t * dest, sample_t * src, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %2, %%mm7 \n\t" "punpckldq %2, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1254,7 +1254,7 @@ static void mix2to1_3dnow (sample_t * dest, sample_t * src, sample_t bias) static void mix3to1_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1281,7 +1281,7 @@ static void mix3to1_3dnow (sample_t * samples, sample_t bias) static void mix4to1_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1310,7 +1310,7 @@ static void mix4to1_3dnow (sample_t * samples, sample_t bias) static void mix5to1_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1341,7 +1341,7 @@ static void mix5to1_3dnow (sample_t * samples, sample_t bias) static void mix3to2_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1372,7 +1372,7 @@ static void mix3to2_3dnow (sample_t * samples, sample_t bias) static void mix21to2_3dnow (sample_t * left, sample_t * right, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %2, %%mm7 \n\t" "punpckldq %2, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1403,7 +1403,7 @@ static void mix21to2_3dnow (sample_t * left, sample_t * right, sample_t bias) static void mix21toS_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1436,7 +1436,7 @@ static void mix21toS_3dnow (sample_t * samples, sample_t bias) static void mix31to2_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1469,7 +1469,7 @@ static void mix31to2_3dnow (sample_t * samples, sample_t bias) static void mix31toS_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1506,7 +1506,7 @@ static void mix31toS_3dnow (sample_t * samples, sample_t bias) static void mix22toS_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1541,7 +1541,7 @@ static void mix22toS_3dnow (sample_t * samples, sample_t bias) static void mix32to2_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %1, %%mm7 \n\t" "punpckldq %1, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1575,7 +1575,7 @@ static void mix32to2_3dnow (sample_t * samples, sample_t bias) /* todo: should be optimized better */ static void mix32toS_3dnow (sample_t * samples, sample_t bias) { - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" ASMALIGN(4) "1: \n\t" @@ -1614,7 +1614,7 @@ static void mix32toS_3dnow (sample_t * samples, sample_t bias) static void move2to1_3dnow (sample_t * src, sample_t * dest, sample_t bias) { - asm volatile( + __asm__ volatile( "movd %2, %%mm7 \n\t" "punpckldq %2, %%mm7 \n\t" "mov $-1024, %%"REG_S" \n\t" @@ -1782,7 +1782,7 @@ static void downmix_3dnow (sample_t * samples, int acmod, int output, sample_t b memcpy (samples + 1024, samples + 768, 256 * sizeof (sample_t)); break; } - __asm __volatile("femms":::"memory"); + __asm__ volatile("femms":::"memory"); } #endif // ARCH_X86 || ARCH_X86_64 diff --git a/liba52/imdct.c b/liba52/imdct.c index 49e695a066..325461c6fd 100644 --- a/liba52/imdct.c +++ b/liba52/imdct.c @@ -750,7 +750,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) /* Pre IFFT complex multiply plus IFFT cmplx conjugate */ /* Bit reversed shuffling */ - asm volatile( + __asm__ volatile( "xor %%"REG_S", %%"REG_S" \n\t" "lea "MANGLE(bit_reverse_512)", %%"REG_a"\n\t" "mov $1008, %%"REG_D" \n\t" @@ -810,7 +810,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) /* 1. iteration */ // Note w[0][0]={1,0} - asm volatile( + __asm__ volatile( "xorps %%xmm1, %%xmm1 \n\t" "xorps %%xmm2, %%xmm2 \n\t" "mov %0, %%"REG_S" \n\t" @@ -832,7 +832,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) /* 2. iteration */ // Note w[1]={{1,0}, {0,-1}} - asm volatile( + __asm__ volatile( "movaps "MANGLE(ps111_1)", %%xmm7\n\t" // 1,1,1,-1 "mov %0, %%"REG_S" \n\t" ASMALIGN(4) @@ -860,7 +860,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) Note sseW2+32={0,0,-sqrt(2),-sqrt(2)) Note sseW2+48={1,-1,sqrt(2),-sqrt(2)) */ - asm volatile( + __asm__ volatile( "movaps 48+"MANGLE(sseW2)", %%xmm6\n\t" "movaps 16+"MANGLE(sseW2)", %%xmm7\n\t" "xorps %%xmm5, %%xmm5 \n\t" @@ -905,7 +905,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) two_m_plus_one = two_m<<1; two_m_plus_one_shl3 = (two_m_plus_one<<3); buf_offset = buf+128; - asm volatile( + __asm__ volatile( "mov %0, %%"REG_S" \n\t" ASMALIGN(4) "1: \n\t" @@ -937,7 +937,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) } /* Post IFFT complex multiply plus IFFT complex conjugate*/ - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" ASMALIGN(4) "1: \n\t" @@ -960,7 +960,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) window_ptr = a52_imdct_window; /* Window and convert to real valued signal */ - asm volatile( + __asm__ volatile( "xor %%"REG_D", %%"REG_D" \n\t" // 0 "xor %%"REG_S", %%"REG_S" \n\t" // 0 "movss %3, %%xmm2 \n\t" // bias @@ -987,7 +987,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) delay_ptr+=128; // window_ptr+=128; - asm volatile( + __asm__ volatile( "mov $1024, %%"REG_D" \n\t" // 512 "xor %%"REG_S", %%"REG_S" \n\t" // 0 "movss %3, %%xmm2 \n\t" // bias @@ -1016,7 +1016,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) /* The trailing edge of the window goes into the delay line */ delay_ptr = delay; - asm volatile( + __asm__ volatile( "xor %%"REG_D", %%"REG_D" \n\t" // 0 "xor %%"REG_S", %%"REG_S" \n\t" // 0 ASMALIGN(4) @@ -1038,7 +1038,7 @@ imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias) delay_ptr+=128; // window_ptr-=128; - asm volatile( + __asm__ volatile( "mov $1024, %%"REG_D" \n\t" // 1024 "xor %%"REG_S", %%"REG_S" \n\t" // 0 ASMALIGN(4) diff --git a/liba52/imdct_3dnow.h b/liba52/imdct_3dnow.h index c53aeb08fd..4a54fde26e 100644 --- a/liba52/imdct_3dnow.h +++ b/liba52/imdct_3dnow.h @@ -431,7 +431,7 @@ imdct_do_512_3dnow */ FFT_128P_3DNOW (&buf[0]); -// asm volatile ("femms \n\t":::"memory"); +// __asm__ volatile ("femms \n\t":::"memory"); /* Post IFFT complex multiply plus IFFT complex conjugate*/ #if 1 @@ -489,7 +489,7 @@ imdct_do_512_3dnow /* Window and convert to real valued signal */ #if 1 - asm volatile ( + __asm__ volatile ( "movd (%0), %%mm3 \n\t" "punpckldq %%mm3, %%mm3 \n\t" :: "r" (&bias) diff --git a/liba52/liba52_changes.diff b/liba52/liba52_changes.diff index 542424ba83..e5008a77cc 100644 --- a/liba52/liba52_changes.diff +++ b/liba52/liba52_changes.diff @@ -1,6 +1,6 @@ --- include/a52.h 2006-06-12 15:04:57.000000000 +0200 +++ liba52/a52.h 2006-06-05 02:23:02.000000000 +0200 -@@ -59,4 +63,9 @@ +@@ -63,4 +63,9 @@ int a52_block (a52_state_t * state); void a52_free (a52_state_t * state); @@ -12,7 +12,7 @@ #endif /* A52_H */ --- liba52/a52_internal.h 2006-06-12 15:05:07.000000000 +0200 +++ liba52/a52_internal.h 2006-06-05 02:23:02.000000000 +0200 -@@ -103,18 +107,34 @@ +@@ -107,18 +107,34 @@ #define DELTA_BIT_NONE (2) #define DELTA_BIT_RESERVED (3) @@ -52,7 +52,7 @@ +void imdct_do_512 (sample_t * data, sample_t * delay, sample_t bias); --- liba52/bitstream.c 2006-06-12 15:05:07.000000000 +0200 +++ liba52/bitstream.c 2006-06-05 02:23:02.000000000 +0200 -@@ -31,6 +35,10 @@ +@@ -35,6 +35,10 @@ #define BUFFER_SIZE 4096 @@ -63,7 +63,7 @@ void a52_bitstream_set_ptr (a52_state_t * state, uint8_t * buf) { int align; -@@ -38,6 +46,9 @@ +@@ -42,6 +46,9 @@ align = (long)buf & 3; state->buffer_start = (uint32_t *) (buf - align); state->bits_left = 0; @@ -75,7 +75,7 @@ --- liba52/bitstream.h 2006-06-12 15:05:07.000000000 +0200 +++ liba52/bitstream.h 2006-06-05 02:23:02.000000000 +0200 -@@ -21,6 +25,42 @@ +@@ -25,6 +25,42 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ @@ -118,7 +118,7 @@ /* (stolen from the kernel) */ #ifdef WORDS_BIGENDIAN -@@ -28,7 +74,7 @@ +@@ -32,7 +74,7 @@ #else @@ -127,7 +127,7 @@ # define swab32(x) __i386_swab32(x) static inline const uint32_t __i386_swab32(uint32_t x) -@@ -39,19 +85,34 @@ +@@ -43,19 +85,34 @@ # else @@ -166,7 +166,7 @@ uint32_t result; if (num_bits < state->bits_left) { -@@ -61,10 +122,29 @@ +@@ -65,10 +122,29 @@ } return a52_bitstream_get_bh (state, num_bits); @@ -196,7 +196,7 @@ int32_t result; if (num_bits < state->bits_left) { -@@ -74,4 +154,5 @@ +@@ -78,4 +154,5 @@ } return a52_bitstream_get_bh_2 (state, num_bits); @@ -204,7 +204,7 @@ } --- liba52/downmix.c 2006-06-12 15:17:53.000000000 +0200 +++ liba52/downmix.c 2006-06-05 02:23:02.000000000 +0200 -@@ -19,18 +23,46 @@ +@@ -23,18 +23,46 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -251,7 +251,7 @@ int a52_downmix_init (int input, int flags, sample_t * level, sample_t clev, sample_t slev) { -@@ -447,7 +479,7 @@ +@@ -451,7 +479,7 @@ samples[i] = 0; } @@ -260,7 +260,7 @@ sample_t clev, sample_t slev) { switch (CONVERT (acmod, output & A52_CHANNEL_MASK)) { -@@ -559,7 +591,7 @@ +@@ -563,7 +591,7 @@ break; case CONVERT (A52_3F2R, A52_2F1R): @@ -269,7 +269,7 @@ move2to1 (samples + 768, samples + 512, bias); break; -@@ -583,12 +615,12 @@ +@@ -587,12 +615,12 @@ break; case CONVERT (A52_3F1R, A52_3F2R): @@ -284,7 +284,7 @@ { switch (CONVERT (acmod, output & A52_CHANNEL_MASK)) { -@@ -653,3 +685,1104 @@ +@@ -657,3 +685,1104 @@ goto mix_31to21; } } @@ -292,7 +292,7 @@ +#if defined(ARCH_X86) || defined(ARCH_X86_64) +static void mix2to1_SSE (sample_t * dest, sample_t * src, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %2, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -315,7 +315,7 @@ + +static void mix3to1_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -336,7 +336,7 @@ + +static void mix4to1_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -358,7 +358,7 @@ + +static void mix5to1_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -381,7 +381,7 @@ + +static void mix3to2_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -404,7 +404,7 @@ + +static void mix21to2_SSE (sample_t * left, sample_t * right, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %2, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -427,7 +427,7 @@ + +static void mix21toS_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -451,7 +451,7 @@ + +static void mix31to2_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -475,7 +475,7 @@ + +static void mix31toS_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -501,7 +501,7 @@ + +static void mix22toS_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -526,7 +526,7 @@ + +static void mix32to2_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -550,7 +550,7 @@ + +static void mix32toS_SSE (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %1, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -577,7 +577,7 @@ + +static void move2to1_SSE (sample_t * src, sample_t * dest, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movlps %2, %%xmm7 \n\t" + "shufps $0x00, %%xmm7, %%xmm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -600,7 +600,7 @@ + +static void zero_MMX(sample_t * samples) +{ -+ asm volatile( ++ __asm__ volatile( + "mov $-1024, %%"REG_S" \n\t" + "pxor %%mm0, %%mm0 \n\t" + ASMALIGN(4) @@ -826,7 +826,7 @@ + +static void mix2to1_3dnow (sample_t * dest, sample_t * src, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %2, %%mm7 \n\t" + "punpckldq %2, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -857,7 +857,7 @@ + +static void mix3to1_3dnow (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %1, %%mm7 \n\t" + "punpckldq %1, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -884,7 +884,7 @@ + +static void mix4to1_3dnow (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %1, %%mm7 \n\t" + "punpckldq %1, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -913,7 +913,7 @@ + +static void mix5to1_3dnow (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %1, %%mm7 \n\t" + "punpckldq %1, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -944,7 +944,7 @@ + +static void mix3to2_3dnow (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %1, %%mm7 \n\t" + "punpckldq %1, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -975,7 +975,7 @@ + +static void mix21to2_3dnow (sample_t * left, sample_t * right, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %2, %%mm7 \n\t" + "punpckldq %2, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -1006,7 +1006,7 @@ + +static void mix21toS_3dnow (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %1, %%mm7 \n\t" + "punpckldq %1, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -1039,7 +1039,7 @@ + +static void mix31to2_3dnow (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %1, %%mm7 \n\t" + "punpckldq %1, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -1072,7 +1072,7 @@ + +static void mix31toS_3dnow (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %1, %%mm7 \n\t" + "punpckldq %1, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -1109,7 +1109,7 @@ + +static void mix22toS_3dnow (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %1, %%mm7 \n\t" + "punpckldq %1, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -1144,7 +1144,7 @@ + +static void mix32to2_3dnow (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %1, %%mm7 \n\t" + "punpckldq %1, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -1178,7 +1178,7 @@ +/* todo: should be optimized better */ +static void mix32toS_3dnow (sample_t * samples, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "mov $-1024, %%"REG_S" \n\t" + ASMALIGN(4) + "1: \n\t" @@ -1217,7 +1217,7 @@ + +static void move2to1_3dnow (sample_t * src, sample_t * dest, sample_t bias) +{ -+ asm volatile( ++ __asm__ volatile( + "movd %2, %%mm7 \n\t" + "punpckldq %2, %%mm7 \n\t" + "mov $-1024, %%"REG_S" \n\t" @@ -1385,13 +1385,13 @@ + memcpy (samples + 1024, samples + 768, 256 * sizeof (sample_t)); + break; + } -+ __asm __volatile("femms":::"memory"); ++ __asm__ volatile("femms":::"memory"); +} + +#endif // ARCH_X86 || ARCH_X86_64 --- liba52/imdct.c 2008-02-19 00:18:33.000000000 +0100 +++ liba52/imdct.c 2008-02-19 00:16:40.000000000 +0100 -@@ -22,6 +26,11 @@ +@@ -26,6 +26,11 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA @@ -1403,7 +1403,7 @@ */ #include "config.h" -@@ -39,12 +48,49 @@ +@@ -43,12 +48,49 @@ #include "a52.h" #include "a52_internal.h" #include "mm_accel.h" @@ -1453,7 +1453,7 @@ static uint8_t fftorder[] = { 0,128, 64,192, 32,160,224, 96, 16,144, 80,208,240,112, 48,176, 8,136, 72,200, 40,168,232,104,248,120, 56,184, 24,152,216, 88, -@@ -56,6 +102,40 @@ +@@ -60,6 +102,40 @@ 6,134, 70,198, 38,166,230,102,246,118, 54,182, 22,150,214, 86 }; @@ -1494,7 +1494,7 @@ /* Root values for IFFT */ static sample_t roots16[3]; static sample_t roots32[7]; -@@ -241,7 +321,7 @@ +@@ -245,7 +321,7 @@ ifft_pass (buf, roots128 - 32, 32); } @@ -1503,7 +1503,7 @@ { int i, k; sample_t t_r, t_i, a_r, a_i, b_r, b_i, w_1, w_2; -@@ -285,6 +365,701 @@ +@@ -289,6 +365,701 @@ } } @@ -1892,7 +1892,7 @@ + + /* Pre IFFT complex multiply plus IFFT cmplx conjugate */ + /* Bit reversed shuffling */ -+ asm volatile( ++ __asm__ volatile( + "xor %%"REG_S", %%"REG_S" \n\t" + "lea "MANGLE(bit_reverse_512)", %%"REG_a"\n\t" + "mov $1008, %%"REG_D" \n\t" @@ -1952,7 +1952,7 @@ + + /* 1. iteration */ + // Note w[0][0]={1,0} -+ asm volatile( ++ __asm__ volatile( + "xorps %%xmm1, %%xmm1 \n\t" + "xorps %%xmm2, %%xmm2 \n\t" + "mov %0, %%"REG_S" \n\t" @@ -1974,7 +1974,7 @@ + + /* 2. iteration */ + // Note w[1]={{1,0}, {0,-1}} -+ asm volatile( ++ __asm__ volatile( + "movaps "MANGLE(ps111_1)", %%xmm7\n\t" // 1,1,1,-1 + "mov %0, %%"REG_S" \n\t" + ASMALIGN(4) @@ -2002,7 +2002,7 @@ + Note sseW2+32={0,0,-sqrt(2),-sqrt(2)) + Note sseW2+48={1,-1,sqrt(2),-sqrt(2)) +*/ -+ asm volatile( ++ __asm__ volatile( + "movaps 48+"MANGLE(sseW2)", %%xmm6\n\t" + "movaps 16+"MANGLE(sseW2)", %%xmm7\n\t" + "xorps %%xmm5, %%xmm5 \n\t" @@ -2047,7 +2047,7 @@ + two_m_plus_one = two_m<<1; + two_m_plus_one_shl3 = (two_m_plus_one<<3); + buf_offset = buf+128; -+ asm volatile( ++ __asm__ volatile( + "mov %0, %%"REG_S" \n\t" + ASMALIGN(4) + "1: \n\t" @@ -2079,7 +2079,7 @@ + } + + /* Post IFFT complex multiply plus IFFT complex conjugate*/ -+ asm volatile( ++ __asm__ volatile( + "mov $-1024, %%"REG_S" \n\t" + ASMALIGN(4) + "1: \n\t" @@ -2102,7 +2102,7 @@ + window_ptr = a52_imdct_window; + + /* Window and convert to real valued signal */ -+ asm volatile( ++ __asm__ volatile( + "xor %%"REG_D", %%"REG_D" \n\t" // 0 + "xor %%"REG_S", %%"REG_S" \n\t" // 0 + "movss %3, %%xmm2 \n\t" // bias @@ -2129,7 +2129,7 @@ + delay_ptr+=128; +// window_ptr+=128; + -+ asm volatile( ++ __asm__ volatile( + "mov $1024, %%"REG_D" \n\t" // 512 + "xor %%"REG_S", %%"REG_S" \n\t" // 0 + "movss %3, %%xmm2 \n\t" // bias @@ -2158,7 +2158,7 @@ + /* The trailing edge of the window goes into the delay line */ + delay_ptr = delay; + -+ asm volatile( ++ __asm__ volatile( + "xor %%"REG_D", %%"REG_D" \n\t" // 0 + "xor %%"REG_S", %%"REG_S" \n\t" // 0 + ASMALIGN(4) @@ -2180,7 +2180,7 @@ + delay_ptr+=128; +// window_ptr-=128; + -+ asm volatile( ++ __asm__ volatile( + "mov $1024, %%"REG_D" \n\t" // 1024 + "xor %%"REG_S", %%"REG_S" \n\t" // 0 + ASMALIGN(4) @@ -2205,7 +2205,7 @@ void a52_imdct_256(sample_t * data, sample_t * delay, sample_t bias) { int i, k; -@@ -364,7 +1145,7 @@ +@@ -368,7 +1145,7 @@ void a52_imdct_init (uint32_t mm_accel) { @@ -2214,7 +2214,7 @@ double sum; /* compute imdct window - kaiser-bessel derived window, alpha = 5.0 */ -@@ -416,6 +1197,99 @@ +@@ -420,6 +1197,99 @@ post2[i].real = cos ((M_PI / 128) * (i + 0.5)); post2[i].imag = sin ((M_PI / 128) * (i + 0.5)); } @@ -2314,7 +2314,7 @@ #ifdef LIBA52_DJBFFT if (mm_accel & MM_ACCEL_DJBFFT) { -@@ -426,7 +1300,5 @@ +@@ -430,7 +1300,5 @@ #endif { fprintf (stderr, "No accelerated IMDCT transform found\n"); @@ -2324,7 +2324,7 @@ } --- include/mm_accel.h 2006-06-12 15:05:00.000000000 +0200 +++ liba52/mm_accel.h 2006-06-05 02:23:04.000000000 +0200 -@@ -30,7 +34,12 @@ +@@ -34,7 +34,12 @@ /* x86 accelerations */ #define MM_ACCEL_X86_MMX 0x80000000 #define MM_ACCEL_X86_3DNOW 0x40000000 diff --git a/liba52/resample_mmx.c b/liba52/resample_mmx.c index a08a7a8b0c..9a37fd4ad3 100644 --- a/liba52/resample_mmx.c +++ b/liba52/resample_mmx.c @@ -38,7 +38,7 @@ static uint64_t attribute_used __attribute__((aligned(8))) wm1100= 0xFFFFFFFF000 static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){ int32_t * f = (int32_t *) _f; - asm volatile( + __asm__ volatile( "mov $-512, %%"REG_S" \n\t" "movq "MANGLE(magicF2W)", %%mm7 \n\t" "movq "MANGLE(wm1100)", %%mm3 \n\t" @@ -77,7 +77,7 @@ static int a52_resample_STEREO_to_2_MMX(float * _f, int16_t * s16){ int32_t * f = (int32_t *) _f; /* benchmark scores are 0.3% better with SSE but we would need to set bias=0 and premultiply it #ifdef HAVE_SSE - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "1: \n\t" "cvtps2pi (%1, %%"REG_S"), %%mm0\n\t" @@ -93,7 +93,7 @@ static int a52_resample_STEREO_to_2_MMX(float * _f, int16_t * s16){ :: "r" (s16+512), "r" (f+256) :"%"REG_S, "memory" );*/ - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "movq "MANGLE(magicF2W)", %%mm7 \n\t" "1: \n\t" @@ -123,7 +123,7 @@ static int a52_resample_STEREO_to_2_MMX(float * _f, int16_t * s16){ static int a52_resample_3F_to_5_MMX(float * _f, int16_t * s16){ int32_t * f = (int32_t *) _f; - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "movq "MANGLE(magicF2W)", %%mm7 \n\t" "pxor %%mm6, %%mm6 \n\t" @@ -177,7 +177,7 @@ static int a52_resample_3F_to_5_MMX(float * _f, int16_t * s16){ static int a52_resample_2F_2R_to_4_MMX(float * _f, int16_t * s16){ int32_t * f = (int32_t *) _f; - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "movq "MANGLE(magicF2W)", %%mm7 \n\t" "1: \n\t" @@ -228,7 +228,7 @@ static int a52_resample_2F_2R_to_4_MMX(float * _f, int16_t * s16){ static int a52_resample_3F_2R_to_5_MMX(float * _f, int16_t * s16){ int32_t * f = (int32_t *) _f; - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "movq "MANGLE(magicF2W)", %%mm7 \n\t" "1: \n\t" @@ -287,7 +287,7 @@ static int a52_resample_3F_2R_to_5_MMX(float * _f, int16_t * s16){ static int a52_resample_MONO_LFE_to_6_MMX(float * _f, int16_t * s16){ int32_t * f = (int32_t *) _f; - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "movq "MANGLE(magicF2W)", %%mm7 \n\t" "pxor %%mm6, %%mm6 \n\t" @@ -327,7 +327,7 @@ static int a52_resample_MONO_LFE_to_6_MMX(float * _f, int16_t * s16){ static int a52_resample_STEREO_LFE_to_6_MMX(float * _f, int16_t * s16){ int32_t * f = (int32_t *) _f; - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "movq "MANGLE(magicF2W)", %%mm7 \n\t" "pxor %%mm6, %%mm6 \n\t" @@ -365,7 +365,7 @@ static int a52_resample_STEREO_LFE_to_6_MMX(float * _f, int16_t * s16){ static int a52_resample_3F_LFE_to_6_MMX(float * _f, int16_t * s16){ int32_t * f = (int32_t *) _f; - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "movq "MANGLE(magicF2W)", %%mm7 \n\t" "pxor %%mm6, %%mm6 \n\t" @@ -405,7 +405,7 @@ static int a52_resample_3F_LFE_to_6_MMX(float * _f, int16_t * s16){ static int a52_resample_2F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){ int32_t * f = (int32_t *) _f; - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "movq "MANGLE(magicF2W)", %%mm7 \n\t" // "pxor %%mm6, %%mm6 \n\t" @@ -451,7 +451,7 @@ static int a52_resample_2F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){ static int a52_resample_3F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){ int32_t * f = (int32_t *) _f; - asm volatile( + __asm__ volatile( "mov $-1024, %%"REG_S" \n\t" "movq "MANGLE(magicF2W)", %%mm7 \n\t" // "pxor %%mm6, %%mm6 \n\t" diff --git a/liba52/test.c b/liba52/test.c index 57f0596af5..f54ca5f836 100644 --- a/liba52/test.c +++ b/liba52/test.c @@ -46,7 +46,7 @@ void mp_msg( int x, const char *format, ... ) // stub for cpudetect.c static inline long long rdtsc() { long long l; - asm volatile( "rdtsc\n\t" + __asm__ volatile("rdtsc\n\t" : "=A" (l) ); // printf("%d\n", int(l/1000)); diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 0a76fc06bb..3c31a01a7b 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -374,10 +374,10 @@ void *decode_video(sh_video_t *sh_video, unsigned char *start, int in_size, // some codecs are broken, and doesn't restore MMX state :( // it happens usually with broken/damaged files. if (gCpuCaps.has3DNow) { - __asm __volatile ("femms\n\t":::"memory"); + __asm__ __volatile ("femms\n\t":::"memory"); } else if (gCpuCaps.hasMMX) { - __asm __volatile ("emms\n\t":::"memory"); + __asm__ __volatile ("emms\n\t":::"memory"); } #endif diff --git a/libmpcodecs/pullup.c b/libmpcodecs/pullup.c index b5229052a4..f71bf790ce 100644 --- a/libmpcodecs/pullup.c +++ b/libmpcodecs/pullup.c @@ -14,7 +14,7 @@ static int diff_y_mmx(unsigned char *a, unsigned char *b, int s) { int ret; - asm volatile ( + __asm__ volatile ( "movl $4, %%ecx \n\t" "pxor %%mm4, %%mm4 \n\t" "pxor %%mm7, %%mm7 \n\t" @@ -61,7 +61,7 @@ static int diff_y_mmx(unsigned char *a, unsigned char *b, int s) static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s) { int ret; - asm volatile ( + __asm__ volatile ( "movl $4, %%ecx \n\t" "pxor %%mm6, %%mm6 \n\t" "pxor %%mm7, %%mm7 \n\t" @@ -150,7 +150,7 @@ static int licomb_y_mmx(unsigned char *a, unsigned char *b, int s) static int var_y_mmx(unsigned char *a, unsigned char *b, int s) { int ret; - asm volatile ( + __asm__ volatile ( "movl $3, %%ecx \n\t" "pxor %%mm4, %%mm4 \n\t" "pxor %%mm7, %%mm7 \n\t" diff --git a/libmpcodecs/vf_decimate.c b/libmpcodecs/vf_decimate.c index fd591bdca3..72d7e8ad19 100644 --- a/libmpcodecs/vf_decimate.c +++ b/libmpcodecs/vf_decimate.c @@ -23,7 +23,7 @@ struct vf_priv_s { static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns) { volatile short out[4]; - asm ( + __asm__ ( "movl $8, %%ecx \n\t" "pxor %%mm4, %%mm4 \n\t" "pxor %%mm7, %%mm7 \n\t" diff --git a/libmpcodecs/vf_divtc.c b/libmpcodecs/vf_divtc.c index 6c97463f4b..d06169cac0 100644 --- a/libmpcodecs/vf_divtc.c +++ b/libmpcodecs/vf_divtc.c @@ -37,7 +37,7 @@ struct vf_priv_s static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns) { volatile short out[4]; - asm ( + __asm__ ( "movl $8, %%ecx \n\t" "pxor %%mm4, %%mm4 \n\t" "pxor %%mm7, %%mm7 \n\t" diff --git a/libmpcodecs/vf_eq.c b/libmpcodecs/vf_eq.c index 0c910b0556..97d4270af6 100644 --- a/libmpcodecs/vf_eq.c +++ b/libmpcodecs/vf_eq.c @@ -44,7 +44,7 @@ static void process_MMX(unsigned char *dest, int dstride, unsigned char *src, in contvec[0] = contvec[1] = contvec[2] = contvec[3] = contrast; while (h--) { - asm volatile ( + __asm__ volatile ( "movq (%5), %%mm3 \n\t" "movq (%6), %%mm4 \n\t" "pxor %%mm0, %%mm0 \n\t" @@ -82,7 +82,7 @@ static void process_MMX(unsigned char *dest, int dstride, unsigned char *src, in src += sstep; dest += dstep; } - asm volatile ( "emms \n\t" ::: "memory" ); + __asm__ volatile ( "emms \n\t" ::: "memory" ); } #endif diff --git a/libmpcodecs/vf_eq2.c b/libmpcodecs/vf_eq2.c index dbe751fbca..b3a501719f 100644 --- a/libmpcodecs/vf_eq2.c +++ b/libmpcodecs/vf_eq2.c @@ -130,7 +130,7 @@ void affine_1d_MMX (eq2_param_t *par, unsigned char *dst, unsigned char *src, dstep = dstride - w; while (h-- > 0) { - asm volatile ( + __asm__ volatile ( "movq (%5), %%mm3 \n\t" "movq (%6), %%mm4 \n\t" "pxor %%mm0, %%mm0 \n\t" @@ -170,7 +170,7 @@ void affine_1d_MMX (eq2_param_t *par, unsigned char *dst, unsigned char *src, dst += dstep; } - asm volatile ( "emms \n\t" ::: "memory" ); + __asm__ volatile ( "emms \n\t" ::: "memory" ); } #endif diff --git a/libmpcodecs/vf_filmdint.c b/libmpcodecs/vf_filmdint.c index 2fea3897b1..2658153c27 100644 --- a/libmpcodecs/vf_filmdint.c +++ b/libmpcodecs/vf_filmdint.c @@ -368,13 +368,13 @@ block_metrics_faster_c(unsigned char *a, unsigned char *b, int as, int bs, #define MEQ(X,Y) ((X).even == (Y).even && (X).odd == (Y).odd && (X).temp == (Y).temp && (X).noise == (Y).noise) #define BLOCK_METRICS_TEMPLATE() \ - asm volatile("pxor %mm7, %mm7\n\t" /* The result is colleted in mm7 */ \ + __asm__ volatile("pxor %mm7, %mm7\n\t" /* The result is colleted in mm7 */ \ "pxor %mm6, %mm6\n\t" /* Temp to stay at 0 */ \ ); \ a -= as; \ b -= bs; \ do { \ - asm volatile( \ + __asm__ volatile( \ "movq (%0,%2), %%mm0\n\t" \ "movq (%1,%3), %%mm1\n\t" /* mm1 = even */ \ PSADBW(%%mm1, %%mm0, %%mm4, %%mm6) \ @@ -439,7 +439,7 @@ block_metrics_3dnow(unsigned char *a, unsigned char *b, int as, int bs, static const unsigned long long ones = 0x0101010101010101ull; BLOCK_METRICS_TEMPLATE(); - asm volatile("movq %%mm7, %0\n\temms" : "=m" (tm)); + __asm__ volatile("movq %%mm7, %0\n\temms" : "=m" (tm)); get_block_stats(&tm, p, s); #endif return tm; @@ -471,7 +471,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs, #ifdef DEBUG struct frame_stats ts = *s; #endif - asm volatile("prefetcht0 (%0,%2)\n\t" + __asm__ volatile("prefetcht0 (%0,%2)\n\t" "prefetcht0 (%1,%3)\n\t" : : "r" (a), "r" (b), "r" (prefetch_line * as), "r" (prefetch_line * bs)); @@ -479,7 +479,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs, BLOCK_METRICS_TEMPLATE(); s->num_blocks++; - asm volatile( + __asm__ volatile( "movq %3, %%mm0\n\t" "movq %%mm7, %%mm1\n\t" "psubusw %%mm0, %%mm1\n\t" @@ -525,7 +525,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs, s->interlaced_high += interlaced >> 16; s->interlaced_low += interlaced; } else { - asm volatile( + __asm__ volatile( "pcmpeqw %%mm0, %%mm0\n\t" /* -1 */ "psubw %%mm0, %%mm4\n\t" "psubw %%mm0, %%mm5\n\t" @@ -539,7 +539,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs, : "=m" (s->tiny), "=m" (s->low), "=m" (s->high) ); - asm volatile( + __asm__ volatile( "pshufw $0, %2, %%mm0\n\t" "psubusw %%mm7, %%mm0\n\t" "pcmpeqw %%mm6, %%mm0\n\t" /* 0 if below sad_thres */ @@ -556,7 +556,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs, ); } - asm volatile( + __asm__ volatile( "movq %%mm7, (%1)\n\t" PMAXUW((%0), %%mm7) "movq %%mm7, (%0)\n\t" @@ -597,7 +597,7 @@ dint_copy_line_mmx2(unsigned char *dst, unsigned char *a, long bos, #else unsigned long len = (w+7) >> 3; int ret; - asm volatile ( + __asm__ volatile ( "pxor %%mm6, %%mm6 \n\t" /* deinterlaced pixel counter */ "movd %0, %%mm7 \n\t" "punpcklbw %%mm7, %%mm7 \n\t" @@ -607,7 +607,7 @@ dint_copy_line_mmx2(unsigned char *dst, unsigned char *a, long bos, : "rm" (t) ); do { - asm volatile ( + __asm__ volatile ( "movq (%0), %%mm0\n\t" "movq (%0,%3,2), %%mm1\n\t" "movq %%mm0, (%2)\n\t" @@ -639,7 +639,7 @@ dint_copy_line_mmx2(unsigned char *dst, unsigned char *a, long bos, dst += 8; } while (--len); - asm volatile ("pxor %%mm7, %%mm7 \n\t" + __asm__ volatile ("pxor %%mm7, %%mm7 \n\t" "psadbw %%mm6, %%mm7 \n\t" "movd %%mm7, %0 \n\t" "emms \n\t" diff --git a/libmpcodecs/vf_fspp.c b/libmpcodecs/vf_fspp.c index a04d851de5..d865d7210c 100644 --- a/libmpcodecs/vf_fspp.c +++ b/libmpcodecs/vf_fspp.c @@ -187,7 +187,7 @@ static void store_slice_mmx(uint8_t *dst, int16_t *src, long dst_stride, long sr width = (width+7)&~7; dst_stride-=width; //src_stride=(src_stride-width)*2; - asm volatile( + __asm__ volatile( "mov %5, %%"REG_d" \n\t" "mov %6, %%"REG_S" \n\t" "mov %7, %%"REG_D" \n\t" @@ -255,7 +255,7 @@ static void store_slice2_mmx(uint8_t *dst, int16_t *src, long dst_stride, long s width = (width+7)&~7; dst_stride-=width; //src_stride=(src_stride-width)*2; - asm volatile( + __asm__ volatile( "mov %5, %%"REG_d" \n\t" "mov %6, %%"REG_S" \n\t" "mov %7, %%"REG_D" \n\t" @@ -318,7 +318,7 @@ static void store_slice2_mmx(uint8_t *dst, int16_t *src, long dst_stride, long s static void mul_thrmat_mmx(struct vf_priv_s *p, int q) { uint64_t *adr=&p->threshold_mtx_noq[0]; - asm volatile( + __asm__ volatile( "movd %0, %%mm7 \n\t" "add $8*8*2, %%"REG_D" \n\t" "movq 0*8(%%"REG_S"), %%mm0 \n\t" @@ -558,10 +558,10 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts) } #ifdef HAVE_MMX - if(gCpuCaps.hasMMX) asm volatile ("emms\n\t"); + if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t"); #endif #ifdef HAVE_MMX2 - if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t"); + if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t"); #endif return vf_next_put_image(vf,dmpi, pts); } @@ -868,7 +868,7 @@ static void column_fidct_c(int16_t* thr_adr, DCTELEM *data, DCTELEM *output, int static void column_fidct_mmx(int16_t* thr_adr, DCTELEM *data, DCTELEM *output, int cnt) { uint64_t __attribute__((aligned(8))) temps[4]; - asm volatile( + __asm__ volatile( ASMALIGN(4) "1: \n\t" "movq "DCTSIZE_S"*0*2(%%"REG_S"), %%mm1 \n\t" @@ -1669,7 +1669,7 @@ static void row_idct_mmx (DCTELEM* workspace, int16_t* output_adr, int output_stride, int cnt) { uint64_t __attribute__((aligned(8))) temps[4]; - asm volatile( + __asm__ volatile( "lea (%%"REG_a",%%"REG_a",2), %%"REG_d" \n\t" "1: \n\t" "movq "DCTSIZE_S"*0*2(%%"REG_S"), %%mm0 \n\t" @@ -1935,7 +1935,7 @@ static void row_fdct_c(DCTELEM *data, const uint8_t *pixels, int line_size, int static void row_fdct_mmx(DCTELEM *data, const uint8_t *pixels, int line_size, int cnt) { uint64_t __attribute__((aligned(8))) temps[4]; - asm volatile( + __asm__ volatile( "lea (%%"REG_a",%%"REG_a",2), %%"REG_d" \n\t" "6: \n\t" "movd (%%"REG_S"), %%mm0 \n\t" diff --git a/libmpcodecs/vf_halfpack.c b/libmpcodecs/vf_halfpack.c index cb8cc28fc4..344de2f0fb 100644 --- a/libmpcodecs/vf_halfpack.c +++ b/libmpcodecs/vf_halfpack.c @@ -37,7 +37,7 @@ static void halfpack_MMX(unsigned char *dst, unsigned char *src[3], vinc = srcstride[2] - w/2; for (h/=2; h; h--) { - asm ( + __asm__ ( "pxor %%mm0, %%mm0 \n\t" ASMALIGN(4) "1: \n\t" @@ -99,7 +99,7 @@ static void halfpack_MMX(unsigned char *dst, unsigned char *src[3], v += vinc; dst += dstinc; } - asm volatile ( "emms \n\t" ::: "memory" ); + __asm__ volatile ( "emms \n\t" ::: "memory" ); } #endif diff --git a/libmpcodecs/vf_ilpack.c b/libmpcodecs/vf_ilpack.c index 67e14dd0cf..8b5fe1ceb4 100644 --- a/libmpcodecs/vf_ilpack.c +++ b/libmpcodecs/vf_ilpack.c @@ -61,7 +61,7 @@ static void pack_li_1_C(unsigned char *dst, unsigned char *y, static void pack_nn_MMX(unsigned char *dst, unsigned char *y, unsigned char *u, unsigned char *v, int w) { - asm volatile ("" + __asm__ volatile ("" ASMALIGN(4) "1: \n\t" "movq (%0), %%mm1 \n\t" @@ -91,7 +91,7 @@ static void pack_nn_MMX(unsigned char *dst, unsigned char *y, static void pack_li_0_MMX(unsigned char *dst, unsigned char *y, unsigned char *u, unsigned char *v, int w, int us, int vs) { - asm volatile ("" + __asm__ volatile ("" "push %%"REG_BP" \n\t" #ifdef ARCH_X86_64 "mov %6, %%"REG_BP" \n\t" @@ -199,7 +199,7 @@ static void pack_li_0_MMX(unsigned char *dst, unsigned char *y, static void pack_li_1_MMX(unsigned char *dst, unsigned char *y, unsigned char *u, unsigned char *v, int w, int us, int vs) { - asm volatile ("" + __asm__ volatile ("" "push %%"REG_BP" \n\t" #ifdef ARCH_X86_64 "mov %6, %%"REG_BP" \n\t" diff --git a/libmpcodecs/vf_ivtc.c b/libmpcodecs/vf_ivtc.c index b6db4c18a8..5d9859068f 100644 --- a/libmpcodecs/vf_ivtc.c +++ b/libmpcodecs/vf_ivtc.c @@ -46,7 +46,7 @@ static void block_diffs_MMX(struct metrics *m, unsigned char *old, unsigned char int i; short out[24]; // output buffer for the partial metrics from the mmx code - asm ( + __asm__ ( "movl $4, %%ecx \n\t" "pxor %%mm4, %%mm4 \n\t" // 4 even difference sums "pxor %%mm5, %%mm5 \n\t" // 4 odd difference sums @@ -105,7 +105,7 @@ static void block_diffs_MMX(struct metrics *m, unsigned char *old, unsigned char m->o = out[4]+out[5]+out[6]+out[7]; m->d = m->e + m->o; - asm ( + __asm__ ( // First loop to measure first four columns "movl $4, %%ecx \n\t" "pxor %%mm4, %%mm4 \n\t" // Past spacial noise diff --git a/libmpcodecs/vf_noise.c b/libmpcodecs/vf_noise.c index 2ffaa76f52..88c577a32e 100644 --- a/libmpcodecs/vf_noise.c +++ b/libmpcodecs/vf_noise.c @@ -150,7 +150,7 @@ static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int long mmx_len= len&(~7); noise+=shift; - asm volatile( + __asm__ volatile( "mov %3, %%"REG_a" \n\t" "pcmpeqb %%mm7, %%mm7 \n\t" "psllw $15, %%mm7 \n\t" @@ -179,7 +179,7 @@ static inline void lineNoise_MMX2(uint8_t *dst, uint8_t *src, int8_t *noise, int long mmx_len= len&(~7); noise+=shift; - asm volatile( + __asm__ volatile( "mov %3, %%"REG_a" \n\t" "pcmpeqb %%mm7, %%mm7 \n\t" "psllw $15, %%mm7 \n\t" @@ -220,7 +220,7 @@ static inline void lineNoise_C(uint8_t *dst, uint8_t *src, int8_t *noise, int le static inline void lineNoiseAvg_MMX(uint8_t *dst, uint8_t *src, int len, int8_t **shift){ long mmx_len= len&(~7); - asm volatile( + __asm__ volatile( "mov %5, %%"REG_a" \n\t" ASMALIGN(4) "1: \n\t" @@ -357,10 +357,10 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ vf_clone_mpi_attributes(dmpi, mpi); #ifdef HAVE_MMX - if(gCpuCaps.hasMMX) asm volatile ("emms\n\t"); + if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t"); #endif #ifdef HAVE_MMX2 - if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t"); + if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t"); #endif return vf_next_put_image(vf,dmpi, pts); diff --git a/libmpcodecs/vf_pp7.c b/libmpcodecs/vf_pp7.c index 81ebbb4df8..2e3fe3d61e 100644 --- a/libmpcodecs/vf_pp7.c +++ b/libmpcodecs/vf_pp7.c @@ -157,7 +157,7 @@ static void dctB_c(DCTELEM *dst, DCTELEM *src){ #ifdef HAVE_MMX static void dctB_mmx(DCTELEM *dst, DCTELEM *src){ - asm volatile ( + __asm__ volatile ( "movq (%0), %%mm0 \n\t" "movq 1*4*2(%0), %%mm1 \n\t" "paddw 6*4*2(%0), %%mm0 \n\t" @@ -398,10 +398,10 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ } #ifdef HAVE_MMX - if(gCpuCaps.hasMMX) asm volatile ("emms\n\t"); + if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t"); #endif #ifdef HAVE_MMX2 - if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t"); + if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t"); #endif return vf_next_put_image(vf,dmpi, pts); diff --git a/libmpcodecs/vf_sab.c b/libmpcodecs/vf_sab.c index 9d81f44e67..676b4bf4b0 100644 --- a/libmpcodecs/vf_sab.c +++ b/libmpcodecs/vf_sab.c @@ -140,7 +140,7 @@ static int config(struct vf_instance_s* vf, unsigned int flags, unsigned int outfmt){ int sw, sh; -//asm volatile("emms\n\t"); +//__asm__ volatile("emms\n\t"); allocStuff(&vf->priv->luma, width, height); getSubSampleFactors(&sw, &sh, outfmt); diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c index 2fdbb77c7c..6ed49901c3 100644 --- a/libmpcodecs/vf_scale.c +++ b/libmpcodecs/vf_scale.c @@ -558,7 +558,7 @@ void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, Sw #ifdef ARCH_X86 if(gCpuCaps.hasMMX) - asm volatile("emms\n\t"::: "memory"); //FIXME this shouldnt be required but it IS (even for non mmx versions) + __asm__ volatile("emms\n\t"::: "memory"); //FIXME this should not be required but it IS (even for non-MMX versions) #endif if(firstTime) { diff --git a/libmpcodecs/vf_spp.c b/libmpcodecs/vf_spp.c index 77abc19441..0f6867473a 100644 --- a/libmpcodecs/vf_spp.c +++ b/libmpcodecs/vf_spp.c @@ -153,7 +153,7 @@ static void hardthresh_mmx(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *pe threshold1= qp*((1<<4) - bias) - 1; - asm volatile( + __asm__ volatile( #define REQUANT_CORE(dst0, dst1, dst2, dst3, src0, src1, src2, src3) \ "movq " #src0 ", %%mm0 \n\t"\ "movq " #src1 ", %%mm1 \n\t"\ @@ -221,7 +221,7 @@ static void softthresh_mmx(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *pe threshold1= qp*((1<<4) - bias) - 1; - asm volatile( + __asm__ volatile( #undef REQUANT_CORE #define REQUANT_CORE(dst0, dst1, dst2, dst3, src0, src1, src2, src3) \ "movq " #src0 ", %%mm0 \n\t"\ @@ -334,7 +334,7 @@ static void store_slice_mmx(uint8_t *dst, int16_t *src, int dst_stride, int src_ for(y=0; y>2; d += ds; s += ss; for (i=h-3; i; i--) { - asm volatile( + __asm__ volatile( "pxor %%mm0, %%mm0 \n\t" "movq (%%"REG_d"), %%mm4 \n\t" "movq 8(%%"REG_d"), %%mm5 \n\t" @@ -245,7 +245,7 @@ static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int d[j] = (s[j+ssd] + 3*s[j])>>2; d += ds; s += ss; if (!up) fast_memcpy(d, s, w); - asm volatile("emms \n\t" : : : "memory"); + __asm__ volatile("emms \n\t" : : : "memory"); } #endif diff --git a/libmpcodecs/vf_unsharp.c b/libmpcodecs/vf_unsharp.c index aed1a2e98f..a2efd29b15 100644 --- a/libmpcodecs/vf_unsharp.c +++ b/libmpcodecs/vf_unsharp.c @@ -194,11 +194,11 @@ static int put_image( struct vf_instance_s* vf, mp_image_t *mpi, double pts) { #ifdef HAVE_MMX if(gCpuCaps.hasMMX) - asm volatile ("emms\n\t"); + __asm__ volatile ("emms\n\t"); #endif #ifdef HAVE_MMX2 if(gCpuCaps.hasMMX2) - asm volatile ("sfence\n\t"); + __asm__ volatile ("sfence\n\t"); #endif return vf_next_put_image( vf, dmpi, pts); diff --git a/libmpcodecs/vf_uspp.c b/libmpcodecs/vf_uspp.c index 3a05a37fbd..c1d100d5fa 100644 --- a/libmpcodecs/vf_uspp.c +++ b/libmpcodecs/vf_uspp.c @@ -292,10 +292,10 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ } #ifdef HAVE_MMX - if(gCpuCaps.hasMMX) asm volatile ("emms\n\t"); + if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t"); #endif #ifdef HAVE_MMX2 - if(gCpuCaps.hasMMX2) asm volatile ("sfence\n\t"); + if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t"); #endif return vf_next_put_image(vf,dmpi, pts); diff --git a/libmpcodecs/vf_yadif.c b/libmpcodecs/vf_yadif.c index 5b39738693..066d2873b9 100644 --- a/libmpcodecs/vf_yadif.c +++ b/libmpcodecs/vf_yadif.c @@ -142,7 +142,7 @@ static void filter_line_mmx2(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, u #define FILTER\ for(x=0; x=BLOCK_SIZE/64) - asm volatile( + __asm__ volatile( "xor %%"REG_a", %%"REG_a" \n\t" ASMALIGN(4) "1: \n\t" diff --git a/libvo/osd_template.c b/libvo/osd_template.c index 45a318b745..c44f060a5d 100644 --- a/libvo/osd_template.c +++ b/libvo/osd_template.c @@ -33,7 +33,7 @@ static inline void RENAME(vo_draw_alpha_yv12)(int w,int h, unsigned char* src, u w=w>>1; #endif #ifdef HAVE_MMX - asm volatile( + __asm__ volatile( "pcmpeqb %%mm5, %%mm5\n\t" // F..F "movq %%mm5, %%mm4\n\t" "movq %%mm5, %%mm7\n\t" @@ -44,13 +44,13 @@ static inline void RENAME(vo_draw_alpha_yv12)(int w,int h, unsigned char* src, u for(y=0;y>1; #endif #ifdef HAVE_MMX - asm volatile( + __asm__ volatile( "pxor %%mm7, %%mm7\n\t" "pcmpeqb %%mm5, %%mm5\n\t" // F..F "movq %%mm5, %%mm6\n\t" @@ -115,13 +115,13 @@ static inline void RENAME(vo_draw_alpha_yuy2)(int w,int h, unsigned char* src, u for(y=0;y # ifndef __USLC__ @@ -115,8 +110,8 @@ void outl(U16_t, U32_t); #else # include "../common/scoasm.h" #endif -#define intr_disable() asm("cli") -#define intr_enable() asm("sti") +#define intr_disable() __asm__("cli") +#define intr_enable() __asm__("sti") #endif /* _MINIX and _ACK */ #endif /* __GNUC__ */ diff --git a/vidix/sysdep/pci_os2.c b/vidix/sysdep/pci_os2.c index 002494f682..5e19463820 100644 --- a/vidix/sysdep/pci_os2.c +++ b/vidix/sysdep/pci_os2.c @@ -62,7 +62,7 @@ static __inline__ int enable_os_io(void) /* Calling callgate with function 13 sets IOPL for the program */ - asm volatile ("movl $13,%%ebx;.byte 0xff,0x1d;.long _callgate" + __asm__ volatile ("movl $13,%%ebx;.byte 0xff,0x1d;.long _callgate" : /*no outputs */ : /*no inputs */ : "eax","ebx","ecx","edx","cc"); From ece6db7e97751c09972f91486dc31465676a1ead Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 19:12:57 +0000 Subject: [PATCH 099/134] Add -nomsgcolor option to match -msgcolor, patch by swell.k gmail com. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27789 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cfg-common-opts.h | 1 + 1 file changed, 1 insertion(+) diff --git a/cfg-common-opts.h b/cfg-common-opts.h index c067b5b4fb..8319fd26e2 100644 --- a/cfg-common-opts.h +++ b/cfg-common-opts.h @@ -10,6 +10,7 @@ {"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOSAVE, 0, 0, NULL}, {"msglevel", msgl_config, CONF_TYPE_SUBCONFIG, CONF_GLOBAL, 0, 0, NULL}, {"msgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, + {"nomsgcolor", &mp_msg_color, CONF_TYPE_FLAG, CONF_GLOBAL, 1, 0, NULL}, {"msgmodule", &mp_msg_module, CONF_TYPE_FLAG, CONF_GLOBAL, 0, 1, NULL}, #ifdef CONFIG_ICONV {"msgcharset", &mp_msg_charset, CONF_TYPE_STRING, CONF_GLOBAL, 0, 0, NULL}, From 2195547220674940ef20e9ea38bb3610541d04b3 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 19:24:21 +0000 Subject: [PATCH 100/134] Revert declaring ThreadProc as void, it breaks the WINAPI. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27790 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/cache2.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/stream/cache2.c b/stream/cache2.c index dd2423d765..7decd32d01 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -20,9 +20,11 @@ #include "osdep/timer.h" #if defined(__MINGW32__) || defined(__CYGWIN__) #include +static DWORD WINAPI ThreadProc(void* s); #elif defined(__OS2__) #define INCL_DOS #include +static void ThreadProc( void *s ); #else #include #endif @@ -35,7 +37,6 @@ extern int use_gui; int stream_fill_buffer(stream_t *s); int stream_seek_long(stream_t *s,off_t pos); -static void ThreadProc(void *s); typedef struct { // constats: @@ -361,9 +362,12 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){ #if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) } - +#if defined(__MINGW32__) || defined(__CYGWIN__) +static DWORD WINAPI ThreadProc(void*s){ +#else // OS2 static void ThreadProc( void *s ){ #endif +#endif #ifdef CONFIG_GUI use_gui = 0; // mp_msg may not use gui stuff in forked code From 26b29f4f2d4284fb81647a00b81530f280881303 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 20:17:56 +0000 Subject: [PATCH 101/134] Replace all occurrences of '__volatile__' and '__volatile' by plain 'volatile'. We were using an inconsistent mix of the three variants and 'volatile' should be the most correct and portable variant. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27791 b3059339-0415-0410-9bf9-f77b7e298cf2 --- TOOLS/fastmemcpybench.c | 2 +- configure | 10 +++++----- cpudetect.c | 14 ++++++------- drivers/radeon_vid.c | 4 ++-- liba52/imdct_3dnow.h | 34 ++++++++++++++++---------------- liba52/srfftp_3dnow.h | 10 +++++----- libmpcodecs/dec_video.c | 4 ++-- libmpcodecs/native/mmx.h | 10 +++++----- libvo/aclib_template.c | 22 ++++++++++----------- loader/drv.c | 8 ++++---- loader/ldt_keeper.c | 6 +++--- loader/qtx/qtxload.c | 4 ++-- loader/win32.c | 26 ++++++++++++------------ loader/wine/windef.h | 2 +- mp3lib/dct36_3dnow.c | 2 +- mp3lib/dct64_3dnow.c | 2 +- mp3lib/dct64_k7.c | 2 +- mp3lib/dct64_mmx.c | 2 +- mp3lib/decode_i586.c | 2 +- mp3lib/decode_mmx.c | 2 +- vidix/nvidia_vid.c | 2 +- vidix/s3_regs.h | 2 +- vidix/sysdep/AsmMacros_powerpc.h | 2 +- vidix/sysdep/AsmMacros_sparc.h | 12 +++++------ vidix/sysdep/AsmMacros_x86.h | 16 +++++++-------- 25 files changed, 101 insertions(+), 101 deletions(-) diff --git a/TOOLS/fastmemcpybench.c b/TOOLS/fastmemcpybench.c index 1ce5434bb8..35f7914285 100644 --- a/TOOLS/fastmemcpybench.c +++ b/TOOLS/fastmemcpybench.c @@ -86,7 +86,7 @@ static unsigned int GetTimer(){ static inline unsigned long long int read_tsc( void ) { unsigned long long int retval; - __asm__ __volatile ("rdtsc":"=A"(retval)::"memory"); + __asm__ volatile ("rdtsc":"=A"(retval)::"memory"); return retval; } diff --git a/configure b/configure index 818b4d8539..8f2fe0796f 100755 --- a/configure +++ b/configure @@ -1595,7 +1595,7 @@ if x86 && test "$_runtime_cpudetection" = no ; then void catch() { exit(1); } int main(void) { signal(SIGILL, catch); - __asm__ __volatile__ ("$3":::"memory"); return 0; + __asm__ volatile ("$3":::"memory"); return 0; } EOF @@ -2443,7 +2443,7 @@ if arm ; then echocheck "ARMv5TE (Enhanced DSP Extensions)" if test $_armv5te = "auto" ; then cat > $TMPC << EOF -int main(void) { __asm__ __volatile__ ("qadd r0, r0, r0"); return 0; } +int main(void) { __asm__ volatile ("qadd r0, r0, r0"); return 0; } EOF _armv5te=no cc_check && _armv5te=yes @@ -2453,7 +2453,7 @@ EOF echocheck "ARMv6 (SIMD instructions)" if test $_armv6 = "auto" ; then cat > $TMPC << EOF -int main(void) { __asm__ __volatile__ ("sadd16 r0, r0, r0"); return 0; } +int main(void) { __asm__ volatile ("sadd16 r0, r0, r0"); return 0; } EOF _armv6=no cc_check && _armv6=yes @@ -2463,7 +2463,7 @@ EOF echocheck "ARM VFP" if test $_armvfp = "auto" ; then cat > $TMPC << EOF -int main(void) { __asm__ __volatile__ ("fadds s0, s0, s0"); return 0; } +int main(void) { __asm__ volatile ("fadds s0, s0, s0"); return 0; } EOF _armvfp=no cc_check && _armvfp=yes @@ -2473,7 +2473,7 @@ EOF echocheck "iWMMXt (Intel XScale SIMD instructions)" if test $_iwmmxt = "auto" ; then cat > $TMPC << EOF -int main(void) { __asm__ __volatile__ ("wunpckelub wr6, wr4"); return 0; } +int main(void) { __asm__ volatile ("wunpckelub wr6, wr4"); return 0; } EOF _iwmmxt=no cc_check && _iwmmxt=yes diff --git a/cpudetect.c b/cpudetect.c index 488061cd85..43f5cc2a7d 100644 --- a/cpudetect.c +++ b/cpudetect.c @@ -57,7 +57,7 @@ static int has_cpuid(void) long a, c; // code from libavcodec: - __asm__ __volatile__ ( + __asm__ volatile ( /* See if CPUID instruction is supported ... */ /* ... Get copies of EFLAGS into eax and ecx */ "pushf\n\t" @@ -85,14 +85,14 @@ static void do_cpuid(unsigned int ax, unsigned int *p) { #if 0 - __asm__ __volatile( + __asm__ volatile( "cpuid;" : "=a" (p[0]), "=b" (p[1]), "=c" (p[2]), "=d" (p[3]) : "0" (ax) ); #else // code from libavcodec: - __asm__ __volatile__ + __asm__ volatile ("mov %%"REG_b", %%"REG_S"\n\t" "cpuid\n\t" "xchg %%"REG_b", %%"REG_S @@ -400,7 +400,7 @@ static void check_os_katmai_support( void ) if ( gCpuCaps.hasSSE ) { mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " ); exc_fil = SetUnhandledExceptionFilter(win32_sig_handler_sse); - __asm__ __volatile ("xorps %xmm0, %xmm0"); + __asm__ volatile ("xorps %xmm0, %xmm0"); SetUnhandledExceptionFilter(exc_fil); mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" ); } @@ -409,7 +409,7 @@ static void check_os_katmai_support( void ) if ( gCpuCaps.hasSSE ) { mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " ); DosSetExceptionHandler( &RegRec ); - __asm__ __volatile ("xorps %xmm0, %xmm0"); + __asm__ volatile ("xorps %xmm0, %xmm0"); DosUnsetExceptionHandler( &RegRec ); mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" ); } @@ -432,8 +432,8 @@ static void check_os_katmai_support( void ) if ( gCpuCaps.hasSSE ) { mp_msg(MSGT_CPUDETECT,MSGL_V, "Testing OS support for SSE... " ); -// __asm__ __volatile ("xorps %%xmm0, %%xmm0"); - __asm__ __volatile ("xorps %xmm0, %xmm0"); +// __asm__ volatile ("xorps %%xmm0, %%xmm0"); + __asm__ volatile ("xorps %xmm0, %xmm0"); mp_msg(MSGT_CPUDETECT,MSGL_V, gCpuCaps.hasSSE ? "yes.\n" : "no!\n" ); } diff --git a/drivers/radeon_vid.c b/drivers/radeon_vid.c index f07b7bbeb6..5514f1cb6c 100644 --- a/drivers/radeon_vid.c +++ b/drivers/radeon_vid.c @@ -129,7 +129,7 @@ static int swap_fourcc __initdata = 0; static inline double FastSin(double x) { register double res; - __asm__ __volatile("fsin":"=t"(res):"0"(x)); + __asm__ volatile("fsin":"=t"(res):"0"(x)); return res; } #undef sin @@ -138,7 +138,7 @@ static inline double FastSin(double x) static inline double FastCos(double x) { register double res; - __asm__ __volatile("fcos":"=t"(res):"0"(x)); + __asm__ volatile("fcos":"=t"(res):"0"(x)); return res; } #undef cos diff --git a/liba52/imdct_3dnow.h b/liba52/imdct_3dnow.h index 4a54fde26e..2291158950 100644 --- a/liba52/imdct_3dnow.h +++ b/liba52/imdct_3dnow.h @@ -45,7 +45,7 @@ static void FFT_4_3DNOW(complex_t *x) /* delta_p = 1 here */ /* x[k] = sum_{i=0..3} x[i] * w^{i*k}, w=e^{-2*pi/4} */ - __asm__ __volatile__( + __asm__ volatile( "movq 24(%1), %%mm3\n\t" "movq 8(%1), %%mm1\n\t" "pxor %2, %%mm3\n\t" /* mm3.re | -mm3.im */ @@ -90,7 +90,7 @@ static void FFT_8_3DNOW(complex_t *x) */ complex_t wT1, wB1, wB2; - __asm__ __volatile__( + __asm__ volatile( "movq 8(%2), %%mm0\n\t" "movq 24(%2), %%mm1\n\t" "movq %%mm0, %0\n\t" /* wT1 = x[1]; */ @@ -99,7 +99,7 @@ static void FFT_8_3DNOW(complex_t *x) :"r"(x) :"memory"); - __asm__ __volatile__( + __asm__ volatile( "movq 16(%0), %%mm2\n\t" "movq 32(%0), %%mm3\n\t" "movq %%mm2, 8(%0)\n\t" /* x[1] = x[2]; */ @@ -114,7 +114,7 @@ static void FFT_8_3DNOW(complex_t *x) /* x[0] x[4] x[2] x[6] */ - __asm__ __volatile__( + __asm__ volatile( "movq 40(%1), %%mm0\n\t" "movq %%mm0, %%mm3\n\t" "movq 56(%1), %%mm1\n\t" @@ -153,7 +153,7 @@ static void FFT_8_3DNOW(complex_t *x) :"memory"); /* x[1] x[5] */ - __asm__ __volatile__ ( + __asm__ volatile ( "movq %6, %%mm6\n\t" "movq %5, %%mm7\n\t" "movq %1, %%mm0\n\t" @@ -203,7 +203,7 @@ static void FFT_8_3DNOW(complex_t *x) /* x[3] x[7] */ - __asm__ __volatile__( + __asm__ volatile( "movq %1, %%mm0\n\t" #ifdef HAVE_3DNOWEX "pswapd %3, %%mm1\n\t" @@ -358,13 +358,13 @@ imdct_do_512_3dnow /* Pre IFFT complex multiply plus IFFT cmplx conjugate & reordering*/ #if 1 - __asm__ __volatile__ ( + __asm__ volatile ( "movq %0, %%mm7\n\t" ::"m"(x_plus_minus_3dnow) :"memory"); for( i=0; i < 128; i++) { int j = pm128[i]; - __asm__ __volatile__ ( + __asm__ volatile ( "movd %1, %%mm0\n\t" "movd %3, %%mm1\n\t" "punpckldq %2, %%mm0\n\t" /* mm0 = data[256-2*j-1] | data[2*j]*/ @@ -394,7 +394,7 @@ imdct_do_512_3dnow buf[i].im = (data[256-2*j-1] * xsin1[j] + data[2*j] * xcos1[j])*(-1.0);*/ } #else - __asm__ __volatile__ ("femms":::"memory"); + __asm__ volatile ("femms":::"memory"); for( i=0; i < 128; i++) { /* z[i] = (X[256-2*i-1] + j * X[2*i]) * (xcos1[i] + j * xsin1[i]) ; */ int j= pm128[i]; @@ -435,14 +435,14 @@ imdct_do_512_3dnow /* Post IFFT complex multiply plus IFFT complex conjugate*/ #if 1 - __asm__ __volatile__ ( + __asm__ volatile ( "movq %0, %%mm7\n\t" "movq %1, %%mm6\n\t" ::"m"(x_plus_minus_3dnow), "m"(x_minus_plus_3dnow) :"eax","memory"); for (i=0; i < 128; i++) { - __asm__ __volatile__ ( + __asm__ volatile ( "movq %1, %%mm0\n\t" /* ac3_buf[i].re | ac3_buf[i].im */ "movq %%mm0, %%mm1\n\t" /* ac3_buf[i].re | ac3_buf[i].im */ #ifndef HAVE_3DNOWEX @@ -473,7 +473,7 @@ imdct_do_512_3dnow ac3_buf[i].im =(tmp_a_r * ac3_xsin1[i]) - (tmp_a_i * ac3_xcos1[i]);*/ } #else - __asm__ __volatile__ ("femms":::"memory"); + __asm__ volatile ("femms":::"memory"); for( i=0; i < 128; i++) { /* y[n] = z[n] * (xcos1[n] + j * xsin1[n]) ; */ tmp_a_r = buf[i].real; @@ -496,7 +496,7 @@ imdct_do_512_3dnow ); for (i=0; i< 64; i++) { /* merge two loops in one to enable working of 2 decoders */ - __asm__ __volatile__ ( + __asm__ volatile ( "movd 516(%1), %%mm0\n\t" "movd (%1), %%mm1\n\t" /**data_ptr++=-buf[64+i].im**window_ptr+++*delay_ptr++;*/ "punpckldq (%2), %%mm0\n\t"/*data_ptr[128]=-buf[i].re*window_ptr[128]+delay_ptr[128];*/ @@ -520,7 +520,7 @@ imdct_do_512_3dnow } window_ptr += 128; #else - __asm__ __volatile__ ("femms":::"memory"); + __asm__ volatile ("femms":::"memory"); for(i=0; i< 64; i++) { *data_ptr++ = -buf[64+i].imag * *window_ptr++ + *delay_ptr++ + bias; *data_ptr++ = buf[64-i-1].real * *window_ptr++ + *delay_ptr++ + bias; @@ -538,7 +538,7 @@ imdct_do_512_3dnow for(i=0; i< 64; i++) { /* merge two loops in one to enable working of 2 decoders */ window_ptr -=2; - __asm__ __volatile__( + __asm__ volatile( "movd 508(%1), %%mm0\n\t" "movd (%1), %%mm1\n\t" "punpckldq (%2), %%mm0\n\t" @@ -565,9 +565,9 @@ imdct_do_512_3dnow :"memory"); delay_ptr += 2; } - __asm__ __volatile__ ("femms":::"memory"); + __asm__ volatile ("femms":::"memory"); #else - __asm__ __volatile__ ("femms":::"memory"); + __asm__ volatile ("femms":::"memory"); for(i=0; i< 64; i++) { *delay_ptr++ = -buf[64+i].real * *--window_ptr; *delay_ptr++ = buf[64-i-1].imag * *--window_ptr; diff --git a/liba52/srfftp_3dnow.h b/liba52/srfftp_3dnow.h index c5e6dd1c24..9f26c59b43 100644 --- a/liba52/srfftp_3dnow.h +++ b/liba52/srfftp_3dnow.h @@ -39,7 +39,7 @@ typedef struct }i_cmplx_t; #define TRANS_FILL_MM6_MM7_3DNOW()\ - __asm__ __volatile__(\ + __asm__ volatile(\ "movq %1, %%mm7\n\t"\ "movq %0, %%mm6\n\t"\ ::"m"(x_plus_minus_3dnow),\ @@ -66,7 +66,7 @@ typedef struct #define TRANSZERO_3DNOW(A0,A4,A8,A12) \ { \ - __asm__ __volatile__(\ + __asm__ volatile(\ "movq %4, %%mm0\n\t" /* mm0 = wTB[0]*/\ "movq %5, %%mm1\n\t" /* mm1 = wTB[k*2]*/ \ "movq %%mm0, %%mm5\n\t"/*u.re = wTB[0].re + wTB[k*2].re;*/\ @@ -95,7 +95,7 @@ typedef struct #define TRANSHALF_16_3DNOW(A2,A6,A10,A14)\ {\ - __asm__ __volatile__(\ + __asm__ volatile(\ "movq %4, %%mm0\n\t"/*u.re = wTB[2].im + wTB[2].re;*/\ "movq %%mm0, %%mm1\n\t"\ "pxor %%mm7, %%mm1\n\t"\ @@ -136,7 +136,7 @@ typedef struct #define TRANS_3DNOW(A1,A5,A9,A13,WT,WB,D,D3)\ { \ - __asm__ __volatile__(\ + __asm__ volatile(\ "movq %1, %%mm4\n\t"\ "movq %%mm4, %%mm5\n\t"\ "punpckldq %%mm4, %%mm4\n\t"/*mm4 = D.re | D.re */\ @@ -166,7 +166,7 @@ typedef struct :\ :"m"(WT), "m"(D), "m"(WB), "m"(D3)\ :"memory");\ - __asm__ __volatile__(\ + __asm__ volatile(\ "movq %4, %%mm0\n\t"/* a1 = A1*/\ "movq %5, %%mm2\n\t"/* a1 = A5*/\ "movq %%mm0, %%mm1\n\t"\ diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c index 3c31a01a7b..7d38891c1a 100644 --- a/libmpcodecs/dec_video.c +++ b/libmpcodecs/dec_video.c @@ -374,10 +374,10 @@ void *decode_video(sh_video_t *sh_video, unsigned char *start, int in_size, // some codecs are broken, and doesn't restore MMX state :( // it happens usually with broken/damaged files. if (gCpuCaps.has3DNow) { - __asm__ __volatile ("femms\n\t":::"memory"); + __asm__ volatile ("femms\n\t":::"memory"); } else if (gCpuCaps.hasMMX) { - __asm__ __volatile ("emms\n\t":::"memory"); + __asm__ volatile ("emms\n\t":::"memory"); } #endif diff --git a/libmpcodecs/native/mmx.h b/libmpcodecs/native/mmx.h index d9a6fb65cb..1661b318a4 100644 --- a/libmpcodecs/native/mmx.h +++ b/libmpcodecs/native/mmx.h @@ -57,24 +57,24 @@ typedef union { #define mmx_i2r(op,imm,reg) \ - __asm__ __volatile__ (#op " %0, %%" #reg \ + __asm__ volatile (#op " %0, %%" #reg \ : /* nothing */ \ : "i" (imm) ) #define mmx_m2r(op, mem, reg) \ - __asm__ __volatile__ (#op " %0, %%" #reg \ + __asm__ volatile (#op " %0, %%" #reg \ : /* nothing */ \ : "m" (mem)) #define mmx_r2m(op, reg, mem) \ - __asm__ __volatile__ (#op " %%" #reg ", %0" \ + __asm__ volatile (#op " %%" #reg ", %0" \ : "=m" (mem) \ : /* nothing */ ) #define mmx_r2r(op, regs, regd) \ - __asm__ __volatile__ (#op " %" #regs ", %" #regd) + __asm__ volatile (#op " %" #regs ", %" #regd) -#define emms() __asm__ __volatile__ ("emms") +#define emms() __asm__ volatile ("emms") #endif /* MPLAYER_MMX_H */ diff --git a/libvo/aclib_template.c b/libvo/aclib_template.c index 353e7594cd..7288831172 100644 --- a/libvo/aclib_template.c +++ b/libvo/aclib_template.c @@ -84,7 +84,7 @@ If you have questions please contact with me: Nick Kurshev: nickols_k@mail.ru. #define small_memcpy(to,from,n)\ {\ register unsigned long int dummy;\ -__asm__ __volatile__(\ +__asm__ volatile(\ "rep; movsb"\ :"=&D"(to), "=&S"(from), "=&c"(dummy)\ /* It's most portable way to notify compiler */\ @@ -153,7 +153,7 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len) #endif #ifndef HAVE_ONLY_MMX1 /* PREFETCH has effect even for MOVSB instruction ;) */ - __asm__ __volatile__ ( + __asm__ volatile ( PREFETCH" (%0)\n" PREFETCH" 64(%0)\n" PREFETCH" 128(%0)\n" @@ -188,7 +188,7 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len) /* if SRC is misaligned */ for(; i>0; i--) { - __asm__ __volatile__ ( + __asm__ volatile ( PREFETCH" 320(%0)\n" "movups (%0), %%xmm0\n" "movups 16(%0), %%xmm1\n" @@ -210,7 +210,7 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len) */ for(; i>0; i--) { - __asm__ __volatile__ ( + __asm__ volatile ( PREFETCH" 320(%0)\n" "movaps (%0), %%xmm0\n" "movaps 16(%0), %%xmm1\n" @@ -228,7 +228,7 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len) // Align destination at BLOCK_SIZE boundary for(; ((int)to & (BLOCK_SIZE-1)) && i>0; i--) { - __asm__ __volatile__ ( + __asm__ volatile ( #ifndef HAVE_ONLY_MMX1 PREFETCH" 320(%0)\n" #endif @@ -317,7 +317,7 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len) for(; i>0; i--) { - __asm__ __volatile__ ( + __asm__ volatile ( #ifndef HAVE_ONLY_MMX1 PREFETCH" 320(%0)\n" #endif @@ -346,11 +346,11 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len) #ifdef HAVE_MMX2 /* since movntq is weakly-ordered, a "sfence" * is needed to become ordered again. */ - __asm__ __volatile__ ("sfence":::"memory"); + __asm__ volatile ("sfence":::"memory"); #endif #ifndef HAVE_SSE /* enables to use FPU */ - __asm__ __volatile__ (EMMS:::"memory"); + __asm__ volatile (EMMS:::"memory"); #endif } /* @@ -405,7 +405,7 @@ static void * RENAME(mem2agpcpy)(void * to, const void * from, size_t len) */ for(; i>0; i--) { - __asm__ __volatile__ ( + __asm__ volatile ( PREFETCH" 320(%0)\n" "movq (%0), %%mm0\n" "movq 8(%0), %%mm1\n" @@ -430,10 +430,10 @@ static void * RENAME(mem2agpcpy)(void * to, const void * from, size_t len) #ifdef HAVE_MMX2 /* since movntq is weakly-ordered, a "sfence" * is needed to become ordered again. */ - __asm__ __volatile__ ("sfence":::"memory"); + __asm__ volatile ("sfence":::"memory"); #endif /* enables to use FPU */ - __asm__ __volatile__ (EMMS:::"memory"); + __asm__ volatile (EMMS:::"memory"); } /* * Now do the tail of the block diff --git a/loader/drv.c b/loader/drv.c index 5d4f0dcb93..b8fecf7467 100644 --- a/loader/drv.c +++ b/loader/drv.c @@ -52,7 +52,7 @@ extern char* def_path; #else // this asm code is no longer needed #define STORE_ALL \ - __asm__ __volatile__ ( \ + __asm__ volatile ( \ "push %%ebx\n\t" \ "push %%ecx\n\t" \ "push %%edx\n\t" \ @@ -60,7 +60,7 @@ extern char* def_path; "push %%edi\n\t"::) #define REST_ALL \ - __asm__ __volatile__ ( \ + __asm__ volatile ( \ "pop %%edi\n\t" \ "pop %%esi\n\t" \ "pop %%edx\n\t" \ @@ -98,7 +98,7 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, #endif if (!module || !module->hDriverModule || !module->DriverProc) return -1; #ifndef __svr4__ - __asm__ __volatile__ ("fsave (%0)\n\t": :"r"(&qw)); + __asm__ volatile ("fsave (%0)\n\t": :"r"(&qw)); #endif #ifdef WIN32_LOADER @@ -110,7 +110,7 @@ LRESULT WINAPI SendDriverMessage(HDRVR hDriver, UINT message, REST_ALL; #ifndef __svr4__ - __asm__ __volatile__ ("frstor (%0)\n\t": :"r"(&qw)); + __asm__ volatile ("frstor (%0)\n\t": :"r"(&qw)); #endif #ifdef DETAILED_OUT diff --git a/loader/ldt_keeper.c b/loader/ldt_keeper.c index ef9386435e..e0d4447e60 100644 --- a/loader/ldt_keeper.c +++ b/loader/ldt_keeper.c @@ -138,7 +138,7 @@ void Setup_FS_Segment(void) { unsigned int ldt_desc = LDT_SEL(fs_ldt); - __asm__ __volatile__( + __asm__ volatile( "movl %0,%%eax; movw %%ax, %%fs" : : "r" (ldt_desc) :"eax" ); @@ -154,7 +154,7 @@ static int LDT_Modify( int func, struct modify_ldt_ldt_s *ptr, { int res; #ifdef __PIC__ - __asm__ __volatile__( "pushl %%ebx\n\t" + __asm__ volatile( "pushl %%ebx\n\t" "movl %2,%%ebx\n\t" "int $0x80\n\t" "popl %%ebx" @@ -165,7 +165,7 @@ static int LDT_Modify( int func, struct modify_ldt_ldt_s *ptr, "d"(16)//sizeof(*ptr) from kernel point of view :"esi" ); #else - __asm__ __volatile__("int $0x80" + __asm__ volatile("int $0x80" : "=a" (res) : "0" (__NR_modify_ldt), "b" (func), diff --git a/loader/qtx/qtxload.c b/loader/qtx/qtxload.c index 772ee5b0c5..38e0decda2 100644 --- a/loader/qtx/qtxload.c +++ b/loader/qtx/qtxload.c @@ -104,7 +104,7 @@ int main(int argc, char *argv[]){ printf("params: flags: %d, paramSize: %d, what: %d, params[0] = %x\n", params->flags, params->paramSize, params->what, params->params[0]); -// __asm__ __volatile__ ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); +// __asm__ volatile ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); // printf("ESP=%p\n",esp); *((void**)0x62b7d640) = &x_table[0]; //malloc(0x00001837 * 4); // ugly hack? @@ -113,7 +113,7 @@ int main(int argc, char *argv[]){ ret = dispatcher(params, &globals); -// __asm__ __volatile__ ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); +// __asm__ volatile ("movl %%esp, %0\n\t" : "=a" (esp) :: "memory" ); // printf("ESP=%p\n",esp); printf("!!! CDComponentDispatch() => %d glob=%p\n",ret,globals); diff --git a/loader/win32.c b/loader/win32.c index b3b157bb5d..576e3bd945 100644 --- a/loader/win32.c +++ b/loader/win32.c @@ -79,7 +79,7 @@ char* def_path = WIN32_PATH; static void do_cpuid(unsigned int ax, unsigned int *regs) { - __asm__ __volatile__ + __asm__ volatile ( "pushl %%ebx; pushl %%ecx; pushl %%edx;" ".byte 0x0f, 0xa2;" @@ -95,7 +95,7 @@ static void do_cpuid(unsigned int ax, unsigned int *regs) static unsigned int c_localcount_tsc() { int a; - __asm__ __volatile__ + __asm__ volatile ( "rdtsc\n\t" :"=a"(a) @@ -106,7 +106,7 @@ static unsigned int c_localcount_tsc() } static void c_longcount_tsc(long long* z) { - __asm__ __volatile__ + __asm__ volatile ( "pushl %%ebx\n\t" "movl %%eax, %%ebx\n\t" @@ -2867,7 +2867,7 @@ static int WINAPI expIsBadStringPtrA(const char* string, int nchars) static long WINAPI expInterlockedExchangeAdd( long* dest, long incr ) { long ret; - __asm__ __volatile__ + __asm__ volatile ( "lock; xaddl %0,(%1)" : "=r" (ret) @@ -4006,7 +4006,7 @@ static int exp_initterm(INITTERMFUNC *start, INITTERMFUNC *end) // ok this trick with push/pop is necessary as otherwice // edi/esi registers are being trashed void* p = *start; - __asm__ __volatile__ + __asm__ volatile ( "pushl %%ebx \n\t" "pushl %%ecx \n\t" @@ -4272,7 +4272,7 @@ static double expcos(double x) static void explog10(void) { - __asm__ __volatile__ + __asm__ volatile ( "fldl 8(%esp) \n\t" "fldln2 \n\t" @@ -4283,7 +4283,7 @@ static void explog10(void) static void expcos(void) { - __asm__ __volatile__ + __asm__ volatile ( "fldl 8(%esp) \n\t" "fcos \n\t" @@ -4300,7 +4300,7 @@ static void expcos(void) static void exp_ftol(void) { - __asm__ __volatile__ + __asm__ volatile ( "sub $12, %esp \n\t" "fstcw -2(%ebp) \n\t" @@ -4319,8 +4319,8 @@ static void exp_ftol(void) } #define FPU_DOUBLES(var1,var2) double var1,var2; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var2) : ); \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var1) : ) + __asm__ volatile( "fstpl %0;fwait" : "=m" (var2) : ); \ + __asm__ volatile( "fstpl %0;fwait" : "=m" (var1) : ) static double exp_CIpow(void) { @@ -4361,7 +4361,7 @@ static int exp_setjmp3(void* jmpbuf, int x) { //dbgprintf("!!!!UNIMPLEMENTED: setjmp3(%p, %d) => 0\n", jmpbuf, x); //return 0; - __asm__ __volatile__ + __asm__ volatile ( //"mov 4(%%esp), %%edx \n\t" "mov (%%esp), %%eax \n\t" @@ -4383,7 +4383,7 @@ static int exp_setjmp3(void* jmpbuf, int x) : "eax" ); #if 1 - __asm__ __volatile__ + __asm__ volatile ( "mov %%fs:0, %%eax \n\t" // unsure "mov %%eax, 24(%%edx) \n\t" @@ -4762,7 +4762,7 @@ static double expfloor(double x) } #define FPU_DOUBLE(var) double var; \ - __asm__ __volatile__( "fstpl %0;fwait" : "=m" (var) : ) + __asm__ volatile( "fstpl %0;fwait" : "=m" (var) : ) static double exp_CIcos(void) { diff --git a/loader/wine/windef.h b/loader/wine/windef.h index 7b836e12a4..9d90a42257 100644 --- a/loader/wine/windef.h +++ b/loader/wine/windef.h @@ -94,7 +94,7 @@ extern "C" { # ifndef _EGCS_ #define __stdcall __attribute__((__stdcall__)) #define __cdecl __attribute__((__cdecl__)) -# define RESTORE_ES __asm__ __volatile__("pushl %ds\n\tpopl %es") +# define RESTORE_ES __asm__ volatile("pushl %ds\n\tpopl %es") # endif # else // # error You need gcc >= 2.7 to build Wine on a 386 diff --git a/mp3lib/dct36_3dnow.c b/mp3lib/dct36_3dnow.c index 66c9f7b148..02d23975b4 100644 --- a/mp3lib/dct36_3dnow.c +++ b/mp3lib/dct36_3dnow.c @@ -39,7 +39,7 @@ void dct36_3dnow(real *inbuf, real *o1, real *o2, real *wintab, real *tsbuf) #endif { - __asm__ __volatile__( + __asm__ volatile( "movq (%%eax),%%mm0\n\t" "movq 4(%%eax),%%mm1\n\t" "pfadd %%mm1,%%mm0\n\t" diff --git a/mp3lib/dct64_3dnow.c b/mp3lib/dct64_3dnow.c index 8df9295119..919771a91d 100644 --- a/mp3lib/dct64_3dnow.c +++ b/mp3lib/dct64_3dnow.c @@ -18,7 +18,7 @@ static float attribute_used plus_1f = 1.0; void dct64_MMX_3dnow(short *a,short *b,real *c) { char tmp[256]; - __asm__ __volatile( + __asm__ volatile( " movl %2,%%eax\n\t" " leal 128+%3,%%edx\n\t" diff --git a/mp3lib/dct64_k7.c b/mp3lib/dct64_k7.c index 058028ebd1..2d79d7a621 100644 --- a/mp3lib/dct64_k7.c +++ b/mp3lib/dct64_k7.c @@ -18,7 +18,7 @@ static float attribute_used plus_1f = 1.0; void dct64_MMX_3dnowex(short *a,short *b,real *c) { char tmp[256]; - __asm__ __volatile( + __asm__ volatile( " movl %2,%%eax\n\t" " leal 128+%3,%%edx\n\t" diff --git a/mp3lib/dct64_mmx.c b/mp3lib/dct64_mmx.c index 317dbb0549..4cce96bd7d 100644 --- a/mp3lib/dct64_mmx.c +++ b/mp3lib/dct64_mmx.c @@ -9,7 +9,7 @@ void dct64_MMX(short *a,short *b,real *c) { char tmp[256]; - __asm__ __volatile( + __asm__ volatile( " movl %2,%%eax\n\t" /* Phase 1*/ " flds (%%eax)\n\t" diff --git a/mp3lib/decode_i586.c b/mp3lib/decode_i586.c index 9ca1aeb360..8d005735d3 100644 --- a/mp3lib/decode_i586.c +++ b/mp3lib/decode_i586.c @@ -41,7 +41,7 @@ int synth_1to1_pent(real *bandPtr, int channel, short *samples) { real tmp[3]; register int retval; - __asm__ __volatile( + __asm__ volatile( " movl %%ebp,"MANGLE(saved_ebp)"\n\t" " movl %1,%%eax\n\t"/*bandPtr*/ " movl %3,%%esi\n\t" diff --git a/mp3lib/decode_mmx.c b/mp3lib/decode_mmx.c index 1d4e3caba9..55dc6a9081 100644 --- a/mp3lib/decode_mmx.c +++ b/mp3lib/decode_mmx.c @@ -217,7 +217,7 @@ int synth_1to1_MMX(real *bandPtr, int channel, short *samples) dct64_MMX_func(a, b, bandPtr); window = mp3lib_decwins + 16 - bo1; //printf("DEBUG: channel %d, bo %d, off %d\n", channel, bo, 16 - bo1); -__asm__ __volatile( +__asm__ volatile( ASMALIGN(4) ".L03:\n\t" "movq (%1),%%mm0\n\t" diff --git a/vidix/nvidia_vid.c b/vidix/nvidia_vid.c index a045b397fe..767a358f37 100644 --- a/vidix/nvidia_vid.c +++ b/vidix/nvidia_vid.c @@ -372,7 +372,7 @@ static int nv_probe(int verbose, int force){ * PCI-Memory IO access macros. */ -#define MEM_BARRIER() __asm__ __volatile__ ("" : : : "memory") +#define MEM_BARRIER() __asm__ volatile ("" : : : "memory") #undef VID_WR08 #define VID_WR08(p,i,val) ({ MEM_BARRIER(); ((uint8_t *)(p))[(i)]=(val); }) diff --git a/vidix/s3_regs.h b/vidix/s3_regs.h index 0add1bea54..4fd0e427cf 100644 --- a/vidix/s3_regs.h +++ b/vidix/s3_regs.h @@ -196,7 +196,7 @@ do { \ #ifndef USE_RMW_CYCLES /* Can be used to inhibit READ-MODIFY-WRITE cycles. On by default. */ -#define MEM_BARRIER() __asm__ __volatile__ ("" : : : "memory") +#define MEM_BARRIER() __asm__ volatile ("" : : : "memory") #undef VID_WR08 #define VID_WR08(p,i,val) ({ MEM_BARRIER(); ((uint8_t *)(p))[(i)]=(val); }) diff --git a/vidix/sysdep/AsmMacros_powerpc.h b/vidix/sysdep/AsmMacros_powerpc.h index 7120446afe..0ae2fd57d2 100644 --- a/vidix/sysdep/AsmMacros_powerpc.h +++ b/vidix/sysdep/AsmMacros_powerpc.h @@ -68,7 +68,7 @@ extern unsigned char *ioBase; static __inline__ volatile void eieio() { - __asm__ __volatile__ ("eieio"); + __asm__ volatile ("eieio"); } static __inline__ void outb(short port, unsigned char value) diff --git a/vidix/sysdep/AsmMacros_sparc.h b/vidix/sysdep/AsmMacros_sparc.h index 2358adea6f..8ffdde26e1 100644 --- a/vidix/sysdep/AsmMacros_sparc.h +++ b/vidix/sysdep/AsmMacros_sparc.h @@ -68,37 +68,37 @@ static __inline__ void outb(unsigned long port, char val) { - __asm__ __volatile__("stba %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); + __asm__ volatile("stba %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); } static __inline__ void outw(unsigned long port, char val) { - __asm__ __volatile__("stha %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); + __asm__ volatile("stha %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); } static __inline__ void outl(unsigned long port, char val) { - __asm__ __volatile__("sta %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); + __asm__ volatile("sta %0, [%1] %2" : : "r" (val), "r" (port), "i" (ASI_PL)); } static __inline__ unsigned int inb(unsigned long port) { unsigned char ret; - __asm__ __volatile__("lduba [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); + __asm__ volatile("lduba [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); return ret; } static __inline__ unsigned int inw(unsigned long port) { unsigned char ret; - __asm__ __volatile__("lduha [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); + __asm__ volatile("lduha [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); return ret; } static __inline__ unsigned int inl(unsigned long port) { unsigned char ret; - __asm__ __volatile__("lda [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); + __asm__ volatile("lda [%1] %2, %0" : "=r" (ret) : "r" (port), "i" (ASI_PL)); return ret; } diff --git a/vidix/sysdep/AsmMacros_x86.h b/vidix/sysdep/AsmMacros_x86.h index c0b1afc105..6bebeaa505 100644 --- a/vidix/sysdep/AsmMacros_x86.h +++ b/vidix/sysdep/AsmMacros_x86.h @@ -171,7 +171,7 @@ static __inline__ void outb(short port,char val) } else #endif - __asm__ __volatile__("outb %0,%1" : :"a" (val), "d" (port)); + __asm__ volatile("outb %0,%1" : :"a" (val), "d" (port)); return; } @@ -199,7 +199,7 @@ static __inline__ void outw(short port,short val) } else #endif - __asm__ __volatile__("outw %0,%1" : :"a" (val), "d" (port)); + __asm__ volatile("outw %0,%1" : :"a" (val), "d" (port)); return; } @@ -227,7 +227,7 @@ static __inline__ void outl(short port,unsigned int val) } else #endif - __asm__ __volatile__("outl %0,%1" : :"a" (val), "d" (port)); + __asm__ volatile("outl %0,%1" : :"a" (val), "d" (port)); return; } @@ -255,7 +255,7 @@ static __inline__ unsigned int inb(short port) } else #endif - __asm__ __volatile__("inb %1,%0" : + __asm__ volatile("inb %1,%0" : "=a" (ret) : "d" (port)); return ret; @@ -285,7 +285,7 @@ static __inline__ unsigned int inw(short port) } else #endif - __asm__ __volatile__("inw %1,%0" : + __asm__ volatile("inw %1,%0" : "=a" (ret) : "d" (port)); return ret; @@ -315,7 +315,7 @@ static __inline__ unsigned int inl(short port) } else #endif - __asm__ __volatile__("inl %1,%0" : + __asm__ volatile("inl %1,%0" : "=a" (ret) : "d" (port)); return ret; @@ -327,7 +327,7 @@ static __inline__ void intr_disable() if (svgahelper_initialized == 1) return; #endif - __asm__ __volatile__("cli"); + __asm__ volatile("cli"); } static __inline__ void intr_enable() @@ -336,7 +336,7 @@ static __inline__ void intr_enable() if (svgahelper_initialized == 1) return; #endif - __asm__ __volatile__("sti"); + __asm__ volatile("sti"); } #endif /* MPLAYER_ASMMACROS_X86_H */ From 4a29d6dee80f5c8ec38592c8835b2998c2aa28ce Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 20:23:22 +0000 Subject: [PATCH 102/134] Move dcbzl definition to the FFmpeg section of config.h where it belongs. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27792 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/configure b/configure index 8f2fe0796f..ddb3d806d8 100755 --- a/configure +++ b/configure @@ -8135,10 +8135,6 @@ $_def_words_endian /* altivec.h support */ $def_altivec_h -/* For the PPC. G5 has the dcbzl when in 64bit mode but G4s and earlier do not - have the instruction. */ -$_def_dcbzl - /* Define this to any prefered value from 386 up to infinity with step 100 */ #define __CPU__ $iproc @@ -8628,6 +8624,10 @@ $_def_muxers /* Define if your processor can access unaligned data in a fast way */ $_def_fast_unaligned +/* The G5 has the dcbzl when in 64bit mode but the G4 and earlier CPUs do not + have the instruction. */ +$_def_dcbzl + #define CONFIG_GPL 1 #define ENABLE_SMALL 0 #define ENABLE_GRAY 0 From 6fa340d54ca5490b1849fa8f218335e26b3cdb4d Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 20:25:41 +0000 Subject: [PATCH 103/134] Create LIBDIR for binary codecs upon make install. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27793 b3059339-0415-0410-9bf9-f77b7e298cf2 --- Makefile | 2 +- configure | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 1f2d960316..5848a27f56 100644 --- a/Makefile +++ b/Makefile @@ -814,7 +814,7 @@ $(VIDIX_DEPS) $(VIDIX_OBJS): $(VIDIX_PCI_FILES) install: $(INSTALL_TARGETS-yes) install-dirs: - $(INSTALL) -d $(BINDIR) $(CONFDIR) + $(INSTALL) -d $(BINDIR) $(CONFDIR) $(LIBDIR) install-%: %$(EXESUF) install-dirs $(INSTALL) -m 755 $(INSTALLSTRIP) $< $(BINDIR) diff --git a/configure b/configure index ddb3d806d8..1d56364ec1 100755 --- a/configure +++ b/configure @@ -7753,6 +7753,7 @@ MAN_LANG_ALL = $man_lang_all prefix = \$(DESTDIR)$_prefix BINDIR = \$(DESTDIR)$_bindir DATADIR = \$(DESTDIR)$_datadir +LIBDIR = \$(DESTDIR)$_libdir MANDIR = \$(DESTDIR)$_mandir CONFDIR = \$(DESTDIR)$_confdir From d0ff7c091af7f60f16ddf8581073c264c4270576 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 20:40:34 +0000 Subject: [PATCH 104/134] typo: _dev_dvd_openbsd --> _def_dvd_openbsd git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27794 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 1d56364ec1..910b2040ff 100755 --- a/configure +++ b/configure @@ -5450,7 +5450,7 @@ fi if test "$_libdvdcss_internal" = yes ; then if linux || netbsd || openbsd || bsdos ; then _def_dvd_linux='#define HAVE_LINUX_DVD_STRUCT 1' - openbsd && _dev_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1' + openbsd && _def_dvd_openbsd='#define HAVE_OPENBSD_DVD_STRUCT 1' elif freebsd || dragonfly ; then _def_dvd_bsd='#define HAVE_BSD_DVD_STRUCT 1' elif darwin ; then @@ -8191,7 +8191,7 @@ $_def_dvdio $_def_bsdi_dvd $_def_dvd_bsd $_def_dvd_linux -$_dev_dvd_openbsd +$_def_dvd_openbsd $_def_dvd_darwin $_def_sol_scsi_h $_def_hpux_scsi_h From 491826b4cd7593bb365ae40c16bef60687eddffa Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 16 Oct 2008 20:44:05 +0000 Subject: [PATCH 105/134] cosmetics: Reorganize config.h. Remove pointless comments, group together options in sensible parts and order them alphabetically. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27795 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 684 +++++++++++++++++------------------------------------- 1 file changed, 215 insertions(+), 469 deletions(-) diff --git a/configure b/configure index 910b2040ff..bbd26dc69d 100755 --- a/configure +++ b/configure @@ -8020,488 +8020,293 @@ cat > $TMPH << EOF /* Define this to enable MPEG-1/2 image postprocessing in libmpeg2 */ #define MPEG12_POSTPROC 1 +#define ATTRIBUTE_ALIGNED_MAX 16 + + #define CONFIGURATION "$_configuration" -/* Common data directory (for fonts, etc) */ #define MPLAYER_DATADIR "$_datadir" #define MPLAYER_CONFDIR "$_confdir" #define MPLAYER_LIBDIR "$_libdir" -/* yes, we have inttypes.h */ +/* definitions needed by included libraries */ #define HAVE_INTTYPES_H 1 - -/* int_fastXY_t emulation, libmpeg2 + FFmpeg */ +/* libmpeg2 + FFmpeg */ $_def_fast_inttypes - /* libdvdcss */ #define HAVE_ERRNO_H 1 - /* libdvdcss + libdvdread */ #define HAVE_LIMITS_H 1 - /* libdvdcss + libfaad2 */ #define HAVE_UNISTD_H 1 - /* libfaad2 + libdvdread */ #define STDC_HEADERS 1 - -/* libfaad2 */ #define HAVE_MEMCPY 1 - /* libdvdread */ #define HAVE_UINTPTR_T 1 -/* Define this if your system has the "alloca.h" header file */ -$def_alloca_h -/* Define this if your system has the "sys/mman.h" header file */ +/* system headers */ +$def_alloca_h +$def_alsa_asoundlib_h +$def_altivec_h +$def_malloc_h $def_mman_h $_def_mman_has_map_failed - -/* Define this if your system has the header file for the OSS sound interface */ -$def_sys_soundcard_h - -/* Define this if your system has the header file for the OSS sound interface - * in /usr/include */ $def_soundcard_h - -/* Define this if your system has the sysinfo header */ +$def_sys_asoundlib_h +$def_sys_soundcard_h $def_sys_sysinfo_h +$def_termios_h +$def_termios_sys_h +$def_winsock2_h -/* Define this if your system has the "malloc.h" header file */ -$def_malloc_h -/* memalign is mapped to malloc if unsupported */ -$_def_memalign -$_def_map_memalign -$_def_memalign_hack - -/* define this to use nl_langinfo function */ -$_def_langinfo - -/* nanosleep support */ -$_def_nanosleep - -/* do we have gethostbyname2? */ +/* system functions */ $_def_gethostbyname2 - -/* Define this if your system has swab */ -$_def_swab - -/* Define this if your system has posix select */ -$_def_posix_select - -/* Define this if your system has gettimeofday */ $_def_gettimeofday - -/* Define this if your system has glob */ $_def_glob - -/* Define this if your system has setenv */ -$_def_setenv - -/* Define this if your system has strsep */ -$_def_strsep - -/* Define this if your system has vsscanf */ -$_def_vsscanf - -/* Define this if your system has sysi86 */ -$_def_sysi86 -$_def_sysi86_iv - -/* C99 *lrint* and round* functions available */ +$_def_langinfo $_def_llrint $_def_lrint $_def_lrintf +$_def_map_memalign +$_def_memalign +$_def_memalign_hack +$_def_nanosleep +$_def_posix_select $_def_round $_def_roundf +$_def_select +$_def_setenv +$_def_shm +$_def_strsep +$_def_swab +$_def_sysi86 +$_def_sysi86_iv +$_def_termcap +$_def_termios +$_def_vsscanf -/* name of messages charset */ + +/* system-specific features */ +$_def_asmalign_pot +$_def_builtin_expect +$_def_dl +$_def_iconv +$_def_kstat +$_def_macosx_bundle +$_def_macosx_finder +$_def_maemo +$_def_named_asm_args +$_def_quicktime +$_def_restrict_keyword +$_def_rtc +$_def_unrar_exec + + +/* configurable options */ $_def_charset - -/* Runtime CPU detection */ -$_def_runtime_cpudetection - -/* Define if your processor stores words with the most significant - byte first (like Motorola and SPARC, unlike Intel and VAX). */ -$_def_words_endian - -`ff_config_enable "$_arch_all" "$_arch" "ARCH"` - -/* Extension defines */ -`ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"` - -/* altivec.h support */ -$def_altivec_h - -/* Define this to any prefered value from 386 up to infinity with step 100 */ -#define __CPU__ $iproc - -/* Use 3dnow/mmxext/sse/mmx optimized fast memcpy() [maybe buggy... signal 4]*/ -$_def_fastmemcpy - -/* enable/disable SIGHANDLER */ -$_def_sighandler - -/* enable/disable automatic gdb attach on crash, requires SIGHANDLER */ $_def_crash_debug - -/* Toggles debugging informations */ $_def_debug - -/* Dynamic a/v plugins */ $_def_dynamic_plugins - -/* Define this to compile stream-caching support, it can be enabled via - -cache */ +$_def_fastmemcpy +$_def_menu +$_def_runtime_cpudetection +$_def_sighandler +$_def_sortsub $_def_stream_cache -/* "restrict" keyword */ -$_def_restrict_keyword -/* __builtin_expect branch prediction hint */ -$_def_builtin_expect +/* CPU stuff */ +#define __CPU__ $iproc +$_def_words_endian +`ff_config_enable "$_arch_all" "$_arch" "ARCH"` +`ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"` -/* compiler support for named assembler arguments */ -$_def_named_asm_args -/* assembler handling of .align */ -$_def_asmalign_pot - -/* enables / disables cdparanoia support */ -$_def_cdparanoia -$_def_cddb - -/* Indicates that libcdio is available for VCD and CD-DA playback */ -$_def_libcdio - -/* Indicates that Ogle's libdvdread is available for DVD playback */ -$_def_dvdread - -/* Indicates that dvdread is internal */ -$_def_dvdread_internal - -/* Additional options for libdvdread/libdvdcss */ -$_def_dvd -$_def_cdrom -$_def_cdio -$_def_dvdio +/* DVD/VCD/CD */ $_def_bsdi_dvd +$_def_cddb +$_def_cdio +$_def_cdparanoia +$_def_cdrom +$_def_dvd $_def_dvd_bsd +$_def_dvd_darwin $_def_dvd_linux $_def_dvd_openbsd -$_def_dvd_darwin -$_def_sol_scsi_h -$_def_hpux_scsi_h - -/* DVD navigation support using libdvdnav */ +$_def_dvdio $_def_dvdnav - +$_def_dvdread +$_def_dvdread_internal +$_def_hpux_scsi_h +$_def_libcdio +$_def_sol_scsi_h $_def_vcd -/* define this to use iconv(3) function to codepage conversions */ -$_def_iconv -/* define this to use RTC (/dev/rtc) for video timers */ -$_def_rtc - -/* Undefine this if your sound card driver has no working select(). - If you have kernel Oops, player hangups, or just no audio, you should - try to recompile MPlayer with this option disabled! */ -$_def_select - -/* Define this if you have the elf dynamic linker -ldl library */ -$_def_dl - -/* Define this if you have the kstat kernel statistics library */ -$_def_kstat - -/* Define this if you have zlib */ -$_def_zlib - -/* LIRC (remote control, see www.lirc.org) support: */ -$_def_lirc - -/* - * LIRCCD (LIRC client daemon) - * See http://www.dolda2000.cjb.net/~fredrik/lirccd/ - */ -$_def_lircc - -/* Apple Remote (remote control, see http://docs.info.apple.com/article.html?artnum=302504) support: */ -$_def_apple_remote - -/* Apple IR Remote (Linux remote control driver) */ -$_def_apple_ir - -/* enables / disables new input joystick support */ -$_def_joystick - -/* Support for maemo (http://www.maemo.org) */ -$_def_maemo - -/* Mac OS X specific features */ -$_def_macosx_finder -$_def_macosx_bundle -$_def_coreaudio -$_def_corevideo -$_def_quartz -$_def_quicktime - -/* Use codec libs included in mplayer CVS / source dist: */ -$_def_mp3lib - -/* enable liba52 support */ -$_def_liba52_internal -$_def_liba52 - -/* enable libmpeg2 support */ -$_def_libmpeg2 - -/* maximum alignment used by libmpeg2 */ -#define ATTRIBUTE_ALIGNED_MAX 16 - -/* enable FAAD (AAC) support */ +/* codec libraries */ +$_def_faac $_def_faad $_def_faad_internal - -/* enable FAAC (AAC encoder) support */ -$_def_faac - -/* Define if you are using the Xvid library */ -$_def_xvid - -/* Define if you are using the X.264 library */ -$_def_x264 - -/* Define to include support for libdv-0.9.5 */ +$_def_liba52 +$_def_liba52_internal +$_def_libdca $_def_libdv - -/* Indicates if libmp3lame is available - Note: for mencoder */ +$_def_liblzo +$_def_libmpeg2 +$_def_mad $_def_mp3lame $_def_mp3lame_preset $_def_mp3lame_preset_medium - -$_def_toolame -$_def_twolame - -/* liblzo support */ -$_def_liblzo - -/* libmad support */ -$_def_mad - -/* enable OggVorbis support */ -$_def_vorbis -$_def_tremor - -/* enable Speex support */ -$_def_speex - -/* enable musepack support */ +$_def_mp3lib $_def_musepack - -/* enable OggTheora support */ +$_def_speex $_def_theora +$_def_toolame +$_def_tremor +$_def_twolame +$_def_vorbis +$_def_x264 +$_def_xvid +$_def_zlib -/* enable libdca support */ -$_def_libdca - -/* Win32 DLL support */ -$_def_win32dll -#define WIN32_PATH "$_win32codecsdir" - -/* Win32-loader support */ -$_def_win32_loader - -/* XAnim DLL support */ -$_def_xanim -/* Default search path */ -$_def_xanim_path - -/* RealPlayer DLL support */ -$_def_real -/* Default search path */ -$_def_real_path - -/* enables / disables QTX codecs */ -$_def_qtx -$_def_qtx_win32 - -/* Define if you are using libnut */ $_def_libnut -/* XMMS input plugin support */ + +/* binary codecs */ +$_def_qtx +$_def_qtx_win32 +$_def_real +$_def_real_path +$_def_win32_loader +$_def_win32dll +#define WIN32_PATH "$_win32codecsdir" +$_def_xanim +$_def_xanim_path $_def_xmms #define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir" -/* Use UnRAR executable for Vobsubs */ -$_def_unrar_exec -/* gui support */ -$_def_gui +/* GUI */ $_def_gtk2 - -/* used by GUI: */ +$_def_gui $_def_xshape + /* Audio output drivers */ +$_def_alsa +$_def_alsa1x +$_def_alsa5 +$_def_alsa9 +$_def_arts +$_def_coreaudio +$_def_esd +$_def_esd_latency +$_def_jack +$_def_nas +$_def_openal +$_def_openal_h $_def_ossaudio $_def_ossaudio_devdsp $_def_ossaudio_devmixer -$_def_alsa -$_def_alsa5 -$_def_alsa9 -$_def_alsa1x -$_def_arts -$_def_esd -$_def_esd_latency $_def_pulse -$_def_jack -$_def_openal -$_def_openal_h -$def_sys_asoundlib_h -$def_alsa_asoundlib_h -$_def_sunaudio $_def_sgiaudio +$_def_sunaudio $_def_win32waveout -$_def_nas -/* Enable TV Interface support */ +$_def_ladspa + + +/* input */ +$_def_apple_ir +$_def_apple_remote +$_def_ioctl_bt848_h_name +$_def_ioctl_meteor_h_name +$_def_joystick +$_def_lirc +$_def_lircc +$_def_pvr +$_def_radio +$_def_radio_bsdbt848 +$_def_radio_capture +$_def_radio_v4l +$_def_radio_v4l2 $_def_tv - -/* Enable Video 4 Linux TV interface support */ +$_def_tv_bsdbt848 +$_def_tv_dshow +$_def_tv_teletext $_def_tv_v4l - -/* Enable Video 4 Linux 1 TV interface support */ $_def_tv_v4l1 - -/* Enable Video 4 Linux 2 TV interface support */ $_def_tv_v4l2 -/* Enable DirectShow TV interface support */ -$_def_tv_dshow -/* *BSD BrookTree headers */ -$_def_ioctl_meteor_h_name -$_def_ioctl_bt848_h_name +/* font stuff */ +$_def_ass +$_def_bitmap_font +$_def_enca +$_def_fontconfig +$_def_freetype +$_def_fribidi -/* Enable *BSD BrookTree TV interface support */ -$_def_tv_bsdbt848 -/* Enable TV Teletext Interface support */ -$_def_tv_teletext +/* networking */ +$_def_closesocket +$_def_ftp +$_def_inet6 +$_def_live +$_def_nemesi +$_def_network +$_def_smb +$_def_socklen_t +$_def_use_aton +$_def_vstream -/* Enable Radio Interface support */ -$_def_radio -/* Enable Capture for Radio Interface support */ -$_def_radio_capture - -/* Enable Video 4 Linux Radio interface support */ -$_def_radio_v4l - -/* Enable Video 4 Linux 2 Radio interface support */ -$_def_radio_v4l2 - -/* Enable *BSD BrookTree Radio interface support */ -$_def_radio_bsdbt848 - -/* Enable Video 4 Linux 2 MPEG PVR support */ -$_def_pvr - -/* termcap flag for getch2.c */ -$_def_termcap - -/* termios flag for getch2.c */ -$_def_termios -$def_termios_h -$def_termios_sys_h - -/* enable PNG support */ -$_def_png - -/* enable JPEG support */ -$_def_jpeg - -/* enable PNM support */ -$_def_pnm - -/* enable md5sum support */ -$_def_md5sum - -/* enable yuv4mpeg support */ -$_def_yuv4mpeg - -/* enable GIF support */ +/* libvo options */ +$_def_3dfx +$_def_aa +$_def_bl +$_def_caca +$_def_corevideo +$_def_dfbmga +$_def_dga +$_def_dga1 +$_def_dga2 +$_def_directfb +$_def_directfb_version +$_def_directx +$_def_dvb +$_def_dvb_head +$_def_dvbin +$_def_dxr2 +$_def_dxr3 +$_def_fbdev +$_def_ggi +$_def_ggiwmh $_def_gif $_def_gif_4 $_def_gif_tvt_hack - -/* enable bitmap font support */ -$_def_bitmap_font - -/* enable FreeType support */ -$_def_freetype - -/* enable Fontconfig support */ -$_def_fontconfig - -/* enable SSA/ASS support */ -$_def_ass - -/* enable FriBiDi usage */ -$_def_fribidi - -/* enable ENCA usage */ -$_def_enca - -/* enables / disables osd menu */ -$_def_menu - -/* enables / disables subtitles sorting */ -$_def_sortsub - -/* enable LADSPA plugin support */ -$_def_ladspa - -/* enable network */ -$_def_network - -/* LIVE555 Streaming Media library support */ -$_def_live - -/* libnemesi Streaming Media library support */ -$_def_nemesi - -/* SMB support */ -$_def_smb - -/* enable ftp support */ -$_def_ftp - -/* enable vstream support */ -$_def_vstream - -/* enable winsock2 instead of Unix functions*/ -$def_winsock2_h - -/* define this to use inet_aton() instead of inet_pton() */ -$_def_use_aton - -/* socklen_t support */ -$_def_socklen_t - -/* closesocket() support */ -$_def_closesocket - -/* enables inet6 support */ -$_def_inet6 - -/* enables / disables VIDIX usage */ +$_def_gl +$_def_gl_win32 +$_def_ivtv +$_def_jpeg +$_def_md5sum +$_def_mga +$_def_png +$_def_pnm +$_def_quartz +$_def_s3fb +$_def_sdl +$_def_sdlbuggy +$_def_svga +$_def_tdfxfb +$_def_tdfxvid +$_def_tga +$_def_v4l2 +$_def_vesa $_def_vidix $_def_vidix_drv_cyberblade $_def_vidix_drv_ivtv @@ -8517,103 +8322,62 @@ $_def_vidix_drv_sh_veu $_def_vidix_drv_sis $_def_vidix_drv_unichrome $_def_vidix_pfx - -/* libvo options */ -$_def_x11 -$_def_xv -$_def_xvmc $_def_vm +$_def_wii +$_def_x11 +$_def_xdpms $_def_xf86keysym $_def_xinerama -$_def_gl -$_def_gl_win32 -$_def_dga -$_def_dga1 -$_def_dga2 -$_def_sdl -/* defined for SDLlib with keyrepeat bugs (before 1.2.1) */ -$_def_sdlbuggy -$_def_directx -$_def_ggi -$_def_ggiwmh -$_def_3dfx -$_def_s3fb -$_def_wii -$_def_tdfxfb -$_def_tdfxvid -$_def_xvr100 -$_def_directfb -$_def_directfb_version -$_def_dfbmga -$_def_zr -$_def_bl -$_def_mga $_def_xmga -$_def_fbdev -$_def_dxr2 -$_def_dxr3 -$_def_ivtv -$_def_v4l2 -$_def_dvb -$_def_dvb_head -$_def_dvbin -$_def_svga -$_def_vesa $_def_xss -$_def_xdpms -$_def_aa -$_def_caca -$_def_tga - -/* Define this if you have shm support */ -$_def_shm +$_def_xv +$_def_xvmc +$_def_xvr100 +$_def_yuv4mpeg +$_def_zr /* FFmpeg */ -/* Define this to enable image postprocessing in libavcodec */ -$_def_libpostproc -$_def_libpostproc_a -$_def_libpostproc_so - -/* ffmpeg's libavcodec support (requires libavcodec source) */ $_def_libavcodec $_def_libavcodec_a -$_def_libavcodec_so $_def_libavcodec_mpegaudio_hp - -/* ffmpeg's libavformat support (requires libavformat source) */ +$_def_libavcodec_so $_def_libavformat $_def_libavformat_a $_def_libavformat_so - $_def_libavutil $_def_libavutil_a $_def_libavutil_so - +$_def_libpostproc +$_def_libpostproc_a +$_def_libpostproc_so $_def_libswscale $_def_libswscale_a $_def_libswscale_so -/* Define this if you enabled thread support for libavcodec */ -$_def_threads +$_def_dcbzl +$_def_extern_prefix +$_def_fast_unaligned +$_def_mkstemp $_def_pthreads +$_def_threads #ifdef HAVE_THREADS #define ENABLE_THREADS 1 #else #define ENABLE_THREADS 0 #endif -/* Use libavcodec's decoders */ +#define CONFIG_GPL 1 +#define ENABLE_SMALL 0 +#define ENABLE_GRAY 0 + #define CONFIG_DECODERS 1 #define ENABLE_DECODERS 1 -/* Use libavcodec's encoders */ #define CONFIG_ENCODERS 1 #define ENABLE_ENCODERS 1 -/* Use libavformat's demuxers */ #define CONFIG_DEMUXERS 1 #define ENABLE_DEMUXERS 1 -/* Use libavformat's muxers */ $_def_muxers /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */ @@ -8622,17 +8386,6 @@ $_def_muxers #define HAVE_EBP_AVAILABLE 1 #endif -/* Define if your processor can access unaligned data in a fast way */ -$_def_fast_unaligned - -/* The G5 has the dcbzl when in 64bit mode but the G4 and earlier CPUs do not - have the instruction. */ -$_def_dcbzl - -#define CONFIG_GPL 1 -#define ENABLE_SMALL 0 -#define ENABLE_GRAY 0 - /* External libraries used through libavcodec. */ $_def_faac_lavc $_def_libamr @@ -8644,13 +8397,6 @@ $_def_mp3lame_lavc $_def_x264_lavc $_def_xvid_lavc -/* mkstemp support */ -$_def_mkstemp - -/* extern symbol prefix */ -$_def_extern_prefix - -/* Use specific parts from FFmpeg. */ `ff_config_enable "$_libavdecoders_all" "$_libavdecoders"` `ff_config_enable "$_libavencoders_all" "$_libavencoders"` `ff_config_enable "$_libavparsers_all" "$_libavparsers"` From fe44156133130e00e2843ccc01c6d005cea07c1d Mon Sep 17 00:00:00 2001 From: faust3 Date: Fri, 17 Oct 2008 10:01:44 +0000 Subject: [PATCH 106/134] fixed image format detection for 15 bit color depths git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27796 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_x11.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c index 2343a16f72..e07b947986 100644 --- a/libvo/vo_x11.c +++ b/libvo/vo_x11.c @@ -480,7 +480,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, } while (fmte->mpfmt) { - if (IMGFMT_RGB_DEPTH(fmte->mpfmt) == myximage->bits_per_pixel && + int depth = IMGFMT_RGB_DEPTH(fmte->mpfmt); + /* bits_per_pixel in X seems to be set to 16 for 15 bit formats + => force depth to 16 so that only the color masks are used for the format check */ + if (depth == 15) + depth = 16; + + if (depth == myximage->bits_per_pixel && fmte->byte_order == myximage->byte_order && fmte->red_mask == myximage->red_mask && fmte->green_mask == myximage->green_mask && From a6b806a97a9738836a46af5370b405cf57c2a239 Mon Sep 17 00:00:00 2001 From: ranma Date: Sat, 18 Oct 2008 16:07:18 +0000 Subject: [PATCH 107/134] MAX_PCI_DEVICES 64 is not enough on my system (even though lspci only shows 25 devices), upped to 256 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27797 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/dha.h | 2 +- vidix/pci.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vidix/dha.h b/vidix/dha.h index eb2a269c46..501215172d 100644 --- a/vidix/dha.h +++ b/vidix/dha.h @@ -42,7 +42,7 @@ #define MAX_DEV_PER_VENDOR_CFG1 64 #define MAX_PCI_DEVICES_PER_BUS 32 -#define MAX_PCI_DEVICES 64 +#define MAX_PCI_DEVICES 256 #define PCI_MULTIFUNC_DEV 0x80 #define PCI_COMMAND_IO 0x1 /* Enable response to I/O space */ diff --git a/vidix/pci.c b/vidix/pci.c index 1006b14a80..6576996362 100644 --- a/vidix/pci.c +++ b/vidix/pci.c @@ -441,7 +441,7 @@ struct pci_config_reg { #define MAX_DEV_PER_VENDOR_CFG1 64 #define MAX_PCI_DEVICES_PER_BUS 32 -#define MAX_PCI_DEVICES 64 +#define MAX_PCI_DEVICES 256 #define NF ((void (*)())NULL), { 0.0, 0, 0, NULL } #define PCI_MULTIFUNC_DEV 0x80 #define PCI_ID_REG 0x00 From 1ec2a1c33f9a846084c9d4286fba7543277e9711 Mon Sep 17 00:00:00 2001 From: ranma Date: Sat, 18 Oct 2008 16:07:47 +0000 Subject: [PATCH 108/134] pci.c includes dha.h, remove redundant MAX_* defines git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27798 b3059339-0415-0410-9bf9-f77b7e298cf2 --- vidix/pci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/vidix/pci.c b/vidix/pci.c index 6576996362..64d2a6c8b3 100644 --- a/vidix/pci.c +++ b/vidix/pci.c @@ -439,9 +439,6 @@ struct pci_config_reg { }; #endif /* !defined(__powerpc__) */ -#define MAX_DEV_PER_VENDOR_CFG1 64 -#define MAX_PCI_DEVICES_PER_BUS 32 -#define MAX_PCI_DEVICES 256 #define NF ((void (*)())NULL), { 0.0, 0, 0, NULL } #define PCI_MULTIFUNC_DEV 0x80 #define PCI_ID_REG 0x00 From 57281a3170854c12ec574135603fedbbce2cbff7 Mon Sep 17 00:00:00 2001 From: reimar Date: Sat, 18 Oct 2008 18:54:05 +0000 Subject: [PATCH 109/134] Use av_malloc/av_free for audio-related buffers to avoid crashes due to insufficient alignment on systems without memalign. http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/2008-October/058743.html git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27799 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/ad_twin.c | 2 +- libmpcodecs/dec_audio.c | 14 ++++---------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/libmpcodecs/ad_twin.c b/libmpcodecs/ad_twin.c index 58d1074682..77158f5bb1 100644 --- a/libmpcodecs/ad_twin.c +++ b/libmpcodecs/ad_twin.c @@ -138,7 +138,7 @@ static int init_vqf_audio_codec(sh_audio_t *sh_audio){ priv->framesize=TvqGetFrameSize(); sh_audio->audio_in_minsize=priv->framesize*in_fmt->nChannels; sh_audio->a_in_buffer_size=4*sh_audio->audio_in_minsize; - sh_audio->a_in_buffer=malloc(sh_audio->a_in_buffer_size); + sh_audio->a_in_buffer=av_malloc(sh_audio->a_in_buffer_size); sh_audio->a_in_buffer_len=0; diff --git a/libmpcodecs/dec_audio.c b/libmpcodecs/dec_audio.c index 23f19ac405..947b47bbfc 100644 --- a/libmpcodecs/dec_audio.c +++ b/libmpcodecs/dec_audio.c @@ -74,8 +74,7 @@ static int init_audio_codec(sh_audio_t *sh_audio) sh_audio->a_in_buffer_size = sh_audio->audio_in_minsize; mp_msg(MSGT_DECAUDIO, MSGL_V, MSGTR_AllocatingBytesForInputBuffer, sh_audio->a_in_buffer_size); - sh_audio->a_in_buffer = memalign(16, sh_audio->a_in_buffer_size); - memset(sh_audio->a_in_buffer, 0, sh_audio->a_in_buffer_size); + sh_audio->a_in_buffer = av_mallocz(sh_audio->a_in_buffer_size); sh_audio->a_in_buffer_len = 0; } @@ -84,12 +83,11 @@ static int init_audio_codec(sh_audio_t *sh_audio) mp_msg(MSGT_DECAUDIO, MSGL_V, MSGTR_AllocatingBytesForOutputBuffer, sh_audio->audio_out_minsize, MAX_OUTBURST, sh_audio->a_buffer_size); - sh_audio->a_buffer = memalign(16, sh_audio->a_buffer_size); + sh_audio->a_buffer = av_mallocz(sh_audio->a_buffer_size); if (!sh_audio->a_buffer) { mp_msg(MSGT_DECAUDIO, MSGL_ERR, MSGTR_CantAllocAudioBuf); return 0; } - memset(sh_audio->a_buffer, 0, sh_audio->a_buffer_size); sh_audio->a_buffer_len = 0; if (!sh_audio->ad_driver->init(sh_audio)) { @@ -306,12 +304,8 @@ void uninit_audio(sh_audio_t *sh_audio) free(sh_audio->a_out_buffer); sh_audio->a_out_buffer = NULL; sh_audio->a_out_buffer_size = 0; - if (sh_audio->a_buffer) - free(sh_audio->a_buffer); - sh_audio->a_buffer = NULL; - if (sh_audio->a_in_buffer) - free(sh_audio->a_in_buffer); - sh_audio->a_in_buffer = NULL; + av_freep(&sh_audio->a_buffer); + av_freep(&sh_audio->a_in_buffer); } From 9ea0b2eeb08c68cb413ede725e78c09b92951870 Mon Sep 17 00:00:00 2001 From: gpoirier Date: Sat, 18 Oct 2008 21:11:44 +0000 Subject: [PATCH 110/134] improve documentation of latest x264's options git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27800 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 177ee191ce..0cb13bdc40 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -10078,9 +10078,9 @@ I- and P-frames (default). .IPs 7 Enables rate-distortion optimization of macroblock types in all frames. .IPs 8 -Enables rate-distortion optimization of motion vectors in I- and P-frames. +Enables rate-distortion optimization of motion vectors and intra prediction modes in I- and P-frames. .IPs 9 -Enables rate-distortion optimization of motion vectors in all frames (best). +Enables rate-distortion optimization of motion vectors and intra prediction modes in all frames (best). .RE .PD 1 .RS @@ -10121,7 +10121,7 @@ Sets the strength of the psychovisual optimization. .PD 0 .RSs .IPs rd=<0.0\-10.0> -rate-distortion strength (requires subq>=6) (default: 1.0) +psy optimization strength (requires subq>=6) (default: 1.0) .IPs trell=<0.0\-10.0> trellis (requires trellis, experimental) (default: 0.0) .RE From 08ca24c62d1aac0d138b9cd3b9a0c846108d26a9 Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 19 Oct 2008 11:27:10 +0000 Subject: [PATCH 111/134] Clarify screenw/screenh options, patch by Christian Ohm, chr.ohm gmx net. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27801 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/man/en/mplayer.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1 index 0cb13bdc40..4b0d562e20 100644 --- a/DOCS/man/en/mplayer.1 +++ b/DOCS/man/en/mplayer.1 @@ -3206,12 +3206,12 @@ Not supported by all video output drivers. . .TP .B \-screenh -Specify the vertical screen resolution for video output drivers which +Specify the screen height for video output drivers which do not know the screen resolution like fbdev, x11 and TV-out. . .TP .B \-screenw -Specify the horizontal screen resolution for video output drivers which +Specify the screen width for video output drivers which do not know the screen resolution like fbdev, x11 and TV-out. . .TP From 33f7abfe2c8140922ddf90c28b43744957cdae3f Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 19 Oct 2008 11:47:46 +0000 Subject: [PATCH 112/134] Improve error message when screen width and height are not set. patch by Christian Ohm, chr.ohm gmx net git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27802 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libvo/vo_cvidix.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/libvo/vo_cvidix.c b/libvo/vo_cvidix.c index 0f7de905dc..2fe250c611 100644 --- a/libvo/vo_cvidix.c +++ b/libvo/vo_cvidix.c @@ -81,10 +81,15 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width,uint32_t d_h if(vo_screenwidth && vo_screenheight){ if(!vo_geometry)center=1; } - else mp_msg(MSGT_VO, MSGL_WARN, "vo_cvidix: warn: screenwidth and height not set assuming 640x480\n"); } - if(!vo_screenwidth)vo_screenwidth=640; - if(!vo_screenheight)vo_screenheight=480; + if(!vo_screenwidth){ + mp_msg(MSGT_VO, MSGL_WARN, "vo_cvidix: Screen width not set (see -screenw), assuming 640 pixels.\n"); + vo_screenwidth = 640; + } + if(!vo_screenheight){ + mp_msg(MSGT_VO, MSGL_WARN, "vo_cvidix: Screen height not set (see -screenh), assuming 480 pixels.\n"); + vo_screenheight = 480; + } swidth = width; sheight = height; sformat = format; From 834d4c5b7b9a2c0344445cfb1719e37838ea5844 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 19 Oct 2008 17:28:23 +0000 Subject: [PATCH 113/134] Remove useless casts. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27803 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/cache2.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stream/cache2.c b/stream/cache2.c index 7decd32d01..b7326b4832 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -375,10 +375,10 @@ static void ThreadProc( void *s ){ // cache thread mainloop: signal(SIGTERM,exit_sighandler); // kill while(1){ - if(!cache_fill((cache_vars_t*)s)){ + if(!cache_fill(s)){ usec_sleep(FILL_USLEEP_TIME); // idle } - cache_execute_control((cache_vars_t*)s); + cache_execute_control(s); // cache_stats(s->cache_data); } } From 3d1f36e3e704a830d6a4048a46367f5ee72f8747 Mon Sep 17 00:00:00 2001 From: reimar Date: Sun, 19 Oct 2008 18:05:45 +0000 Subject: [PATCH 114/134] Avoid CreateThread and especially TerminateThread since they cause a memleak. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27804 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/cache2.c | 39 ++++++++++++++++++--------------------- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/stream/cache2.c b/stream/cache2.c index b7326b4832..aa06bc1b51 100644 --- a/stream/cache2.c +++ b/stream/cache2.c @@ -20,7 +20,7 @@ #include "osdep/timer.h" #if defined(__MINGW32__) || defined(__CYGWIN__) #include -static DWORD WINAPI ThreadProc(void* s); +static void ThreadProc( void *s ); #elif defined(__OS2__) #define INCL_DOS #include @@ -198,14 +198,15 @@ int cache_fill(cache_vars_t* s){ } -static void cache_execute_control(cache_vars_t *s) { +static int cache_execute_control(cache_vars_t *s) { + int res = 1; static unsigned last; if (!s->stream->control) { s->stream_time_length = 0; s->control_new_pos = 0; s->control_res = STREAM_UNSUPPORTED; s->control = -1; - return; + return res; } if (GetTimerMS() - last > 99) { double len; @@ -215,7 +216,7 @@ static void cache_execute_control(cache_vars_t *s) { s->stream_time_length = 0; last = GetTimerMS(); } - if (s->control == -1) return; + if (s->control == -1) return res; switch (s->control) { case STREAM_CTRL_GET_CURRENT_TIME: case STREAM_CTRL_SEEK_TO_TIME: @@ -230,12 +231,15 @@ static void cache_execute_control(cache_vars_t *s) { case STREAM_CTRL_SET_ANGLE: s->control_res = s->stream->control(s->stream, s->control, &s->control_uint_arg); break; + case -2: + res = 0; default: s->control_res = STREAM_UNSUPPORTED; break; } s->control_new_pos = s->stream->pos; s->control = -1; + return res; } cache_vars_t* cache_init(int size,int sector){ @@ -277,11 +281,8 @@ cache_vars_t* cache_init(int size,int sector){ void cache_uninit(stream_t *s) { cache_vars_t* c = s->cache_data; if(!s->cache_pid) return; -#if defined(__MINGW32__) || defined(__CYGWIN__) - TerminateThread((HANDLE)s->cache_pid,0); -#elif defined(__OS2__) - DosKillThread( s->cache_pid ); - DosWaitThread( &s->cache_pid, DCWW_WAIT ); +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) + cache_do_control(s, -2, NULL); #else kill(s->cache_pid,SIGKILL); waitpid(s->cache_pid,NULL,0); @@ -332,15 +333,12 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){ if((stream->cache_pid=fork())){ #else { -#if defined(__MINGW32__) || defined(__CYGWIN__) - DWORD threadId; -#endif stream_t* stream2=malloc(sizeof(stream_t)); memcpy(stream2,s->stream,sizeof(stream_t)); s->stream=stream2; #if defined(__MINGW32__) || defined(__CYGWIN__) - stream->cache_pid = CreateThread(NULL,0,ThreadProc,s,0,&threadId); -#else // OS2 + stream->cache_pid = _beginthread( ThreadProc, 0, s ); +#else stream->cache_pid = _beginthread( ThreadProc, NULL, 256 * 1024, s ); #endif #endif @@ -362,25 +360,23 @@ int stream_enable_cache(stream_t *stream,int size,int min,int seek_limit){ #if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) } -#if defined(__MINGW32__) || defined(__CYGWIN__) -static DWORD WINAPI ThreadProc(void*s){ -#else // OS2 static void ThreadProc( void *s ){ #endif -#endif #ifdef CONFIG_GUI use_gui = 0; // mp_msg may not use gui stuff in forked code #endif // cache thread mainloop: signal(SIGTERM,exit_sighandler); // kill - while(1){ + do { if(!cache_fill(s)){ usec_sleep(FILL_USLEEP_TIME); // idle } - cache_execute_control(s); // cache_stats(s->cache_data); - } + } while (cache_execute_control(s)); +#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) + _endthread(); +#endif } int cache_stream_fill_buffer(stream_t *s){ @@ -455,6 +451,7 @@ int cache_do_control(stream_t *stream, int cmd, void *arg) { case STREAM_CTRL_GET_ASPECT_RATIO: case STREAM_CTRL_GET_NUM_ANGLES: case STREAM_CTRL_GET_ANGLE: + case -2: s->control = cmd; break; default: From b5e728431afe6f395fbf197eec13705542e0918e Mon Sep 17 00:00:00 2001 From: conrad Date: Sun, 19 Oct 2008 18:56:35 +0000 Subject: [PATCH 115/134] Convert typeof keyword into __typeof__ typeof is a gcc extension and the former is not accepted in C99 without GNU extensions enabled (e.g. via -fasm). This fixes compilation on PPC. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27805 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/yuv2rgb_altivec.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/libswscale/yuv2rgb_altivec.c b/libswscale/yuv2rgb_altivec.c index 43d224edfd..0223fdd54d 100644 --- a/libswscale/yuv2rgb_altivec.c +++ b/libswscale/yuv2rgb_altivec.c @@ -154,7 +154,7 @@ const vector unsigned char #define vec_merge3(x2,x1,x0,y0,y1,y2) \ do { \ - typeof(x0) o0,o2,o3; \ + __typeof__(x0) o0,o2,o3; \ o0 = vec_mergeh (x0,x1); \ y0 = vec_perm (o0, x2, perm_rgb_0); \ o2 = vec_perm (o0, x2, perm_rgb_1); \ @@ -165,7 +165,7 @@ do { \ #define vec_mstbgr24(x0,x1,x2,ptr) \ do { \ - typeof(x0) _0,_1,_2; \ + __typeof__(x0) _0,_1,_2; \ vec_merge3 (x0,x1,x2,_0,_1,_2); \ vec_st (_0, 0, ptr++); \ vec_st (_1, 0, ptr++); \ @@ -174,7 +174,7 @@ do { \ #define vec_mstrgb24(x0,x1,x2,ptr) \ do { \ - typeof(x0) _0,_1,_2; \ + __typeof__(x0) _0,_1,_2; \ vec_merge3 (x2,x1,x0,_0,_1,_2); \ vec_st (_0, 0, ptr++); \ vec_st (_1, 0, ptr++); \ @@ -222,12 +222,12 @@ do { \ #define vec_unh(x) \ (vector signed short) \ - vec_perm(x,(typeof(x)){0}, \ + vec_perm(x,(__typeof__(x)){0}, \ ((vector unsigned char){0x10,0x00,0x10,0x01,0x10,0x02,0x10,0x03,\ 0x10,0x04,0x10,0x05,0x10,0x06,0x10,0x07})) #define vec_unl(x) \ (vector signed short) \ - vec_perm(x,(typeof(x)){0}, \ + vec_perm(x,(__typeof__(x)){0}, \ ((vector unsigned char){0x10,0x08,0x10,0x09,0x10,0x0A,0x10,0x0B,\ 0x10,0x0C,0x10,0x0D,0x10,0x0E,0x10,0x0F})) @@ -240,7 +240,7 @@ do { \ ((vector unsigned short)vec_max (x,((vector signed short) {0})), \ (vector unsigned short)vec_max (y,((vector signed short) {0}))) -//#define out_pixels(a,b,c,ptr) vec_mstrgb32(typeof(a),((typeof (a)){0}),a,a,a,ptr) +//#define out_pixels(a,b,c,ptr) vec_mstrgb32(__typeof__(a),((__typeof__ (a)){0}),a,a,a,ptr) static inline void cvtyuvtoRGB (SwsContext *c, @@ -441,10 +441,10 @@ static int altivec_##name (SwsContext *c, \ } -#define out_abgr(a,b,c,ptr) vec_mstrgb32(typeof(a),((typeof (a)){0}),c,b,a,ptr) -#define out_bgra(a,b,c,ptr) vec_mstrgb32(typeof(a),c,b,a,((typeof (a)){0}),ptr) -#define out_rgba(a,b,c,ptr) vec_mstrgb32(typeof(a),a,b,c,((typeof (a)){0}),ptr) -#define out_argb(a,b,c,ptr) vec_mstrgb32(typeof(a),((typeof (a)){0}),a,b,c,ptr) +#define out_abgr(a,b,c,ptr) vec_mstrgb32(__typeof__(a),((__typeof__ (a)){0}),c,b,a,ptr) +#define out_bgra(a,b,c,ptr) vec_mstrgb32(__typeof__(a),c,b,a,((__typeof__ (a)){0}),ptr) +#define out_rgba(a,b,c,ptr) vec_mstrgb32(__typeof__(a),a,b,c,((__typeof__ (a)){0}),ptr) +#define out_argb(a,b,c,ptr) vec_mstrgb32(__typeof__(a),((__typeof__ (a)){0}),a,b,c,ptr) #define out_rgb24(a,b,c,ptr) vec_mstrgb24(a,b,c,ptr) #define out_bgr24(a,b,c,ptr) vec_mstbgr24(a,b,c,ptr) From 33c347f66ee0835ce65c70ff8c2568aa4069d07a Mon Sep 17 00:00:00 2001 From: diego Date: Sun, 19 Oct 2008 20:02:21 +0000 Subject: [PATCH 116/134] Translate a Hungarian comment, thanks to Denes Balatoni. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27806 b3059339-0415-0410-9bf9-f77b7e298cf2 --- loader/qtx/qtxload.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loader/qtx/qtxload.c b/loader/qtx/qtxload.c index 38e0decda2..0fb13aa9a4 100644 --- a/loader/qtx/qtxload.c +++ b/loader/qtx/qtxload.c @@ -7,7 +7,7 @@ #include "ldt_keeper.h" #include "mp_msg.h" -/* ilyen egy sima komponens */ +/* this is what a plain component looks like */ ComponentResult ComponentDummy( ComponentParameters *params, void **globals, From 6f6bf7f765c8eb182da524983790e5ae0b60643b Mon Sep 17 00:00:00 2001 From: diego Date: Mon, 20 Oct 2008 09:55:38 +0000 Subject: [PATCH 117/134] Replace typeof by __typeof__, the former is a non-portable GNU extension. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27807 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/stream_dvd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stream/stream_dvd.c b/stream/stream_dvd.c index b28cb874b7..ec0b7983c8 100644 --- a/stream/stream_dvd.c +++ b/stream/stream_dvd.c @@ -398,7 +398,7 @@ read_next: // See also gcc problem report PR c/7847: // http://gcc.gnu.org/cgi-bin/gnatsweb.pl?database=gcc&cmd=view+audit-trail&pr=7847 for(i=0;i<9;i++) { // check if all values zero: - typeof(d->dsi_pack.sml_agli.data[i].address) tmp_addr; + __typeof__(d->dsi_pack.sml_agli.data[i].address) tmp_addr; memcpy(&tmp_addr,&d->dsi_pack.sml_agli.data[i].address,sizeof(tmp_addr)); if((skip=tmp_addr)!=0) break; } From 92f9a746ae534d16f2cfdccae069bc6abdb6b7d3 Mon Sep 17 00:00:00 2001 From: reimar Date: Mon, 20 Oct 2008 18:08:10 +0000 Subject: [PATCH 118/134] Make cpuinfo.c compile under MinGW64 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27808 b3059339-0415-0410-9bf9-f77b7e298cf2 --- cpuinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpuinfo.c b/cpuinfo.c index e6526ea62c..ad9a49c42e 100644 --- a/cpuinfo.c +++ b/cpuinfo.c @@ -8,7 +8,7 @@ #include #include -#if defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION <= 3) && (__MINGW32_MINOR_VERSION < 10) +#if defined(__MINGW32__) && (__MINGW32_MAJOR_VERSION <= 3) && (__MINGW32_MINOR_VERSION < 10) && !defined(MINGW64) #include void gettimeofday(struct timeval* t,void* timezone) { struct timeb timebuffer; From ed0af8844ae1a89b758ff30f588cfef20c598efc Mon Sep 17 00:00:00 2001 From: diego Date: Tue, 21 Oct 2008 07:02:25 +0000 Subject: [PATCH 119/134] Determine default CD/DVD device in configure instead of using an #ifdef jungle. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27809 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 30 ++++++++++++++++++++++++++++++ stream/stream.h | 26 -------------------------- 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/configure b/configure index bbd26dc69d..1674447fb5 100755 --- a/configure +++ b/configure @@ -5372,6 +5372,34 @@ echores "$_sgiaudio" fi #if irix +# set default CD/DVD devices +if win32 || os2 ; then + default_cdrom_device="D:" +elif darwin ; then + default_cdrom_device="/dev/disk1" +elif dragonfly ; then + default_cdrom_device="/dev/cd0" +elif freebsd ; then + default_cdrom_device="/dev/acd0" +elif openbsd ; then + default_cdrom_device="/dev/rcd0a" +elif sunos ; then + default_cdrom_device="/vol/dev/aliases/cdrom0" +elif amigaos ; then + default_cdrom_device="a1ide.device:2" +else + default_cdrom_device="/dev/cdrom" +fi + +if win32 || os2 || dragonfly || freebsd || openbsd || sunos || amigaos ; then + default_dvd_device=$default_cdrom_device +elif darwin ; then + default_dvd_device="/dev/rdiskN" +else + default_dvd_device="/dev/dvd" +fi + + echocheck "VCD support" if linux || freebsd || netbsd || dragonfly || bsdos || darwin || sunos || mingw32; then _inputmodules="vcd $_inputmodules" @@ -8127,6 +8155,8 @@ $_def_words_endian /* DVD/VCD/CD */ +#define DEFAULT_CDROM_DEVICE "$default_cdrom_device" +#define DEFAULT_DVD_DEVICE "$default_dvd_device" $_def_bsdi_dvd $_def_cddb $_def_cdio diff --git a/stream/stream.h b/stream/stream.h index 4eab9b5d85..686288071f 100644 --- a/stream/stream.h +++ b/stream/stream.h @@ -65,32 +65,6 @@ #define STREAM_CTRL_GET_ANGLE 10 #define STREAM_CTRL_SET_ANGLE 11 -#ifdef __sun -#define DEFAULT_CDROM_DEVICE "/vol/dev/aliases/cdrom0" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__MINGW32__) || defined(__CYGWIN__) || defined(__OS2__) -#define DEFAULT_CDROM_DEVICE "D:" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__APPLE__) || defined(__DARWIN__) -#define DEFAULT_CDROM_DEVICE "/dev/disk1" -#define DEFAULT_DVD_DEVICE "/dev/rdiskN" -#elif defined(__OpenBSD__) -#define DEFAULT_CDROM_DEVICE "/dev/rcd0a" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) -#define DEFAULT_CDROM_DEVICE "/dev/acd0" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__DragonFly__) -#define DEFAULT_CDROM_DEVICE "/dev/cd0" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#elif defined(__AMIGAOS4__) -#define DEFAULT_CDROM_DEVICE "a1ide.device:2" -#define DEFAULT_DVD_DEVICE DEFAULT_CDROM_DEVICE -#else -#define DEFAULT_CDROM_DEVICE "/dev/cdrom" -#define DEFAULT_DVD_DEVICE "/dev/dvd" -#endif - #ifdef CONFIG_NETWORK #include "network.h" From 65e06f1c5f9e2cf373178dcc0946b3be56deaebf Mon Sep 17 00:00:00 2001 From: attila Date: Wed, 22 Oct 2008 16:08:26 +0000 Subject: [PATCH 120/134] increase the max RTP packet size to 5MB as modern Elphel cameras do produce such huge packets. Requested by Alexandre Poltorak git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27810 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpdemux/demux_rtp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmpdemux/demux_rtp.cpp b/libmpdemux/demux_rtp.cpp index 1e15063027..aaa525fc4c 100644 --- a/libmpdemux/demux_rtp.cpp +++ b/libmpdemux/demux_rtp.cpp @@ -371,7 +371,7 @@ extern "C" void demux_close_rtp(demuxer_t* demuxer) { ////////// Extra routines that help implement the above interface functions: -#define MAX_RTP_FRAME_SIZE 50000 +#define MAX_RTP_FRAME_SIZE 5000000 // >= the largest conceivable frame composed from one or more RTP packets static void afterReading(void* clientData, unsigned frameSize, From 6dcc6bee6d860a0f1e4248a3f61bac065f81ab33 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 22 Oct 2008 17:34:39 +0000 Subject: [PATCH 121/134] Try to improve binary codec pack installation instructions. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27811 b3059339-0415-0410-9bf9-f77b7e298cf2 --- README | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/README b/README index 7b697ee9fb..62e6d7b7a9 100644 --- a/README +++ b/README @@ -42,6 +42,16 @@ section of our homepage at http://www.mplayerhq.hu/dload.html +MPlayer has builtin support for the most common audio and video formats. For a +few formats no native decoder exists and external binary codecs are required +to handle them. Examples are newer RealVideo variants and a variety of rare +formats. However, binary codecs are NOT required in this day and age, they are +strictly optional. + +Please note that binary codecs only work on the processor architecture they +were compiled for. Choose the correct package for your processor. No other +package is necessary. + The GUI needs at least one skin and codec packages add support for some more video and audio formats. MPlayer does not come with any of these by default, you have to download and install them separately. @@ -64,13 +74,6 @@ _______________________________ STEP1: Installing Binary Codecs ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -MPlayer has builtin support for the most common audio and video formats. For a -few formats no native decoder exists and external binary codecs are required -to handle them, for example newer RealVideo variants and a variety of uncommon -formats. This step is not mandatory, but recommended for getting MPlayer to -play a broader range of formats. Please note that binary codecs only work on -the processor architecture they were compiled for. - Unpack the codecs archives and put the contents in a directory where MPlayer will find them. The default directory is /usr/local/lib/codecs/ (it used to be /usr/local/lib/win32 in the past, this also works) but you can change that to From 4722fa0b827b53ce49eb73941c6b981f0a375512 Mon Sep 17 00:00:00 2001 From: diego Date: Wed, 22 Oct 2008 23:39:39 +0000 Subject: [PATCH 122/134] IWMMXT optimizations were removed from our internal libmpeg2 copy, so now remove it from the library interface code as well. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27812 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vd_libmpeg2.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libmpcodecs/vd_libmpeg2.c b/libmpcodecs/vd_libmpeg2.c index a05ca07b8b..811701d837 100644 --- a/libmpcodecs/vd_libmpeg2.c +++ b/libmpcodecs/vd_libmpeg2.c @@ -83,9 +83,7 @@ static int init(sh_video_t *sh){ #elif ARCH_ARM accel |= MPEG2_ACCEL_ARM; #endif - #ifdef HAVE_IWMMXT - accel |= MPEG2_ACCEL_ARM_IWMMXT; - #elif HAVE_MVI + #ifdef HAVE_MVI accel |= MPEG2_ACCEL_ALPHA_MVI; #elif HAVE_VIS accel |= MPEG2_ACCEL_SPARC_VIS; From e2362bfa559e14c7d7cfefac00ca64c8be93927c Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 23 Oct 2008 09:53:08 +0000 Subject: [PATCH 123/134] Add ARM pld instruction test for FFmpeg ARM optimizations. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27813 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 1674447fb5..0322259d52 100755 --- a/configure +++ b/configure @@ -2440,6 +2440,14 @@ EOF fi if arm ; then + echocheck "ARM pld instruction" + cat > $TMPC << EOF +int main(void) { __asm__ volatile ("pld [r0]"); return 0; } +EOF + pld=no + cc_check && pld=yes + echores "$pld" + echocheck "ARMv5TE (Enhanced DSP Extensions)" if test $_armv5te = "auto" ; then cat > $TMPC << EOF @@ -2481,7 +2489,7 @@ EOF echores "$_iwmmxt" fi -_cpuexts_all='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV ARMV5TE ARMV6 ARMVFP IWMMXT MLIB MMI SH4 VIS MVI' +_cpuexts_all='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMVFP IWMMXT MLIB MMI SH4 VIS MVI' test "$_altivec" = yes && _cpuexts="ALTIVEC $_cpuexts" test "$_mmx" = yes && _cpuexts="MMX $_cpuexts" test "$_mmxext" = yes && _cpuexts="MMX2 $_cpuexts" @@ -2492,6 +2500,7 @@ test "$_sse2" = yes && _cpuexts="SSE2 $_cpuexts" test "$_ssse3" = yes && _cpuexts="SSSE3 $_cpuexts" test "$_cmov" = yes && _cpuexts="CMOV $_cpuexts" test "$_fast_cmov" = yes && _cpuexts="FAST_CMOV $_cpuexts" +test "$pld" = yes && _cpuexts="PLD $_cpuexts" test "$_armv5te" = yes && _cpuexts="ARMV5TE $_cpuexts" test "$_armv6" = yes && _cpuexts="ARMV6 $_cpuexts" test "$_armvfp" = yes && _cpuexts="ARMVFP $_cpuexts" From 1839492b59ab89d1bf3698bb8926d1407adf9939 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 23 Oct 2008 10:58:47 +0000 Subject: [PATCH 124/134] SH4 is an architecture, not a CPU extension. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27814 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 0322259d52..30a62e3858 100755 --- a/configure +++ b/configure @@ -2489,7 +2489,7 @@ EOF echores "$_iwmmxt" fi -_cpuexts_all='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMVFP IWMMXT MLIB MMI SH4 VIS MVI' +_cpuexts_all='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMVFP IWMMXT MLIB MMI VIS MVI' test "$_altivec" = yes && _cpuexts="ALTIVEC $_cpuexts" test "$_mmx" = yes && _cpuexts="MMX $_cpuexts" test "$_mmxext" = yes && _cpuexts="MMX2 $_cpuexts" From 85d4dfe0ad6f85bf7f130b1eeed9a919b788a42b Mon Sep 17 00:00:00 2001 From: compn Date: Thu, 23 Oct 2008 15:36:59 +0000 Subject: [PATCH 125/134] remove outdated message about outfmt=i420 git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27815 b3059339-0415-0410-9bf9-f77b7e298cf2 --- DOCS/xml/en/tvinput.xml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/DOCS/xml/en/tvinput.xml b/DOCS/xml/en/tvinput.xml index 8be25d1389..f0d3641034 100644 --- a/DOCS/xml/en/tvinput.xml +++ b/DOCS/xml/en/tvinput.xml @@ -110,11 +110,6 @@ Here are just a few tips: images, the captured image will be actually later converted back into YV12 so the only thing you achieve is a massive waste of CPU power. - - To specify the I420 colorspace (), you have to - add an option due to a fourcc conflict with an - Intel Indeo video codec. - There are several ways of capturing audio. You can grab the sound either using your sound card via an external cable connection between video card and From e9b43bec0944b6a0882d0520d70edb5f4c7876f3 Mon Sep 17 00:00:00 2001 From: diego Date: Thu, 23 Oct 2008 16:23:42 +0000 Subject: [PATCH 126/134] cosmetics: typo fix git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27816 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/rgb2rgb_template.c | 2 +- libswscale/swscale_template.c | 2 +- libswscale/yuv2rgb_template.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index 5f9de959c6..ab82035044 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -57,7 +57,7 @@ #endif #ifdef HAVE_3DNOW -/* On K6 femms is faster than emms. On K7 femms is directly mapped on emms. */ +/* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */ #define EMMS "femms" #else #define EMMS "emms" diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c index 2c2fa0ce22..40ee6c4746 100644 --- a/libswscale/swscale_template.c +++ b/libswscale/swscale_template.c @@ -30,7 +30,7 @@ #undef SFENCE #ifdef HAVE_3DNOW -/* On K6 femms is faster than emms. On K7 femms is directly mapped on emms. */ +/* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */ #define EMMS "femms" #else #define EMMS "emms" diff --git a/libswscale/yuv2rgb_template.c b/libswscale/yuv2rgb_template.c index c9a75ece9f..e8b6ff30cf 100644 --- a/libswscale/yuv2rgb_template.c +++ b/libswscale/yuv2rgb_template.c @@ -31,7 +31,7 @@ #undef SFENCE #ifdef HAVE_3DNOW -/* On K6 femms is faster than emms. On K7 femms is directly mapped on emms. */ +/* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */ #define EMMS "femms" #else #define EMMS "emms" From f42e50f3679d7ce362d6ca5652dd90c6fd289073 Mon Sep 17 00:00:00 2001 From: vitor Date: Thu, 23 Oct 2008 19:13:11 +0000 Subject: [PATCH 127/134] Fix broken palette8to*. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27817 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/rgb2rgb.c | 71 ++++---------------------------------------- libswscale/rgb2rgb.h | 6 ++-- libswscale/swscale.c | 41 +++++++++++++++++++++---- 3 files changed, 43 insertions(+), 75 deletions(-) diff --git a/libswscale/rgb2rgb.c b/libswscale/rgb2rgb.c index 13388ac85a..b55141264a 100644 --- a/libswscale/rgb2rgb.c +++ b/libswscale/rgb2rgb.c @@ -213,84 +213,23 @@ void sws_rgb2rgb_init(int flags){ } /** - * Palette is assumed to contain BGR32. + * Convert the palette to the same packet 32-bit format as the palette */ -void palette8torgb32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette) +void palette8topacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette) { long i; -/* for (i=0; i dst format: ABC */ -void palette8torgb24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette) +void palette8topacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette) { long i; -/* - Writes 1 byte too much and might cause alignment issues on some architectures? - for (i=0; i %s converter\n", sws_format_name(srcFormat), sws_format_name(dstFormat)); break; } @@ -2343,8 +2345,10 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d if ((usePal(srcFormat) && ( dstFormat == PIX_FMT_RGB32 || + dstFormat == PIX_FMT_RGB32_1 || dstFormat == PIX_FMT_RGB24 || dstFormat == PIX_FMT_BGR32 || + dstFormat == PIX_FMT_BGR32_1 || dstFormat == PIX_FMT_BGR24))) c->swScale= pal2rgbWrapper; @@ -2739,7 +2743,34 @@ int sws_scale(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY, u= av_clip_uint8((RU*r + GU*g + BU*b + (257<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT); v= av_clip_uint8((RV*r + GV*g + BV*b + (257<<(RGB2YUV_SHIFT-1)))>>RGB2YUV_SHIFT); c->pal_yuv[i]= y + (u<<8) + (v<<16); - c->pal_rgb[i]= b + (g<<8) + (r<<16); + + + switch(c->dstFormat) { + case PIX_FMT_BGR32: +#ifndef WORDS_BIGENDIAN + case PIX_FMT_RGB24: +#endif + c->pal_rgb[i]= r + (g<<8) + (b<<16); + break; + case PIX_FMT_BGR32_1: +#ifdef WORDS_BIGENDIAN + case PIX_FMT_BGR24: +#endif + c->pal_rgb[i]= (r + (g<<8) + (b<<16)) << 8; + break; + case PIX_FMT_RGB32_1: +#ifdef WORDS_BIGENDIAN + case PIX_FMT_RGB24: +#endif + c->pal_rgb[i]= (b + (g<<8) + (r<<16)) << 8; + break; + case PIX_FMT_RGB32: +#ifndef WORDS_BIGENDIAN + case PIX_FMT_BGR24: +#endif + default: + c->pal_rgb[i]= b + (g<<8) + (r<<16); + } } } From d979a142fd342fc4e8a44f8f34f6437df68c60cb Mon Sep 17 00:00:00 2001 From: vitor Date: Thu, 23 Oct 2008 19:20:14 +0000 Subject: [PATCH 128/134] Cosmetics: alignment git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27818 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libswscale/swscale.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 1ad488c57f..a926bade05 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -2344,10 +2344,10 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d c->swScale= rgb2rgbWrapper; if ((usePal(srcFormat) && ( - dstFormat == PIX_FMT_RGB32 || + dstFormat == PIX_FMT_RGB32 || dstFormat == PIX_FMT_RGB32_1 || - dstFormat == PIX_FMT_RGB24 || - dstFormat == PIX_FMT_BGR32 || + dstFormat == PIX_FMT_RGB24 || + dstFormat == PIX_FMT_BGR32 || dstFormat == PIX_FMT_BGR32_1 || dstFormat == PIX_FMT_BGR24))) c->swScale= pal2rgbWrapper; From 50b71e8fabd787a4c255a9219362622b59f04655 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 24 Oct 2008 09:08:03 +0000 Subject: [PATCH 129/134] 10l: Revert SH4 removal, which is required in FFmpeg. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27819 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 30a62e3858..0322259d52 100755 --- a/configure +++ b/configure @@ -2489,7 +2489,7 @@ EOF echores "$_iwmmxt" fi -_cpuexts_all='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMVFP IWMMXT MLIB MMI VIS MVI' +_cpuexts_all='ALTIVEC MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMVFP IWMMXT MLIB MMI SH4 VIS MVI' test "$_altivec" = yes && _cpuexts="ALTIVEC $_cpuexts" test "$_mmx" = yes && _cpuexts="MMX $_cpuexts" test "$_mmxext" = yes && _cpuexts="MMX2 $_cpuexts" From c0f231ac477aa6ee55526e6401ed114026473980 Mon Sep 17 00:00:00 2001 From: diego Date: Fri, 24 Oct 2008 09:13:04 +0000 Subject: [PATCH 130/134] Conditionally declare a conditionally used variable, fixes the warning: stream/dvb_tune.c:99: warning: unused variable 'sec_dev' git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27820 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/dvb_tune.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/stream/dvb_tune.c b/stream/dvb_tune.c index 64a2b0fb0a..b42d69d17e 100644 --- a/stream/dvb_tune.c +++ b/stream/dvb_tune.c @@ -96,7 +96,10 @@ int dvb_set_ts_filt(int fd, uint16_t pid, dmx_pes_type_t pestype); int dvb_open_devices(dvb_priv_t *priv, int n, int demux_cnt) { int i; - char frontend_dev[32], dvr_dev[32], demux_dev[32], sec_dev[32]; + char frontend_dev[32], dvr_dev[32], demux_dev[32]; +#ifndef CONFIG_DVB_HEAD + char sec_dev[32]; +#endif #ifdef CONFIG_DVB_HEAD sprintf(frontend_dev, "/dev/dvb/adapter%d/frontend0", n); From e313dd3b4d5f931bc1c72033a967c2dab9aa2515 Mon Sep 17 00:00:00 2001 From: ptt Date: Fri, 24 Oct 2008 09:18:28 +0000 Subject: [PATCH 131/134] updated to r27402, jumping over 27072, by now, i'll do soon git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27821 b3059339-0415-0410-9bf9-f77b7e298cf2 --- help/help_mp-it.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/help/help_mp-it.h b/help/help_mp-it.h index dfecd6edeb..55bf3c071f 100644 --- a/help/help_mp-it.h +++ b/help/help_mp-it.h @@ -2,7 +2,7 @@ // Updated by: Roberto Togni // Updated by: PaulTT -// Updated to help_mp-en.h r27071 +// Updated to help_mp-en.h r27402 // ========================= MPlayer help =========================== @@ -1092,6 +1092,11 @@ static char help_text[]= // audio_out.c #define MSGTR_AO_ALSA9_1x_Removed "audio_out: i moduli alsa9/alsa1x sono stati rimossi, ora usa -ao alsa.\n" +#define MSGTR_AO_TryingPreferredAudioDriver "Provo con il driver audio preferito '%.*s', opzioni '%s'\n" +#define MSGTR_AO_NoSuchDriver "driver audio '%.*s' non trovato\n" +#define MSGTR_AO_FailedInit "Inizializzazione del driver audio '%s' non riuscita\n" +#define MSGTR_AO_TryingEveryKnown "Provo con tutti i driver audio conosciuti...\n" + // ao_oss.c #define MSGTR_AO_OSS_CantOpenMixer "[AO OSS] audio_setup: Non posso aprire il dispositivo mixer %s: %s\n" From 1a089681fc7b66bd6dadc76b98be0d1364004c79 Mon Sep 17 00:00:00 2001 From: uau Date: Sat, 25 Oct 2008 00:07:59 +0000 Subject: [PATCH 132/134] vf_palette: Fix compilation after libswscale API changes Patch from Guillaume Poirier. I didn't test the functionality of the filter but at least it fixes compilation. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27822 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libmpcodecs/vf_palette.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/libmpcodecs/vf_palette.c b/libmpcodecs/vf_palette.c index 70b4379759..ece59b2cac 100644 --- a/libmpcodecs/vf_palette.c +++ b/libmpcodecs/vf_palette.c @@ -108,15 +108,15 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ break; case 24: if (IMGFMT_IS_BGR(dmpi->imgfmt)) - palette8tobgr24(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]); + palette8topacked24(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]); else - palette8torgb24(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]); + palette8topacked24(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]); break; case 32: if (IMGFMT_IS_BGR(dmpi->imgfmt)) - palette8tobgr32(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]); + palette8topacked32(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]); else - palette8torgb32(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]); + palette8topacked32(mpi->planes[0],dmpi->planes[0],mpi->h*mpi->w,mpi->planes[1]); break; } } else { @@ -139,15 +139,15 @@ static int put_image(struct vf_instance_s* vf, mp_image_t *mpi, double pts){ break; case 24: if (IMGFMT_IS_BGR(dmpi->imgfmt)) - palette8tobgr24(src,dst,mpi->w,mpi->planes[1]); + palette8topacked24(src,dst,mpi->w,mpi->planes[1]); else - palette8torgb24(src,dst,mpi->w,mpi->planes[1]); + palette8topacked24(src,dst,mpi->w,mpi->planes[1]); break; case 32: if (IMGFMT_IS_BGR(dmpi->imgfmt)) - palette8tobgr32(src,dst,mpi->w,mpi->planes[1]); + palette8topacked32(src,dst,mpi->w,mpi->planes[1]); else - palette8torgb32(src,dst,mpi->w,mpi->planes[1]); + palette8topacked32(src,dst,mpi->w,mpi->planes[1]); break; } } From ff6e6ec743922a77517502029de0d0f655af9711 Mon Sep 17 00:00:00 2001 From: uau Date: Sat, 25 Oct 2008 00:08:02 +0000 Subject: [PATCH 133/134] configure: Set CONFIG_FFT to fix libavcodec compilation After the latest FFmpeg changes some codecs require that CONFIG_FFT is also set if the codec is enabled. This commit enables CONFIG_FFT unconditionally though in principle all the codecs requiring it could be disabled. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27823 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/configure b/configure index 0322259d52..5dcafbf2b8 100755 --- a/configure +++ b/configure @@ -7999,6 +7999,8 @@ CONFIG_POSTPROC = yes # Prevent building libavcodec/imgresample.c with conflicting symbols CONFIG_SWSCALE=yes CONFIG_ZLIB=$_zlib +# Some FFmpeg codecs depend on this. Enable it unconditionally for now. +CONFIG_FFT=yes HAVE_PTHREADS = $_pthreads HAVE_W32THREADS = $_w32threads @@ -8417,6 +8419,11 @@ $_def_threads #define CONFIG_DEMUXERS 1 #define ENABLE_DEMUXERS 1 + +/* Some FFmpeg codecs depend on this. Enable it unconditionally for now. */ +#define CONFIG_FFT 1 +#define ENABLE_FFT 1 + $_def_muxers /* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */ From 15a80092161a1cd305f8005c780c744416a5252b Mon Sep 17 00:00:00 2001 From: diego Date: Sat, 25 Oct 2008 01:43:24 +0000 Subject: [PATCH 134/134] cosmetics: Reorder some FFmpeg-related config.h and config.mak entries. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@27824 b3059339-0415-0410-9bf9-f77b7e298cf2 --- configure | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/configure b/configure index 5dcafbf2b8..2a255e755f 100755 --- a/configure +++ b/configure @@ -7982,8 +7982,9 @@ LIBSUF=.a LIBNAME=\$(LIBPREF)\$(NAME)\$(LIBSUF) CONFIG_ENCODERS=yes +# Some FFmpeg codecs depend on this. Enable it unconditionally for now. +CONFIG_FFT=yes CONFIG_GPL=yes -CONFIG_MUXERS=$_mencoder CONFIG_LIBAMR=$_libamr CONFIG_LIBAMR_NB=$_libamr_nb CONFIG_LIBAMR_WB=$_libamr_wb @@ -7995,12 +7996,11 @@ CONFIG_LIBVORBIS=$_libvorbis CONFIG_LIBX264=$_x264_lavc CONFIG_LIBXVID=$_xvid_lavc CONFIG_MLIB = $_mlib +CONFIG_MUXERS=$_mencoder CONFIG_POSTPROC = yes # Prevent building libavcodec/imgresample.c with conflicting symbols CONFIG_SWSCALE=yes CONFIG_ZLIB=$_zlib -# Some FFmpeg codecs depend on this. Enable it unconditionally for now. -CONFIG_FFT=yes HAVE_PTHREADS = $_pthreads HAVE_W32THREADS = $_w32threads @@ -8412,6 +8412,16 @@ $_def_threads #define ENABLE_SMALL 0 #define ENABLE_GRAY 0 +/* Some FFmpeg codecs depend on this. Enable it unconditionally for now. */ +#define CONFIG_FFT 1 +#define ENABLE_FFT 1 + +/* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */ +#define HAVE_EBX_AVAILABLE 1 +#ifndef MP_DEBUG +#define HAVE_EBP_AVAILABLE 1 +#endif + #define CONFIG_DECODERS 1 #define ENABLE_DECODERS 1 #define CONFIG_ENCODERS 1 @@ -8420,18 +8430,8 @@ $_def_threads #define CONFIG_DEMUXERS 1 #define ENABLE_DEMUXERS 1 -/* Some FFmpeg codecs depend on this. Enable it unconditionally for now. */ -#define CONFIG_FFT 1 -#define ENABLE_FFT 1 - $_def_muxers -/* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */ -#define HAVE_EBX_AVAILABLE 1 -#ifndef MP_DEBUG -#define HAVE_EBP_AVAILABLE 1 -#endif - /* External libraries used through libavcodec. */ $_def_faac_lavc $_def_libamr