aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--DOCS/man/de/mplayer.128
-rw-r--r--DOCS/man/en/mplayer.148
-rw-r--r--DOCS/man/fr/mplayer.14
-rw-r--r--DOCS/man/hu/mplayer.171
-rw-r--r--DOCS/xml/en/codecs.xml309
-rw-r--r--DOCS/xml/en/containers.xml520
-rw-r--r--DOCS/xml/en/documentation.xml1
-rw-r--r--DOCS/xml/en/encoding-guide.xml2
-rw-r--r--DOCS/xml/en/tvinput.xml5
-rw-r--r--DOCS/xml/en/video.xml12
-rw-r--r--DOCS/xml/hu/faq.xml2
-rw-r--r--DOCS/xml/hu/install.xml14
-rw-r--r--DOCS/xml/hu/mencoder.xml12
-rw-r--r--Makefile2
-rw-r--r--README17
-rw-r--r--TOOLS/fastmemcpybench.c2
-rw-r--r--TOOLS/netstream.c7
-rw-r--r--cfg-common-opts.h3
-rw-r--r--cfg-common.h6
-rwxr-xr-xconfigure1236
-rw-r--r--cpudetect.c24
-rw-r--r--cpuinfo.c8
-rw-r--r--drivers/radeon_vid.c4
-rw-r--r--get_path.c15
-rw-r--r--help/help_mp-it.h7
-rw-r--r--liba52/downmix.c56
-rw-r--r--liba52/imdct.c20
-rw-r--r--liba52/imdct_3dnow.h38
-rw-r--r--liba52/liba52_changes.diff122
-rw-r--r--liba52/resample_mmx.c22
-rw-r--r--liba52/srfftp_3dnow.h10
-rw-r--r--liba52/test.c2
-rw-r--r--libaf/af_ladspa.c11
-rw-r--r--libaf/reorder_ch.c2
-rw-r--r--libaf/reorder_ch.h5
-rw-r--r--libao2/ao_alsa.c14
-rw-r--r--libao2/ao_sdl.c2
-rw-r--r--libdvdread/dvd_reader.c5
-rw-r--r--libdvdread/libdvdread_changes.diff25
-rw-r--r--libmenu/vf_menu.c2
-rw-r--r--libmpcodecs/ad_ffmpeg.c2
-rw-r--r--libmpcodecs/ad_twin.c2
-rw-r--r--libmpcodecs/dec_audio.c14
-rw-r--r--libmpcodecs/dec_video.c4
-rw-r--r--libmpcodecs/native/mmx.h10
-rw-r--r--libmpcodecs/pullup.c6
-rw-r--r--libmpcodecs/vd.c3
-rw-r--r--libmpcodecs/vd_libmpeg2.c4
-rw-r--r--libmpcodecs/vd_zrmjpeg.c2
-rw-r--r--libmpcodecs/vf_decimate.c2
-rw-r--r--libmpcodecs/vf_divtc.c6
-rw-r--r--libmpcodecs/vf_eq.c4
-rw-r--r--libmpcodecs/vf_eq2.c4
-rw-r--r--libmpcodecs/vf_filmdint.c22
-rw-r--r--libmpcodecs/vf_fspp.c16
-rw-r--r--libmpcodecs/vf_geq.c1
-rw-r--r--libmpcodecs/vf_halfpack.c4
-rw-r--r--libmpcodecs/vf_ilpack.c6
-rw-r--r--libmpcodecs/vf_ivtc.c4
-rw-r--r--libmpcodecs/vf_noise.c10
-rw-r--r--libmpcodecs/vf_palette.c16
-rw-r--r--libmpcodecs/vf_pp7.c6
-rw-r--r--libmpcodecs/vf_qp.c2
-rw-r--r--libmpcodecs/vf_sab.c2
-rw-r--r--libmpcodecs/vf_scale.c2
-rw-r--r--libmpcodecs/vf_spp.c10
-rw-r--r--libmpcodecs/vf_tfields.c16
-rw-r--r--libmpcodecs/vf_unsharp.c4
-rw-r--r--libmpcodecs/vf_uspp.c4
-rw-r--r--libmpcodecs/vf_yadif.c6
-rw-r--r--libmpcodecs/vf_zrmjpeg.c21
-rw-r--r--libmpdemux/asfguid.h10
-rw-r--r--libmpdemux/asfheader.c10
-rw-r--r--libmpdemux/demux_audio.c1
-rw-r--r--libmpdemux/demux_nut.c2
-rw-r--r--libmpdemux/demux_rtp.cpp2
-rw-r--r--libmpdemux/demux_ty_osd.c4
-rw-r--r--libmpdemux/demuxer.h8
-rw-r--r--libswscale/rgb2rgb.c71
-rw-r--r--libswscale/rgb2rgb.h6
-rw-r--r--libswscale/rgb2rgb_template.c255
-rw-r--r--libswscale/swscale-example.c4
-rw-r--r--libswscale/swscale.c135
-rw-r--r--libswscale/swscale_internal.h5
-rw-r--r--libswscale/swscale_template.c167
-rw-r--r--libswscale/yuv2rgb.c9
-rw-r--r--libswscale/yuv2rgb_altivec.c20
-rw-r--r--libswscale/yuv2rgb_template.c56
-rw-r--r--libswscale/yuv2rgb_vis.c4
-rw-r--r--libvo/aclib_template.c24
-rw-r--r--libvo/osd_template.c42
-rw-r--r--libvo/video_out.c2
-rw-r--r--libvo/vo_cvidix.c11
-rw-r--r--libvo/vo_directx.c2
-rw-r--r--libvo/vo_dxr2.c3
-rw-r--r--libvo/vo_gl2.c2
-rw-r--r--libvo/vo_sdl.c2
-rw-r--r--libvo/vo_winvidix.c1
-rw-r--r--libvo/vo_x11.c8
-rw-r--r--libvo/vo_xvidix.c41
-rw-r--r--libvo/x11_common.c9
-rw-r--r--libvo/x11_common.h6
-rw-r--r--loader/com.h4
-rw-r--r--loader/drv.c8
-rw-r--r--loader/ldt_keeper.c6
-rw-r--r--loader/qtx/qtxload.c6
-rw-r--r--loader/win32.c28
-rw-r--r--loader/wine/windef.h2
-rw-r--r--loader/wine/winnt.h2
-rw-r--r--mangle.h6
-rw-r--r--mencoder.c10
-rw-r--r--mp3lib/dct36_3dnow.c2
-rw-r--r--mp3lib/dct64_3dnow.c2
-rw-r--r--mp3lib/dct64_k7.c2
-rw-r--r--mp3lib/dct64_mmx.c2
-rw-r--r--mp3lib/dct64_sse.c20
-rw-r--r--mp3lib/decode_i586.c2
-rw-r--r--mp3lib/decode_mmx.c2
-rw-r--r--mplayer.c22
-rw-r--r--stream/cache2.c59
-rw-r--r--stream/dvb_tune.c5
-rw-r--r--stream/librtsp/rtsp_rtp.c1
-rw-r--r--stream/network.h3
-rw-r--r--stream/stream.h1
-rw-r--r--stream/stream_cddb.c8
-rw-r--r--stream/stream_dvd.c2
-rw-r--r--stream/stream_file.c2
-rw-r--r--stream/stream_netstream.c2
-rw-r--r--stream/stream_netstream.h (renamed from stream/netstream.h)0
-rw-r--r--stream/stream_vcd.c12
-rw-r--r--stream/tvi_dshow.c46
-rw-r--r--subreader.c2
-rw-r--r--vidix/AsmMacros.h9
-rw-r--r--vidix/dha.c2
-rw-r--r--vidix/dha.h2
-rw-r--r--vidix/nvidia_vid.c9
-rw-r--r--vidix/pci.c3
-rw-r--r--vidix/s3_regs.h2
-rw-r--r--vidix/sysdep/AsmMacros_powerpc.h2
-rw-r--r--vidix/sysdep/AsmMacros_sparc.h12
-rw-r--r--vidix/sysdep/AsmMacros_x86.h16
-rw-r--r--vidix/sysdep/libdha_win32.c5
-rw-r--r--vidix/sysdep/pci_os2.c2
143 files changed, 1503 insertions, 2662 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ützt).
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ützung aus.
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ützt.
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ützlich ist, um MPlayer in einen Browser einzubetten (z.B.\&
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ür MPEG[12] von Bedeutung.
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>
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ür jeden vorhandenen Stream
(Verzögerung von Demuxing zu Decodierung).
.
.TP
-.B "o\ \ \ \ \ \ "
-FIXME: Dokumentiere diese Option.
-.
.
.
.\" --------------------------------------------------------------------------
diff --git a/DOCS/man/en/mplayer.1 b/DOCS/man/en/mplayer.1
index a169cbe613..bd1f196ced 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
@@ -3206,12 +3206,12 @@ Not supported by all video output drivers.
.
.TP
.B \-screenh <pixels>
-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 <pixels>
-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
@@ -9093,7 +9093,6 @@ FIXME: Document this.
FIXME: Document this.
.
.
-.
.SS nuv (\-nuvopts)
.
Nuppel video is based on RTJPEG and LZO.
@@ -10043,7 +10042,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.
@@ -10068,12 +10067,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 and intra prediction modes in I- and P-frames.
+.IPs 9
+Enables rate-distortion optimization of motion vectors and intra prediction modes in all frames (best).
.RE
.PD 1
.RS
@@ -10095,18 +10100,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
@@ -10120,6 +10114,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>
+psy optimization 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).
@@ -10515,7 +10522,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
diff --git a/DOCS/man/fr/mplayer.1 b/DOCS/man/fr/mplayer.1
index eacff95201..22549f410f 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être au lieu celui de l'écran.
.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
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ülsõ ablak is meg van adva a \-win opcióval, akkor az x és y
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ájl neve a képkocka sorszáma lesz vezetõ nullákkal.
.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=<könyvtárnév>
+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ású dekódolás mellékhatásai.
Ha a <w> is meg van adva, a lowres dekódolás csak akkor lesz használva, ha a
videó szélessége nagyobb vagy egyenlõ mint <w>.
.RE
-.IPs "o\ \ \ \ "
-FIXME: nem dokumentált
+.B o=<kulcs>=<érték>[,<kulcs>=<é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=<szám> (csak MPEG-2)"
Kihagyja a megadott számú makroblokk sort a tetején.
.IPs "st=<szám> (csak MPEG-2)"
@@ -7652,9 +7667,11 @@ Nézd meg a forrást a részletekért.
.
.TP
.B o=<kulcs>=<érték>[,<kulcs>=<é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ágainak megállapításához maximálisan analizálndó hossz másodpe
Kényszeríti a megadott libavformat demuxer-t.
.
.TP
-.B "o\ \ \ \ \ \ "
-FIXME: nem dokumentált
+.B o=<kulcs>=<érték>[,<kulcs>=<é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átum
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 van értelme.
Néha szükséges növelni a "buffer alulcsordulás" elkerüléséhez.
.
.TP
-.B "o\ \ \ \ \ \ "
-FIXME: nem dokumentált
+.B o=<kulcs>=<érték>[,<kulcs>=<é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=<méret>
diff --git a/DOCS/xml/en/codecs.xml b/DOCS/xml/en/codecs.xml
index 909efa2ef9..ad873d4877 100644
--- a/DOCS/xml/en/codecs.xml
+++ b/DOCS/xml/en/codecs.xml
@@ -15,65 +15,7 @@ of our homepage.
</para>
<para>
-The most important ones above all:
-</para>
-
-<itemizedlist>
-<listitem><para>
- <emphasis role="bold">MPEG-1</emphasis> (<emphasis role="bold">VCD</emphasis>) and
- <emphasis role="bold">MPEG-2</emphasis> (<emphasis role="bold">DVD</emphasis>) video
-</para></listitem>
-<listitem><para>
- native decoders for <emphasis role="bold">all DivX variants,
- 3ivX, Microsoft MPEG-4</emphasis> v1, v2 and other MPEG-4 variants
-</para></listitem>
-<listitem><para>
- native decoder for <emphasis role="bold">Windows Media Video 7/8</emphasis>
- (<emphasis role="bold">WMV1/WMV2</emphasis>), and Win32 DLL decoder
- for <emphasis role="bold">Windows Media Video 9</emphasis>
- (<emphasis role="bold">WMV3</emphasis>),
- both used in <filename>.wmv</filename> files
-</para></listitem>
-<listitem><para>
- native <emphasis role="bold">Sorenson 1 (SVQ1)</emphasis> decoder
-</para></listitem>
-<listitem><para>
- native <emphasis role="bold">Sorenson 3 (SVQ3)</emphasis> decoder
-</para></listitem>
-<listitem><para>
- <emphasis role="bold">3ivx</emphasis> v1, v2 decoder
-</para></listitem>
-<listitem><para>
- Cinepak and <emphasis role="bold">Intel Indeo</emphasis> codecs
- (3.1,3.2,4.1,5.0)
-</para></listitem>
-<listitem><para>
- <emphasis role="bold">MJPEG</emphasis>, AVID, VCR2, ASV2 and other hardware
- formats
-</para></listitem>
-<listitem><para>
- VIVO 1.0, 2.0, I263 and other <emphasis role="bold">H.263(+)</emphasis>
- variants
-</para></listitem>
-<listitem><para>
- FLI/FLC
-</para></listitem>
-<listitem><para>
- <emphasis role="bold">RealVideo 1.0 &amp; 2.0</emphasis> from
- <systemitem class="library">libavcodec</systemitem>, and
- <emphasis role="bold">RealVideo 3.0 &amp; 4.0</emphasis> codecs using
- RealPlayer libraries
-</para></listitem>
-<listitem><para>
- native decoder for HuffYUV
-</para></listitem>
-<listitem><para>
- Various old simple RLE-like formats
-</para></listitem>
-</itemizedlist>
-
-<para>
-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 <link linkend="codec-importing">codec importing HOWTO</link>
and help us add support for it.
</para>
@@ -116,22 +58,8 @@ Just run <filename>./configure</filename> and compile.
<para>
<ulink url="http://www.xvid.org">Xvid</ulink> 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.
-</para>
-
-<para>
-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.
-</para>
-
-<para>
-Note that Xvid is not necessary to decode Xvid-encoded video.
-<systemitem class="library">libavcodec</systemitem> is used by
+compliant video codec. Note that Xvid is not necessary to decode Xvid-encoded
+video. <systemitem class="library">libavcodec</systemitem> is used by
default as it offers better speed.
</para>
@@ -184,154 +112,27 @@ default as it offers better speed.
<sect2 id="codec-x264">
<title><systemitem class="library">x264</systemitem></title>
-<sect3 id="codec-x264-whatis">
-<title>What is <systemitem class="library">x264</systemitem>?</title>
-
<para>
<ulink url="http://developers.videolan.org/x264.html"><systemitem class="library">x264</systemitem></ulink>
-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 <systemitem class="library">x264</systemitem>.
-</para>
-
-<itemizedlist>
-<title>Encoder features</title>
- <listitem><para>CAVLC/CABAC</para></listitem>
- <listitem><para>Multi-references</para></listitem>
- <listitem><para>
- Intra: all macroblock types (16x16, 8x8, and 4x4 with all predictions)
- </para></listitem>
- <listitem><para>
- Inter P: all partitions (from 16x16 down to 4x4)
- </para></listitem>
- <listitem><para>
- Inter B: partitions from 16x16 down to 8x8 (including SKIP/DIRECT)
- </para></listitem>
- <listitem><para>
- Ratecontrol: constant quantizer, constant bitrate, single or multipass ABR,
- optional VBV
- </para></listitem>
- <listitem><para>Scene cut detection</para></listitem>
- <listitem><para>Adaptive B-frame placement</para></listitem>
- <listitem><para>
- B-frames as references / arbitrary frame order
- </para></listitem>
- <listitem><para>8x8 and 4x4 adaptive spatial transform</para></listitem>
- <listitem><para>Lossless mode</para></listitem>
- <listitem><para>Custom quantization matrices</para></listitem>
- <listitem><para>Parallel encoding of multiple slices</para></listitem>
- <listitem><para>Interlacing</para></listitem>
-</itemizedlist>
-</sect3>
-
-
-<sect3 id="codec-h264-whatis">
-<title>What is H.264?</title>
-
-<para>
-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".
-</para>
-
-<para>
-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.
-</para>
-
-<para>
-At least with <systemitem class="library">x264</systemitem>,
-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.
-</para>
-
-<para>
-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
-<ulink url="http://www.cdt.luth.se/~peppar/kurs/smd151/spie04-h264OverviewPaper.pdf">The H.264/AVC Advanced Video Coding Standard: Overview and Introduction to the Fidelity Range Extensions</ulink>.
-</para>
-</sect3>
-
-
-<sect3 id="codec-x264-playback">
-<title>How can I play H.264 videos with
- <application>MPlayer</application>?</title>
-
-<para>
-<application>MPlayer</application> uses
-<systemitem class="library">libavcodec</systemitem>'s H.264 decoder.
-<systemitem class="library">libavcodec</systemitem> 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.
-</para>
-
-<para>
-If you want a quick and easy way to know whether there have been
-recent changes to <systemitem class="library">libavcodec</systemitem>'s
-H.264 decoding, you might keep an eye on
-<ulink url="http://svn.mplayerhq.hu/ffmpeg/trunk/libavcodec/h264.c?view=log">FFmpeg Subversion repository's web interface</ulink>.
-</para>
-</sect3>
-
-
-<sect3 id="codec-x264-encode">
-<title>How can I encode videos using <application>MEncoder</application>
- and <systemitem class="library">x264</systemitem>?</title>
-
-<para>
-If you have the GIT client installed, the latest x264
-sources can be gotten with this command:
-<screen>git clone git://git.videolan.org/x264.git</screen>
+is a library for creating H.264 video.
<application>MPlayer</application> sources are updated whenever
an <systemitem class="library">x264</systemitem> API change
occurs, so it is always suggested to use
-<application>MPlayer</application> from Subversion as well.
-Perhaps this situation will change when and if an
-<systemitem class="library">x264</systemitem> "release" occurs.
-Meanwhile, <systemitem class="library">x264</systemitem> should
-be considered a bit unstable, in the sense that its programming
-interface is subject to change.
+<application>MPlayer</application> from Subversion.
</para>
<para>
-<systemitem class="library">x264</systemitem> is built and
-installed in the standard way:
-<screen>./configure &amp;&amp; make &amp;&amp; sudo make install</screen>
-This installs libx264.a in /usr/local/lib and x264.h is placed in
-/usr/local/include.
-
-With the <systemitem class="library">x264</systemitem> library
-and header placed in the standard locations, building
-<application>MPlayer</application> with
-<systemitem class="library">x264</systemitem> support is easy.
-Just run the standard:
-<screen>./configure &amp;&amp; make &amp;&amp; sudo make install</screen>
-The <filename>./configure</filename> script will autodetect that you have
-satisfied the requirements for <systemitem class="library">x264</systemitem>.
+If you have a GIT client installed, the latest x264
+sources can be gotten with this command:
+<screen>git clone git://git.videolan.org/x264.git</screen>
+
+Then build and install in the standard way:
+<screen>./configure &amp;&amp; make &amp;&amp; make install</screen>
+
+Now rerun <filename>./configure</filename> for
+<application>MPlayer</application> to pick up
+<systemitem class="library">x264</systemitem> support.
</para>
-</sect3>
</sect2>
</sect1>
@@ -342,55 +143,6 @@ satisfied the requirements for <systemitem class="library">x264</systemitem>.
<sect1 id="audio-codecs">
<title>Audio codecs</title>
-<itemizedlist>
-<title>The most important audio codecs above all:</title>
-<listitem><para>
- MPEG layer 1/2/3 (MP1/2/3) audio (<emphasis role="bold">native</emphasis>
- code, with MMX/SSE/3DNow! optimization)
-</para></listitem>
-<listitem><para>
- Windows Media Audio 7 and 8 (AKA WMAv1 and WMAv2)
- (<emphasis role="bold">native</emphasis> code, with
- <link linkend="ffmpeg"><systemitem class="library">libavcodec</systemitem></link>)
-</para></listitem>
-<listitem><para>
- Windows Media Audio 9 (WMAv3) (using DMO DLL)
-</para></listitem>
-<listitem><para>
- AC-3 Dolby audio (<emphasis role="bold">native</emphasis> code, with
- MMX/SSE/3DNow! optimization)
-</para></listitem>
-<listitem><para>
- AC-3 passing through sound card hardware
-</para></listitem>
-<listitem><para>
- AAC
-</para></listitem>
-<listitem><para>
- Ogg Vorbis audio codec (<emphasis role="bold">native</emphasis> library)
-</para></listitem>
-<listitem><para>
- RealAudio: DNET (low bitrate AC-3), Cook, Sipro and ATRAC3
-</para></listitem>
-<listitem><para>
- QuickTime: Qualcomm and QDesign audio codecs
-</para></listitem>
-<listitem><para>
- VIVO audio (g723, Vivo Siren)
-</para></listitem>
-<listitem><para>
- Voxware audio (using DirectShow DLL)
-</para></listitem>
-<listitem><para>
- alaw and ulaw, various GSM, ADPCM and PCM formats and other simple old
- audio codecs
-</para></listitem>
-<listitem><para>
- Adaptive Multi-Rate (AMR) speech codecs
-</para></listitem>
-</itemizedlist>
-
-<!-- ********** -->
<sect2 id="swac3">
<title>Software AC-3 decoding</title>
@@ -490,21 +242,23 @@ only white noise).
<title>AAC codec</title>
<para>
-AAC (Advanced Audio Coding) is an audio codec sometimes found in MOV and MP4
-files. An open source decoder called FAAD is available from
-<ulink url="http://www.audiocoding.com"/>.
-<application>MPlayer</application> 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
+<ulink url="http://www.audiocoding.com/downloads.html"/>.
+<application>MPlayer</application> includes a copy of it in its source tree.
+If you want to use the external library instead, install it and pass
+<option>--enable-faad-external</option> to <filename>./configure</filename>.
</para>
<para>
-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
-<ulink url="http://www.audiocoding.com/modules/mydownloads/">download page</ulink>
-and pass <option>--enable-faad-external</option>
-to <filename>./configure</filename>.
-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
+<ulink url="http://www.debian-multimedia.org/">Christian Marillat</ulink>,
+Mandrake/Mandriva RPMs from the <ulink url="http://plf.zarb.org">P.L.F</ulink>
+and Fedora RPMs from <ulink url="http://rpm.livna.org/">Livna</ulink>.
+</para>
+<para>
+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:
<screen>
cd faad2/
sh bootstrap
@@ -513,11 +267,6 @@ cd libfaad
make
make install
</screen>
-Binaries are not available from audiocoding.com, but you can (apt-)get Debian
-packages from
-<ulink url="http://www.debian-multimedia.org/">Christian Marillat's homepage</ulink>,
-Mandrake/Mandriva RPMs from the <ulink url="http://plf.zarb.org">P.L.F</ulink>
-and Fedora RPMs from <ulink url="http://rpm.livna.org/">Livna</ulink>.
</para>
</sect2>
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 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- $Revision$ -->
-<chapter id="containers">
-<title>Containers</title>
-
-<para>
-It is important to clarify a common mistake. When people see a file with a
-<filename>.AVI</filename> 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 <emphasis>can</emphasis> contain MPEG-1 video.
-</para>
-
-<para>
-You see, a <emphasis role="bold">codec</emphasis> is not the same as a
-<emphasis role="bold">container format</emphasis>.
-Examples of video <emphasis role="bold">codecs</emphasis> are: MPEG-1, MPEG-2,
-MPEG-4 (DivX), Indeo5, 3ivx.
-Examples of container <emphasis role="bold">formats</emphasis> are:
-MPG, AVI, ASF.
-</para>
-
-<para>
-In theory, you can put an OpenDivX video and MP3 audio
-into an <emphasis role="bold">MPG container</emphasis>. However, most
-players will not play it, since they expect MPEG-1 video and MP2 audio (unlike
-<emphasis role="bold">AVI</emphasis>, <emphasis role="bold">MPG</emphasis>
-does not have the necessary fields to describe its video and audio streams).
-Or you might put MPEG-1 video into an AVI file.
-<ulink url="http://ffmpeg.org/">FFmpeg</ulink> and
-<link linkend="mencoder"><application>MEncoder</application></link>
-can create these files.
-</para>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-
-<sect1 id="video-formats">
-<title>Video formats</title>
-
-<sect2 id="mpg-vob-dat">
-<title>MPEG files</title>
-
-<para>
-MPEG files come in different guises:
-</para>
-
-<itemizedlist>
-<listitem><para>
- MPG: This is the most <emphasis role="bold">basic</emphasis> form of the
- MPEG file formats. It contains MPEG-1 video, and MP2 (MPEG-1 layer 2) or
- rarely MP1 audio.
-</para></listitem>
-<listitem><para>
- DAT: This is the very same format as MPG with a different extension. It
- is used on <emphasis role="bold">Video CDs</emphasis>. 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 <option>vcd://</option>
- to play a Video CD.
-</para></listitem>
-<listitem><para>
- VOB: This is the MPEG file format on <emphasis role="bold">DVDs</emphasis>.
- 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. <emphasis role="bold">Read the
- <link linkend="dvd">DVD</link> section</emphasis>!
-</para></listitem>
-<listitem><para>
- 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
- <ulink url="http://dvd-create.sourceforge.net/tystudio/tystream.shtml">
- the TyStudio page</ulink>.
-</para></listitem>
-</itemizedlist>
-
-<para>
-Series of frames form independent groups in MPEG files. This means that you
-can cut/join an MPEG file with standard file tools (like
-<command>dd</command>, <command>cut</command>), and it remains completely
-functional.
-</para>
-
-<para>
-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>-aspect</option>
-option.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="avi">
-<title>AVI files</title>
-
-<para>
-Designed by Microsoft,
-<emphasis role="bold">AVI (Audio Video Interleaved)</emphasis>
-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
-<emphasis role="bold">OpenDML</emphasis>. Microsoft currently strongly
-discourages its use and encourages ASF/WMV. Not that anybody cares.
-</para>
-
-<para>
-There is a hack that allows AVI files to contain an Ogg Vorbis audio
-stream, but makes them incompatible with standard AVI.
-<application>MPlayer</application> 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, <application>NanDub</application>, has this problem.
-</para>
-
-<note><para>
-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 <application>MPlayer</application> can play or
-the raw DV stream for which support is under development.
-</para></note>
-
-<para>
-There are two kinds of AVI files:
-<itemizedlist>
-<listitem><para>
- <emphasis role="bold">Interleaved:</emphasis> Audio and video content is
- interleaved. This is the standard usage. Recommended and mostly used. Some
- tools create interleaved AVIs with bad sync.
- <application>MPlayer</application> 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>-ni</option> option).
-</para></listitem>
-<listitem><para>
- <emphasis role="bold">Non-interleaved:</emphasis> 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.
-</para></listitem>
-</itemizedlist>
-</para>
-
-<para>
-<application>MPlayer</application> supports two kinds of timings for AVI
-files:
-<itemizedlist>
-<listitem><para>
- <emphasis role="bold">bps-based:</emphasis> It is based on the
- bitrate/samplerate of the video/audio stream. This method is used by
- most players, including <ulink url="http://avifile.sf.net">avifile</ulink>
- and <application>Windows Media Player</application>. 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).
-</para></listitem>
-<listitem><para>
- <emphasis role="bold">interleaving-based:</emphasis> 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.
-</para></listitem>
-</itemizedlist>
-</para>
-
-<para>
-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: <application>NanDub</application> and
-<link linkend="mencoder"><application>MEncoder</application></link>.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="asf-wmv">
-<title>ASF/WMV files</title>
-
-<para>
-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
-(<application>Windows Media Player</application> and
-<application>Windows Media Encoder</application>)
-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).
-<application>MPlayer</application> supports only v1.0, as nobody has ever seen
-v2.0 files :). Note that ASF files nowadays come with the extension
-<filename>.WMA</filename> or <filename>.WMV</filename>.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="mov">
-<title>QuickTime/MOV files</title>
-
-<para>
-These formats were designed by Apple and can contain any codec, CBR or VBR.
-They usually have a <filename>.QT</filename> or <filename>.MOV</filename>
-extension. Note that since the MPEG-4 group chose QuickTime as the recommended
-file format for MPEG-4, their MOV files come with a <filename>.MPG</filename> or
-<filename>.MP4</filename> extension (Interestingly the video and audio
-streams in these files are real MPG and AAC files. You can even extract them
-with the <option>-dumpvideo</option> and <option>-dumpaudio</option> options.).
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="vivo">
-<title>VIVO files</title>
-
-<para>
-<application>MPlayer</application> 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!
-</para>
-
-<para>
-The video codec of VIVO/1.0 files is standard
-<emphasis role="bold">h.263</emphasis>.
-The video codec of VIVO/2.0 files is a modified, nonstandard
-<emphasis role="bold">h.263v2</emphasis>. The audio is the same, it may be
-<emphasis role="bold">g.723 (standard)</emphasis>, or
-<emphasis role="bold">Vivo Siren</emphasis>.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="fli">
-<title>FLI files</title>
-
-<para>
-<emphasis role="bold">FLI</emphasis> is a very old file format used by
-Autodesk Animator, but it is a common file format for short animations on the
-net.
-<application>MPlayer</application> demuxes and decodes FLI movies and is
-even able to seek within them (useful when looping with the
-<option>-loop</option> option). FLI files do not have keyframes, so the
-picture will be messy for a short time after seeking.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="realmedia">
-<title>RealMedia (RM) files</title>
-
-<para>
-Yes, <application>MPlayer</application> can read (demux) RealMedia
-(<filename>.rm</filename>) files.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="nuppelvideo">
-<title>NuppelVideo files</title>
-
-<para>
-NuppelVideo
-is a TV grabber tool (AFAIK:). <application>MPlayer</application> can read
-its <filename>.NUV</filename> files (only NuppelVideo 5.0). Those files can
-contain uncompressed YV12, YV12+RTJpeg compressed, YV12 RTJpeg+lzo
-compressed, and YV12+lzo compressed frames.
-<application>MPlayer</application> decodes (and also
-<emphasis role="bold">encodes</emphasis>
-them with <application>MEncoder</application> to MPEG-4 (DivX)/etc!) them all.
-Seeking works.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="yuv4mpeg">
-<title>yuv4mpeg files</title>
-
-<para>
-<ulink url="http://mjpeg.sf.net">yuv4mpeg / yuv4mpeg2</ulink>
-is a file format used by the
-<ulink url="http://mjpeg.sf.net">mjpegtools programs</ulink>.
-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.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="film">
-<title>FILM files</title>
-
-<para>
-This format is used on old Sega Saturn CD-ROM games.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="roq">
-<title>RoQ files</title>
-
-<para>
-RoQ files are multimedia files used in some ID games such as Quake III and
-Return to Castle Wolfenstein.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="ogg">
-<title>OGG/OGM files</title>
-
-<para>
-This is a new file format from the
-<ulink url="http://www.xiph.org">Xiph.Org Foundation</ulink>.
-It can contain any video or audio codec, CBR or VBR. You'll need
-<systemitem class="library">libogg</systemitem> and
-<systemitem class="library">libvorbis</systemitem> installed before
-compiling <application>MPlayer</application> to be able to play it.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="sdp">
-<title>SDP files</title>
-
-<para>
-<ulink url="ftp://ftp.rfc-editor.org/in-notes/rfc2327.txt">SDP</ulink> is an
-IETF standard format for describing video and/or audio RTP streams.
-(The "<ulink url="http://www.live555.com/mplayer/">LIVE555 Streaming Media</ulink>"
-are required.)
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="pva">
-<title>PVA files</title>
-
-<para>
-PVA is an MPEG-like format used by DVB TV boards' software (e.g.:
-<application>MultiDec</application>,
-<application>WinTV</application> under Windows).
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="nsv">
-<title>NSV files</title>
-
-<para>
-NSV (NullSoft Video) is the file format used by the
-<application>Winamp</application> 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 <filename>.nsa</filename> extension.
-<application>MPlayer</application> can play both NSV streams and files.
-Please note that most files from the
-<ulink url="http://www.winamp.com">Winamp site</ulink> 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).
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="matroska">
-<title>Matroska files</title>
-
-<para>
-Matroska is an open container format.
-Read more on the <ulink url="http://www.matroska.org/">official site</ulink>.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="nut">
-<title>NUT files</title>
-
-<para>
-NUT is the container format developed by <application>MPlayer</application> and
-<application>FFmpeg</application> folks. Both projects support it.
-Read more on the <ulink url="http://www.nut-container.org/">official
-site</ulink>.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="gif">
-<title>GIF files</title>
-
-<para>
-The <emphasis role="bold">GIF</emphasis> 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.
-<application>MPlayer</application> supports both formats through use of
-<systemitem class="library">libungif</systemitem> or
-another libgif-compatible library. Non-animated GIFs will be displayed as
-single frame videos. (Use the <option>-loop</option> and
-<option>-fixed-vo</option> options to display these longer.)
-</para>
-
-<para>
-<application>MPlayer</application> 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.
-</para>
-
-<para>
-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.
-</para>
-
-<para>
-If your distribution does not come with
-<systemitem class="library">libungif</systemitem>, download a copy from the
-<ulink url="http://sourceforge.net/projects/libungif">libungif
-homepage</ulink>. For detailed technical information, have a look at the
-<ulink url="http://www.w3.org/Graphics/GIF/spec-gif89a.txt">GIF89a specification</ulink>.
-</para>
-</sect2>
-</sect1>
-
-
-<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
-
-
-<sect1 id="audio-formats">
-<title>Audio formats</title>
-
-<para>
-<application>MPlayer</application> is a <emphasis role="bold">movie</emphasis>
-and not a <emphasis role="bold">media</emphasis> player, although it can play
-some audio file formats (they are listed in the sections below). This is not
-a recommended usage of <application>MPlayer</application>, you better use <ulink
-url="http://www.xmms.org">XMMS</ulink>.
-</para>
-
-<!-- ********** -->
-
-<sect2 id="mp3">
-<title>MP3 files</title>
-
-<para>
-You may have problems playing certain MP3 files that
-<application>MPlayer</application> 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 <option>-demuxer</option> flag described in the
-man page may help you in these cases.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="ogg-vorbis">
-<title>OGG/OGM files (Vorbis)</title>
-
-<para>
-Requires properly installed
-<systemitem class="library">libogg</systemitem> and
-<systemitem class="library">libvorbis</systemitem>.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="cdda">
-<title>CD audio</title>
-
-<para>
-<application>MPlayer</application> can use <application>cdparanoia</application>
-to play CDDA (Audio CD). The scope of this section does not contain enumerating
-<application>cdparanoia</application>'s features.
-</para>
-
-<para>
-See the man page's <option>-cdda</option> option which can be used to pass
-options to <application>cdparanoia</application>.
-</para>
-</sect2>
-
-<!-- ********** -->
-
-<sect2 id="xmms">
-<title>XMMS</title>
-
-<para>
-<application>MPlayer</application> can use <application>XMMS</application> 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
-<ulink url="http://www.xmms.org/plugins.php?category=input">XMMS input plugin page</ulink>.
-</para>
-
-<para>
-For this feature you need to have <application>XMMS</application> and compile
-<application>MPlayer</application> with
-<filename>./configure --enable-xmms</filename>.
-</para>
-</sect2>
-</sect1>
-
-</chapter>
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;
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.
<systemitem class="library">x264</systemitem> is a free library for
encoding H.264/AVC video streams.
Before starting to encode, you need to
-<link linkend="codec-x264-encode">set up <application>MEncoder</application> to support it</link>.
+<link linkend="codec-x264">set up <application>MEncoder</application> to support it</link>.
</para>
<!-- ********** -->
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
@@ -111,11 +111,6 @@ Here are just a few tips:
the only thing you achieve is a massive waste of CPU power.
</para></listitem>
<listitem><para>
- To specify the I420 colorspace (<option>outfmt=i420</option>), you have to
- add an option <option>-vc rawi420</option> due to a fourcc conflict with an
- Intel Indeo video codec.
-</para></listitem>
-<listitem><para>
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
line-in, or using the built-in ADC in the bt878 chip. In the latter case, you
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 <application>MPlayer</application> binary
(<emphasis role="bold">Warning: This is a security risk!</emphasis>).
-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:
</para>
<procedure>
<step><para>
Download the
<ulink url="http://www.arava.co.il/matan/svgalib/">development version</ulink>
- of svgalib (for example 1.9.17), <emphasis role="bold">OR</emphasis>
- download a version made by Alex especially for usage with
- <application>MPlayer</application> (it doesn't need the svgalib source to
- compile) from
- <ulink url="http://www.mplayerhq.hu/MPlayer/contrib/svgalib/svgalib_helper-1.9.17-mplayer.tar.bz2">here</ulink>.
+ of svgalib (1.9.x).
</para></step>
<step><para>
Compile the module in the
@@ -1579,7 +1574,8 @@ special kernel module, like this:
<step><para>
Then run <filename>configure</filename> again and pass the parameter
<option>--enable-svgalib_helper</option> as well as
- <option>--with-extraincdir=/path/to/svgalib_helper/sources</option>,
+ <option>--with-extraincdir=<replaceable>/path/to/svgalib_helper/sources/</replaceable>kernel/svgalib_helper</option>,
+ where <replaceable>/path/to/svgalib_helper/sources/</replaceable> has to be
adjusted to wherever you extracted svgalib_helper sources.
</para></step>
<step><para>
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 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- synced with r27230 -->
+<!-- synced with r27683 -->
<chapter id="faq" xreflabel="FAQ">
<title>Gyakran ismételt kérdések</title>
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 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- synced with r26990 -->
+<!-- synced with r27663 -->
<chapter id="install">
<title>Telepítés</title>
@@ -177,11 +177,9 @@ Lásd a <link linkend="subosd">Feliratok és az OSD</link> részt bővebben.
<title>Mi a helyzet a GUI-val?</title>
<para>
-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,
-<systemitem class="library">libpng</systemitem> (és a fejlesztői cuccok, amik
-általában <systemitem class="library">gtk-dev</systemitem>
-és <systemitem class="library">libpng-dev</systemitem> 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 <systemitem class="library">GTK</systemitem> (és a fejlesztői
+cuccok, amik általában <systemitem class="library">gtk-dev</systemitem>) szükséges.
A <filename>./configure</filename>-nak az <option>--enable-gui</option> 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 <command>gmplayer</command> binárist kell elindítanod.
@@ -189,9 +187,9 @@ akarod futtatni, akkor a <command>gmplayer</command> binárist kell elindítanod
<para>
Mivel az <application>MPlayer</application> nem rendelkezik beépített skin-nel,
-le kell töltened őket, ha a GUI-t használni akarod. Lásd a <ulink
+le kell töltened egyet, ha a GUI-t használni akarod. Lásd a <ulink
url="http://www.mplayerhq.hu/dload.html">letöltési oldalt</ulink>.
-Ajánlott egy rendszerszinten elérhető könyvtárba tenni őket (<filename
+Ajánlott egy rendszerszinten elérhető könyvtárba tenni (<filename
class="directory">$PREFIX/share/mplayer/skins</filename>), vagy a <filename
class="directory">$HOME/.mplayer/skins</filename>-be.
Az <application>MPlayer</application> 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 @@
<?xml version="1.0" encoding="utf-8"?>
-<!-- synced with r26990 -->
+<!-- synced with r27640 -->
<chapter id="mencoder">
<title>A <application>MEncoder</application> használatának alapjai</title>
@@ -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
(<filename>*.log</filename>), ezeket ne töröld le még (az AVI-t
letörölheted vagy egyszerűen létre sem hozod, a videó
-<filename>/dev/null</filename> -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.
+<filename>/dev/null</filename>-ba vagy Windows alatt a <filename>NUL</filename>-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.
</para>
<example id="copy_audio_track">
diff --git a/Makefile b/Makefile
index 4a0d521c9e..c52fdca131 100644
--- a/Makefile
+++ b/Makefile
@@ -817,7 +817,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/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
diff --git a/TOOLS/fastmemcpybench.c b/TOOLS/fastmemcpybench.c
index 1e3cc14ce3..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/TOOLS/netstream.c b/TOOLS/netstream.c
index 0009f673f6..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;
@@ -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;
diff --git a/cfg-common-opts.h b/cfg-common-opts.h
index 68d46c9c51..5f58925683 100644
--- a/cfg-common-opts.h
+++ b/cfg-common-opts.h
@@ -5,11 +5,12 @@
{"v", cfg_inc_verbose, CONF_TYPE_FUNC, CONF_GLOBAL|CONF_NOSAVE, 0, 0, NULL},
{"msglevel", (void *) 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},
#endif
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
{"priority", &proc_priority, CONF_TYPE_STRING, 0, 0, 0, NULL},
#endif
{"noconfig", (void *) 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 607333a52d..719c53bf0d 100644
--- a/cfg-common.h
+++ b/cfg-common.h
@@ -342,9 +342,7 @@ const m_option_t msgl_config[]={
};
-extern char * proc_priority;
-
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
struct {
char* name;
int prio;
@@ -361,7 +359,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 dd14bbef1a..29673d1ce4 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
#
@@ -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="$*"
@@ -321,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]
@@ -578,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
@@ -1404,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
@@ -1600,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
@@ -1888,10 +1883,6 @@ EOF
_arch='IA64'
_target_arch='ARCH_IA64 = yes'
iproc='ia64'
- proc=''
- _march=''
- _mcpu=''
- _optimizing=''
;;
x86_64|amd64)
@@ -1976,11 +1967,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,18 +1990,6 @@ EOF
else
proc=v8
fi
- _march=''
- _mcpu="-mcpu=$proc"
- _optimizing="$proc"
- ;;
-
- sparc64)
- _arch='SPARC'
- _target_arch='ARCH_SPARC = yes'
- _vis='yes'
- iproc='sparc'
- proc='ultrasparc'
- _march=''
_mcpu="-mcpu=$proc"
_optimizing="$proc"
;;
@@ -2016,31 +1998,20 @@ 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)
_arch='POWERPC PPC'
_def_dcbzl='#undef HAVE_DCBZL'
_target_arch='ARCH_POWERPC = yes'
+ _def_fast_unaligned='#define HAVE_FAST_UNALIGNED 1'
iproc='ppc'
- proc=''
- _march=''
- _mcpu=''
- _optimizing=''
echocheck "CPU type"
case $system_name in
@@ -2148,14 +2119,13 @@ EOF
_arch='ALPHA'
_target_arch='ARCH_ALPHA = yes'
iproc='alpha'
- _march=''
echocheck "CPU type"
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;
}
@@ -2190,10 +2160,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 +2185,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=''
;;
*)
@@ -2433,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
@@ -2456,13 +2397,13 @@ EOF
if $(cc_check -maltivec -mabi=altivec) ; then
_altivec_gcc_flags="-maltivec -mabi=altivec"
# check if <altivec.h> should be included
- _def_altivec_h='#undef HAVE_ALTIVEC_H'
+ def_altivec_h='#undef HAVE_ALTIVEC_H'
cat > $TMPC << EOF
#include <altivec.h>
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 <altivec.h>'
else
cat > $TMPC << EOF
@@ -2499,10 +2440,18 @@ 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
-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
@@ -2512,7 +2461,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
@@ -2522,7 +2471,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
@@ -2532,7 +2481,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
@@ -2540,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"
@@ -2551,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"
@@ -2829,9 +2779,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
@@ -2982,17 +2932,6 @@ fi
echores "$_fast_inttypes"
-echocheck "word size"
-_mp_wordsize="#undef MP_WORDSIZE"
-cat > $TMPC << EOF
-#include <stdio.h>
-#include <sys/types.h>
-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 <malloc.h>
@@ -3001,12 +2940,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"
@@ -3036,28 +2975,13 @@ 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"
-echocheck "byteswap.h"
-cat > $TMPC << EOF
-#include <byteswap.h>
-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 <sys/types.h>
@@ -3067,9 +2991,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"
@@ -3218,8 +3142,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>
@@ -3230,9 +3154,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"
@@ -3380,8 +3304,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
@@ -3396,9 +3320,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"
@@ -3441,7 +3365,9 @@ echores "$_strsep"
echocheck "vsscanf()"
cat > $TMPC << EOF
+#define _ISOC99_SOURCE
#include <stdarg.h>
+#include <stdio.h>
int main(void) { vsscanf(0, 0, 0); return 0; }
EOF
_vsscanf=no
@@ -3577,9 +3503,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"
@@ -5341,8 +5267,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
@@ -5350,7 +5276,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
@@ -5358,7 +5284,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
@@ -5366,7 +5292,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
@@ -5374,7 +5300,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
@@ -5382,7 +5308,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
@@ -5455,6 +5381,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"
@@ -5533,14 +5487,14 @@ 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
_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
@@ -6019,9 +5973,8 @@ if test "$_theora" = auto ; then
#include <theora/theora.h>
#include <string.h>
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;
@@ -6072,6 +6025,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"
@@ -6082,6 +6038,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
@@ -6175,7 +6134,7 @@ fi
echores "$_musepack"
-echocheck "FAAC (AAC encoder) support"
+echocheck "FAAC support"
if test "$_faac" = auto ; then
cat > $TMPC <<EOF
#include <inttypes.h>
@@ -6206,7 +6165,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
@@ -6959,7 +6918,7 @@ fi
_res_comment="in libavcodec: $_mp3lame_lavc"
echores "$_mp3lame"
-fi
+fi # test "$_mencoder" != no
echocheck "mencoder"
if test "$_mencoder" = yes ; then
@@ -7822,6 +7781,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
@@ -7829,22 +7789,21 @@ MAN_LANG = $man_lang
MAN_LANGS = $man_langs
MAN_LANG_ALL = $man_lang_all
-DESTDIR =
prefix = \$(DESTDIR)$_prefix
BINDIR = \$(DESTDIR)$_bindir
DATADIR = \$(DESTDIR)$_datadir
+LIBDIR = \$(DESTDIR)$_libdir
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
+RANLIB = $_ranlib
+WINDRES = $_windres
EXTRA_INC = $_inc_extra
EXTRAXX_INC = $_inc_extra $_inc_extraxx
@@ -7866,33 +7825,26 @@ EXTRA_LIB = $_ld_extra $_ld_static $_ld_lm
EXTRALIBS_MPLAYER = $_libs_mplayer
EXTRALIBS_MENCODER = $_libs_mencoder
-CHARSET = $_charset
-HELP_FILE = $_mp_help
-
-EXESUF = $_exesuf
+DEPEND_CMD = \$(CC) -MM \$(CFLAGS) \$(filter-out %.h,\$^) | sed "s,[0-9a-z._-]*: \(\$(SRC_DIR)/\)*\([a-z0-9]*/\)[^/]* ,\\2&,"
-$_target_arch
-$_target_arch_x86
-`echo $_cpuexts | tr '[a-z] ' '[A-Z]\n' | sed 's/^/HAVE_/;s/$/=yes/'`
+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 %.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
TIMER = $_timer
AO_SRCS = $_aosrc
VO_SRCS = $_vosrc
-MENCODER = $_mencoder
-MPLAYER = $_mplayer
+EXESUF = $_exesuf
-#internal libraries
-LIBA52 = $_liba52
-LIBA52_INTERNAL = $_liba52_internal
-LIBMPEG2 = $_libmpeg2
-MP3LIB = $_mp3lib
-TREMOR_INTERNAL = $_tremor_internal
+$_target_arch
+$_target_arch_x86
+`echo $_cpuexts | tr '[a-z] ' '[A-Z]\n' | sed 's/^/HAVE_/;s/$/=yes/'`
-HAVE_SYS_MMAN_H = $_mman
-HAVE_POSIX_SELECT = $_posix_select
+MENCODER = $_mencoder
+MPLAYER = $_mplayer
NEED_GETTIMEOFDAY = $_need_gettimeofday
NEED_GLOB = $_need_glob
@@ -7903,12 +7855,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
@@ -7930,9 +7879,14 @@ GIF = $_gif
GUI = $_gui
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
+LIBA52 = $_liba52
+LIBA52_INTERNAL = $_liba52_internal
LIBASS = $_ass
LIBDCA = $_libdca
LIBDV = $_libdv
@@ -7941,6 +7895,7 @@ LIBLZO = $_liblzo
LIBMAD = $_mad
LIBMENU = $_menu
LIBMENU_DVBIN = $_menu_dvbin
+LIBMPEG2 = $_libmpeg2
LIBNEMESI = $_nemesi
LIBNUT = $_libnut
LIBSMBCLIENT = $_smb
@@ -7951,9 +7906,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
@@ -7967,6 +7924,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
@@ -8027,8 +7985,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
@@ -8040,6 +7999,7 @@ 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
@@ -8047,7 +8007,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/'`
@@ -8055,12 +8014,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
#############################################################################
@@ -8080,646 +8033,324 @@ 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
+/* 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 ATTRIBUTE_ALIGNED_MAX 16
+
+
+
#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
+#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 */
$_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
-#define HAVE_STRCHR 1
-
/* libdvdread */
#define HAVE_UINTPTR_T 1
-/* name of messages charset */
-$_def_charset
-
-/* Runtime CPU detection */
-$_def_runtime_cpudetection
-
-/* Dynamic a/v plugins */
-$_def_dynamic_plugins
-/* "restrict" keyword */
-$_def_restrict_keyword
+/* system headers */
+$def_alloca_h
+$def_alsa_asoundlib_h
+$def_altivec_h
+$def_malloc_h
+$def_mman_h
+$_def_mman_has_map_failed
+$def_soundcard_h
+$def_sys_asoundlib_h
+$def_sys_soundcard_h
+$def_sys_sysinfo_h
+$def_termios_h
+$def_termios_sys_h
+$def_winsock2_h
-/* __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)
-# define attribute_used __attribute__((used))
-#else
-# define attribute_used
-#endif
+/* system functions */
+$_def_gethostbyname2
+$_def_gettimeofday
+$_def_glob
+$_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
-/* extern symbol prefix */
-$_def_extern_prefix
-/* compiler support for named assembler arguments */
+/* 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
-/* enable/disable SIGHANDLER */
-$_def_sighandler
-/* enable/disable automatic gdb attach on crash, requires SIGHANDLER */
+/* configurable options */
+$_def_charset
$_def_crash_debug
-
-/* Toggles debugging informations */
$_def_debug
+$_def_dynamic_plugins
+$_def_fastmemcpy
+$_def_menu
+$_def_runtime_cpudetection
+$_def_sighandler
+$_def_sortsub
+$_def_stream_cache
-/* 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
+/* CPU stuff */
+#define __CPU__ $iproc
+$_def_words_endian
+`ff_config_enable "$_arch_all" "$_arch" "ARCH"`
+`ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"`
-/* Indicates that dvdread is internal */
-$_def_dvdread_internal
-/* Additional options for libdvdread/libdvdcss */
-$_def_dvd
-$_def_cdrom
-$_def_cdio
-$_def_dvdio
+/* DVD/VCD/CD */
+#define DEFAULT_CDROM_DEVICE "$default_cdrom_device"
+#define DEFAULT_DVD_DEVICE "$default_dvd_device"
$_def_bsdi_dvd
+$_def_cddb
+$_def_cdio
+$_def_cdparanoia
+$_def_cdrom
+$_def_dvd
$_def_dvd_bsd
-$_def_dvd_linux
-$_dev_dvd_openbsd
$_def_dvd_darwin
-$_def_sol_scsi_h
+$_def_dvd_linux
+$_def_dvd_openbsd
+$_def_dvdio
+$_def_dvdnav
+$_def_dvdread
+$_def_dvdread_internal
$_def_hpux_scsi_h
+$_def_libcdio
+$_def_sol_scsi_h
+$_def_vcd
-/* Common data directory (for fonts, etc) */
-#define MPLAYER_DATADIR "$_datadir"
-#define MPLAYER_CONFDIR "$_confdir"
-#define MPLAYER_LIBDIR "$_libdir"
-
-/* Define this to compile stream-caching support, it can be enabled via
- -cache <kilobytes> */
-$_def_stream_cache
-
-/* 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 */
+/* codec libraries */
+$_def_faac
+$_def_faad
+$_def_faad_internal
+$_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
-
-/* 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! */
-$_def_select
-
-/* 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
-
-/* 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
-
-/* 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
-
-/* 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_mp3lib
+$_def_musepack
+$_def_speex
+$_def_theora
+$_def_toolame
+$_def_tremor
+$_def_twolame
+$_def_vorbis
+$_def_x264
+$_def_xvid
$_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
-
-/* 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
-
-/* 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
-
-/* Define this to enable MPEG 1/2 image postprocessing (requires a FAST CPU!) */
-#define MPEG12_POSTPROC 1
+$_def_libnut
-/* maximum alignment used by libmpeg2 */
-#define ATTRIBUTE_ALIGNED_MAX 16
-/* Win32 DLL support */
+/* binary codecs */
+$_def_qtx
+$_def_qtx_win32
+$_def_real
+$_def_real_path
+$_def_win32_loader
$_def_win32dll
#define WIN32_PATH "$_win32codecsdir"
-
-/* Mac OS X specific features */
-$_def_macosx_finder
-$_def_macosx_bundle
-$_def_coreaudio
-$_def_corevideo
-$_def_quartz
-$_def_quicktime
-
-/* Build our Win32-loader */
-$_def_win32_loader
-
-/* FFmpeg */
-/* Define this to enable image postprocessing in libavcodec (requires a FAST CPU!) */
-$_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
-
-/* enable liba52 support */
-$_def_liba52_internal
-$_def_liba52
-$_def_libmpeg2
-
-/* XAnim DLL support */
$_def_xanim
-/* Default search path */
$_def_xanim_path
+$_def_xmms
+#define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
-/* RealPlayer DLL support */
-$_def_real
-/* Default search path */
-$_def_real_path
-
-/* 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
-/* gui support, please do not edit this option */
-$_def_gui
+/* GUI */
$_def_gtk2
+$_def_gui
+$_def_xshape
+
/* Audio output drivers */
-$_def_ossaudio
-$_def_ossaudio_devdsp
-$_def_ossaudio_devmixer
$_def_alsa
+$_def_alsa1x
$_def_alsa5
$_def_alsa9
-$_def_alsa1x
$_def_arts
+$_def_coreaudio
$_def_esd
$_def_esd_latency
-$_def_pulse
$_def_jack
+$_def_nas
$_def_openal
$_def_openal_h
-$_def_sys_asoundlib_h
-$_def_alsa_asoundlib_h
-$_def_sunaudio
+$_def_ossaudio
+$_def_ossaudio_devdsp
+$_def_ossaudio_devmixer
+$_def_pulse
$_def_sgiaudio
+$_def_sunaudio
$_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
-
-/* Enable Video 4 Linux TV interface support */
-$_def_tv_v4l
-
-/* Enable Video 4 Linux 1 TV interface support */
-$_def_tv_v4l1
+$_def_ladspa
-/* 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
+/* input */
+$_def_apple_ir
+$_def_apple_remote
$_def_ioctl_bt848_h_name
-
-/* Enable *BSD BrookTree TV interface support */
-$_def_tv_bsdbt848
-
-/* Enable TV Teletext Interface support */
-$_def_tv_teletext
-
-/* Enable Radio Interface support */
+$_def_ioctl_meteor_h_name
+$_def_joystick
+$_def_lirc
+$_def_lircc
+$_def_pvr
$_def_radio
-
-/* Enable Capture for Radio Interface support */
+$_def_radio_bsdbt848
$_def_radio_capture
-
-/* Enable Video 4 Linux Radio interface support */
$_def_radio_v4l
-
-/* Enable Video 4 Linux 2 Radio interface support */
$_def_radio_v4l2
+$_def_tv
+$_def_tv_bsdbt848
+$_def_tv_dshow
+$_def_tv_teletext
+$_def_tv_v4l
+$_def_tv_v4l1
+$_def_tv_v4l2
-/* Enable *BSD BrookTree Radio interface support */
-$_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
-
-$_mp_wordsize
-
-$_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
-
-/* mkstemp support */
-$_def_mkstemp
-
-/* nanosleep support */
-$_def_nanosleep
-
-/* SMB support */
-$_def_smb
-
-/* 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 */
-$_def_gif
-$_def_gif_4
-$_def_gif_tvt_hack
-/* enable bitmap font support */
+/* font stuff */
+$_def_ass
$_def_bitmap_font
-
-/* enable FreeType support */
-$_def_freetype
-
-/* enable Fontconfig support */
+$_def_enca
$_def_fontconfig
-
-/* enable SSA/ASS support */
-$_def_ass
-
-/* enable FriBiDi usage */
+$_def_freetype
$_def_fribidi
-/* enable ENCA usage */
-$_def_enca
-
-/* 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
-
-/* enable LADSPA plugin support */
-$_def_ladspa
-
-/* enable network */
-$_def_network
-
-/* enable ftp support */
+/* networking */
+$_def_closesocket
$_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_inet6
+$_def_live
+$_def_nemesi
+$_def_network
+$_def_smb
$_def_socklen_t
-#ifndef HAVE_SOCKLEN_T
-#define HAVE_SOCKLEN_T 1
-typedef int socklen_t;
-#endif
-
-/* closesocket() support */
-$_def_closesocket
+$_def_use_aton
+$_def_vstream
-/* enables / disables cdparanoia support */
-$_def_cdparanoia
-$_def_cddb
-/* enables / disables VIDIX usage */
+/* 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
+$_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
@@ -8735,92 +8366,93 @@ $_def_vidix_drv_sh_veu
$_def_vidix_drv_sis
$_def_vidix_drv_unichrome
$_def_vidix_pfx
+$_def_vm
+$_def_wii
+$_def_x11
+$_def_xdpms
+$_def_xf86keysym
+$_def_xinerama
+$_def_xmga
+$_def_xss
+$_def_xv
+$_def_xvmc
+$_def_xvr100
+$_def_yuv4mpeg
+$_def_zr
-/* enables / disables new input joystick support */
-$_def_joystick
-/* enables / disables QTX codecs */
-$_def_qtx
-$_def_qtx_win32
-
-/* enables / disables osd menu */
-$_def_menu
+/* FFmpeg */
+$_def_libavcodec
+$_def_libavcodec_a
+$_def_libavcodec_mpegaudio_hp
+$_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
-/* enables / disables subtitles sorting */
-$_def_sortsub
+$_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
-/* XMMS input plugin support */
-$_def_xmms
-#define XMMS_INPUT_PLUGIN_DIR "$_xmmsplugindir"
+#define CONFIG_GPL 1
+#define ENABLE_SMALL 0
+#define ENABLE_GRAY 0
-/* enables inet6 support */
-$_def_inet6
+/* Some FFmpeg codecs depend on this. Enable it unconditionally for now. */
+#define CONFIG_FFT 1
+#define ENABLE_FFT 1
-/* do we have gethostbyname2? */
-$_def_gethostbyname2
+/* 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
-/* Extension defines */
-`ff_config_enable "$_cpuexts_all" "$_cpuexts" "HAVE"`
+#define CONFIG_DECODERS 1
+#define ENABLE_DECODERS 1
+#define CONFIG_ENCODERS 1
+#define ENABLE_ENCODERS 1
-$_def_altivec_h // enables usage of altivec.h
+#define CONFIG_DEMUXERS 1
+#define ENABLE_DEMUXERS 1
-/* libvo options */
-#define SCREEN_SIZE_X 1
-#define SCREEN_SIZE_Y 1
-$_def_x11
-$_def_xv
-$_def_xvmc
-$_def_vm
-$_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
-$_def_toolame
-$_def_twolame
+$_def_muxers
-/* used by GUI: */
-$_def_xshape
+/* 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
-#if defined(CONFIG_GL) || defined(CONFIG_X11) || defined(CONFIG_XV)
-#define X11_FULLSCREEN 1
-#endif
+`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
diff --git a/cpudetect.c b/cpudetect.c
index 8ec1adefaa..43f5cc2a7d 100644
--- a/cpudetect.c
+++ b/cpudetect.c
@@ -29,7 +29,7 @@ CpuCaps gCpuCaps;
#include <signal.h>
#endif
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
#include <windows.h>
#endif
@@ -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
@@ -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,12 +395,12 @@ 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... " );
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..ad9a49c42e 100644
--- a/cpuinfo.c
+++ b/cpuinfo.c
@@ -8,7 +8,7 @@
#include <string.h>
#include <unistd.h>
-#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 <sys/timeb.h>
void gettimeofday(struct timeval* t,void* timezone) {
struct timeb timebuffer;
@@ -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..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/get_path.c b/get_path.c
index 76a0169519..1cb7bd8207 100644
--- a/get_path.c
+++ b/get_path.c
@@ -18,13 +18,12 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#endif
-
-#ifdef WIN32
+#elif __MINGW32__
#include <windows.h>
-#endif
-
-#ifdef __OS2__
+#elif __CYGWIN__
+#include <windows.h>
+#include <sys/cygwin.h>
+#elif __OS2__
#define INCL_DOS
#include <os2.h>
#endif
@@ -140,7 +139,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()*/
@@ -176,4 +175,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/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 <see AUTHORS for email address>
// Updated by: PaulTT <see AUTHORS for email address>
-// 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"
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..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];
@@ -431,18 +431,18 @@ 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
- __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;
@@ -489,14 +489,14 @@ 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)
);
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/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/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/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/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/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/libao2/ao_alsa.c b/libao2/ao_alsa.c
index 987713e6f9..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);
@@ -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)
@@ -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)
{
diff --git a/libao2/ao_sdl.c b/libao2/ao_sdl.c
index 2da0073da7..645c9e9685 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/libmenu/vf_menu.c b/libmenu/vf_menu.c
index cb0af69afa..c2c7f127a5 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;
diff --git a/libmpcodecs/ad_ffmpeg.c b/libmpcodecs/ad_ffmpeg.c
index a8a8a18120..560dd90c0a 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,
diff --git a/libmpcodecs/ad_twin.c b/libmpcodecs/ad_twin.c
index 3915101ae4..51b260d061 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);
}
diff --git a/libmpcodecs/dec_video.c b/libmpcodecs/dec_video.c
index 7a3e826e45..4259377342 100644
--- a/libmpcodecs/dec_video.c
+++ b/libmpcodecs/dec_video.c
@@ -414,9 +414,9 @@ 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/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/vd.c b/libmpcodecs/vd.c
index 1e23d2eced..fe9d1d7861 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -103,6 +103,9 @@ const vd_functions_t * const mpcodecs_vd_drivers[] = {
#include "libvo/video_out.h"
+#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)
{
diff --git a/libmpcodecs/vd_libmpeg2.c b/libmpcodecs/vd_libmpeg2.c
index eeab4b23be..7505768dee 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;
diff --git a/libmpcodecs/vd_zrmjpeg.c b/libmpcodecs/vd_zrmjpeg.c
index a2d1d21e8b..2d35ec1420 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 */
diff --git a/libmpcodecs/vf_decimate.c b/libmpcodecs/vf_decimate.c
index 5fb633d3c5..81b58cccb7 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 4dade860f1..307a14890d 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"
@@ -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<e2; p+=sizeof(wsum_t))
wsum^=*(wsum_t *)p;
-#if MP_WORDSIZE==64
+#if __WORDSIZE==64
t=be2me_32((uint32_t)(wsum>>32^wsum));
#else
t=be2me_32(wsum);
diff --git a/libmpcodecs/vf_eq.c b/libmpcodecs/vf_eq.c
index 0b65720849..a0dc04ae39 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 f479569536..5c022e5920 100644
--- a/libmpcodecs/vf_filmdint.c
+++ b/libmpcodecs/vf_filmdint.c
@@ -366,13 +366,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) \
@@ -437,7 +437,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;
@@ -469,7 +469,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));
@@ -477,7 +477,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"
@@ -523,7 +523,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"
@@ -537,7 +537,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 */
@@ -554,7 +554,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"
@@ -595,7 +595,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"
@@ -605,7 +605,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"
@@ -637,7 +637,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 a6c2c58a3b..46c8468745 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* 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_geq.c b/libmpcodecs/vf_geq.c
index e8f16776d7..d2cbe6554b 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_halfpack.c b/libmpcodecs/vf_halfpack.c
index 39ba69bb81..f15a9a439b 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 0ffca173da..4b5612643d 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 c54405a4eb..450ccb0a3c 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 ab88cb5964..02fe9d9e16 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* 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_palette.c b/libmpcodecs/vf_palette.c
index 449516f758..b2105f9487 100644
--- a/libmpcodecs/vf_palette.c
+++ b/libmpcodecs/vf_palette.c
@@ -108,15 +108,15 @@ static int put_image(struct vf_instance* 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* 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;
}
}
diff --git a/libmpcodecs/vf_pp7.c b/libmpcodecs/vf_pp7.c
index 2fc76b1752..4221625abf 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* 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_qp.c b/libmpcodecs/vf_qp.c
index b08a0d5523..98aeab7535 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"
diff --git a/libmpcodecs/vf_sab.c b/libmpcodecs/vf_sab.c
index 1f7bdbccc1..61a5a7bc32 100644
--- a/libmpcodecs/vf_sab.c
+++ b/libmpcodecs/vf_sab.c
@@ -140,7 +140,7 @@ static int config(struct vf_instance* 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 0daa23c605..02cd1ac919 100644
--- a/libmpcodecs/vf_scale.c
+++ b/libmpcodecs/vf_scale.c
@@ -557,7 +557,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 b94948d549..11a7cae1ff 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<height; y++){
uint8_t *dst1= dst;
int16_t *src1= src;
- asm volatile(
+ __asm__ volatile(
"movq (%3), %%mm3 \n\t"
"movq (%3), %%mm4 \n\t"
"movd %4, %%mm2 \n\t"
@@ -500,10 +500,10 @@ static int put_image(struct vf_instance* 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_tfields.c b/libmpcodecs/vf_tfields.c
index 893c059972..0d88119371 100644
--- a/libmpcodecs/vf_tfields.c
+++ b/libmpcodecs/vf_tfields.c
@@ -59,7 +59,7 @@ static void qpel_li_3DNOW(unsigned char *d, unsigned char *s, int w, int h, int
s += ss;
}
for (i=h-1; i; i--) {
- asm volatile(
+ __asm__ volatile(
"1: \n\t"
"movq (%%"REG_S"), %%mm0 \n\t"
"movq (%%"REG_S",%%"REG_a"), %%mm1 \n\t"
@@ -79,7 +79,7 @@ static void qpel_li_3DNOW(unsigned char *d, unsigned char *s, int w, int h, int
s += ss;
}
if (!up) fast_memcpy(d, s, w);
- asm volatile("emms \n\t" : : : "memory");
+ __asm__ volatile("emms \n\t" : : : "memory");
}
#endif
@@ -95,7 +95,7 @@ static void qpel_li_MMX2(unsigned char *d, unsigned char *s, int w, int h, int d
s += ss;
}
for (i=h-1; i; i--) {
- asm volatile(
+ __asm__ volatile(
"pxor %%mm7, %%mm7 \n\t"
"2: \n\t"
"movq (%%"REG_S"), %%mm0 \n\t"
@@ -116,7 +116,7 @@ static void qpel_li_MMX2(unsigned char *d, unsigned char *s, int w, int h, int d
s += ss;
}
if (!up) fast_memcpy(d, s, w);
- asm volatile("emms \n\t" : : : "memory");
+ __asm__ volatile("emms \n\t" : : : "memory");
}
#endif
@@ -132,7 +132,7 @@ static void qpel_li_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds
s += ss;
}
for (i=h-1; i; i--) {
- asm volatile(
+ __asm__ volatile(
"pxor %%mm7, %%mm7 \n\t"
"3: \n\t"
"movq (%%"REG_S"), %%mm0 \n\t"
@@ -166,7 +166,7 @@ static void qpel_li_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds
s += ss;
}
if (!up) fast_memcpy(d, s, w);
- asm volatile("emms \n\t" : : : "memory");
+ __asm__ volatile("emms \n\t" : : : "memory");
}
static void qpel_4tap_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up)
@@ -186,7 +186,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;
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"
@@ -246,7 +246,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 26f66917e9..40111fafcc 100644
--- a/libmpcodecs/vf_unsharp.c
+++ b/libmpcodecs/vf_unsharp.c
@@ -194,11 +194,11 @@ static int put_image( struct vf_instance* 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 95fe34f762..04a42a2b9e 100644
--- a/libmpcodecs/vf_uspp.c
+++ b/libmpcodecs/vf_uspp.c
@@ -292,10 +292,10 @@ static int put_image(struct vf_instance* 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 12d85da97e..b4dbaa25c0 100644
--- a/libmpcodecs/vf_yadif.c
+++ b/libmpcodecs/vf_yadif.c
@@ -143,7 +143,7 @@ static void filter_line_mmx2(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, u
#define FILTER\
for(x=0; x<w; x+=4){\
- asm volatile(\
+ __asm__ volatile(\
"pxor %%mm7, %%mm7 \n\t"\
LOAD4("(%[cur],%[mrefs])", %%mm0) /* c = cur[x-refs] */\
LOAD4("(%[cur],%[prefs])", %%mm1) /* e = cur[x+refs] */\
@@ -260,7 +260,7 @@ static void filter_line_mmx2(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, u
[pb1] "m"(pb_1),\
[mode] "g"(mode)\
);\
- asm volatile("movd %%mm1, %0" :"=m"(*dst));\
+ __asm__ volatile("movd %%mm1, %0" :"=m"(*dst));\
dst += 4;\
prev+= 4;\
cur += 4;\
@@ -371,7 +371,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], int dst_stride[3], int
}
}
#if defined(HAVE_MMX) && defined(NAMED_ASM_ARGS)
- if(gCpuCaps.hasMMX2) asm volatile("emms \n\t" : : : "memory");
+ if(gCpuCaps.hasMMX2) __asm__ volatile("emms \n\t" : : : "memory");
#endif
}
diff --git a/libmpcodecs/vf_zrmjpeg.c b/libmpcodecs/vf_zrmjpeg.c
index 546c63cf10..32b4f9b7bc 100644
--- a/libmpcodecs/vf_zrmjpeg.c
+++ b/libmpcodecs/vf_zrmjpeg.c
@@ -49,15 +49,11 @@
* 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
#undef free
-#undef realloc
-
-extern int avcodec_initialized;
/* some convenient #define's, is this portable enough? */
/// Printout with vf_zrmjpeg: prefix at VERBOSE level
@@ -72,21 +68,6 @@ extern int avcodec_initialized;
// 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);
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;
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",
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;
}
diff --git a/libmpdemux/demux_rtp.cpp b/libmpdemux/demux_rtp.cpp
index 7ec42db75a..99fdb1c39f 100644
--- a/libmpdemux/demux_rtp.cpp
+++ b/libmpdemux/demux_rtp.cpp
@@ -372,7 +372,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,
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
diff --git a/libmpdemux/demuxer.h b/libmpdemux/demuxer.h
index 82e1577018..3f2eb70585 100644
--- a/libmpdemux/demuxer.h
+++ b/libmpdemux/demuxer.h
@@ -10,6 +10,14 @@
struct MPOpts;
+#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
#define MAX_PACK_BYTES 0x8000000 // 128 MiB
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<num_pixels; i++)
- ((unsigned *)dst)[i] = ((unsigned *)palette)[src[i]];
-*/
-
- for (i=0; i<num_pixels; i++)
- {
- #ifdef WORDS_BIGENDIAN
- dst[3]= palette[src[i]*4+2];
- dst[2]= palette[src[i]*4+1];
- dst[1]= palette[src[i]*4+0];
- #else
- //FIXME slow?
- dst[0]= palette[src[i]*4+2];
- dst[1]= palette[src[i]*4+1];
- dst[2]= palette[src[i]*4+0];
- //dst[3]= 0; /* do we need this cleansing? */
- #endif
- dst+= 4;
- }
-}
-
-void palette8tobgr32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette)
-{
- long i;
for (i=0; i<num_pixels; i++)
- {
- #ifdef WORDS_BIGENDIAN
- dst[3]= palette[src[i]*4+0];
- dst[2]= palette[src[i]*4+1];
- dst[1]= palette[src[i]*4+2];
- #else
- //FIXME slow?
- dst[0]= palette[src[i]*4+0];
- dst[1]= palette[src[i]*4+1];
- dst[2]= palette[src[i]*4+2];
- //dst[3]= 0; /* do we need this cleansing? */
- #endif
-
- dst+= 4;
- }
+ ((uint32_t *) dst)[i] = ((const uint32_t *) palette)[src[i]];
}
/**
- * Palette is assumed to contain BGR32.
+ * Palette format: ABCD -> 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<num_pixels; i++)
- ((unsigned *)(&dst[i*3])) = ((unsigned *)palette)[src[i]];
-*/
- for (i=0; i<num_pixels; i++)
- {
- //FIXME slow?
- dst[0]= palette[src[i]*4+2];
- dst[1]= palette[src[i]*4+1];
- dst[2]= palette[src[i]*4+0];
- dst+= 3;
- }
-}
-void palette8tobgr24(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<num_pixels; i++)
- ((unsigned *)(&dst[i*3])) = ((unsigned *)palette)[src[i]];
-*/
for (i=0; i<num_pixels; i++)
{
//FIXME slow?
diff --git a/libswscale/rgb2rgb.h b/libswscale/rgb2rgb.h
index 11c0d8e65f..5cc6a2dc03 100644
--- a/libswscale/rgb2rgb.h
+++ b/libswscale/rgb2rgb.h
@@ -61,10 +61,8 @@ extern void rgb15tobgr15(const uint8_t *src, uint8_t *dst, long src_size);
extern void bgr8torgb8 (const uint8_t *src, uint8_t *dst, long src_size);
-extern void palette8torgb32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
-extern void palette8tobgr32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
-extern void palette8torgb24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
-extern void palette8tobgr24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
+extern void palette8topacked32(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
+extern void palette8topacked24(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8torgb16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8tobgr16(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
extern void palette8torgb15(const uint8_t *src, uint8_t *dst, long num_pixels, const uint8_t *palette);
diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c
index c98c080978..ab82035044 100644
--- a/libswscale/rgb2rgb_template.c
+++ b/libswscale/rgb2rgb_template.c
@@ -28,12 +28,6 @@
*/
#include <stddef.h>
-#include <inttypes.h> /* for __WORDSIZE */
-
-#ifndef __WORDSIZE
-// #warning You have a misconfigured system and will probably lose performance!
-#define __WORDSIZE MP_WORDSIZE
-#endif
#undef PREFETCH
#undef MOVNTQ
@@ -58,17 +52,12 @@
#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. */
+/* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */
#define EMMS "femms"
#else
#define EMMS "emms"
@@ -92,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"
@@ -121,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)
{
@@ -152,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"
@@ -207,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)
{
@@ -242,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 (s<mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq 8%1, %%mm2 \n\t"
@@ -265,8 +254,8 @@ static inline void RENAME(rgb15to16)(const uint8_t *src, uint8_t *dst, long src_
d+=16;
s+=16;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
mm_end = end - 3;
while (s < mm_end)
@@ -291,13 +280,13 @@ static inline void RENAME(rgb16to15)(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, %%mm7"::"m"(mask15rg));
- asm volatile("movq %0, %%mm6"::"m"(mask15b));
+ __asm__ volatile(PREFETCH" %0"::"m"(*s));
+ __asm__ volatile("movq %0, %%mm7"::"m"(mask15rg));
+ __asm__ volatile("movq %0, %%mm6"::"m"(mask15b));
mm_end = end - 15;
while (s<mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq 8%1, %%mm2 \n\t"
@@ -319,8 +308,8 @@ static inline void RENAME(rgb16to15)(const uint8_t *src, uint8_t *dst, long src_
d+=16;
s+=16;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
mm_end = end - 3;
while (s < mm_end)
@@ -351,7 +340,7 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, long src_
#ifdef HAVE_MMX
mm_end = end - 15;
#if 1 //is faster only if multiplies are reasonably fast (FIXME figure out on which CPUs this is faster, on Athlon it is slightly faster)
- asm volatile(
+ __asm__ volatile(
"movq %3, %%mm5 \n\t"
"movq %4, %%mm6 \n\t"
"movq %5, %%mm7 \n\t"
@@ -386,14 +375,14 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, long src_
: "r" (mm_end), "m" (mask3216g), "m" (mask3216br), "m" (mul3216)
);
#else
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_16mask),"m"(green_16mask));
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 4%1, %%mm3 \n\t"
@@ -427,8 +416,8 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, long src_
s += 16;
}
#endif
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -447,15 +436,15 @@ static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long s
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_16mask),"m"(green_16mask));
mm_end = end - 15;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 4%1, %%mm3 \n\t"
@@ -488,8 +477,8 @@ static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long s
d += 4;
s += 16;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -510,7 +499,7 @@ static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_
#ifdef HAVE_MMX
mm_end = end - 15;
#if 1 //is faster only if multiplies are reasonably fast (FIXME figure out on which CPUs this is faster, on Athlon it is slightly faster)
- asm volatile(
+ __asm__ volatile(
"movq %3, %%mm5 \n\t"
"movq %4, %%mm6 \n\t"
"movq %5, %%mm7 \n\t"
@@ -545,14 +534,14 @@ static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_
: "r" (mm_end), "m" (mask3215g), "m" (mask3216br), "m" (mul3215)
);
#else
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_15mask),"m"(green_15mask));
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 4%1, %%mm3 \n\t"
@@ -586,8 +575,8 @@ static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_
s += 16;
}
#endif
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -606,15 +595,15 @@ static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long s
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_15mask),"m"(green_15mask));
mm_end = end - 15;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 4%1, %%mm3 \n\t"
@@ -647,8 +636,8 @@ static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long s
d += 4;
s += 16;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -667,15 +656,15 @@ static inline void RENAME(rgb24tobgr16)(const uint8_t *src, uint8_t *dst, long s
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_16mask),"m"(green_16mask));
mm_end = end - 11;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 3%1, %%mm3 \n\t"
@@ -708,8 +697,8 @@ static inline void RENAME(rgb24tobgr16)(const uint8_t *src, uint8_t *dst, long s
d += 4;
s += 12;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -730,15 +719,15 @@ static inline void RENAME(rgb24to16)(const uint8_t *src, uint8_t *dst, long src_
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_16mask),"m"(green_16mask));
mm_end = end - 15;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 3%1, %%mm3 \n\t"
@@ -771,8 +760,8 @@ static inline void RENAME(rgb24to16)(const uint8_t *src, uint8_t *dst, long src_
d += 4;
s += 12;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -793,15 +782,15 @@ static inline void RENAME(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long s
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_15mask),"m"(green_15mask));
mm_end = end - 11;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 3%1, %%mm3 \n\t"
@@ -834,8 +823,8 @@ static inline void RENAME(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long s
d += 4;
s += 12;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -856,15 +845,15 @@ static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, long src_
uint16_t *d = (uint16_t *)dst;
end = s + src_size;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*src):"memory");
- asm volatile(
+ __asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
+ __asm__ volatile(
"movq %0, %%mm7 \n\t"
"movq %1, %%mm6 \n\t"
::"m"(red_15mask),"m"(green_15mask));
mm_end = end - 15;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movd %1, %%mm0 \n\t"
"movd 3%1, %%mm3 \n\t"
@@ -897,8 +886,8 @@ static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, long src_
d += 4;
s += 12;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -940,11 +929,11 @@ static inline void RENAME(rgb15tobgr24)(const uint8_t *src, uint8_t *dst, long s
const uint16_t *s = (const uint16_t*)src;
end = s + src_size/2;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s):"memory");
+ __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end = end - 7;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq %1, %%mm1 \n\t"
@@ -1007,7 +996,7 @@ static inline void RENAME(rgb15tobgr24)(const uint8_t *src, uint8_t *dst, long s
:"m"(*s),"m"(mask15b),"m"(mask15g),"m"(mask15r), "m"(mmx_null)
:"memory");
/* borrowed 32 to 24 */
- asm volatile(
+ __asm__ volatile(
"movq %%mm0, %%mm4 \n\t"
"movq %%mm3, %%mm5 \n\t"
"movq %%mm6, %%mm0 \n\t"
@@ -1059,8 +1048,8 @@ static inline void RENAME(rgb15tobgr24)(const uint8_t *src, uint8_t *dst, long s
d += 24;
s += 8;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -1082,11 +1071,11 @@ static inline void RENAME(rgb16tobgr24)(const uint8_t *src, uint8_t *dst, long s
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s):"memory");
+ __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
mm_end = end - 7;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq %1, %%mm1 \n\t"
@@ -1148,7 +1137,7 @@ static inline void RENAME(rgb16tobgr24)(const uint8_t *src, uint8_t *dst, long s
:"m"(*s),"m"(mask16b),"m"(mask16g),"m"(mask16r),"m"(mmx_null)
:"memory");
/* borrowed 32 to 24 */
- asm volatile(
+ __asm__ volatile(
"movq %%mm0, %%mm4 \n\t"
"movq %%mm3, %%mm5 \n\t"
"movq %%mm6, %%mm0 \n\t"
@@ -1200,8 +1189,8 @@ static inline void RENAME(rgb16tobgr24)(const uint8_t *src, uint8_t *dst, long s
d += 24;
s += 8;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -1223,12 +1212,12 @@ static inline void RENAME(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_
const uint16_t *s = (const uint16_t *)src;
end = s + src_size/2;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s):"memory");
- asm volatile("pxor %%mm7,%%mm7 \n\t":::"memory");
+ __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
+ __asm__ volatile("pxor %%mm7,%%mm7 \n\t":::"memory");
mm_end = end - 3;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq %1, %%mm1 \n\t"
@@ -1264,8 +1253,8 @@ static inline void RENAME(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_
d += 16;
s += 4;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -1301,12 +1290,12 @@ static inline void RENAME(rgb16to32)(const uint8_t *src, uint8_t *dst, long src_
const uint16_t *s = (const uint16_t*)src;
end = s + src_size/2;
#ifdef HAVE_MMX
- asm volatile(PREFETCH" %0"::"m"(*s):"memory");
- asm volatile("pxor %%mm7,%%mm7 \n\t":::"memory");
+ __asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
+ __asm__ volatile("pxor %%mm7,%%mm7 \n\t":::"memory");
mm_end = end - 3;
while (s < mm_end)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq %1, %%mm1 \n\t"
@@ -1342,8 +1331,8 @@ static inline void RENAME(rgb16to32)(const uint8_t *src, uint8_t *dst, long src_
d += 16;
s += 4;
}
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
while (s < end)
{
@@ -1369,7 +1358,7 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long s
const uint8_t *s = src-idx;
uint8_t *d = dst-idx;
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
"test %0, %0 \n\t"
"jns 2f \n\t"
PREFETCH" (%1, %0) \n\t"
@@ -1432,7 +1421,7 @@ static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long s
unsigned i;
#ifdef HAVE_MMX
long mmx_size= 23 - src_size;
- asm volatile (
+ __asm__ volatile (
"test %%"REG_a", %%"REG_a" \n\t"
"jns 2f \n\t"
"movq "MANGLE(mask24r)", %%mm5 \n\t"
@@ -1476,8 +1465,8 @@ static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long s
: "r" (src-mmx_size), "r"(dst-mmx_size)
);
- asm volatile(SFENCE:::"memory");
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(SFENCE:::"memory");
+ __asm__ volatile(EMMS:::"memory");
if (mmx_size==23) return; //finished, was multiple of 8
@@ -1507,7 +1496,7 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u
{
#ifdef HAVE_MMX
//FIXME handle 2 lines at once (fewer prefetches, reuse some chroma, but very likely memory-limited anyway)
- asm volatile(
+ __asm__ volatile(
"xor %%"REG_a", %%"REG_a" \n\t"
ASMALIGN(4)
"1: \n\t"
@@ -1548,10 +1537,10 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u
y2 = yc2[n]; \
u = uc[n]; \
v = vc[n]; \
- asm("unpkbw %1, %0" : "=r"(y1) : "r"(y1)); \
- asm("unpkbw %1, %0" : "=r"(y2) : "r"(y2)); \
- asm("unpkbl %1, %0" : "=r"(u) : "r"(u)); \
- asm("unpkbl %1, %0" : "=r"(v) : "r"(v)); \
+ __asm__("unpkbw %1, %0" : "=r"(y1) : "r"(y1)); \
+ __asm__("unpkbw %1, %0" : "=r"(y2) : "r"(y2)); \
+ __asm__("unpkbl %1, %0" : "=r"(u) : "r"(u)); \
+ __asm__("unpkbl %1, %0" : "=r"(v) : "r"(v)); \
yuv1 = (u << 8) + (v << 24); \
yuv2 = yuv1 + y2; \
yuv1 += y1; \
@@ -1568,10 +1557,10 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u
uint64_t y1, y2, yuv1, yuv2;
uint64_t u, v;
/* Prefetch */
- asm("ldq $31,64(%0)" :: "r"(yc));
- asm("ldq $31,64(%0)" :: "r"(yc2));
- asm("ldq $31,64(%0)" :: "r"(uc));
- asm("ldq $31,64(%0)" :: "r"(vc));
+ __asm__("ldq $31,64(%0)" :: "r"(yc));
+ __asm__("ldq $31,64(%0)" :: "r"(yc2));
+ __asm__("ldq $31,64(%0)" :: "r"(uc));
+ __asm__("ldq $31,64(%0)" :: "r"(vc));
pl2yuy2(0);
pl2yuy2(1);
@@ -1589,7 +1578,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;
@@ -1631,7 +1620,7 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u
dst += dstStride;
}
#ifdef HAVE_MMX
-asm( EMMS" \n\t"
+__asm__( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#endif
@@ -1659,7 +1648,7 @@ static inline void RENAME(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *u
{
#ifdef HAVE_MMX
//FIXME handle 2 lines at once (fewer prefetches, reuse some chroma, but very likely memory-limited anyway)
- asm volatile(
+ __asm__ volatile(
"xor %%"REG_a", %%"REG_a" \n\t"
ASMALIGN(4)
"1: \n\t"
@@ -1695,7 +1684,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;
@@ -1737,7 +1726,7 @@ static inline void RENAME(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *u
dst += dstStride;
}
#ifdef HAVE_MMX
-asm( EMMS" \n\t"
+__asm__( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#endif
@@ -1788,7 +1777,7 @@ static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
for (y=0; y<height; y+=2)
{
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
"xor %%"REG_a", %%"REG_a" \n\t"
"pcmpeqw %%mm7, %%mm7 \n\t"
"psrlw $8, %%mm7 \n\t" // FF,00,FF,00...
@@ -1843,7 +1832,7 @@ static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
ydst += lumStride;
src += srcStride;
- asm volatile(
+ __asm__ volatile(
"xor %%"REG_a", %%"REG_a" \n\t"
ASMALIGN(4)
"1: \n\t"
@@ -1893,7 +1882,7 @@ static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
src += srcStride;
}
#ifdef HAVE_MMX
-asm volatile( EMMS" \n\t"
+__asm__ volatile( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#endif
@@ -1927,7 +1916,7 @@ static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, long srcWi
for (y=1; y<srcHeight; y++){
#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
const long mmxSize= srcWidth&~15;
- asm volatile(
+ __asm__ volatile(
"mov %4, %%"REG_a" \n\t"
"1: \n\t"
"movq (%0, %%"REG_a"), %%mm0 \n\t"
@@ -2005,7 +1994,7 @@ static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, long srcWi
#endif
#ifdef HAVE_MMX
-asm volatile( EMMS" \n\t"
+__asm__ volatile( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#endif
@@ -2026,7 +2015,7 @@ static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
for (y=0; y<height; y+=2)
{
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
"xorl %%eax, %%eax \n\t"
"pcmpeqw %%mm7, %%mm7 \n\t"
"psrlw $8, %%mm7 \n\t" // FF,00,FF,00...
@@ -2081,7 +2070,7 @@ static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
ydst += lumStride;
src += srcStride;
- asm volatile(
+ __asm__ volatile(
"xorl %%eax, %%eax \n\t"
ASMALIGN(4)
"1: \n\t"
@@ -2131,7 +2120,7 @@ static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
src += srcStride;
}
#ifdef HAVE_MMX
-asm volatile( EMMS" \n\t"
+__asm__ volatile( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#endif
@@ -2156,7 +2145,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
long i;
for (i=0; i<2; i++)
{
- asm volatile(
+ __asm__ volatile(
"mov %2, %%"REG_a" \n\t"
"movq "MANGLE(ff_bgr2YCoeff)", %%mm6 \n\t"
"movq "MANGLE(ff_w1111)", %%mm5 \n\t"
@@ -2229,7 +2218,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
src += srcStride;
}
src -= srcStride*2;
- asm volatile(
+ __asm__ volatile(
"mov %4, %%"REG_a" \n\t"
"movq "MANGLE(ff_w1111)", %%mm5 \n\t"
"movq "MANGLE(ff_bgr2UCoeff)", %%mm6 \n\t"
@@ -2383,7 +2372,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
src += srcStride*2;
}
- asm volatile( EMMS" \n\t"
+ __asm__ volatile( EMMS" \n\t"
SFENCE" \n\t"
:::"memory");
#else
@@ -2440,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;
@@ -2451,7 +2440,7 @@ void RENAME(interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dest,
#ifdef HAVE_MMX
#ifdef HAVE_SSE2
- asm(
+ __asm__(
"xor %%"REG_a", %%"REG_a" \n\t"
"1: \n\t"
PREFETCH" 64(%1, %%"REG_a") \n\t"
@@ -2470,7 +2459,7 @@ void RENAME(interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dest,
: "memory", "%"REG_a""
);
#else
- asm(
+ __asm__(
"xor %%"REG_a", %%"REG_a" \n\t"
"1: \n\t"
PREFETCH" 64(%1, %%"REG_a") \n\t"
@@ -2513,7 +2502,7 @@ void RENAME(interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dest,
src2 += src2Stride;
}
#ifdef HAVE_MMX
- asm(
+ __asm__(
EMMS" \n\t"
SFENCE" \n\t"
::: "memory"
@@ -2530,7 +2519,7 @@ static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
long y,x,w,h;
w=width/2; h=height/2;
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
PREFETCH" %0 \n\t"
PREFETCH" %1 \n\t"
::"m"(*(src1+srcStride1)),"m"(*(src2+srcStride2)):"memory");
@@ -2542,7 +2531,7 @@ static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
#ifdef HAVE_MMX
for (;x<w-31;x+=32)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq 8%1, %%mm2 \n\t"
@@ -2582,7 +2571,7 @@ static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
#ifdef HAVE_MMX
for (;x<w-31;x+=32)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32%1 \n\t"
"movq %1, %%mm0 \n\t"
"movq 8%1, %%mm2 \n\t"
@@ -2616,7 +2605,7 @@ static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
for (;x<w;x++) d[2*x]=d[2*x+1]=s2[x];
}
#ifdef HAVE_MMX
- asm(
+ __asm__(
EMMS" \n\t"
SFENCE" \n\t"
::: "memory"
@@ -2641,7 +2630,7 @@ static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2
#ifdef HAVE_MMX
for (;x<w-7;x+=8)
{
- asm volatile(
+ __asm__ volatile(
PREFETCH" 32(%1, %0) \n\t"
PREFETCH" 32(%2, %0) \n\t"
PREFETCH" 32(%3, %0) \n\t"
@@ -2707,7 +2696,7 @@ static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2
}
}
#ifdef HAVE_MMX
- asm(
+ __asm__(
EMMS" \n\t"
SFENCE" \n\t"
::: "memory"
diff --git a/libswscale/swscale-example.c b/libswscale/swscale-example.c
index b5f8d5e230..c67b4c0420 100644
--- a/libswscale/swscale-example.c
+++ b/libswscale/swscale-example.c
@@ -120,7 +120,7 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat
sws_scale(outContext, dst, dstStride, 0, dstH, out, refStride);
#if defined(ARCH_X86)
- asm volatile ("emms\n\t");
+ __asm__ volatile ("emms\n\t");
#endif
ssdY= getSSD(ref[0], out[0], refStride[0], refStride[0], w, h);
@@ -215,7 +215,7 @@ int main(int argc, char **argv){
sws_scale(sws, rgb_src, rgb_stride, 0, H, src, stride);
#if defined(ARCH_X86)
- asm volatile ("emms\n\t");
+ __asm__ volatile ("emms\n\t");
#endif
selfTest(src, stride, W, H);
diff --git a/libswscale/swscale.c b/libswscale/swscale.c
index ff2d1d49d4..a926bade05 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<<RGB2YUV_SHIFT)+0.5))
@@ -205,11 +212,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))) g6Dither;
-static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither;
-
const DECLARE_ALIGNED(8, uint64_t, ff_dither4[2]) = {
0x0103010301030103LL,
0x0200020002000200LL,};
@@ -242,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) */
@@ -262,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, },
};
@@ -1059,7 +1061,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF
int ret= -1;
#if defined(ARCH_X86)
if (flags & SWS_CPU_CAPS_MMX)
- asm volatile("emms\n\t"::: "memory"); //FIXME this should not 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
// Note the +1 is for the MMXscaler which reads over the end
@@ -1448,7 +1450,7 @@ static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode, int16_t *fil
//code fragment
- asm volatile(
+ __asm__ volatile(
"jmp 9f \n\t"
// Begin
"0: \n\t"
@@ -1488,7 +1490,7 @@ static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode, int16_t *fil
"=r" (fragmentLengthA)
);
- asm volatile(
+ __asm__ volatile(
"jmp 9f \n\t"
// Begin
"0: \n\t"
@@ -1712,11 +1714,46 @@ static int YUV422PToUyvyWrapper(SwsContext *c, uint8_t* src[], int srcStride[],
return srcSliceH;
}
+static int pal2rgbWrapper(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
+ int srcSliceH, uint8_t* dst[], int dstStride[]){
+ 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;
+ 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 = palette8topacked32; break;
+ case PIX_FMT_BGR32 : conv = palette8topacked32; break;
+ case PIX_FMT_BGR32_1: conv = palette8topacked32; break;
+ case PIX_FMT_RGB32_1: conv = palette8topacked32; break;
+ case PIX_FMT_RGB24 : conv = palette8topacked24; break;
+ case PIX_FMT_BGR24 : conv = palette8topacked24; 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; i<srcSliceH; i++) {
+ conv(srcPtr, dstPtr, c->srcW, 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[]){
- 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 */
@@ -2101,7 +2138,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:
@@ -2121,7 +2158,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;
@@ -2132,7 +2169,7 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH
SwsFilter dummyFilter= {NULL, NULL, NULL, NULL};
#if defined(ARCH_X86)
if (flags & SWS_CPU_CAPS_MMX)
- asm volatile("emms\n\t"::: "memory");
+ __asm__ volatile("emms\n\t"::: "memory");
#endif
#if !defined(RUNTIME_CPUDETECT) || !defined (CONFIG_GPL) //ensure that the flags match the compiled variant if cpudetect is off
@@ -2306,6 +2343,15 @@ SwsContext *sws_getContext(int srcW, int srcH, int srcFormat, int dstW, int dstH
&& (!needsDither || (c->flags&(SWS_FAST_BILINEAR|SWS_POINT))))
c->swScale= rgb2rgbWrapper;
+ 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;
+
if (srcFormat == PIX_FMT_YUV422P)
{
if (dstFormat == PIX_FMT_YUYV422)
@@ -2659,12 +2705,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");
@@ -2674,7 +2714,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){
@@ -2702,9 +2742,36 @@ 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);
+
+
+ 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);
+ }
}
- src2[1]= (uint8_t*)pal;
}
// copy strides, so they can safely be modified
@@ -2722,7 +2789,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];
@@ -3087,8 +3154,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..48995571e0 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;
@@ -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;
diff --git a/libswscale/swscale_template.c b/libswscale/swscale_template.c
index 74f4c57285..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"
@@ -71,7 +71,7 @@
#endif
#define YSCALEYUV2YV12X(x, offset, dest, width) \
- asm volatile(\
+ __asm__ volatile(\
"xor %%"REG_a", %%"REG_a" \n\t"\
"movq "VROUNDER_OFFSET"(%0), %%mm3 \n\t"\
"movq %%mm3, %%mm4 \n\t"\
@@ -107,7 +107,7 @@
);
#define YSCALEYUV2YV12X_ACCURATE(x, offset, dest, width) \
- asm volatile(\
+ __asm__ volatile(\
"lea " offset "(%0), %%"REG_d" \n\t"\
"xor %%"REG_a", %%"REG_a" \n\t"\
"pxor %%mm4, %%mm4 \n\t"\
@@ -207,7 +207,7 @@
: "%eax", "%ebx", "%ecx", "%edx", "%esi"
*/
#define YSCALEYUV2PACKEDX \
- asm volatile(\
+ __asm__ volatile(\
"xor %%"REG_a", %%"REG_a" \n\t"\
ASMALIGN(4)\
"nop \n\t"\
@@ -256,7 +256,7 @@
);
#define YSCALEYUV2PACKEDX_ACCURATE \
- asm volatile(\
+ __asm__ volatile(\
"xor %%"REG_a", %%"REG_a" \n\t"\
ASMALIGN(4)\
"nop \n\t"\
@@ -1002,7 +1002,7 @@ static inline void RENAME(yuv2yuv1)(SwsContext *c, int16_t *lumSrc, int16_t *chr
if (c->flags & 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])
@@ -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(g6Dither)", %%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(g6Dither)", %%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)
@@ -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,11 +1326,11 @@ FULL_YSCALEYUV2RGB
);
break;
case PIX_FMT_BGR565:
- asm volatile(
+ __asm__ volatile(
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
@@ -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,16 +1461,16 @@ 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"
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)
@@ -1482,16 +1482,16 @@ 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"
YSCALEYUV2RGB(%%REGBP, %5)
/* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
#ifdef DITHER1XBPP
- "paddusb "MANGLE(b5Dither)", %%mm2 \n\t"
- "paddusb "MANGLE(g6Dither)", %%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)
@@ -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,16 +1574,16 @@ 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"
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"
@@ -1594,16 +1594,16 @@ 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"
YSCALEYUV2RGB1(%%REGBP, %5)
/* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
#ifdef DITHER1XBPP
- "paddusb "MANGLE(b5Dither)", %%mm2 \n\t"
- "paddusb "MANGLE(g6Dither)", %%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)
@@ -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,16 +1663,16 @@ 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"
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"
@@ -1683,16 +1683,16 @@ 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"
YSCALEYUV2RGB1b(%%REGBP, %5)
/* mm2=B, %%mm4=G, %%mm5=R, %%mm7=0 */
#ifdef DITHER1XBPP
- "paddusb "MANGLE(b5Dither)", %%mm2 \n\t"
- "paddusb "MANGLE(g6Dither)", %%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)
@@ -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
@@ -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];
@@ -2965,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;
}
}
@@ -3091,10 +3090,12 @@ 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];
- r5Dither= ff_dither8[(dstY+1)&1];
+ c->blueDither= ff_dither8[dstY&1];
+ if (c->dstFormat == PIX_FMT_RGB555 || c->dstFormat == PIX_FMT_BGR555)
+ c->greenDither= ff_dither8[dstY&1];
+ else
+ c->greenDither= ff_dither4[dstY&1];
+ c->redDither= ff_dither8[(dstY+1)&1];
#endif
if (dstY < dstH-2)
{
@@ -3255,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.c b/libswscale/yuv2rgb.c
index 544d608d62..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];
@@ -54,13 +52,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))) g6Dither;
-static volatile uint64_t attribute_used __attribute__((aligned(8))) r5Dither;
-
#undef HAVE_MMX
//MMX versions
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)
diff --git a/libswscale/yuv2rgb_template.c b/libswscale/yuv2rgb_template.c
index 1f8e225baa..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"
@@ -133,8 +133,8 @@ 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 */ );
- //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],
+ __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; y<srcSliceH; y++ ) {
uint8_t *image = dst[0] + (y+srcSliceY)*dstStride[0];
@@ -143,13 +143,12 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr
uint8_t *pv = src[2] + (y>>1)*srcStride[2];
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];
+ 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 (
+ __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 */
@@ -165,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(g6Dither)", %%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 */
@@ -211,7 +210,7 @@ YUV2RGB
);
}
- asm volatile (EMMS);
+ __asm__ volatile (EMMS);
return srcSliceH;
}
@@ -228,8 +227,8 @@ 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 */ );
- //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],
+ __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; y<srcSliceH; y++ ) {
uint8_t *image = dst[0] + (y+srcSliceY)*dstStride[0];
@@ -238,13 +237,12 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr
uint8_t *pv = src[2] + (y>>1)*srcStride[2];
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];
+ 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 (
+ __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 */
@@ -254,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 */
@@ -301,7 +299,7 @@ YUV2RGB
);
}
- asm volatile (EMMS);
+ __asm__ volatile (EMMS);
return srcSliceH;
}
@@ -317,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; y<srcSliceH; y++ ) {
uint8_t *image = dst[0] + (y+srcSliceY)*dstStride[0];
@@ -328,7 +326,7 @@ static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStr
/* 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 */
@@ -447,7 +445,7 @@ YUV2RGB
);
}
- asm volatile (EMMS);
+ __asm__ volatile (EMMS);
return srcSliceH;
}
@@ -463,7 +461,7 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr
h_size= (c->dstW+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<srcSliceH; y++ ) {
uint8_t *image = dst[0] + (y+srcSliceY)*dstStride[0];
@@ -474,7 +472,7 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr
/* 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 */
@@ -533,6 +531,6 @@ YUV2RGB
);
}
- asm volatile (EMMS);
+ __asm__ volatile (EMMS);
return srcSliceH;
}
diff --git a/libswscale/yuv2rgb_vis.c b/libswscale/yuv2rgb_vis.c
index 120fa56c71..42a0094f68 100644
--- a/libswscale/yuv2rgb_vis.c
+++ b/libswscale/yuv2rgb_vis.c
@@ -85,7 +85,7 @@ static int vis_420P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int s
int y, out1, out2, out3, out4, out5, out6;
for(y=0;y < srcSliceH;++y) {
- asm volatile (
+ __asm__ volatile (
YUV2RGB_INIT
"wr %%g0, 0xd2, %%asi \n\t" /* ASI_FL16_P */
"1: \n\t"
@@ -136,7 +136,7 @@ static int vis_422P_ARGB32(SwsContext *c, uint8_t* src[], int srcStride[], int s
int y, out1, out2, out3, out4, out5, out6;
for(y=0;y < srcSliceH;++y) {
- asm volatile (
+ __asm__ volatile (
YUV2RGB_INIT
"wr %%g0, 0xd2, %%asi \n\t" /* ASI_FL16_P */
"1: \n\t"
diff --git a/libvo/aclib_template.c b/libvo/aclib_template.c
index ac08aab3f9..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
@@ -256,7 +256,7 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
// printf(" %d %d\n", (int)from&1023, (int)to&1023);
// Pure Assembly cuz gcc is a bit unpredictable ;)
if(i>=BLOCK_SIZE/64)
- asm volatile(
+ __asm__ volatile(
"xor %%"REG_a", %%"REG_a" \n\t"
ASMALIGN(4)
"1: \n\t"
@@ -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/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<h;y++){
register int x;
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
PREFETCHW" %0\n\t"
PREFETCH" %1\n\t"
PREFETCH" %2\n\t"
::"m"(*dstbase),"m"(*srca),"m"(*src):"memory");
for(x=0;x<w;x+=8){
- asm volatile(
+ __asm__ volatile(
"movl %1, %%eax\n\t"
"orl 4%1, %%eax\n\t"
" jz 1f\n\t"
@@ -92,7 +92,7 @@ static inline void RENAME(vo_draw_alpha_yv12)(int w,int h, unsigned char* src, u
dstbase+=dststride;
}
#ifdef HAVE_MMX
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
return;
}
@@ -103,7 +103,7 @@ static inline void RENAME(vo_draw_alpha_yuy2)(int w,int h, unsigned char* src, u
w=w>>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<h;y++){
register int x;
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
PREFETCHW" %0\n\t"
PREFETCH" %1\n\t"
PREFETCH" %2\n\t"
::"m"(*dstbase),"m"(*srca),"m"(*src));
for(x=0;x<w;x+=4){
- asm volatile(
+ __asm__ volatile(
"movl %1, %%eax\n\t"
"orl %%eax, %%eax\n\t"
" jz 1f\n\t"
@@ -164,7 +164,7 @@ static inline void RENAME(vo_draw_alpha_yuy2)(int w,int h, unsigned char* src, u
dstbase+=dststride;
}
#ifdef HAVE_MMX
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
return;
}
@@ -196,7 +196,7 @@ static inline void RENAME(vo_draw_alpha_uyvy)(int w,int h, unsigned char* src, u
static inline void RENAME(vo_draw_alpha_rgb24)(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){
int y;
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
"pxor %%mm7, %%mm7\n\t"
"pcmpeqb %%mm6, %%mm6\n\t" // F..F
::);
@@ -206,14 +206,14 @@ static inline void RENAME(vo_draw_alpha_rgb24)(int w,int h, unsigned char* src,
register int x;
#if defined(ARCH_X86) && (!defined(ARCH_X86_64) || defined(HAVE_MMX))
#ifdef HAVE_MMX
- asm volatile(
+ __asm__ volatile(
PREFETCHW" %0\n\t"
PREFETCH" %1\n\t"
PREFETCH" %2\n\t"
::"m"(*dst),"m"(*srca),"m"(*src):"memory");
for(x=0;x<w;x+=2){
if(srca[x] || srca[x+1])
- asm volatile(
+ __asm__ volatile(
PREFETCHW" 32%0\n\t"
PREFETCH" 32%1\n\t"
PREFETCH" 32%2\n\t"
@@ -250,7 +250,7 @@ static inline void RENAME(vo_draw_alpha_rgb24)(int w,int h, unsigned char* src,
#else /* HAVE_MMX */
for(x=0;x<w;x++){
if(srca[x]){
- asm volatile(
+ __asm__ volatile(
"movzbl (%0), %%ecx\n\t"
"movzbl 1(%0), %%eax\n\t"
@@ -296,7 +296,7 @@ static inline void RENAME(vo_draw_alpha_rgb24)(int w,int h, unsigned char* src,
dstbase+=dststride;
}
#ifdef HAVE_MMX
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
return;
}
@@ -308,12 +308,12 @@ static inline void RENAME(vo_draw_alpha_rgb32)(int w,int h, unsigned char* src,
#endif
#ifdef HAVE_MMX
#ifdef HAVE_3DNOW
- asm volatile(
+ __asm__ volatile(
"pxor %%mm7, %%mm7\n\t"
"pcmpeqb %%mm6, %%mm6\n\t" // F..F
::);
#else /* HAVE_3DNOW */
- asm volatile(
+ __asm__ volatile(
"pxor %%mm7, %%mm7\n\t"
"pcmpeqb %%mm5, %%mm5\n\t" // F..F
"movq %%mm5, %%mm4\n\t"
@@ -327,14 +327,14 @@ static inline void RENAME(vo_draw_alpha_rgb32)(int w,int h, unsigned char* src,
#if defined(ARCH_X86) && (!defined(ARCH_X86_64) || defined(HAVE_MMX))
#ifdef HAVE_MMX
#ifdef HAVE_3DNOW
- asm volatile(
+ __asm__ volatile(
PREFETCHW" %0\n\t"
PREFETCH" %1\n\t"
PREFETCH" %2\n\t"
::"m"(*dstbase),"m"(*srca),"m"(*src):"memory");
for(x=0;x<w;x+=2){
if(srca[x] || srca[x+1])
- asm volatile(
+ __asm__ volatile(
PREFETCHW" 32%0\n\t"
PREFETCH" 32%1\n\t"
PREFETCH" 32%2\n\t"
@@ -362,13 +362,13 @@ static inline void RENAME(vo_draw_alpha_rgb32)(int w,int h, unsigned char* src,
:: "m" (dstbase[4*x]), "m" (srca[x]), "m" (src[x]));
}
#else //this is faster for intels crap
- asm volatile(
+ __asm__ volatile(
PREFETCHW" %0\n\t"
PREFETCH" %1\n\t"
PREFETCH" %2\n\t"
::"m"(*dstbase),"m"(*srca),"m"(*src):"memory");
for(x=0;x<w;x+=4){
- asm volatile(
+ __asm__ volatile(
"movl %1, %%eax\n\t"
"orl %%eax, %%eax\n\t"
" jz 1f\n\t"
@@ -417,7 +417,7 @@ static inline void RENAME(vo_draw_alpha_rgb32)(int w,int h, unsigned char* src,
#else /* HAVE_MMX */
for(x=0;x<w;x++){
if(srca[x]){
- asm volatile(
+ __asm__ volatile(
"movzbl (%0), %%ecx\n\t"
"movzbl 1(%0), %%eax\n\t"
"movzbl 2(%0), %%edx\n\t"
@@ -461,7 +461,7 @@ static inline void RENAME(vo_draw_alpha_rgb32)(int w,int h, unsigned char* src,
dstbase+=dststride;
}
#ifdef HAVE_MMX
- asm volatile(EMMS:::"memory");
+ __asm__ volatile(EMMS:::"memory");
#endif
return;
}
diff --git a/libvo/video_out.c b/libvo/video_out.c
index 90634fecab..88bacc639f 100644
--- a/libvo/video_out.c
+++ b/libvo/video_out.c
@@ -202,7 +202,7 @@ const struct vo_driver *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/libvo/vo_cvidix.c b/libvo/vo_cvidix.c
index c2565ef7ec..75effe0350 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;
diff --git a/libvo/vo_directx.c b/libvo/vo_directx.c
index 67ed453d04..f492d957d3 100644
--- a/libvo/vo_directx.c
+++ b/libvo/vo_directx.c
@@ -1273,7 +1273,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;
}
diff --git a/libvo/vo_dxr2.c b/libvo/vo_dxr2.c
index f5dc56bb13..914da3e5cf 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 <dxr2ioctl.h>
diff --git a/libvo/vo_gl2.c b/libvo/vo_gl2.c
index 070fd0d5d6..b2c7e49d25 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)
{
diff --git a/libvo/vo_sdl.c b/libvo/vo_sdl.c
index 7bf359dc26..d1aeed2b0d 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) ) {
diff --git a/libvo/vo_winvidix.c b/libvo/vo_winvidix.c
index 2581310596..2a8959fa5c 100644
--- a/libvo/vo_winvidix.c
+++ b/libvo/vo_winvidix.c
@@ -48,7 +48,6 @@ static int depthonscreen;
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;
diff --git a/libvo/vo_x11.c b/libvo/vo_x11.c
index c3692cad58..18861e1266 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 &&
diff --git a/libvo/vo_xvidix.c b/libvo/vo_xvidix.c
index 7470034f24..04c8bea4b7 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)
{
diff --git a/libvo/x11_common.c b/libvo/x11_common.c
index f2e659d3b6..b8446c94f9 100644
--- a/libvo/x11_common.c
+++ b/libvo/x11_common.c
@@ -526,6 +526,12 @@ static void vo_x11_putkey_ext(struct vo *vo, int keysym)
struct mp_fifo *f = vo->key_fifo;
switch (keysym)
{
+ case XF86XK_MenuKB:
+ mplayer_put_key(f, KEY_MENU);
+ break;
+ case XF86XK_AudioPlay:
+ mplayer_put_key(f, KEY_PLAY);
+ break;
case XF86XK_AudioPause:
mplayer_put_key(f, KEY_PAUSE);
break;
@@ -538,6 +544,9 @@ static void vo_x11_putkey_ext(struct vo *vo, int keysym)
case XF86XK_AudioNext:
mplayer_put_key(f, KEY_NEXT);
break;
+ case XF86XK_AudioMute:
+ mplayer_put_key(f, KEY_MUTE);
+ break;
case XF86XK_AudioLowerVolume:
mplayer_put_key(f, KEY_VOLUME_DOWN);
break;
diff --git a/libvo/x11_common.h b/libvo/x11_common.h
index b3066b300a..70f1231a7d 100644
--- a/libvo/x11_common.h
+++ b/libvo/x11_common.h
@@ -4,6 +4,8 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
+#include "config.h"
+
struct vo;
struct vo_x11_state {
@@ -58,6 +60,10 @@ struct vo_x11_state {
Atom XAWM_DELETE_WINDOW;
};
+#if defined(CONFIG_GL) || defined(CONFIG_X11) || defined(CONFIG_XV)
+#define X11_FULLSCREEN 1
+#endif
+
#ifdef X11_FULLSCREEN
#define vo_wm_LAYER 1
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 */
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..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,
@@ -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 13f880c137..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"
@@ -4569,7 +4569,7 @@ static INT WINAPI expMessageBoxA(HWND hWnd, LPCSTR text, LPCSTR title, UINT type
void exp_EH_prolog(void *dest);
//! just a dummy function that acts a container for the asm section
void exp_EH_prolog_dummy(void) {
- asm volatile (
+ __asm__ volatile (
// take care, this "function" may not change flags or
// registers besides eax (which is also why we can't use
// exp_EH_prolog_dummy directly)
@@ -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/loader/wine/winnt.h b/loader/wine/winnt.h
index cbe06f6976..19594e71b1 100644
--- a/loader/wine/winnt.h
+++ b/loader/wine/winnt.h
@@ -693,7 +693,7 @@ typedef HANDLE *PHANDLE;
#else /* __GNUC__ */
# define ASM_GLOBAL_FUNC(name,code) \
void asm_dummy_##name(void) { \
- asm( ".align 4\n\t" \
+ __asm__( ".align 4\n\t" \
".globl " ASM_NAME(#name) "\n\t" \
".type " ASM_NAME(#name) ",@function\n" \
ASM_NAME(#name) ":\n\t" \
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__)
diff --git a/mencoder.c b/mencoder.c
index 4a8575e75d..46370bc85c 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 <windows.h>
#endif
@@ -145,7 +145,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
@@ -457,9 +457,9 @@ audio_encoder_t *aencoder = NULL;
#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();
@@ -517,7 +517,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/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 3ccd03cf88..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 f668f8b27d..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 2650ce6c37..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/dct64_sse.c b/mp3lib/dct64_sse.c
index ad835ef14f..34650d01ba 100644
--- a/mp3lib/dct64_sse.c
+++ b/mp3lib/dct64_sse.c
@@ -32,7 +32,7 @@ void dct64_sse(short *out0,short *out1,real *c)
for (i = 0; i < 0x20 / 2; i += 4)
{
- asm(
+ __asm__(
"movaps %2, %%xmm3\n\t"
"shufps $27, %%xmm3, %%xmm3\n\t"
"movaps %3, %%xmm1\n\t"
@@ -57,7 +57,7 @@ void dct64_sse(short *out0,short *out1,real *c)
for (i = 0; i < 0x20; i += 0x10)
{
- asm(
+ __asm__(
"movaps %4, %%xmm1\n\t"
"movaps %5, %%xmm3\n\t"
"movaps %6, %%xmm4\n\t"
@@ -86,7 +86,7 @@ void dct64_sse(short *out0,short *out1,real *c)
{
real *costab = costab_mmx + 16;
- asm(
+ __asm__(
"movaps %4, %%xmm0\n\t"
"movaps %5, %%xmm1\n\t"
"movaps %8, %%xmm4\n\t"
@@ -116,7 +116,7 @@ void dct64_sse(short *out0,short *out1,real *c)
real *costab = costab_mmx + 24;
int i;
- asm(
+ __asm__(
"movaps %0, %%xmm0\n\t"
"shufps $27, %%xmm0, %%xmm0\n\t"
"movaps %1, %%xmm5\n\t"
@@ -127,7 +127,7 @@ void dct64_sse(short *out0,short *out1,real *c)
for (i = 0; i < 0x20; i += 8)
{
- asm(
+ __asm__(
"movaps %2, %%xmm2\n\t"
"movaps %3, %%xmm3\n\t"
"movaps %%xmm2, %%xmm4\n\t"
@@ -150,7 +150,7 @@ void dct64_sse(short *out0,short *out1,real *c)
{
int i;
- asm(
+ __asm__(
"movss %0, %%xmm1\n\t"
"movss %1, %%xmm0\n\t"
"movaps %%xmm1, %%xmm3\n\t"
@@ -166,7 +166,7 @@ void dct64_sse(short *out0,short *out1,real *c)
for (i = 0; i < 0x20; i += 8)
{
- asm(
+ __asm__(
"movaps %2, %%xmm3\n\t"
"movaps %%xmm3, %%xmm4\n\t"
"shufps $20, %%xmm4, %%xmm4\n\t"
@@ -190,7 +190,7 @@ void dct64_sse(short *out0,short *out1,real *c)
{
int i;
- asm(
+ __asm__(
"movss %0, %%xmm0\n\t"
"movaps %%xmm1, %%xmm2\n\t"
"movaps %%xmm0, %%xmm7\n\t"
@@ -204,7 +204,7 @@ void dct64_sse(short *out0,short *out1,real *c)
for (i = 0x8; i < 0x20; i += 8)
{
- asm volatile (
+ __asm__ volatile (
"movaps %2, %%xmm1\n\t"
"movaps %%xmm1, %%xmm3\n\t"
"shufps $224, %%xmm3, %%xmm3\n\t"
@@ -285,7 +285,7 @@ void dct64_sse(short *out0,short *out1,real *c)
To do saturation efficiently in x86 we can use fist(t)(p),
pf2iw, or packssdw. We use fist(p) here.
*/
- asm(
+ __asm__(
"flds %0\n\t"
"flds (%2)\n\t"
"fadds 4(%2)\n\t"
diff --git a/mp3lib/decode_i586.c b/mp3lib/decode_i586.c
index 0d1370f342..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 613a11cf35..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/mplayer.c b/mplayer.c
index c6cd4f6351..320107d460 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -7,7 +7,7 @@
#include "config.h"
#include "talloc.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 <windows.h>
#endif
@@ -91,7 +91,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
@@ -648,7 +648,7 @@ void exit_player_with_rc(struct MPContext *mpctx, const char* how, int rc){
if (mpctx->user_muted && !mpctx->edl_muted) mixer_mute(&mpctx->mixer);
uninit_player(mpctx, INITIALIZED_ALL);
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
timeEndPeriod(1);
#endif
#ifdef CONFIG_X11
@@ -1181,7 +1181,7 @@ static void print_status(struct MPContext *mpctx, float a_pos, float a_v, float
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--;
@@ -2590,9 +2590,9 @@ int gui_no_filename=0;
m_config_preparse_command_line(mpctx->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;
@@ -2637,7 +2637,7 @@ int gui_no_filename=0;
}
mpctx->key_fifo = mp_fifo_create(opts);
-#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 && mpctx->filename && use_gui){
COPYDATASTRUCT csData;
@@ -2652,7 +2652,7 @@ int gui_no_filename=0;
}
#endif
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
// request 1ms timer resolution
timeBeginPeriod(1);
if(proc_priority){
@@ -2672,7 +2672,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;
@@ -3106,7 +3106,7 @@ if (edl_output_filename) {
char *buf = strdup(mpctx->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))
@@ -3117,7 +3117,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 59d6e0aacb..209b2bdfd5 100644
--- a/stream/cache2.c
+++ b/stream/cache2.c
@@ -17,17 +17,17 @@
#include <unistd.h>
#include "cache2.h"
+#include "osdep/shmem.h"
#include "osdep/timer.h"
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
#include <windows.h>
-static DWORD WINAPI ThreadProc(void* s);
+static void ThreadProc( void *s );
#elif defined(__OS2__)
#define INCL_DOS
#include <os2.h>
static void ThreadProc( void *s );
#else
#include <sys/wait.h>
-#include "osdep/shmem.h"
#endif
#include "mp_msg.h"
@@ -196,14 +196,15 @@ static 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;
@@ -213,7 +214,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:
@@ -228,17 +229,20 @@ 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;
}
static 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));
@@ -252,14 +256,14 @@ static 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);
@@ -275,17 +279,14 @@ static 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
- 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);
#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);
@@ -326,19 +327,16 @@ 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
- DWORD threadId;
-#endif
stream_t* stream2=malloc(sizeof(stream_t));
memcpy(stream2,s->stream,sizeof(stream_t));
s->stream=stream2;
-#ifdef WIN32
- stream->cache_pid = CreateThread(NULL,0,ThreadProc,s,0,&threadId);
-#else // OS2
+#if defined(__MINGW32__) || defined(__CYGWIN__)
+ stream->cache_pid = _beginthread( ThreadProc, 0, s );
+#else
stream->cache_pid = _beginthread( ThreadProc, NULL, 256 * 1024, s );
#endif
#endif
@@ -358,27 +356,25 @@ 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__)
}
-#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
#endif
// cache thread mainloop:
signal(SIGTERM,exit_sighandler); // kill
- while(1){
- if(!cache_fill((cache_vars_t*)s)){
+ do {
+ if(!cache_fill(s)){
usec_sleep(FILL_USLEEP_TIME); // idle
}
- cache_execute_control((cache_vars_t*)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){
@@ -453,6 +449,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:
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);
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 1f06a5ca14..2f8d4123ab 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
diff --git a/stream/stream.h b/stream/stream.h
index 9b598418ef..87cda3637a 100644
--- a/stream/stream.h
+++ b/stream/stream.h
@@ -65,6 +65,7 @@
#define STREAM_CTRL_GET_ANGLE 10
#define STREAM_CTRL_SET_ANGLE 11
+
#ifdef CONFIG_NETWORK
#include "network.h"
#endif
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 <unistd.h>
#include <string.h>
#include <limits.h>
-#ifdef WIN32
+#if defined(__MINGW32__) || defined(__CYGWIN__)
#ifdef __MINGW32__
#define mkdir(a,b) mkdir(a)
#endif
@@ -44,7 +44,7 @@
#include <linux/cdrom.h>
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
#include <sys/cdio.h>
-#elif defined(WIN32)
+#elif defined(__MINGW32__) || defined(__CYGWIN__)
#include <ddk/ntddcdrm.h>
#elif (__bsdi__)
#include <dvd.h>
@@ -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_dvd.c b/stream/stream_dvd.c
index 7df1040d7e..20cc8431f0 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;
}
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_netstream.c b/stream/stream_netstream.c
index f9c70e72ba..5c68defe73 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
index 533e6a3b93..533e6a3b93 100644
--- a/stream/netstream.h
+++ b/stream/stream_netstream.h
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 <windows.h>
#endif
@@ -14,7 +14,7 @@
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
-#ifndef WIN32
+#if !defined(__MINGW32__) && !defined(__CYGWIN__)
#include <sys/ioctl.h>
#endif
#include <errno.h>
@@ -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/stream/tvi_dshow.c b/stream/tvi_dshow.c
index 726f469098..e06f4dc346 100644
--- a/stream/tvi_dshow.c
+++ b/stream/tvi_dshow.c
@@ -1299,52 +1299,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
*
* \param priv driver's private data
diff --git a/subreader.c b/subreader.c
index 504f50d383..ddaeceef8e 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/AsmMacros.h b/vidix/AsmMacros.h
index f40929ade5..c202fd4cec 100644
--- a/vidix/AsmMacros.h
+++ b/vidix/AsmMacros.h
@@ -99,11 +99,6 @@ void outl(U16_t, U32_t);
#else /* not _MINIX and _ACK */
-# if defined(__STDC__) && (__STDC__ == 1)
-# ifndef NCR
-# define asm __asm
-# endif
-# endif
# ifdef SVR4
# include <sys/types.h>
# 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/dha.c b/vidix/dha.c
index 28dc8c8c09..638be29328 100644
--- a/vidix/dha.c
+++ b/vidix/dha.c
@@ -48,7 +48,7 @@
#endif
#include <unistd.h>
-#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/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/nvidia_vid.c b/vidix/nvidia_vid.c
index 30e30a9e38..4c86322932 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); })
@@ -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;
diff --git a/vidix/pci.c b/vidix/pci.c
index 1006b14a80..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 64
#define NF ((void (*)())NULL), { 0.0, 0, 0, NULL }
#define PCI_MULTIFUNC_DEV 0x80
#define PCI_ID_REG 0x00
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 */
diff --git a/vidix/sysdep/libdha_win32.c b/vidix/sysdep/libdha_win32.c
index ba3bacb5aa..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(){
@@ -51,10 +48,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" ;
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");