mirror of
https://github.com/mpv-player/mpv
synced 2025-01-05 03:06:28 +01:00
Merge svn changes up to r28951
This commit is contained in:
commit
ae2faad666
2
AUTHORS
2
AUTHORS
@ -808,7 +808,7 @@ Ulion <ulion2002 gmail.com>
|
||||
Urpala, Uoti (uau) <uoti.urpala@pp1.inet.fi>
|
||||
* A/V sync fixes
|
||||
|
||||
Vajna, Miklós (VMiklos) <mamajom@axelero.hu>
|
||||
Vajna, Miklós (VMiklos) <vmiklos@frugalware.org>
|
||||
* TOOLS/divx2svcd author
|
||||
* TOOLS/ directory documentation
|
||||
|
||||
|
@ -37,6 +37,7 @@ MPlayer (1.0)
|
||||
* Brooktree YUV 4:1:1 Raw (Y41P) via binary DLL
|
||||
* many rare/obscure fourccs for known formats added
|
||||
* lower priority for binary Linux rv3040 codecs due to bugs
|
||||
* remove native NuppelVideo decoder, use lavc instead
|
||||
|
||||
Demuxers:
|
||||
* -lavfdopts cryptokey allows decrypting MXF and ASF files
|
||||
@ -55,6 +56,7 @@ MPlayer (1.0)
|
||||
* support seeking in multirate RealMedia files
|
||||
* FLAC speedup in lavf demuxer
|
||||
* MNG demuxer
|
||||
* remove native NuppelVideo demuxer, use lavf demuxer instead
|
||||
|
||||
Filters:
|
||||
* vf_ow new overcomplete wavelet denoiser
|
||||
@ -146,6 +148,7 @@ MPlayer (1.0)
|
||||
* removed unnecessary code from vo x11, xv, xvmc
|
||||
* add OS/2 DART audio driver (-ao dart)
|
||||
* add VDPAU video output
|
||||
* add OS/2 KVA video driver (-vo kva)
|
||||
|
||||
MEncoder:
|
||||
* check for system-wide configuration file in MEncoder
|
||||
@ -166,6 +169,8 @@ MPlayer (1.0)
|
||||
* libdvdcss updated to 1.2.10, now same as upstream version
|
||||
* fix -endchapter support again for -dump* options
|
||||
* add startup volume option
|
||||
* add option to disable default key binds
|
||||
* change default OSD and subtitle font size to a smaller default
|
||||
|
||||
libass:
|
||||
* various fixes and updates to match VSFilter renderer
|
||||
|
77
Copyright
77
Copyright
@ -9,22 +9,24 @@ from several external sources:
|
||||
|
||||
Name: FFmpeg
|
||||
Version: Subversion HEAD
|
||||
Homepage: http://www.ffmpeg.org
|
||||
URL: http://www.ffmpeg.org
|
||||
Directory: libavcodec, libavformat, libavutil, libpostproc
|
||||
Copyright: Many, see individual files for copyright notices.
|
||||
License: GNU Lesser General Public License, some parts GNU General Public
|
||||
License, GNU General Public License when combined
|
||||
|
||||
|
||||
Name: FAAD2
|
||||
Version: 2.1 beta (20040915 CVS snapshot) + fixes and portability patches
|
||||
Homepage: http://www.audiocoding.com
|
||||
URL: http://www.audiocoding.com
|
||||
Directory: libfaad2
|
||||
Copyright: 2003-2004 M. Bakker, Ahead Software AG, http://www.nero.com
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: GSM 06.10 library
|
||||
Version: patchlevel 10
|
||||
Homepage: http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
URL: http://kbs.cs.tu-berlin.de/~jutta/toast.html
|
||||
Directory: libmpcodecs/native/
|
||||
Copyright: 1992 by Jutta Degener and Carsten Bormann, TU Berlin
|
||||
License: permissive, see libmpcodecs/native/xa_gsm.c
|
||||
@ -32,7 +34,7 @@ License: permissive, see libmpcodecs/native/xa_gsm.c
|
||||
|
||||
Name: liba52
|
||||
Version: 0.7.4 + patches
|
||||
Homepage: http://liba52.sourceforge.net/
|
||||
URL: http://liba52.sourceforge.net/
|
||||
Directory: liba52
|
||||
Copyright: 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
|
||||
2000-2001 Michel Lespinasse <walken@zoy.org>
|
||||
@ -41,28 +43,41 @@ Copyright: 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
|
||||
2004 Romain Dolbeau <romain@dolbeau.org>
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: libdvdcss
|
||||
Version: 1.2.10
|
||||
Homepage: http://developers.videolan.org/libdvdcss/
|
||||
URL: http://developers.videolan.org/libdvdcss/
|
||||
Directory: libdvdcss
|
||||
Copyright: 1998-2008 VideoLAN
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: libdvdread
|
||||
Version: 0.9.7 + patches
|
||||
Homepage: http://www.dtek.chalmers.se/groups/dvd/development.shtml
|
||||
Directory: libdvdread
|
||||
Version: Subversion HEAD
|
||||
URL: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdread/src
|
||||
Directory: libdvdread4
|
||||
Copyright: 1998, 1999 Eric Smith <eric@brouhaha.com>
|
||||
1999 Christian Wolff for convergence integrated media
|
||||
2000-2001 Billy Biggs <vektor@dumbterm.net>,
|
||||
2000-2004 Billy Biggs <vektor@dumbterm.net>,
|
||||
2001-2002 Samuel Hocevar <sam@zoy.org>,
|
||||
2000-2003 Björn Englund <d4bjorn@dtek.chalmers.se>,
|
||||
2000-2003 Håkan Hjort <d95hjort@dtek.chalmers.se>
|
||||
2000-2004 Björn Englund <d4bjorn@dtek.chalmers.se>,
|
||||
2000-2004 Håkan Hjort <d95hjort@dtek.chalmers.se>
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: libdvdnav
|
||||
Version: Subversion HEAD from
|
||||
URL: svn://svn.mplayerhq.hu/dvdnav/trunk/libdvdnav/src
|
||||
Directory: libdvdnav
|
||||
Copyright: 2000, 2001 Martin Norbäck, Håkan Hjort
|
||||
2000-2004 Rich Wareham <richwareham@users.sourceforge.net>
|
||||
2001-2004 the dvdnav project
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: libmpeg2
|
||||
Version: 0.5.1 + patches
|
||||
Homepage: http://libmpeg2.sourceforge.net/
|
||||
URL: http://libmpeg2.sourceforge.net/
|
||||
Directory: libmpeg2
|
||||
Copyright: 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
|
||||
2000-2004 Michel Lespinasse <walken@zoy.org>
|
||||
@ -72,25 +87,28 @@ Copyright: 1999-2000 Aaron Holtzman <aholtzma@ess.engr.uvic.ca>
|
||||
2003 Peter Gubanov <peter@elecard.net.ru>
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: mpg123
|
||||
Version: 0.59s + significant changes
|
||||
Homepage: http://www.mpg123.de/
|
||||
URL: http://www.mpg123.de/
|
||||
Directory: mp3lib
|
||||
Copyright: 1995-1999 by Michael Hipp
|
||||
2004 Romain Dolbeau <romain@dolbeau.org>
|
||||
2006 Zuxy Meng <zuxy.meng@gmail.com
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: Tremor
|
||||
Version: 1.0 + parts CVS from December 2004 + patches
|
||||
Homepage: http://xiph.org/
|
||||
URL: http://xiph.org/
|
||||
Directory: tremor
|
||||
Copyright: 1994-2002, Xiph.org Foundation http://www.xiph.org/
|
||||
License: BSD-like, see tremor/COPYING
|
||||
|
||||
|
||||
Name: avifile DLL loader
|
||||
Version: 0.47 + patches + CVS updates
|
||||
Homepage: http://avifile.sourceforge.net/
|
||||
URL: http://avifile.sourceforge.net/
|
||||
Directory: loader/
|
||||
Copyright: 1993 Robert J. Amstadt
|
||||
1994 Eric Youndale & Erik Bos
|
||||
@ -101,68 +119,77 @@ Copyright: 1993 Robert J. Amstadt
|
||||
2000-2001 Eugene Kuznetsov (divx@euro.ru)
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: dvbstream
|
||||
Version: 0.4.3-pre3 (CVS checkout)
|
||||
Homepage: http://sourceforge.net/projects/dvbtools/
|
||||
URL: http://sourceforge.net/projects/dvbtools/
|
||||
Directory: stream/dvbin.h stream/rtp.[ch] stream/stream_dvb.c
|
||||
Copyright: 2001-2002 Dave Chapman <dave@dchapman.com>
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: librtsp
|
||||
Version: xine CVS 2003/04/10 + patches
|
||||
Homepage: http://www.xinehq.de
|
||||
URL: http://www.xinehq.de
|
||||
Directory: stream/librtsp/
|
||||
Copyright: 2000-2002 the xine project
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: realrtsp
|
||||
Version: xine CVS 2003/04/17 + patches
|
||||
Homepage: http://www.xinehq.de
|
||||
URL: http://www.xinehq.de
|
||||
Directory: stream/realrtsp/
|
||||
Copyright: 2002 the xine project
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: pnm protocol implementation
|
||||
Version: xine CVS 2002/12/26 + patches
|
||||
Homepage: http://www.xinehq.de
|
||||
URL: http://www.xinehq.de
|
||||
Directory: stream/pnm.[ch]
|
||||
Copyright: 2000-2002 the xine project
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: id3edit
|
||||
Version: 1.9 + patches
|
||||
Homepage: http://id3edit.sourceforge.net/
|
||||
URL: http://id3edit.sourceforge.net/
|
||||
Directory: libmpdemux/genres.h
|
||||
Copyright: 2001 Jason Carter
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: FreeSDP
|
||||
Version: 0.4.1
|
||||
Homepage: https://savannah.nongnu.org/projects/freesdp/
|
||||
URL: https://savannah.nongnu.org/projects/freesdp/
|
||||
Directory: stream/freesdp/
|
||||
Copyright: 2001-2003 Federico Montesino Pouzols <fedemp@suidzer0.org>
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: MJPEG Tools
|
||||
Version: post 2001-12-03 release or CVS snapshot
|
||||
Homepage: http://mjpeg.sourceforge.net/
|
||||
URL: http://mjpeg.sourceforge.net/
|
||||
Directory: libmpdemux/yuv4mpeg*
|
||||
Copyright: 2001 Matthew J. Marjanovic <maddog@mir.com>
|
||||
2001 Andrew Stevens <andrew.stevens@philips.com>
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: NuppelVideo / RTJPEG
|
||||
Version: 0.52a + patches
|
||||
Homepage: http://web.archive.org/web/20060219034716/http://frost.htu.tuwien.ac.at/~roman/nuppelvideo/
|
||||
Directory: libmpcodecs/native/rtjpegn.[ch] libmpdemux/nuppelvideo.h
|
||||
URL: http://web.archive.org/web/20060219034716/http://frost.htu.tuwien.ac.at/~roman/nuppelvideo/
|
||||
Directory: libmpcodecs/native/rtjpegn.[ch]
|
||||
Copyright: 1998 Justin Schoeman (justin@suntiger.ee.up.ac.za)
|
||||
1998, 1999 Joerg Walter <trouble@moes.pmnet.uni-oldenburg.de>
|
||||
1999 Wim Taymans <wim.taymans@tvd.be>
|
||||
License: GNU General Public License
|
||||
|
||||
|
||||
Name: ReactOS
|
||||
Version: r25937
|
||||
Homepage: http://www.reactos.org/
|
||||
URL: http://www.reactos.org/
|
||||
Directory: vidix/dhahelperwin/ntverp.h vidix/dhahelperwin/common.ver
|
||||
Copyright: Alex Ionescu (alex.ionescu@reactos.org)
|
||||
License: GNU General Public License
|
||||
|
@ -960,6 +960,8 @@ Device to be used for Apple IR Remote (default is autodetected, Linux only).
|
||||
Delay in milliseconds before we start to autorepeat a key (0 to disable).
|
||||
.IPs ar-rate
|
||||
Number of key presses to generate per second on autorepeat.
|
||||
.IPs (no)default-binds
|
||||
Use the key bindings that MPlayer ships with by default.
|
||||
.IPs keylist
|
||||
Prints all keys that can be bound to commands.
|
||||
.IPs cmdlist
|
||||
@ -1131,6 +1133,8 @@ by a newline (\\n) from stdin.
|
||||
.I NOTE:
|
||||
See \-input cmdlist for a list of slave commands and DOCS/tech/slave.txt
|
||||
for their description.
|
||||
Also, this is not intended to disable other inputs, e.g. via the video window,
|
||||
use some other method like \-input nodefault\-binds:conf=/dev/null for that.
|
||||
.
|
||||
.TP
|
||||
.B \-softsleep
|
||||
@ -2249,14 +2253,14 @@ Use this if commas in subtitles are shown at the start of a sentence
|
||||
instead of at the end.
|
||||
.
|
||||
.TP
|
||||
.B \-font <path to font.desc file>
|
||||
.B \-font <path to font.desc file, path to font (FreeType), font pattern (Fontconfig)>
|
||||
Search for the OSD/\:SUB fonts in an alternative directory (default for normal
|
||||
fonts: ~/\:.mplayer/\:font/\:font.desc, default for FreeType fonts:
|
||||
~/.mplayer/\:subfont.ttf).
|
||||
.br
|
||||
.I NOTE:
|
||||
With FreeType, this option determines the path to the text font file.
|
||||
With fontconfig, this option determines the fontconfig font name.
|
||||
With Fontconfig, this option determines the Fontconfig font pattern.
|
||||
.sp 1
|
||||
.I EXAMPLE:
|
||||
.PD 0
|
||||
@ -2266,6 +2270,8 @@ With fontconfig, this option determines the fontconfig font name.
|
||||
\-font ~/\:.mplayer/\:arialuni.ttf
|
||||
.br
|
||||
\-font 'Bitstream Vera Sans'
|
||||
.br
|
||||
\-font 'Bitstream Vera Sans:style=Bold'
|
||||
.RE
|
||||
.PD 1
|
||||
.
|
||||
@ -2504,8 +2510,8 @@ Currently useless.
|
||||
Same as \-audiofile, but for subtitle streams (OggDS?).
|
||||
.
|
||||
.TP
|
||||
.B \-subfont <filename> (FreeType only)
|
||||
Sets the subtitle font.
|
||||
.B \-subfont <path to font (FreeType), font pattern (Fontconfig)> (FreeType only)
|
||||
Sets the subtitle font (see \-font).
|
||||
If no \-subfont is given, \-font is used.
|
||||
.
|
||||
.TP
|
||||
@ -3449,6 +3455,9 @@ Apply a noise reduction algorithm to the video (default: 0, no noise reduction).
|
||||
.IPs deint=<0\-4>
|
||||
Chooses the deinterlacer (default: 0).
|
||||
All modes > 0 respect \-field\-dominance.
|
||||
.br
|
||||
.I NOTE:
|
||||
Values > 2 delay the video output by one frame.
|
||||
.RSss
|
||||
.IPs 0
|
||||
No deinterlacing.
|
||||
@ -3587,6 +3596,23 @@ Try this option if you have display problems.
|
||||
.PD 1
|
||||
.
|
||||
.TP
|
||||
.B kva (OS/2 only)
|
||||
Video output driver that uses the libkva interface.
|
||||
.PD 0
|
||||
.RSs
|
||||
.IPs snap
|
||||
Force SNAP mode.
|
||||
.IPs wo
|
||||
Force WarpOverlay! mode.
|
||||
.IPs dive
|
||||
Force DIVE mode.
|
||||
.IPs (no)t23
|
||||
Enable/disable workaround for T23 laptop (default: \-not23).
|
||||
Try to enable this option if your video card supports upscaling only.
|
||||
.RE
|
||||
.PD 1
|
||||
.
|
||||
.TP
|
||||
.B quartz (Mac OS X only)
|
||||
Mac OS X Quartz video output driver.
|
||||
Under some circumstances, it might be more efficient to force a
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" synced with r28807
|
||||
.\" synced with r28950
|
||||
.\" Encoding: iso-8859-1
|
||||
.\" MPlayer (C) 2000-2009 MPlayer Team
|
||||
.\" The English man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann
|
||||
@ -1009,6 +1009,8 @@ d'une touche
|
||||
(0 pour désactiver).
|
||||
.IPs ar-rate
|
||||
Combien de frappes par seconde pendant la répétition automatique.
|
||||
.IPs (no)default-binds
|
||||
Répond aux touches de contrôle par défaut de MPlayer.
|
||||
.IPs keylist
|
||||
Affiche toutes les touches pouvant être attachées.
|
||||
.IPs cmdlist
|
||||
@ -1193,6 +1195,9 @@ commandes s
|
||||
.I NOTE\ :
|
||||
Voir \-input cmdlist pour une liste des commandes esclaves, et
|
||||
DOCS/tech/slave.txt pour leur description.
|
||||
De plus, cette option n'est pas vouée à désactiver les autres entrées,
|
||||
comme via la fenêtre vidéo\ ; pour cela, utilisez d'autres méthodes, comme
|
||||
\-input nodefault\-binds:conf=/dev/null.
|
||||
.
|
||||
.TP
|
||||
.B \-softsleep
|
||||
@ -2354,14 +2359,14 @@ les sous-titres.
|
||||
phrases au lieu de la fin.
|
||||
.
|
||||
.TP
|
||||
.B \-font <chemin vers le fichier font.desc>
|
||||
.B \-font <chemin vers le fichier font.desc, la police (FreeType), motif de police (Fontconfig)>
|
||||
Recherche les polices OSD/\:SUB dans un répertoire particulier
|
||||
(par défaut pour les polices normales: ~/\:.mplayer/\:font/\:font.desc,
|
||||
pour les polices FreeType: ~/.mplayer/\:subfont.ttf).
|
||||
.br
|
||||
.I NOTE:
|
||||
Avec FreeType, cette option détermine le chemin vers le fichier de polices.
|
||||
Avec Fontconfig, cette option détermine le nom de police fontconfig.
|
||||
Avec Fontconfig, cette option détermine le motif de police Fontconfig.
|
||||
.sp 1
|
||||
.I EXEMPLE:
|
||||
.PD 0
|
||||
@ -2370,7 +2375,9 @@ Avec Fontconfig, cette option d
|
||||
.br
|
||||
\-font ~/\:.mplayer/\:arialuni.ttf
|
||||
.br
|
||||
\-font 'Bitstream Vera Sans'
|
||||
\-font 'Bitstream Vera Sans:style'
|
||||
.br
|
||||
\-font 'Bitstream Vera Sans:style=Bold'
|
||||
.RE
|
||||
.PD 1
|
||||
.
|
||||
@ -2615,8 +2622,8 @@ Inutile actuellement.
|
||||
Identique à \-audiofile, mais pour les flux de sous-titres (OggDS ?).
|
||||
.
|
||||
.TP
|
||||
.B \-subfont <filename> (FreeType uniquement)
|
||||
Spécifie la police des sous-titres.
|
||||
.B \-subfont <chemin vers la police (FreeType), motif de police (Fontconfig)> (FreeType uniquement)
|
||||
Spécifie la police des sous-titres (voir \-font).
|
||||
Si \-subfont n'est pas spécifié, \-font est utilisé.
|
||||
.
|
||||
.TP
|
||||
@ -3640,6 +3647,9 @@ r
|
||||
.IPs deint=<0\-4>
|
||||
Sélectionne un désentrelaceur (par défaut\ : 0)
|
||||
Tous les modes > 0 respectent \-field\-dominance.
|
||||
.br
|
||||
.I NOTE\ :
|
||||
Les valeurs > 2 retardent la sortie vidéo d'une image.
|
||||
.RSss
|
||||
.IPs 0
|
||||
pas de désentrelacement
|
||||
@ -3768,6 +3778,24 @@ Essayez cette option si vous avez des probl
|
||||
.PD 1
|
||||
.
|
||||
.TP
|
||||
.B kva (OS/2 uniquement)
|
||||
Pilote de sortie vidéo utilisant l'interface libkva.
|
||||
.PD 0
|
||||
.RSs
|
||||
.IPs snap
|
||||
Force le mode SNAP.
|
||||
.IPs wo
|
||||
Force le mode WarpOverlay!.
|
||||
.IPs dive
|
||||
Force le mode DIVE.
|
||||
.IPs (no)t23
|
||||
Active le contournement pour les bugs de l'ordinateur portable T23.
|
||||
Essayez d'activer cette option si votre carte vidéo ne gère que
|
||||
l'agrandissement d'image (upscaling).
|
||||
.RE
|
||||
.PD 1
|
||||
.
|
||||
.TP
|
||||
.B quartz (Mac OS X uniquement)
|
||||
Pilote de sortie vidéo Quartz pour Mac OS X.
|
||||
Dans certains cas, il est préférable de forcer le format de sortie packed YUV,
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" Synced with r28807
|
||||
.\" Synced with r28895
|
||||
.\" MPlayer (C) 2000-2009 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 "2009. 03. 05." "MPlayer Project" "A film lejátszó"
|
||||
.TH MPlayer 1 "2009. 03. 09." "MPlayer Project" "A film lejátszó"
|
||||
.
|
||||
.SH NÉV
|
||||
mplayer \- film lejátszó
|
||||
@ -958,6 +958,8 @@ Az Apple IR t
|
||||
Egy gomb automatikus ismétlése előtti késleltetés miliszekundumban (0: kikapcsolás).
|
||||
.IPs ar-rate
|
||||
Billentyű/másodperc érték megadása autorepeat használata esetén.
|
||||
.IPs (no)default-binds
|
||||
Az alapértelmezetten MPlayerbe épített billentyű-hozzárendeléseket használja.
|
||||
.IPs keylist
|
||||
Az összes használható billentyű listájának kiírása.
|
||||
.IPs cmdlist
|
||||
@ -1134,6 +1136,8 @@ parancsokat olvas az stdin-r
|
||||
.I MEGJEGYZÉS:
|
||||
A \-input cmdlist kapcsoló kilistázza a szolga módban használható parancsokat,
|
||||
a DOCS/tech/slave.txt fájlban megtalálod a leírásukat.
|
||||
Ez nem a többi, pl. a videó ablakon keresztül érkező input letiltására készült,
|
||||
arra használj mást, mint a \-input nodefault\-binds:conf=/dev/null.
|
||||
.
|
||||
.TP
|
||||
.B \-softsleep
|
||||
@ -2258,14 +2262,14 @@ Akkor haszn
|
||||
és nem a végén.
|
||||
.
|
||||
.TP
|
||||
.B \-font <útvonal a font.desc fájlhoz>
|
||||
.B \-font <útvonal a font.desc fájlhoz, útvonal a betűtípushoz (FreeType), betűtípus minta (Fontconfig)>
|
||||
Az OSD/\:SUB betűtipusok megadott könyvtárban történő keresése
|
||||
(normál fontoknál alapértelmezett:
|
||||
~/\:.mplayer/\:font/\:font.desc, FreeType fontokhoz: ~/.mplayer/\:subfont.ttf).
|
||||
.br
|
||||
.I MEGJEGYZÉS:
|
||||
FreeType-pal ez az opció a szöveges betűtípus fájlok elérési útját határozza meg.
|
||||
A fontconfig-gal ez az opció a fontconfig betűtípus nevét határozza meg.
|
||||
A fontconfig-gal ez az opció a Fontconfig betűtípus mintáját határozza meg.
|
||||
.sp 1
|
||||
.I PÉLDA:
|
||||
.PD 0
|
||||
@ -2275,6 +2279,8 @@ A fontconfig-gal ez az opci
|
||||
\-font ~/\:.mplayer/\:arialuni.ttf
|
||||
.br
|
||||
\-font 'Bitstream Vera Sans'
|
||||
.br
|
||||
\-font 'Bitstream Vera Sans:style=Bold'
|
||||
.RE
|
||||
.PD 1
|
||||
.
|
||||
@ -2514,9 +2520,9 @@ Jelenleg haszontalan.
|
||||
Ugyan az, mint az \-audiofile, de felirat folyamokra (OggDS?).
|
||||
.
|
||||
.TP
|
||||
.B \-subfont <fájlnév> (csak FreeType)
|
||||
Beállítja a felirat betűtípusát.
|
||||
Ha nincs megafva a \-subfont, a \-font lesz használva.
|
||||
.B \-subfont <útvonal a betűtípushoz (FreeType), betűtípus minta (Fontconfig)> (csak FreeType)
|
||||
Beállítja a felirat betűtípusát (lásd \-font).
|
||||
Ha nincs megadva a \-subfont, a \-font lesz használva.
|
||||
.
|
||||
.TP
|
||||
.B \-subfont\-autoscale <0\-3> (csak FreeType)
|
||||
|
@ -2,7 +2,7 @@
|
||||
.\" This man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann
|
||||
.\" Translated by Vladimir Voroshilov <voroshil@gmail.com>
|
||||
.\" Encoding: koi8-r
|
||||
.\" synced with r28807
|
||||
.\" synced with r28895
|
||||
.
|
||||
.\" --------------------------------------------------------------------------
|
||||
.\" Определения макросов
|
||||
@ -922,6 +922,8 @@ mplayer \-heartbeat\-cmd "gnome\-screensaver\-command \-p" file
|
||||
Задержка в миллисекундах перед началом автоповтора (0 для отключения).
|
||||
.IPs ar\-rate
|
||||
Количество клавиш в секунду, генерируемых при автоповторе.
|
||||
.IPs (no)default-binds
|
||||
Использовать привязки клавиш, поставляемые с MPlayer по умолчанию.
|
||||
.IPs keylist
|
||||
Выводит все клавиши, которые можно назначить командам.
|
||||
.IPs cmdlist
|
||||
@ -1085,17 +1087,18 @@ FIXME:
|
||||
.
|
||||
.TP
|
||||
.B \-slave (смотрите также \-input)
|
||||
÷ËÌÀÞÁÅÔ "ÒÁÂÓËÉÊ" ÒÅÖÉÍ, × ËÏÔÏÒÏÍ MPlayer ÒÁÂÏÔÁÅÔ × ËÁÞÅÓÔ×Å ÂÜËÜÎÄÁ Ë ÄÒÕÇÉÍ ÐÒÏÇÒÁÍÍÁÍ.
|
||||
Включает ведомый режим, в котором MPlayer работает в качестве бэкэнда к другим программам.
|
||||
Вместо перехвата событий клавиатуры, MPlayer будет читать со стандартного входа команды,
|
||||
разделенные символом новой строки (\\n).
|
||||
.br
|
||||
.I ЗАМЕЧАНИЕ:
|
||||
Смотрите список этих команд в \-input cmdlist и описания в DOCS/tech/slave.txt.
|
||||
Эта опция не предназначена для отключения других источников ввода,
|
||||
например при помощи окна видео; для данных целей используйте иные
|
||||
способы, например, \-input nodefault\-binds:conf=/dev/null.
|
||||
.
|
||||
.TP
|
||||
.B \-softsleep
|
||||
.\" FIXME is translation correct?
|
||||
.\" Time frames by repeatedly checking the current time instead of asking the
|
||||
Устанавливает тайминг кадров, постоянно проверяя текущее время, вместо просьбы
|
||||
ядру пробуждать MPlayer в нужный момент.
|
||||
Полезно, если таймер вашего ядра неточен и вы не можете использовать RTC.
|
||||
@ -2217,14 +2220,14 @@ SubViewer (SRT).
|
||||
вместо их конца.
|
||||
.
|
||||
.TP
|
||||
.B \-font <ÐÕÔØ Ë ÆÁÊÌÕ font.desc>
|
||||
.B \-font <путь к файлу font.desc, путь к шрифту (FreeType), название шрифта (Fontconfig))>
|
||||
Ищет OSD/\:SUB шрифты в другом каталоге (по умолчанию для обычных
|
||||
шрифтов: ~/\:.mplayer/\:font/\:font.desc, по умолчанию для FreeType шрифтов:
|
||||
~/.mplayer/\:subfont.ttf).
|
||||
.br
|
||||
.I ЗАМЕЧАНИЕ:
|
||||
С FreeType, эта опция определяет путь к файлу шрифта текста.
|
||||
ó fontconfig, ÜÔÁ ÏÐÃÉÑ ÏÐÒÅÄÅÌÑÅÔ ÎÁÚ×ÁÎÉÅ ÛÒÉÆÔÁ fontconfig.
|
||||
С Fontconfig, эта опция определяет название шрифта fontconfig.
|
||||
.sp 1
|
||||
.I ПРИМЕР:
|
||||
.PD 0
|
||||
@ -2234,6 +2237,8 @@ SubViewer (SRT).
|
||||
\-font ~/\:.mplayer/\:arialuni.ttf
|
||||
.br
|
||||
\-font 'Bitstream Vera Sans'
|
||||
.br
|
||||
\-font 'Bitstream Vera Sans:style=Bold'
|
||||
.RE
|
||||
.PD 1
|
||||
.
|
||||
@ -2475,8 +2480,8 @@ cp1250,
|
||||
То же, что и \-audiofile, но для потока субтитров (OggDS?).
|
||||
.
|
||||
.TP
|
||||
.B \-subfont <ÉÍÑ ÆÁÊÌÁ> (ÔÏÌØËÏ FreeType)
|
||||
õÓÔÁÎÁ×ÌÉ×ÁÅÔ ÛÒÉÆÔ ÓÕÂÔÉÔÒÏ×.
|
||||
.B \-subfont <имя файла (FreeType), название шрифта (Fontconfig)> (только FreeType)
|
||||
Устанавливает шрифт субтитров (см. \-font).
|
||||
Если опция \-subfont не указана, используется \-font.
|
||||
.
|
||||
.TP
|
||||
|
@ -116,7 +116,6 @@ demuxers:
|
||||
* demux_rtp* - Ross Finlayson
|
||||
* demux_mpg and demux_ts - Nico Sabbi
|
||||
* demux_mpc.c - Reimar Döffinger
|
||||
* demux_nuv.c - Reimar Döffinger
|
||||
|
||||
muxers:
|
||||
* muxer_lavf.c - Michael Niedermayer
|
||||
|
@ -6,19 +6,15 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
</head>
|
||||
<body text="#000000" link="#666666" vlink="#666666" alink="#666666">
|
||||
<table width=750 border="0">
|
||||
<tr>
|
||||
<td align="right">
|
||||
<p> </p>
|
||||
|
||||
<p><b>Status of codecs support</b></p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<p><a href="#vc">Video codecs</a><br><a href="#ac">Audio codecs</a><br></p>
|
||||
</td>
|
||||
</tr>
|
||||
<h1>Status of codecs support</h1>
|
||||
|
||||
<ul>
|
||||
<li><a href="#vc">Video codecs</a></li>
|
||||
<li><a href="#ac">Audio codecs</a></li>
|
||||
</ul>
|
||||
|
||||
<table width=750 border="0">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<b><font face="Verdana, Arial, Helvetica, sans-serif" size="5"><a name="vc">Video codecs:</a></font></b><br><br>
|
||||
@ -31,7 +27,7 @@
|
||||
<tr>
|
||||
<td width=150 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codec name</font></b></td>
|
||||
<td width=70 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">fourcc</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codecfile</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">driver name</font></b></td>
|
||||
<td width=40 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">out</font></b></td>
|
||||
<td align=center colspan=2><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">comments</font></b></td>
|
||||
</tr>
|
||||
@ -51,8 +47,8 @@
|
||||
<tr>
|
||||
<td width=150 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codec name</font></b></td>
|
||||
<td width=70 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">fourcc</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codecfile</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">problem</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">driver name</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">comments</font></b></td>
|
||||
</tr>
|
||||
<!-- %4 -->
|
||||
<tr>
|
||||
@ -69,8 +65,8 @@
|
||||
<tr>
|
||||
<td width=150 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codec name</font></b></td>
|
||||
<td width=70 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">fourcc</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codecfile</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">problem</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">driver name</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">comments</font></b></td>
|
||||
</tr>
|
||||
<!-- %2 -->
|
||||
<tr>
|
||||
@ -87,8 +83,8 @@
|
||||
<tr>
|
||||
<td width=150 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codec name</font></b></td>
|
||||
<td width=70 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">fourcc</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codecfile</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">problem</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">driver name</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">comments</font></b></td>
|
||||
</tr>
|
||||
<!-- %3 -->
|
||||
<tr>
|
||||
@ -111,7 +107,7 @@
|
||||
<tr>
|
||||
<td width=150 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codec name</font></b></td>
|
||||
<td width=70 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">format</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codecfile</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">driver name</font></b></td>
|
||||
<td align=center colspan=3><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">comments</font></b></td>
|
||||
</tr>
|
||||
<!-- %5 -->
|
||||
@ -129,8 +125,8 @@
|
||||
<tr>
|
||||
<td width=150 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codec name</font></b></td>
|
||||
<td width=70 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">format</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codecfile</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">problem</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">driver name</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">comments</font></b></td>
|
||||
</tr>
|
||||
<!-- %9 -->
|
||||
<tr>
|
||||
@ -147,8 +143,8 @@
|
||||
<tr>
|
||||
<td width=150 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codec name</font></b></td>
|
||||
<td width=70 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">format</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codecfile</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">problem</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">driver name</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">comments</font></b></td>
|
||||
</tr>
|
||||
<!-- %7 -->
|
||||
<tr>
|
||||
@ -165,8 +161,8 @@
|
||||
<tr>
|
||||
<td width=150 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codec name</font></b></td>
|
||||
<td width=70 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">format</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">codecfile</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">problem</font></b></td>
|
||||
<td width=120 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">driver name</font></b></td>
|
||||
<td colspan=3 align=center><b><font color="#AAAAAA" face="Verdana, Arial, Helvetica, sans-serif" size="2">comments</font></b></td>
|
||||
</tr>
|
||||
<!-- %8 -->
|
||||
<tr>
|
||||
|
32
DOCS/tech/mingw-crosscompile.txt
Normal file
32
DOCS/tech/mingw-crosscompile.txt
Normal file
@ -0,0 +1,32 @@
|
||||
Due to a lack of Windows developers, it is a good idea to allow Linux
|
||||
developers to do at least some basic check of their code.
|
||||
This HOWTO explains how to set up MinGW cross-compilation under Debian.
|
||||
|
||||
First, you need to install the "mingw32" package and get a MPlayer SVN
|
||||
checkout.
|
||||
|
||||
Next, you need quite a lot of dependencies. Since this is for testing and
|
||||
not actually use, the easiest way is to use this package:
|
||||
http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2
|
||||
NOTE that this is likely to be quite out-dated and might include packages
|
||||
with security issues, so do not use it to build binaries for real use.
|
||||
|
||||
After extracting this package into the MPlayer source-tree,
|
||||
you only need to run the included linux-mingw.sh to configure (it just runs
|
||||
./configure --host-cc=cc --target=i686-mingw32msvc --cc=i586-mingw32msvc-cc
|
||||
--windres=i586-mingw32msvc-windres --ranlib=i586-mingw32msvc-ranlib
|
||||
--with-extraincdir="$PWD/osdep/mingw32"
|
||||
--with-extralibdir="$PWD/osdep/mingw32"
|
||||
--with-freetype-config="$PWD/osdep/mingw32/ftconf") and then run make.
|
||||
|
||||
You should be able to run the generated binary with Wine, if you want to.
|
||||
|
||||
The steps as command-lines:
|
||||
|
||||
sudo apt-get install mingw32
|
||||
svn co svn://svn.mplayerhq.hu/mplayer/trunk MPlayer-mingw
|
||||
cd MPlayer-mingw
|
||||
wget http://natsuki.mplayerhq.hu/~reimar/mpl_mingw32.tar.bz2
|
||||
tar -xjf mpl_mingw32.tar.bz2
|
||||
sh linux-mingw.sh
|
||||
make
|
@ -30,6 +30,8 @@ As a temporary hack, there is also the _experimental_ "pausing_keep_force "
|
||||
prefix, with which MPlayer will not exit the pause loop at all.
|
||||
Like this you can avoid the "frame stepping" effect of "pausing_keep "
|
||||
but most commands will either not work at all or behave in unexpected ways.
|
||||
For "set_mouse_pos" and "key_down_event", "pausing_keep_force" is the default
|
||||
since other values do not make much sense for them.
|
||||
|
||||
|
||||
Available commands ('mplayer -input cmdlist' will print a list):
|
||||
|
@ -25,17 +25,36 @@ Cannot find codec matching selected -vo and video format 0x55594648.
|
||||
|
||||
It means your AVI is encoded with a codec which has the HFYU fourcc (HFYU =
|
||||
HuffYUV codec, DIV3 = DivX Low Motion, etc.). Now that you know this, you
|
||||
have to find out which DLL Windows loads in order to play this file. In our
|
||||
case, the 'system.ini' contains this information in a line that reads:
|
||||
have to find out which DLL Windows loads in order to play this file.
|
||||
You can find the vfw codec by searching the internet for e.g. VIDC.HFYU.
|
||||
|
||||
In our case, the 'system.ini' also contains this information in a line that reads:
|
||||
|
||||
VIDC.HFYU=huffyuv.dll
|
||||
|
||||
So you need the 'huffyuv.dll' file. Note that the audio codecs are
|
||||
specified by the MSACM prefix:
|
||||
So you need the 'huffyuv.dll' file.
|
||||
|
||||
|
||||
|
||||
ACM Codecs:
|
||||
~~~~~~~~~~~~
|
||||
MPlayer may fail at playing the audio in your file with this message:
|
||||
|
||||
Cannot find codec for audio format 0x55.
|
||||
Read DOCS/HTML/en/codecs.html!
|
||||
Audio: no sound
|
||||
|
||||
MPlayer calls this the TwoCC format identifier. From the TwoCC list we find:
|
||||
|
||||
0x0055 MPEG-1 Layer 3 (MP3)
|
||||
|
||||
If you are lucky, you can then just search the internet for "codec acm"
|
||||
e.g. "mp3 acm". Or if the codec is already installed on Windows,
|
||||
it will show up in the system.ini as:
|
||||
|
||||
msacm.l3acm=L3codeca.acm
|
||||
|
||||
This is the MP3 codec.
|
||||
Note that the audio codecs are specified by the MSACM prefix:
|
||||
|
||||
|
||||
|
||||
@ -53,7 +72,7 @@ New Method:
|
||||
|
||||
Using Microsoft GraphEdit (fast)
|
||||
|
||||
- Get GraphEdit from either DirectX SDK or doom9.
|
||||
- Get GraphEdit from the Microsoft SDK, DirectX SDK or doom9.
|
||||
- Start 'graphedit.exe'.
|
||||
- From the menu select "Graph -> Insert Filters".
|
||||
- Expand item "DirectShow Filters".
|
||||
@ -86,3 +105,15 @@ Take a deep breath and start searching the registry...
|
||||
|
||||
If searching fails, try enabling all the checkboxes. You may have
|
||||
false hits, but you may get lucky...
|
||||
|
||||
|
||||
|
||||
Tips:
|
||||
~~~~~~~
|
||||
If you get an error loading a new codec, it may need some more files to work.
|
||||
Start the filemon utility before loading MPlayer to find out which dlls are
|
||||
trying to be loaded.
|
||||
|
||||
Your codec may load some external .dll libraries. If the codec is already
|
||||
installed in Windows, run listdlls wmplayer.exe while Windows Media
|
||||
Player is playing your file to find out which.
|
||||
|
@ -2,7 +2,9 @@
|
||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||
version="1.0">
|
||||
|
||||
<xsl:output method="html" indent="no"/>
|
||||
<xsl:output method="html" indent="no"
|
||||
doctype-system="http://www.w3.org/TR/html4/loose.dtd"
|
||||
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN"/>
|
||||
|
||||
<!-- **************
|
||||
Set parameters
|
||||
|
24
Makefile
24
Makefile
@ -94,8 +94,6 @@ SRCS_COMMON = asxparser.c \
|
||||
libmpcodecs/dec_video.c \
|
||||
libmpcodecs/img_format.c \
|
||||
libmpcodecs/mp_image.c \
|
||||
libmpcodecs/native/nuppelvideo.c \
|
||||
libmpcodecs/native/rtjpegn.c \
|
||||
libmpcodecs/native/xa_gsm.c \
|
||||
libmpcodecs/pullup.c \
|
||||
libmpcodecs/vd.c \
|
||||
@ -104,7 +102,6 @@ SRCS_COMMON = asxparser.c \
|
||||
libmpcodecs/vd_mpegpes.c \
|
||||
libmpcodecs/vd_mtga.c \
|
||||
libmpcodecs/vd_null.c \
|
||||
libmpcodecs/vd_nuv.c \
|
||||
libmpcodecs/vd_raw.c \
|
||||
libmpcodecs/vd_sgi.c \
|
||||
libmpcodecs/vf.c \
|
||||
@ -189,7 +186,6 @@ SRCS_COMMON = asxparser.c \
|
||||
libmpdemux/demux_mov.c \
|
||||
libmpdemux/demux_mpg.c \
|
||||
libmpdemux/demux_nsv.c \
|
||||
libmpdemux/demux_nuv.c \
|
||||
libmpdemux/demux_pva.c \
|
||||
libmpdemux/demux_rawaudio.c \
|
||||
libmpdemux/demux_rawvideo.c \
|
||||
@ -603,6 +599,7 @@ SRCS_MPLAYER-$(IVTV) += libao2/ao_ivtv.c libvo/vo_ivtv.c
|
||||
SRCS_MPLAYER-$(JACK) += libao2/ao_jack.c
|
||||
SRCS_MPLAYER-$(JOYSTICK) += input/joystick.c
|
||||
SRCS_MPLAYER-$(JPEG) += libvo/vo_jpeg.c
|
||||
SRCS_MPLAYER-$(KVA) += libvo/vo_kva.c
|
||||
SRCS_MPLAYER-$(LIBMENU) += libmenu/menu.c \
|
||||
libmenu/menu_chapsel.c \
|
||||
libmenu/menu_cmdlist.c \
|
||||
@ -691,7 +688,7 @@ SRCS_MENCODER-$(FAAC) += libmpcodecs/ae_faac.c
|
||||
SRCS_MENCODER-$(LIBAVCODEC) += libmpcodecs/ae_lavc.c libmpcodecs/ve_lavc.c
|
||||
SRCS_MENCODER-$(LIBAVFORMAT) += libmpdemux/muxer_lavf.c
|
||||
SRCS_MENCODER-$(LIBDV) += libmpcodecs/ve_libdv.c
|
||||
SRCS_MENCODER-$(LIBLZO) += libmpcodecs/ve_nuv.c
|
||||
SRCS_MENCODER-$(LIBLZO) += libmpcodecs/ve_nuv.c libmpcodecs/native/rtjpegn.c
|
||||
SRCS_MENCODER-$(MP3LAME) += libmpcodecs/ae_lame.c
|
||||
SRCS_MENCODER-$(QTX_CODECS_WIN32) += libmpcodecs/ve_qtvideo.c
|
||||
SRCS_MENCODER-$(TOOLAME) += libmpcodecs/ae_toolame.c
|
||||
@ -999,7 +996,7 @@ testsclean:
|
||||
TOOLS = $(addprefix TOOLS/,alaw-gen asfinfo avi-fix avisubdump compare dump_mp4 movinfo netstream subrip vivodump)
|
||||
|
||||
ifdef ARCH_X86
|
||||
TOOLS += TOOLS/modify_reg
|
||||
TOOLS += TOOLS/fastmemcpybench TOOLS/modify_reg
|
||||
endif
|
||||
|
||||
ALLTOOLS = $(TOOLS) TOOLS/bmovl-test TOOLS/vfw2menc
|
||||
@ -1009,7 +1006,7 @@ alltools: $(addsuffix $(EXESUF),$(ALLTOOLS))
|
||||
|
||||
toolsclean:
|
||||
-rm -f $(foreach file,$(ALLTOOLS),$(call ADD_ALL_EXESUFS,$(file)))
|
||||
-rm -f TOOLS/fastmem*-* TOOLS/realcodecs/*.so.6.0
|
||||
-rm -f TOOLS/realcodecs/*.so.6.0
|
||||
|
||||
TOOLS/bmovl-test$(EXESUF): -lSDL_image
|
||||
|
||||
@ -1026,22 +1023,11 @@ TOOLS/vivodump$(EXESUF): TOOLS/vivodump.c
|
||||
TOOLS/netstream$(EXESUF) TOOLS/vivodump$(EXESUF): $(subst mplayer.o,mplayer-nomain.o,$(OBJS_MPLAYER)) $(filter-out %mencoder.o,$(OBJS_MENCODER)) $(OBJS_COMMON) $(COMMON_LIBS)
|
||||
$(CC) $(CFLAGS) -o $@ $^ $(EXTRALIBS_MPLAYER) $(EXTRALIBS_MENCODER) $(COMMON_LDFLAGS)
|
||||
|
||||
fastmemcpybench: TOOLS/fastmemcpybench.c
|
||||
$(CC) $(CFLAGS) $< -o TOOLS/fastmem-mmx$(EXESUF) -DNAME=\"mmx\" -DHAVE_MMX
|
||||
$(CC) $(CFLAGS) $< -o TOOLS/fastmem-k6$(EXESUF) -DNAME=\"k6\ \" -DHAVE_MMX -DHAVE_AMD3DNOW
|
||||
$(CC) $(CFLAGS) $< -o TOOLS/fastmem-k7$(EXESUF) -DNAME=\"k7\ \" -DHAVE_MMX -DHAVE_AMD3DNOW -DHAVE_MMX2
|
||||
$(CC) $(CFLAGS) $< -o TOOLS/fastmem-sse$(EXESUF) -DNAME=\"sse\" -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2
|
||||
$(CC) $(CFLAGS) $< -o TOOLS/fastmem2-mmx$(EXESUF) -DNAME=\"mga-mmx\" -DCONFIG_MGA -DHAVE_MMX
|
||||
$(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k6$(EXESUF) -DNAME=\"mga-k6\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_AMD3DNOW
|
||||
$(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k7$(EXESUF) -DNAME=\"mga-k7\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_AMD3DNOW -DHAVE_MMX2
|
||||
$(CC) $(CFLAGS) $< -o TOOLS/fastmem2-sse$(EXESUF) -DNAME=\"mga-sse\" -DCONFIG_MGA -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2
|
||||
|
||||
REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c)
|
||||
REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)
|
||||
|
||||
realcodecs: $(REAL_TARGETS)
|
||||
|
||||
fastmemcpybench realcodecs: CFLAGS += -g
|
||||
realcodecs: CFLAGS += -g
|
||||
|
||||
%.so.6.0: %.o
|
||||
ld -shared -o $@ $< -ldl -lc
|
||||
|
@ -1,14 +1,12 @@
|
||||
/*
|
||||
fastmemcpybench.c used to benchmark fastmemcpy.h code from libvo.
|
||||
|
||||
Note: this code can not be used on PentMMX-PII because they contain
|
||||
a bug in rdtsc. For Intel processors since P6(PII) rdpmc should be used
|
||||
instead. For PIII it's disputable and seems bug was fixed but I don't
|
||||
tested it.
|
||||
* benchmark tool for fast_memcpy code from libvo
|
||||
*
|
||||
* NOTE: This code can not be used on Pentium MMX / II because they contain
|
||||
* a bug in rdtsc. For Intel processors since P6(PII) rdpmc should be used
|
||||
* instead. For PIII it's disputable and it seems the bug was fixed but this
|
||||
* was not confirmed through testing.
|
||||
*/
|
||||
|
||||
/* According to Uoti this code is broken. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
@ -19,6 +17,92 @@
|
||||
#include <sys/time.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "cpudetect.h"
|
||||
|
||||
#define BLOCK_SIZE 4096
|
||||
#define CONFUSION_FACTOR 0
|
||||
|
||||
#if HAVE_MMX
|
||||
#define COMPILE_MMX
|
||||
#endif
|
||||
|
||||
#if HAVE_MMX2
|
||||
#define COMPILE_MMX2
|
||||
#endif
|
||||
|
||||
#if HAVE_AMD3DNOW
|
||||
#define COMPILE_AMD3DNOW
|
||||
#endif
|
||||
|
||||
#if HAVE_SSE
|
||||
#define COMPILE_SSE
|
||||
#endif
|
||||
|
||||
#ifdef COMPILE_MMX
|
||||
#undef RENAME
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_AMD3DNOW
|
||||
#undef HAVE_SSE
|
||||
#undef HAVE_SSE2
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_AMD3DNOW 0
|
||||
#define HAVE_SSE 0
|
||||
#define HAVE_SSE2 0
|
||||
#define RENAME(a) a ## _MMX
|
||||
#include "libvo/aclib_template.c"
|
||||
#endif
|
||||
|
||||
#ifdef COMPILE_MMX2
|
||||
#undef RENAME
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_AMD3DNOW
|
||||
#undef HAVE_SSE
|
||||
#undef HAVE_SSE2
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 1
|
||||
#define HAVE_AMD3DNOW 0
|
||||
#define HAVE_SSE 0
|
||||
#define HAVE_SSE2 0
|
||||
#define RENAME(a) a ## _MMX2
|
||||
#include "libvo/aclib_template.c"
|
||||
#endif
|
||||
|
||||
#ifdef COMPILE_AMD3DNOW
|
||||
#undef RENAME
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_AMD3DNOW
|
||||
#undef HAVE_SSE
|
||||
#undef HAVE_SSE2
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_AMD3DNOW 1
|
||||
#define HAVE_SSE 0
|
||||
#define HAVE_SSE2 0
|
||||
#define RENAME(a) a ## _3DNow
|
||||
#include "libvo/aclib_template.c"
|
||||
#endif
|
||||
|
||||
#ifdef COMPILE_SSE
|
||||
#undef RENAME
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_AMD3DNOW
|
||||
#undef HAVE_SSE
|
||||
#undef HAVE_SSE2
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 1
|
||||
#define HAVE_AMD3DNOW 0
|
||||
#define HAVE_SSE 1
|
||||
#define HAVE_SSE2 1
|
||||
#define RENAME(a) a ## _SSE
|
||||
#include "libvo/aclib_template.c"
|
||||
#endif
|
||||
|
||||
//#define ARR_SIZE 100000
|
||||
#define ARR_SIZE (1024*768*2)
|
||||
|
||||
@ -27,50 +111,48 @@
|
||||
#include "drivers/mga_vid.h"
|
||||
|
||||
static mga_vid_config_t mga_vid_config;
|
||||
static unsigned char* frame=NULL;
|
||||
static unsigned char* frame = NULL;
|
||||
static int f;
|
||||
|
||||
static int mga_init(void)
|
||||
{
|
||||
f = open("/dev/mga_vid",O_RDWR);
|
||||
if(f == -1)
|
||||
{
|
||||
fprintf(stderr,"Couldn't open /dev/mga_vid\n");
|
||||
return -1;
|
||||
}
|
||||
f = open("/dev/mga_vid", O_RDWR);
|
||||
if (f == -1) {
|
||||
fprintf(stderr, "Couldn't open /dev/mga_vid.\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
mga_vid_config.num_frames=1;
|
||||
mga_vid_config.frame_size=ARR_SIZE;
|
||||
mga_vid_config.format=MGA_VID_FORMAT_YUY2;
|
||||
mga_vid_config.num_frames = 1;
|
||||
mga_vid_config.frame_size = ARR_SIZE;
|
||||
mga_vid_config.format = MGA_VID_FORMAT_YUY2;
|
||||
|
||||
mga_vid_config.colkey_on=0;
|
||||
mga_vid_config.src_width = 640;
|
||||
mga_vid_config.src_height= 480;
|
||||
mga_vid_config.dest_width = 320;
|
||||
mga_vid_config.dest_height= 200;
|
||||
mga_vid_config.x_org= 0;
|
||||
mga_vid_config.y_org= 0;
|
||||
|
||||
mga_vid_config.version=MGA_VID_VERSION;
|
||||
if (ioctl(f,MGA_VID_CONFIG,&mga_vid_config))
|
||||
{
|
||||
perror("Error in mga_vid_config ioctl()");
|
||||
printf("Your mga_vid driver version is incompatible with this MPlayer version!\n");
|
||||
exit(1);
|
||||
}
|
||||
ioctl(f,MGA_VID_ON,0);
|
||||
mga_vid_config.colkey_on = 0;
|
||||
mga_vid_config.src_width = 640;
|
||||
mga_vid_config.src_height = 480;
|
||||
mga_vid_config.dest_width = 320;
|
||||
mga_vid_config.dest_height = 200;
|
||||
mga_vid_config.x_org = 0;
|
||||
mga_vid_config.y_org = 0;
|
||||
|
||||
frame = (char*)mmap(0,mga_vid_config.frame_size*mga_vid_config.num_frames,PROT_WRITE,MAP_SHARED,f,0);
|
||||
if(!frame){
|
||||
printf("Can't mmap mga frame\n");
|
||||
exit(1);
|
||||
}
|
||||
mga_vid_config.version = MGA_VID_VERSION;
|
||||
if (ioctl(f, MGA_VID_CONFIG, &mga_vid_config)) {
|
||||
perror("Error in mga_vid_config ioctl()");
|
||||
printf("Your mga_vid driver version is incompatible with this MPlayer version!\n");
|
||||
exit(1);
|
||||
}
|
||||
ioctl(f, MGA_VID_ON, 0);
|
||||
|
||||
//clear the buffer
|
||||
//memset(frames[0],0x80,mga_vid_config.frame_size*mga_vid_config.num_frames);
|
||||
frame = (char*)mmap(0, mga_vid_config.frame_size*mga_vid_config.num_frames,
|
||||
PROT_WRITE,MAP_SHARED, f, 0);
|
||||
if (!frame) {
|
||||
printf("Can't mmap MGA frame.\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
//clear the buffer
|
||||
//memset(frames[0], 0x80, mga_vid_config.frame_size*mga_vid_config.num_frames);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
@ -78,45 +160,68 @@ static int mga_init(void)
|
||||
// Returns current time in microseconds
|
||||
static unsigned int GetTimer(void)
|
||||
{
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
// float s;
|
||||
gettimeofday(&tv,&tz);
|
||||
// s=tv.tv_usec;s*=0.000001;s+=tv.tv_sec;
|
||||
return tv.tv_sec * 1000000 + tv.tv_usec;
|
||||
}
|
||||
|
||||
static inline unsigned long long int read_tsc( void )
|
||||
{
|
||||
unsigned long long int retval;
|
||||
__asm__ volatile ("rdtsc":"=A"(retval)::"memory");
|
||||
return retval;
|
||||
struct timeval tv;
|
||||
struct timezone tz;
|
||||
//float s;
|
||||
gettimeofday(&tv, &tz);
|
||||
//s = tv.tv_usec; s *= 0.000001; s += tv.tv_sec;
|
||||
return tv.tv_sec * 1000000 + tv.tv_usec;
|
||||
}
|
||||
|
||||
unsigned char __attribute__((aligned(4096)))arr1[ARR_SIZE],arr2[ARR_SIZE];
|
||||
|
||||
int main( void )
|
||||
static inline unsigned long long int read_tsc(void)
|
||||
{
|
||||
unsigned long long int v1,v2;
|
||||
unsigned char * marr1,*marr2;
|
||||
int i;
|
||||
unsigned int t;
|
||||
unsigned long long int retval;
|
||||
__asm__ volatile ("rdtsc":"=A" (retval)::"memory");
|
||||
return retval;
|
||||
}
|
||||
|
||||
unsigned char __attribute__((aligned(4096)))arr1[ARR_SIZE], arr2[ARR_SIZE];
|
||||
|
||||
int main(void)
|
||||
{
|
||||
unsigned long long int v1, v2;
|
||||
unsigned char *marr1, *marr2;
|
||||
int i;
|
||||
unsigned int t;
|
||||
#ifdef CONFIG_MGA
|
||||
mga_init();
|
||||
marr1 = &frame[3];
|
||||
mga_init();
|
||||
marr1 = &frame[3];
|
||||
#else
|
||||
marr1 = &arr1[3];
|
||||
marr1 = &arr1[0];
|
||||
#endif
|
||||
marr2 = &arr2[9];
|
||||
marr2 = &arr2[0];
|
||||
|
||||
for(i=0; i<ARR_SIZE-16; i++) marr1[i] = marr2[i] = i;
|
||||
for (i = 0; i < ARR_SIZE - 16; i++)
|
||||
marr1[i] = marr2[i] = i;
|
||||
|
||||
t=GetTimer();
|
||||
v1 = read_tsc();
|
||||
for(i=0;i<100;i++) memcpy(marr1,marr2,ARR_SIZE-16);
|
||||
v2 = read_tsc();
|
||||
t=GetTimer()-t;
|
||||
// ARR_SIZE*100/(1024*1024)/(t/1000000) = ARR_SIZE*95.36743/t
|
||||
printf(NAME": cpu clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n",v2-v1,t,100000000.0f/(float)t,(float)ARR_SIZE*95.36743f/(float)t);
|
||||
return 0;
|
||||
#define testblock(func, name) \
|
||||
t = GetTimer(); \
|
||||
v1 = read_tsc(); \
|
||||
for (i = 0; i < 100; i++) \
|
||||
func(marr1, marr2, ARR_SIZE - 16); \
|
||||
v2 = read_tsc(); \
|
||||
t = GetTimer() - t; \
|
||||
/* ARR_SIZE*100 / (1024*1024) / (t/1000000) = ARR_SIZE*95.36743 / t */ \
|
||||
printf(name "CPU clocks=%llu = %dus (%5.3ffps) %5.1fMB/s\n", v2-v1, t, \
|
||||
100000000.0f / (float)t, (float)ARR_SIZE*95.36743f / (float)t);
|
||||
|
||||
testblock(memcpy, "libc: ");
|
||||
|
||||
#if HAVE_MMX
|
||||
testblock(fast_memcpy_MMX, "MMX: ");
|
||||
#endif
|
||||
|
||||
#if HAVE_AMD3DNOW
|
||||
testblock(fast_memcpy_3DNow, "3DNow!: ");
|
||||
#endif
|
||||
|
||||
#if HAVE_MMX2
|
||||
testblock(fast_memcpy_MMX2, "MMX2: ");
|
||||
#endif
|
||||
|
||||
#if HAVE_SSE
|
||||
testblock(fast_memcpy_SSE, "SSE: ");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
43
configure
vendored
43
configure
vendored
@ -366,6 +366,7 @@ Video output:
|
||||
--enable-vesa enable VESA video output [autodetect]
|
||||
--enable-svga enable SVGAlib video output [autodetect]
|
||||
--enable-sdl enable SDL video output [autodetect]
|
||||
--enable-kva enable KVA video output [autodetect]
|
||||
--enable-aa enable AAlib video output [autodetect]
|
||||
--enable-caca enable CACA video output [autodetect]
|
||||
--enable-ggi enable GGI video output [autodetect]
|
||||
@ -556,6 +557,7 @@ _xv=auto
|
||||
_xvmc=no #auto when complete
|
||||
_vdpau=auto
|
||||
_sdl=auto
|
||||
_kva=auto
|
||||
_direct3d=auto
|
||||
_directx=auto
|
||||
_win32waveout=auto
|
||||
@ -888,6 +890,8 @@ for ac_option do
|
||||
--disable-vdpau) _vdpau=no ;;
|
||||
--enable-sdl) _sdl=yes ;;
|
||||
--disable-sdl) _sdl=no ;;
|
||||
--enable-kva) _kva=yes ;;
|
||||
--disable-kva) _kva=no ;;
|
||||
--enable-direct3d) _direct3d=yes ;;
|
||||
--disable-direct3d) _direct3d=no ;;
|
||||
--enable-directx) _directx=yes ;;
|
||||
@ -4156,7 +4160,8 @@ echocheck "X11 headers presence"
|
||||
fi
|
||||
done
|
||||
if test $_cross_compile = no; then
|
||||
for I in /usr/X11/include /usr/X11R6/include /usr/include/X11R6 /usr/openwin/include ; do
|
||||
for I in /usr/X11/include /usr/X11R7/include /usr/X11R6/include \
|
||||
/usr/include/X11R6 /usr/openwin/include ; do
|
||||
if test -f "$I/X11/Xlib.h" ; then
|
||||
_inc_extra="$_inc_extra -I$I"
|
||||
_x11_headers="yes"
|
||||
@ -4175,8 +4180,9 @@ if test "$_x11" = auto && test "$_x11_headers" = yes ; then
|
||||
#include <X11/Xutil.h>
|
||||
int main(void) { (void) XCreateWindow(0,0,0,0,0,0,0,0,0,0,0,0); return 0; }
|
||||
EOF
|
||||
for I in "" -L/usr/X11R6/lib -L/usr/lib/X11R6 -L/usr/X11/lib \
|
||||
-L/usr/lib32 -L/usr/openwin/lib -L/usr/X11R6/lib64 -L/usr/lib ; do
|
||||
for I in "" -L/usr/X11R7/lib -L/usr/X11R6/lib -L/usr/lib/X11R6 \
|
||||
-L/usr/X11/lib -L/usr/lib32 -L/usr/openwin/lib -L/usr/X11R6/lib64 \
|
||||
-L/usr/lib ; do
|
||||
if netbsd; then
|
||||
_ld_tmp="$I -lXext -lX11 $_ld_pthread -Wl,-R`echo $I | sed s/^-L//`"
|
||||
else
|
||||
@ -5101,6 +5107,29 @@ fi
|
||||
echores "$_sdl"
|
||||
|
||||
|
||||
if os2 ; then
|
||||
echocheck "KVA (SNAP/WarpOverlay!/DIVE)"
|
||||
if test "$_kva" = auto; then
|
||||
cat > $TMPC << EOF
|
||||
#include <os2.h>
|
||||
#include <kva.h>
|
||||
int main( void ) { return 0; }
|
||||
EOF
|
||||
_kva=no;
|
||||
cc_check -lkva && _kva=yes
|
||||
fi
|
||||
if test "$_kva" = yes ; then
|
||||
def_kva='#define CONFIG_KVA 1'
|
||||
_libs_mplayer="$_libs_mplayer -lkva"
|
||||
_vomodules="kva $_vomodules"
|
||||
else
|
||||
def_kva='#undef CONFIG_KVA'
|
||||
_novomodules="kva $_novomodules"
|
||||
fi
|
||||
echores "$_kva"
|
||||
fi #if os2
|
||||
|
||||
|
||||
if win32; then
|
||||
|
||||
echocheck "Windows waveout"
|
||||
@ -7777,13 +7806,11 @@ fi #if test "$_gui"
|
||||
# --------------- GUI specific tests end -------------------
|
||||
|
||||
|
||||
if test "$_charset" = "noconv" ; then
|
||||
_charset=""
|
||||
fi
|
||||
if test "$_charset" ; then
|
||||
if test "$_charset" != "noconv" ; then
|
||||
def_charset="#define MSG_CHARSET \"$_charset\""
|
||||
else
|
||||
def_charset="#undef MSG_CHARSET"
|
||||
_charset="UTF-8"
|
||||
fi
|
||||
|
||||
if test -n "$_charset" && test "$_charset" != "UTF-8" ; then
|
||||
@ -8160,6 +8187,7 @@ IVTV = $_ivtv
|
||||
JACK = $_jack
|
||||
JOYSTICK = $_joystick
|
||||
JPEG = $_jpeg
|
||||
KVA = $_kva
|
||||
LADSPA = $_ladspa
|
||||
LIBA52 = $_liba52
|
||||
LIBA52_INTERNAL = $_liba52_internal
|
||||
@ -8662,6 +8690,7 @@ $def_gl
|
||||
$def_gl_win32
|
||||
$def_ivtv
|
||||
$def_jpeg
|
||||
$def_kva
|
||||
$def_md5sum
|
||||
$def_mga
|
||||
$def_mng
|
||||
|
@ -143,6 +143,7 @@ void GetCpuCaps( CpuCaps *caps)
|
||||
caps->hasMMX = (regs2[3] & (1 << 23 )) >> 23; // 0x0800000
|
||||
caps->hasSSE = (regs2[3] & (1 << 25 )) >> 25; // 0x2000000
|
||||
caps->hasSSE2 = (regs2[3] & (1 << 26 )) >> 26; // 0x4000000
|
||||
caps->hasSSE3 = (regs2[2] & 1); // 0x0000001
|
||||
caps->hasSSSE3 = (regs2[2] & (1 << 9 )) >> 9; // 0x0000200
|
||||
caps->hasMMX2 = caps->hasSSE; // SSE cpus supports mmxext too
|
||||
cl_size = ((regs2[1] >> 8) & 0xFF)*8;
|
||||
@ -458,6 +459,7 @@ void GetCpuCaps( CpuCaps *caps)
|
||||
caps->has3DNowExt=0;
|
||||
caps->hasSSE=0;
|
||||
caps->hasSSE2=0;
|
||||
caps->hasSSE3=0;
|
||||
caps->hasSSSE3=0;
|
||||
caps->hasSSE4a=0;
|
||||
caps->isX86=0;
|
||||
|
@ -46,6 +46,7 @@ typedef struct cpucaps_s {
|
||||
int has3DNowExt;
|
||||
int hasSSE;
|
||||
int hasSSE2;
|
||||
int hasSSE3;
|
||||
int hasSSSE3;
|
||||
int hasSSE4a;
|
||||
int isX86;
|
||||
|
@ -46,6 +46,7 @@ void set_default_mplayer_options(struct MPOpts *opts)
|
||||
#else
|
||||
.use_ar = 0,
|
||||
#endif
|
||||
.default_binds = 1,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
; Before editing this file, please read DOCS/tech/codecs.conf.txt !
|
||||
;=============================================================================
|
||||
|
||||
release 20070930
|
||||
release 20090308
|
||||
|
||||
;=============================================================================
|
||||
; VIDEO CODECS
|
||||
@ -319,14 +319,6 @@ videocodec ffnuv
|
||||
dll nuv
|
||||
out I420
|
||||
|
||||
videocodec nuv
|
||||
info "NuppelVideo"
|
||||
status working
|
||||
fourcc NUV1 ; NUV1 is an internal MPlayer FOURCC
|
||||
fourcc RJPG
|
||||
driver nuv
|
||||
out I420,IYUV
|
||||
|
||||
videocodec ffbmp
|
||||
info "FFmpeg BMP"
|
||||
status working
|
||||
@ -533,6 +525,15 @@ videocodec theora
|
||||
|
||||
;WIN32:
|
||||
|
||||
videocodec smartsight
|
||||
info "Verint Video Manager"
|
||||
status working
|
||||
fourcc SN40
|
||||
fourcc SN41,SJPG ; untested
|
||||
driver vfw
|
||||
dll "SN4Codec.dll"
|
||||
out BGR24 flip
|
||||
|
||||
videocodec msuscls
|
||||
info "MSU Screen Capture Lossless Codec"
|
||||
status working
|
||||
@ -891,7 +892,7 @@ videocodec ffodivx
|
||||
fourcc FFDS
|
||||
fourcc DCOD,MVXM,EM4A,PM4V
|
||||
fourcc M4T3,DMK2,DIGI,INMC
|
||||
fourcc EPHV
|
||||
fourcc EPHV,SN40
|
||||
driver ffmpeg
|
||||
dll mpeg4 ;opendivx
|
||||
out YV12,I420,IYUV
|
||||
@ -942,7 +943,7 @@ videocodec xvid
|
||||
fourcc FFDS
|
||||
fourcc DCOD,MVXM,EM4A,PM4V
|
||||
fourcc M4T3,DMK2,DIGI,INMC
|
||||
fourcc EPHV
|
||||
fourcc EPHV,SN40
|
||||
format 0x10000004 ; mpeg 4 es
|
||||
driver xvid
|
||||
out YV12
|
||||
|
@ -3,7 +3,7 @@
|
||||
//... Okay enough of the hw, now send the other two!
|
||||
//
|
||||
// Updated by: Gabrov <gabrov@freemail.hu>
|
||||
// Sync'ed with help_mp-en.h r28122 (2008. 12. 17.)
|
||||
// Sync'ed with help_mp-en.h r28860 (2009. 03. 09.)
|
||||
|
||||
|
||||
// ========================= MPlayer help ===========================
|
||||
|
@ -947,6 +947,128 @@ static const char help_text[]=
|
||||
#define MSGTR_LIBVO_MGA_ResolutionTooHigh "[MGA] Розширення джерела, у крайньому випадку в одному вимірі, більше ніж 1023x1023.\n[MGA] Перемасштабуйте програмно або викорстайте -lavdopts lowres=1.\n"
|
||||
#define MSGTR_LIBVO_MGA_mgavidVersionMismatch "[MGA] версія драйверу mga_vid ядра (%u) та MPlayer (%u) не співпадають\n"
|
||||
|
||||
// vo_null.c
|
||||
#define MSGTR_LIBVO_NULL_UnknownSubdevice "[VO_NULL] Невідомий підпристрій: %s.\n"
|
||||
|
||||
// vo_png.c
|
||||
#define MSGTR_LIBVO_PNG_Warning1 "[VO_PNG] Попередження: рівень стиснення встановлено 0, стиснення вимкнено!\n"
|
||||
#define MSGTR_LIBVO_PNG_Warning2 "[VO_PNG] Інфо: Використайте -vo png:z=<n> щоб встановити рівень стиснення з 0 до 9.\n"
|
||||
#define MSGTR_LIBVO_PNG_Warning3 "[VO_PNG] Інфо: (0 = без стиснення, 1 = найшвидша, найповільніша - 9 але найкраще стиснення)\n"
|
||||
#define MSGTR_LIBVO_PNG_ErrorOpeningForWriting "\n[VO_PNG] Помилка при відкритті '%s' для запису!\n"
|
||||
#define MSGTR_LIBVO_PNG_ErrorInCreatePng "[VO_PNG] Помилка при створенні png.\n"
|
||||
|
||||
// vo_pnm.c
|
||||
#define MSGTR_VO_PNM_ASCIIMode "Режим ASCII увімкнено."
|
||||
#define MSGTR_VO_PNM_RawMode "Режим Raw увімкнено."
|
||||
#define MSGTR_VO_PNM_PPMType "Запише файли PPM."
|
||||
#define MSGTR_VO_PNM_PGMType "Запише файли PGM."
|
||||
#define MSGTR_VO_PNM_PGMYUVType "Запише файли PGMYUV."
|
||||
|
||||
// vo_sdl.c
|
||||
#define MSGTR_LIBVO_SDL_CouldntGetAnyAcceptableSDLModeForOutput "[VO_SDL] Не можу вивести прийнятний SDL Mode.\n"
|
||||
#define MSGTR_LIBVO_SDL_SetVideoModeFailed "[VO_SDL] set_video_mode: Збій SDL_SetVideoMode: %s.\n"
|
||||
#define MSGTR_LIBVO_SDL_SetVideoModeFailedFull "[VO_SDL] Set_fullmode: Збій SDL_SetVideoMode: %s.\n"
|
||||
#define MSGTR_LIBVO_SDL_MappingI420ToIYUV "[VO_SDL] Показую I420 у IYUV.\n"
|
||||
#define MSGTR_LIBVO_SDL_UnsupportedImageFormat "[VO_SDL] Формат картинки не підтримується (0x%X).\n"
|
||||
#define MSGTR_LIBVO_SDL_InfoPleaseUseVmOrZoom "[VO_SDL] Інфо - спробуйте -vm чи -zoom щоб перейти до найкращої роздільної здатності.\n"
|
||||
#define MSGTR_LIBVO_SDL_FailedToSetVideoMode "[VO_SDL] Не вдалося встановити відео режим: %s.\n"
|
||||
#define MSGTR_LIBVO_SDL_CouldntCreateAYUVOverlay "[VO_SDL] Не вдалося створити оверлей YUV: %s.\n"
|
||||
#define MSGTR_LIBVO_SDL_CouldntCreateARGBSurface "[VO_SDL] Не вдалося створити поверхню RGB: %s.\n"
|
||||
#define MSGTR_LIBVO_SDL_UsingDepthColorspaceConversion "[VO_SDL] Використовую перетворення глибини/кольорового простору, це уповільнить протікання процесу (%ibpp -> %ibpp).\n"
|
||||
#define MSGTR_LIBVO_SDL_UnsupportedImageFormatInDrawslice "[VO_SDL] Формат картинки не підтримується у draw_slice, повідомте розробників MPlayer!\n"
|
||||
#define MSGTR_LIBVO_SDL_BlitFailed "[VO_SDL] Збій Blit: %s.\n"
|
||||
#define MSGTR_LIBVO_SDL_InitializationFailed "[VO_SDL] Ініціялізація SDL не вдалася: %s.\n"
|
||||
#define MSGTR_LIBVO_SDL_UsingDriver "[VO_SDL] Використовую драйвер: %s.\n"
|
||||
|
||||
// vo_svga.c
|
||||
#define MSGTR_LIBVO_SVGA_ForcedVidmodeNotAvailable "[VO_SVGA] Форсований vid_mode %d (%s) не доступний.\n"
|
||||
#define MSGTR_LIBVO_SVGA_ForcedVidmodeTooSmall "[VO_SVGA] Форсований vid_mode %d (%s) замалий.\n"
|
||||
#define MSGTR_LIBVO_SVGA_Vidmode "[VO_SVGA] Vid_mode: %d, %dx%d %dbpp.\n"
|
||||
#define MSGTR_LIBVO_SVGA_VgasetmodeFailed "[VO_SVGA] Збій Vga_setmode(%d).\n"
|
||||
#define MSGTR_LIBVO_SVGA_VideoModeIsLinearAndMemcpyCouldBeUsed "[VO_SVGA] Режим Відео лінійний та для передачі зображення може бути\nвикористаний memcpy.\n"
|
||||
#define MSGTR_LIBVO_SVGA_VideoModeHasHardwareAcceleration "[VO_SVGA] Режим Відео має апаратне прискорення тому може бути кокористаний put_image.\n"
|
||||
#define MSGTR_LIBVO_SVGA_IfItWorksForYouIWouldLikeToKnow "[VO_SVGA] Якщо це працює у вас, дайте мені знати.\n[VO_SVGA] (надішліть лоґ з `mplayer test.avi -v -v -v -v &> svga.log`). Дякую!\n"
|
||||
#define MSGTR_LIBVO_SVGA_VideoModeHas "[VO_SVGA] Режим Відео має %d сторінку(ок/ки).\n"
|
||||
#define MSGTR_LIBVO_SVGA_CenteringImageStartAt "[VO_SVGA] Centering image. Starting at (%d,%d)\n"
|
||||
#define MSGTR_LIBVO_SVGA_UsingVidix "[VO_SVGA] Використовую VIDIX. w=%i h=%i mw=%i mh=%i\n"
|
||||
|
||||
// vo_tdfx_vid.c
|
||||
#define MSGTR_LIBVO_TDFXVID_Move "[VO_TDXVID] Переміщую %d(%d) x %d => %d.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_AGPMoveFailedToClearTheScreen "[VO_TDFXVID] Переміщення AGP не вдалося очистити екран.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_BlitFailed "[VO_TDFXVID] Збій Blit.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_NonNativeOverlayFormatNeedConversion "[VO_TDFXVID] Нестандартний формат оверлею потребує перетворення.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_UnsupportedInputFormat "[VO_TDFXVID] Формат вводу 0x%x не підтримується.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_OverlaySetupFailed "[VO_TDFXVID] Встановлення оверлею не вдалося.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_OverlayOnFailed "[VO_TDFXVID] Помилка оверлею.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_OverlayReady "[VO_TDFXVID] Оверлей готовий: %d(%d) x %d @ %d => %d(%d) x %d @ %d.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_TextureBlitReady "[VO_TDFXVID] Blit текстур готовий: %d(%d) x %d @ %d => %d(%d) x %d @ %d.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_OverlayOffFailed "[VO_TDFXVID] Ввимкнення оверлею не вдолося\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_CantOpen "[VO_TDFXVID] Не можу відкрити %s: %s.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_CantGetCurrentCfg "[VO_TDFXVID] Не можу отримати поточну конфігурацію: %s.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_MemmapFailed "[VO_TDFXVID] Збій memmap !!!!!\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_GetImageTodo "Треба доробити картинку.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_AgpMoveFailed "[VO_TDFXVID] Переміщення AGP не вдалося.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_SetYuvFailed "[VO_TDFXVID] Встановлення YUV не вдалося.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_AgpMoveFailedOnYPlane "[VO_TDFXVID] Переміщення AGP не вдалося на проєкції Y.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_AgpMoveFailedOnUPlane "[VO_TDFXVID] Переміщення AGP не вдалося на проєкції U.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_AgpMoveFailedOnVPlane "[VO_TDFXVID] Переміщення AGP не вдалося на проєкції V.\n"
|
||||
#define MSGTR_LIBVO_TDFXVID_UnknownFormat "[VO_TDFXVID] невідомий формат: 0x%x.\n"
|
||||
|
||||
// vo_tdfxfb.c
|
||||
#define MSGTR_LIBVO_TDFXFB_CantOpen "[VO_TDFXFB] Не можу відкрити %s: %s.\n"
|
||||
#define MSGTR_LIBVO_TDFXFB_ProblemWithFbitgetFscreenInfo "[VO_TDFXFB] Проблема з FBITGET_FSCREENINFO ioctl: %s.\n"
|
||||
#define MSGTR_LIBVO_TDFXFB_ProblemWithFbitgetVscreenInfo "[VO_TDFXFB] Проблема з FBITGET_VSCREENINFO ioctl: %s.\n"
|
||||
#define MSGTR_LIBVO_TDFXFB_ThisDriverOnlySupports "[VO_TDFXFB] Це драйвер підтримує тільки 3Dfx Banshee, Voodoo3 та Voodoo 5.\n"
|
||||
#define MSGTR_LIBVO_TDFXFB_OutputIsNotSupported "[VO_TDFXFB] %d вивід bpp не підтримується.\n"
|
||||
#define MSGTR_LIBVO_TDFXFB_CouldntMapMemoryAreas "[VO_TDFXFB] Не можу показати частини пам'яті: %s.\n"
|
||||
#define MSGTR_LIBVO_TDFXFB_BppOutputIsNotSupported "[VO_TDFXFB] %d вивід bpp не підтримується (Цього зовсім не повинно траплятися).\n"
|
||||
#define MSGTR_LIBVO_TDFXFB_SomethingIsWrongWithControl "[VO_TDFXFB] Ой! Щось сталося з control().\n"
|
||||
#define MSGTR_LIBVO_TDFXFB_NotEnoughVideoMemoryToPlay "[VO_TDFXFB] Не достатньо пам'яті щоб програти це відео. Спробуйте меншу роздільну здатність.\n"
|
||||
#define MSGTR_LIBVO_TDFXFB_ScreenIs "[VO_TDFXFB] Екран %dx%d на %d bpp, у %dx%d на %d bpp, режим %dx%d.\n"
|
||||
|
||||
// vo_tga.c
|
||||
#define MSGTR_LIBVO_TGA_UnknownSubdevice "[VO_TGA] Невідомий підпристрій: %s.\n"
|
||||
|
||||
// vo_vesa.c
|
||||
#define MSGTR_LIBVO_VESA_FatalErrorOccurred "[VO_VESA] Виникла фатально помилка! Не можу продовжити.\n"
|
||||
#define MSGTR_LIBVO_VESA_UnknownSubdevice "[VO_VESA] невідомий підпристрій: '%s'.\n"
|
||||
#define MSGTR_LIBVO_VESA_YouHaveTooLittleVideoMemory "[VO_VESA] Замало відео пам'яті для цього режиму:\n[VO_VESA] Потребує: %08lX є: %08lX.\n"
|
||||
#define MSGTR_LIBVO_VESA_YouHaveToSpecifyTheCapabilitiesOfTheMonitor "[VO_VESA] Ви маєте вказати можливості монітора. Не змінюю частому оновлення.\n"
|
||||
#define MSGTR_LIBVO_VESA_UnableToFitTheMode "[VO_VESA] Режим не відповідає обмеженням монітора. Не змінюю частому оновлення.\n"
|
||||
#define MSGTR_LIBVO_VESA_DetectedInternalFatalError "[VO_VESA] Виявлена фатальна внутрішня помилка: init викликаний перед preinit.\n"
|
||||
#define MSGTR_LIBVO_VESA_SwitchFlipIsNotSupported "[VO_VESA] Опція -flip не підтримується.\n"
|
||||
#define MSGTR_LIBVO_VESA_PossibleReasonNoVbe2BiosFound "[VO_VESA] Можлива причина: Не знайдено VBE2 BIOS.\n"
|
||||
#define MSGTR_LIBVO_VESA_FoundVesaVbeBiosVersion "[VO_VESA] Знайдено VESA VBE BIOS, версія %x.%x ревізія: %x.\n"
|
||||
#define MSGTR_LIBVO_VESA_VideoMemory "[VO_VESA] Відео пам'ять: %u Кб.\n"
|
||||
#define MSGTR_LIBVO_VESA_Capabilites "[VO_VESA] Можливості VESA: %s %s %s %s %s.\n"
|
||||
#define MSGTR_LIBVO_VESA_BelowWillBePrintedOemInfo "[VO_VESA] !!! OEM інформація буде виведена нище !!!\n"
|
||||
#define MSGTR_LIBVO_VESA_YouShouldSee5OemRelatedLines "[VO_VESA] Ви повинні бачити 5 рядків інфо про OEM нище; Якщо ні, у вас поламана vm86.\n"
|
||||
#define MSGTR_LIBVO_VESA_OemInfo "[VO_VESA] OEM інфо: %s.\n"
|
||||
#define MSGTR_LIBVO_VESA_OemRevision "[VO_VESA] OEM ревізія: %x.\n"
|
||||
#define MSGTR_LIBVO_VESA_OemVendor "[VO_VESA] OEM постачальник: %s.\n"
|
||||
#define MSGTR_LIBVO_VESA_OemProductName "[VO_VESA] Назва продукту OEM: %s.\n"
|
||||
#define MSGTR_LIBVO_VESA_OemProductRev "[VO_VESA] Ревізія продукту OEM: %s.\n"
|
||||
#define MSGTR_LIBVO_VESA_Hint "[VO_VESA] Підказка: Для роботи ТБ-виходу вам необхідно підключити ТБ роз'єм\n"\
|
||||
"[VO_VESA] перед завантаженням як VESA BIOS ініціялізує себе протягом POST.\n"
|
||||
#define MSGTR_LIBVO_VESA_UsingVesaMode "[VO_VESA] Використовую режим VESA (%u) = %x [%ux%u@%u]\n"
|
||||
#define MSGTR_LIBVO_VESA_CantInitializeSwscaler "[VO_VESA] Не можу ініціялізувати програмне масштабування.\n"
|
||||
#define MSGTR_LIBVO_VESA_CantUseDga "[VO_VESA] Не можу використовувати DGA. Форсую режим комутації сегментів. :(\n"
|
||||
#define MSGTR_LIBVO_VESA_UsingDga "[VO_VESA] Використовую DGA (фізичні ресурси: %08lXh, %08lXh)"
|
||||
#define MSGTR_LIBVO_VESA_CantUseDoubleBuffering "[VO_VESA] Не можу використати подвійну буферизацію: не достатньо відео пам'яті.\n"
|
||||
#define MSGTR_LIBVO_VESA_CantFindNeitherDga "[VO_VESA] Не можу знайти ні DGA ні переміщуваного фрейму вікна.\n"
|
||||
#define MSGTR_LIBVO_VESA_YouveForcedDga "[VO_VESA] Ви форсували DGA. Виходжу\n"
|
||||
#define MSGTR_LIBVO_VESA_CantFindValidWindowAddress "[VO_VESA] Не можу знайти правильну адресу вікна.\n"
|
||||
#define MSGTR_LIBVO_VESA_UsingBankSwitchingMode "[VO_VESA] Використовую режим комутації сегментів (фізичні ресурси: %08lXh, %08lXh).\n"
|
||||
#define MSGTR_LIBVO_VESA_CantAllocateTemporaryBuffer "[VO_VESA] Не можу виділити тимчасовий буфер.\n"
|
||||
#define MSGTR_LIBVO_VESA_SorryUnsupportedMode "[VO_VESA] Вибачте, режим не підтримується -- спробуйте -x 640 -zoom.\n"
|
||||
#define MSGTR_LIBVO_VESA_OhYouReallyHavePictureOnTv "[VO_VESA] О, ви справді маєте картинку на ТБ!\n"
|
||||
#define MSGTR_LIBVO_VESA_CantInitialozeLinuxVideoOverlay "[VO_VESA] Не можу ініціялізувати Відео оверлей Linux.\n"
|
||||
#define MSGTR_LIBVO_VESA_UsingVideoOverlay "[VO_VESA] Використовую відео оверлей: %s.\n"
|
||||
#define MSGTR_LIBVO_VESA_CantInitializeVidixDriver "[VO_VESA] Не можу ініціялізувати драйвер VIDIX.\n"
|
||||
#define MSGTR_LIBVO_VESA_UsingVidix "[VO_VESA] Використовую VIDIX.\n"
|
||||
#define MSGTR_LIBVO_VESA_CantFindModeFor "[VO_VESA] Не можу знайти режим для: %ux%u@%u.\n"
|
||||
#define MSGTR_LIBVO_VESA_InitializationComplete "[VO_VESA] Ініціялізація VESA завершена.\n"
|
||||
|
||||
// open.c, stream.c:
|
||||
#define MSGTR_CdDevNotfound "Компактовід \"%s\" не знайдений!\n"
|
||||
#define MSGTR_ErrTrackSelect "Помилка вибору треку на VCD!"
|
||||
|
@ -21,6 +21,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/types.h>
|
||||
@ -582,6 +583,7 @@ struct input_ctx {
|
||||
unsigned int num_key_down;
|
||||
unsigned int last_key_down;
|
||||
|
||||
bool default_binds;
|
||||
// List of command binding sections
|
||||
mp_cmd_bind_section_t *cmd_bind_sections;
|
||||
// Name of currently used command section
|
||||
@ -621,6 +623,8 @@ static const m_option_t input_conf[] = {
|
||||
OPT_STRING("js-dev", input.js_dev, CONF_GLOBAL),
|
||||
OPT_STRING("ar-dev", input.ar_dev, CONF_GLOBAL),
|
||||
OPT_STRING("file", input.in_file, CONF_GLOBAL),
|
||||
OPT_FLAG_ON("default-binds", input.default_binds, CONF_GLOBAL),
|
||||
OPT_FLAG_OFF("nodefault-binds", input.default_binds, CONF_GLOBAL),
|
||||
{ NULL, NULL, 0, 0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
@ -1059,7 +1063,7 @@ static mp_cmd_t *get_cmd_from_keys(struct input_ctx *ictx, int n, int *keys,
|
||||
cmd = find_bind_for_key(ictx->cmd_binds, n, keys);
|
||||
if (ictx->cmd_binds_default && cmd == NULL)
|
||||
cmd = find_bind_for_key(ictx->cmd_binds_default, n, keys);
|
||||
if(cmd == NULL)
|
||||
if (ictx->default_binds && cmd == NULL)
|
||||
cmd = find_bind_for_key(def_cmd_binds,n,keys);
|
||||
|
||||
if(cmd == NULL) {
|
||||
@ -1694,6 +1698,7 @@ struct input_ctx *mp_input_init(struct input_conf *input_conf, int use_gui)
|
||||
.ar_state = -1,
|
||||
.ar_delay = input_conf->ar_delay,
|
||||
.ar_rate = input_conf->ar_rate,
|
||||
.default_binds = input_conf->default_binds,
|
||||
};
|
||||
|
||||
char* file;
|
||||
|
102
libao2/ao_jack.c
102
libao2/ao_jack.c
@ -36,7 +36,7 @@
|
||||
#include "osdep/timer.h"
|
||||
#include "subopt-helper.h"
|
||||
|
||||
#include "libvo/fastmemcpy.h"
|
||||
#include "libavutil/fifo.h"
|
||||
|
||||
#include <jack/jack.h>
|
||||
|
||||
@ -68,47 +68,10 @@ static volatile float callback_time = 0;
|
||||
#define CHUNK_SIZE (16 * 1024)
|
||||
//! number of "virtual" chunks the buffer consists of
|
||||
#define NUM_CHUNKS 8
|
||||
// This type of ring buffer may never fill up completely, at least
|
||||
// one byte must always be unused.
|
||||
// For performance reasons (alignment etc.) one whole chunk always stays
|
||||
// empty, not only one byte.
|
||||
#define BUFFSIZE ((NUM_CHUNKS + 1) * CHUNK_SIZE)
|
||||
#define BUFFSIZE (NUM_CHUNKS * CHUNK_SIZE)
|
||||
|
||||
//! buffer for audio data
|
||||
static unsigned char *buffer = NULL;
|
||||
|
||||
//! buffer read position, may only be modified by playback thread or while it is stopped
|
||||
static volatile int read_pos;
|
||||
//! buffer write position, may only be modified by MPlayer's thread
|
||||
static volatile int write_pos;
|
||||
|
||||
/**
|
||||
* \brief get the number of free bytes in the buffer
|
||||
* \return number of free bytes in buffer
|
||||
*
|
||||
* may only be called by MPlayer's thread
|
||||
* return value may change between immediately following two calls,
|
||||
* and the real number of free bytes might be larger!
|
||||
*/
|
||||
static int buf_free(void) {
|
||||
int free = read_pos - write_pos - CHUNK_SIZE;
|
||||
if (free < 0) free += BUFFSIZE;
|
||||
return free;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief get amount of data available in the buffer
|
||||
* \return number of bytes available in buffer
|
||||
*
|
||||
* may only be called by the playback thread
|
||||
* return value may change between immediately following two calls,
|
||||
* and the real number of buffered bytes might be larger!
|
||||
*/
|
||||
static int buf_used(void) {
|
||||
int used = write_pos - read_pos;
|
||||
if (used < 0) used += BUFFSIZE;
|
||||
return used;
|
||||
}
|
||||
static AVFifoBuffer *buffer;
|
||||
|
||||
/**
|
||||
* \brief insert len bytes into buffer
|
||||
@ -119,22 +82,34 @@ static int buf_used(void) {
|
||||
* If there is not enough room, the buffer is filled up
|
||||
*/
|
||||
static int write_buffer(unsigned char* data, int len) {
|
||||
int first_len = BUFFSIZE - write_pos;
|
||||
int free = buf_free();
|
||||
int free = BUFFSIZE - av_fifo_size(buffer);
|
||||
if (len > free) len = free;
|
||||
if (first_len > len) first_len = len;
|
||||
// till end of buffer
|
||||
fast_memcpy (&buffer[write_pos], data, first_len);
|
||||
if (len > first_len) { // we have to wrap around
|
||||
// remaining part from beginning of buffer
|
||||
fast_memcpy (buffer, &data[first_len], len - first_len);
|
||||
}
|
||||
write_pos = (write_pos + len) % BUFFSIZE;
|
||||
return len;
|
||||
return av_fifo_generic_write(buffer, data, len, NULL);
|
||||
}
|
||||
|
||||
static void silence(float **bufs, int cnt, int num_bufs);
|
||||
|
||||
struct deinterleave {
|
||||
float **bufs;
|
||||
int num_bufs;
|
||||
int cur_buf;
|
||||
int pos;
|
||||
};
|
||||
|
||||
static void deinterleave(void *info, void *src, int len) {
|
||||
struct deinterleave *di = info;
|
||||
float *s = src;
|
||||
int i;
|
||||
len /= sizeof(float);
|
||||
for (i = 0; i < len; i++) {
|
||||
di->bufs[di->cur_buf++][di->pos] = s[i];
|
||||
if (di->cur_buf >= di->num_bufs) {
|
||||
di->cur_buf = 0;
|
||||
di->pos++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief read data from buffer and splitting it into channels
|
||||
* \param bufs num_bufs float buffers, each will contain the data of one channel
|
||||
@ -149,18 +124,13 @@ static void silence(float **bufs, int cnt, int num_bufs);
|
||||
* with silence.
|
||||
*/
|
||||
static int read_buffer(float **bufs, int cnt, int num_bufs) {
|
||||
int buffered = buf_used();
|
||||
int i, j;
|
||||
struct deinterleave di = {bufs, num_bufs, 0, 0};
|
||||
int buffered = av_fifo_size(buffer);
|
||||
if (cnt * sizeof(float) * num_bufs > buffered) {
|
||||
silence(bufs, cnt, num_bufs);
|
||||
cnt = buffered / sizeof(float) / num_bufs;
|
||||
}
|
||||
for (i = 0; i < cnt; i++) {
|
||||
for (j = 0; j < num_bufs; j++) {
|
||||
bufs[j][i] = *(float *)&buffer[read_pos];
|
||||
read_pos = (read_pos + sizeof(float)) % BUFFSIZE;
|
||||
}
|
||||
}
|
||||
av_fifo_generic_read(buffer, &di, cnt * num_bufs * sizeof(float), deinterleave);
|
||||
return cnt;
|
||||
}
|
||||
|
||||
@ -268,7 +238,7 @@ static int init(int rate, int channels, int format, int flags) {
|
||||
mp_msg(MSGT_AO, MSGL_FATAL, "[JACK] cannot open server\n");
|
||||
goto err_out;
|
||||
}
|
||||
reset();
|
||||
buffer = av_fifo_alloc(BUFFSIZE);
|
||||
jack_set_process_callback(client, outputaudio, 0);
|
||||
|
||||
// list matching ports
|
||||
@ -308,7 +278,6 @@ static int init(int rate, int channels, int format, int flags) {
|
||||
jack_latency = (float)(jack_port_get_total_latency(client, ports[0]) +
|
||||
jack_get_buffer_size(client)) / (float)rate;
|
||||
callback_interval = 0;
|
||||
buffer = malloc(BUFFSIZE);
|
||||
|
||||
ao_data.channels = channels;
|
||||
ao_data.samplerate = rate;
|
||||
@ -327,7 +296,7 @@ err_out:
|
||||
free(client_name);
|
||||
if (client)
|
||||
jack_client_close(client);
|
||||
free(buffer);
|
||||
av_fifo_free(buffer);
|
||||
buffer = NULL;
|
||||
return 0;
|
||||
}
|
||||
@ -340,7 +309,7 @@ static void uninit(int immed) {
|
||||
reset();
|
||||
usec_sleep(100 * 1000);
|
||||
jack_client_close(client);
|
||||
free(buffer);
|
||||
av_fifo_free(buffer);
|
||||
buffer = NULL;
|
||||
}
|
||||
|
||||
@ -349,8 +318,7 @@ static void uninit(int immed) {
|
||||
*/
|
||||
static void reset(void) {
|
||||
paused = 1;
|
||||
read_pos = 0;
|
||||
write_pos = 0;
|
||||
av_fifo_reset(buffer);
|
||||
paused = 0;
|
||||
}
|
||||
|
||||
@ -369,7 +337,7 @@ static void audio_resume(void) {
|
||||
}
|
||||
|
||||
static int get_space(void) {
|
||||
return buf_free();
|
||||
return BUFFSIZE - av_fifo_size(buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -383,7 +351,7 @@ static int play(void *data, int len, int flags) {
|
||||
}
|
||||
|
||||
static float get_delay(void) {
|
||||
int buffered = BUFFSIZE - CHUNK_SIZE - buf_free(); // could be less
|
||||
int buffered = av_fifo_size(buffer); // could be less
|
||||
float in_jack = jack_latency;
|
||||
if (estimate && callback_interval > 0) {
|
||||
float elapsed = (float)GetTimer() / 1000000.0 - callback_time;
|
||||
|
@ -3,8 +3,6 @@
|
||||
*
|
||||
* Copyleft 2001 by Felix Bünemann (atmosfear@users.sf.net)
|
||||
*
|
||||
* Thanks to Arpi for nice ringbuffer-code!
|
||||
*
|
||||
* This file is part of MPlayer.
|
||||
*
|
||||
* MPlayer is free software; you can redistribute it and/or modify
|
||||
@ -36,7 +34,7 @@
|
||||
#include <SDL.h>
|
||||
#include "osdep/timer.h"
|
||||
|
||||
#include "libvo/fastmemcpy.h"
|
||||
#include "libavutil/fifo.h"
|
||||
|
||||
static const ao_info_t info =
|
||||
{
|
||||
@ -60,76 +58,34 @@ LIBAO_EXTERN(sdl)
|
||||
|
||||
#define CHUNK_SIZE 4096
|
||||
#define NUM_CHUNKS 8
|
||||
// This type of ring buffer may never fill up completely, at least
|
||||
// one byte must always be unused.
|
||||
// For performance reasons (alignment etc.) one whole chunk always stays
|
||||
// empty, not only one byte.
|
||||
#define BUFFSIZE ((NUM_CHUNKS + 1) * CHUNK_SIZE)
|
||||
#define BUFFSIZE (NUM_CHUNKS * CHUNK_SIZE)
|
||||
|
||||
static unsigned char *buffer;
|
||||
static AVFifoBuffer *buffer;
|
||||
|
||||
// may only be modified by SDL's playback thread or while it is stopped
|
||||
static volatile int read_pos;
|
||||
// may only be modified by mplayer's thread
|
||||
static volatile int write_pos;
|
||||
#ifdef USE_SDL_INTERNAL_MIXER
|
||||
static unsigned char volume=SDL_MIX_MAXVOLUME;
|
||||
#endif
|
||||
|
||||
// may only be called by mplayer's thread
|
||||
// return value may change between immediately following two calls,
|
||||
// and the real number of free bytes might be larger!
|
||||
static int buf_free(void) {
|
||||
int free = read_pos - write_pos - CHUNK_SIZE;
|
||||
if (free < 0) free += BUFFSIZE;
|
||||
return free;
|
||||
}
|
||||
|
||||
// may only be called by SDL's playback thread
|
||||
// return value may change between immediately following two calls,
|
||||
// and the real number of buffered bytes might be larger!
|
||||
static int buf_used(void) {
|
||||
int used = write_pos - read_pos;
|
||||
if (used < 0) used += BUFFSIZE;
|
||||
return used;
|
||||
}
|
||||
|
||||
static int write_buffer(unsigned char* data,int len){
|
||||
int first_len = BUFFSIZE - write_pos;
|
||||
int free = buf_free();
|
||||
int free = BUFFSIZE - av_fifo_size(buffer);
|
||||
if (len > free) len = free;
|
||||
if (first_len > len) first_len = len;
|
||||
// till end of buffer
|
||||
fast_memcpy (&buffer[write_pos], data, first_len);
|
||||
if (len > first_len) { // we have to wrap around
|
||||
// remaining part from beginning of buffer
|
||||
fast_memcpy (buffer, &data[first_len], len - first_len);
|
||||
}
|
||||
write_pos = (write_pos + len) % BUFFSIZE;
|
||||
return len;
|
||||
return av_fifo_generic_write(buffer, data, len, NULL);
|
||||
}
|
||||
|
||||
#ifdef USE_SDL_INTERNAL_MIXER
|
||||
static void mix_audio(void *dst, void *src, int len) {
|
||||
SDL_MixAudio(dst, src, len, volume);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int read_buffer(unsigned char* data,int len){
|
||||
int first_len = BUFFSIZE - read_pos;
|
||||
int buffered = buf_used();
|
||||
int buffered = av_fifo_size(buffer);
|
||||
if (len > buffered) len = buffered;
|
||||
if (first_len > len) first_len = len;
|
||||
// till end of buffer
|
||||
#ifdef USE_SDL_INTERNAL_MIXER
|
||||
SDL_MixAudio (data, &buffer[read_pos], first_len, volume);
|
||||
return av_fifo_generic_read(buffer, data, len, mix_audio);
|
||||
#else
|
||||
fast_memcpy (data, &buffer[read_pos], first_len);
|
||||
return av_fifo_generic_read(buffer, data, len, NULL);
|
||||
#endif
|
||||
if (len > first_len) { // we have to wrap around
|
||||
// remaining part from beginning of buffer
|
||||
#ifdef USE_SDL_INTERNAL_MIXER
|
||||
SDL_MixAudio (&data[first_len], buffer, len - first_len, volume);
|
||||
#else
|
||||
fast_memcpy (&data[first_len], buffer, len - first_len);
|
||||
#endif
|
||||
}
|
||||
read_pos = (read_pos + len) % BUFFSIZE;
|
||||
return len;
|
||||
}
|
||||
|
||||
// end ring buffer stuff
|
||||
@ -175,7 +131,7 @@ static int init(int rate,int channels,int format,int flags){
|
||||
SDL_AudioSpec aspec, obtained;
|
||||
|
||||
/* Allocate ring-buffer memory */
|
||||
buffer = (unsigned char *) malloc(BUFFSIZE);
|
||||
buffer = av_fifo_alloc(BUFFSIZE);
|
||||
|
||||
mp_msg(MSGT_AO,MSGL_INFO,MSGTR_AO_SDL_INFO, rate, (channels > 1) ? "Stereo" : "Mono", af_fmt2str_short(format));
|
||||
|
||||
@ -278,7 +234,6 @@ void callback(void *userdata, Uint8 *stream, int len); userdata is the pointer s
|
||||
ao_data.buffersize=obtained.size;
|
||||
ao_data.outburst = CHUNK_SIZE;
|
||||
|
||||
reset();
|
||||
/* unsilence audio, if callback is ready */
|
||||
SDL_PauseAudio(0);
|
||||
|
||||
@ -292,6 +247,7 @@ static void uninit(int immed){
|
||||
usec_sleep(get_delay() * 1000 * 1000);
|
||||
SDL_CloseAudio();
|
||||
SDL_QuitSubSystem(SDL_INIT_AUDIO);
|
||||
av_fifo_free(buffer);
|
||||
}
|
||||
|
||||
// stop playing and empty buffers (for seeking/pause)
|
||||
@ -301,8 +257,7 @@ static void reset(void){
|
||||
|
||||
SDL_PauseAudio(1);
|
||||
/* Reset ring-buffer state */
|
||||
read_pos = 0;
|
||||
write_pos = 0;
|
||||
av_fifo_reset(buffer);
|
||||
SDL_PauseAudio(0);
|
||||
}
|
||||
|
||||
@ -325,7 +280,7 @@ static void audio_resume(void)
|
||||
|
||||
// return: how many bytes can be played without blocking
|
||||
static int get_space(void){
|
||||
return buf_free();
|
||||
return BUFFSIZE - av_fifo_size(buffer);
|
||||
}
|
||||
|
||||
// plays 'len' bytes of 'data'
|
||||
@ -352,7 +307,7 @@ static int play(void* data,int len,int flags){
|
||||
|
||||
// return: delay in seconds between first and last sample in buffer
|
||||
static float get_delay(void){
|
||||
int buffered = BUFFSIZE - CHUNK_SIZE - buf_free(); // could be less
|
||||
int buffered = av_fifo_size(buffer); // could be less
|
||||
return (float)(buffered + ao_data.buffersize)/(float)ao_data.bps;
|
||||
}
|
||||
|
||||
|
@ -243,8 +243,9 @@ static void uninit(int immed)
|
||||
{
|
||||
if(!immed)
|
||||
usec_sleep(get_delay() * 1000 * 1000);
|
||||
else
|
||||
waveOutReset(hWaveOut);
|
||||
waveOutClose(hWaveOut);
|
||||
while (waveOutClose(hWaveOut) == WAVERR_STILLPLAYING) usec_sleep(0);
|
||||
mp_msg(MSGT_AO, MSGL_V,"waveOut device closed\n");
|
||||
free(waveBlocks);
|
||||
mp_msg(MSGT_AO, MSGL_V,"buffer memory freed\n");
|
||||
|
@ -1128,6 +1128,7 @@ long long ass_step_sub(ass_track_t* track, long long now, int movement) {
|
||||
ass_track_t* ass_new_track(ass_library_t* library) {
|
||||
ass_track_t* track = calloc(1, sizeof(ass_track_t));
|
||||
track->library = library;
|
||||
track->ScaledBorderAndShadow = 1;
|
||||
track->parser_priv = calloc(1, sizeof(parser_priv_t));
|
||||
return track;
|
||||
}
|
||||
|
@ -192,6 +192,8 @@ static int font_compare(void* key1, void* key2, size_t key_size) {
|
||||
return 0;
|
||||
if (a->italic != b->italic)
|
||||
return 0;
|
||||
if (a->treat_family_as_pattern != b->treat_family_as_pattern)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -125,7 +125,7 @@ static int add_face(void* fc_priv, ass_font_t* font, uint32_t ch)
|
||||
if (font->n_faces == ASS_FONT_MAX_FACES)
|
||||
return -1;
|
||||
|
||||
path = fontconfig_select(fc_priv, font->desc.family, font->desc.bold,
|
||||
path = fontconfig_select(fc_priv, font->desc.family, font->desc.treat_family_as_pattern, font->desc.bold,
|
||||
font->desc.italic, &index, ch);
|
||||
|
||||
mem_idx = find_font(font->library, path);
|
||||
@ -169,6 +169,7 @@ ass_font_t* ass_font_new(ass_library_t* library, FT_Library ftlibrary, void* fc_
|
||||
font.ftlibrary = ftlibrary;
|
||||
font.n_faces = 0;
|
||||
font.desc.family = strdup(desc->family);
|
||||
font.desc.treat_family_as_pattern = desc->treat_family_as_pattern;
|
||||
font.desc.bold = desc->bold;
|
||||
font.desc.italic = desc->italic;
|
||||
|
||||
|
@ -33,6 +33,7 @@ typedef struct ass_font_desc_s {
|
||||
char* family;
|
||||
unsigned bold;
|
||||
unsigned italic;
|
||||
int treat_family_as_pattern;
|
||||
} ass_font_desc_t;
|
||||
|
||||
#define ASS_FONT_MAX_FACES 10
|
||||
|
@ -66,14 +66,15 @@ struct fc_instance_s {
|
||||
* \brief Low-level font selection.
|
||||
* \param priv private data
|
||||
* \param family font family
|
||||
* \param treat_family_as_pattern treat family as fontconfig pattern
|
||||
* \param bold font weight value
|
||||
* \param italic font slant value
|
||||
* \param index out: font index inside a file
|
||||
* \param code: the character that should be present in the font, can be 0
|
||||
* \return font file path
|
||||
*/
|
||||
static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold, unsigned italic, int* index,
|
||||
uint32_t code)
|
||||
static char* _select_font(fc_instance_t* priv, const char* family, int treat_family_as_pattern,
|
||||
unsigned bold, unsigned italic, int* index, uint32_t code)
|
||||
{
|
||||
FcBool rc;
|
||||
FcResult result;
|
||||
@ -89,34 +90,40 @@ static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold
|
||||
|
||||
*index = 0;
|
||||
|
||||
pat = FcPatternCreate();
|
||||
if (treat_family_as_pattern)
|
||||
pat = FcNameParse((const FcChar8*)family);
|
||||
else
|
||||
pat = FcPatternCreate();
|
||||
|
||||
if (!pat)
|
||||
goto error;
|
||||
|
||||
FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)family);
|
||||
if (!treat_family_as_pattern) {
|
||||
FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)family);
|
||||
|
||||
// In SSA/ASS fonts are sometimes referenced by their "full name",
|
||||
// which is usually a concatenation of family name and font
|
||||
// style (ex. Ottawa Bold). Full name is available from
|
||||
// FontConfig pattern element FC_FULLNAME, but it is never
|
||||
// used for font matching.
|
||||
// Therefore, I'm removing words from the end of the name one
|
||||
// by one, and adding shortened names to the pattern. It seems
|
||||
// that the first value (full name in this case) has
|
||||
// precedence in matching.
|
||||
// An alternative approach could be to reimplement FcFontSort
|
||||
// using FC_FULLNAME instead of FC_FAMILY.
|
||||
family_cnt = 1;
|
||||
{
|
||||
char* s = strdup(family);
|
||||
char* p = s + strlen(s);
|
||||
while (--p > s)
|
||||
if (*p == ' ' || *p == '-') {
|
||||
*p = '\0';
|
||||
FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)s);
|
||||
++ family_cnt;
|
||||
}
|
||||
free(s);
|
||||
// In SSA/ASS fonts are sometimes referenced by their "full name",
|
||||
// which is usually a concatenation of family name and font
|
||||
// style (ex. Ottawa Bold). Full name is available from
|
||||
// FontConfig pattern element FC_FULLNAME, but it is never
|
||||
// used for font matching.
|
||||
// Therefore, I'm removing words from the end of the name one
|
||||
// by one, and adding shortened names to the pattern. It seems
|
||||
// that the first value (full name in this case) has
|
||||
// precedence in matching.
|
||||
// An alternative approach could be to reimplement FcFontSort
|
||||
// using FC_FULLNAME instead of FC_FAMILY.
|
||||
family_cnt = 1;
|
||||
{
|
||||
char* s = strdup(family);
|
||||
char* p = s + strlen(s);
|
||||
while (--p > s)
|
||||
if (*p == ' ' || *p == '-') {
|
||||
*p = '\0';
|
||||
FcPatternAddString(pat, FC_FAMILY, (const FcChar8*)s);
|
||||
++ family_cnt;
|
||||
}
|
||||
free(s);
|
||||
}
|
||||
}
|
||||
FcPatternAddBool(pat, FC_OUTLINE, FcTrue);
|
||||
FcPatternAddInteger(pat, FC_SLANT, italic);
|
||||
@ -182,7 +189,8 @@ static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold
|
||||
if (result != FcResultMatch)
|
||||
r_fullname = NULL;
|
||||
|
||||
if (!(r_family && strcasecmp((const char*)r_family, family) == 0) &&
|
||||
if (!treat_family_as_pattern &&
|
||||
!(r_family && strcasecmp((const char*)r_family, family) == 0) &&
|
||||
!(r_fullname && strcasecmp((const char*)r_fullname, family) == 0))
|
||||
mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_SelectedFontFamilyIsNotTheRequestedOne,
|
||||
(const char*)(r_fullname ? r_fullname : r_family), family);
|
||||
@ -219,14 +227,15 @@ static char* _select_font(fc_instance_t* priv, const char* family, unsigned bold
|
||||
* \brief Find a font. Use default family or path if necessary.
|
||||
* \param priv_ private data
|
||||
* \param family font family
|
||||
* \param treat_family_as_pattern treat family as fontconfig pattern
|
||||
* \param bold font weight value
|
||||
* \param italic font slant value
|
||||
* \param index out: font index inside a file
|
||||
* \param code: the character that should be present in the font, can be 0
|
||||
* \return font file path
|
||||
*/
|
||||
char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold, unsigned italic, int* index,
|
||||
uint32_t code)
|
||||
char* fontconfig_select(fc_instance_t* priv, const char* family, int treat_family_as_pattern,
|
||||
unsigned bold, unsigned italic, int* index, uint32_t code)
|
||||
{
|
||||
char* res = 0;
|
||||
if (!priv->config) {
|
||||
@ -234,9 +243,9 @@ char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold,
|
||||
return priv->path_default;
|
||||
}
|
||||
if (family && *family)
|
||||
res = _select_font(priv, family, bold, italic, index, code);
|
||||
res = _select_font(priv, family, treat_family_as_pattern, bold, italic, index, code);
|
||||
if (!res && priv->family_default) {
|
||||
res = _select_font(priv, priv->family_default, bold, italic, index, code);
|
||||
res = _select_font(priv, priv->family_default, 0, bold, italic, index, code);
|
||||
if (res)
|
||||
mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_UsingDefaultFontFamily,
|
||||
family, bold, italic, res, *index);
|
||||
@ -248,7 +257,7 @@ char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold,
|
||||
family, bold, italic, res, *index);
|
||||
}
|
||||
if (!res) {
|
||||
res = _select_font(priv, "Arial", bold, italic, index, code);
|
||||
res = _select_font(priv, "Arial", 0, bold, italic, index, code);
|
||||
if (res)
|
||||
mp_msg(MSGT_ASS, MSGL_WARN, MSGTR_LIBASS_UsingArialFontFamily,
|
||||
family, bold, italic, res, *index);
|
||||
@ -474,8 +483,8 @@ exit:
|
||||
|
||||
#else /* CONFIG_FONTCONFIG */
|
||||
|
||||
char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold, unsigned italic, int* index,
|
||||
uint32_t code)
|
||||
char* fontconfig_select(fc_instance_t* priv, const char* family, int treat_family_as_pattern,
|
||||
unsigned bold, unsigned italic, int* index, uint32_t code)
|
||||
{
|
||||
*index = priv->index_default;
|
||||
return priv->path_default;
|
||||
|
@ -35,7 +35,7 @@
|
||||
typedef struct fc_instance_s fc_instance_t;
|
||||
|
||||
fc_instance_t* fontconfig_init(ass_library_t* library, FT_Library ftlibrary, const char* family, const char* path, int fc);
|
||||
char* fontconfig_select(fc_instance_t* priv, const char* family, unsigned bold, unsigned italic, int* index, uint32_t code);
|
||||
char* fontconfig_select(fc_instance_t* priv, const char* family, int treat_family_as_pattern, unsigned bold, unsigned italic, int* index, uint32_t code);
|
||||
void fontconfig_done(fc_instance_t* priv);
|
||||
|
||||
#endif /* LIBASS_FONTCONFIG_H */
|
||||
|
@ -94,6 +94,7 @@ ass_track_t* ass_default_track(ass_library_t* library) {
|
||||
style = track->styles + sid;
|
||||
style->Name = strdup("Default");
|
||||
style->FontName = (font_fontconfig >= 0 && sub_font_name) ? strdup(sub_font_name) : (font_fontconfig >= 0 && font_name) ? strdup(font_name) : strdup("Sans");
|
||||
style->treat_fontname_as_pattern = 1;
|
||||
|
||||
fs = track->PlayResY * text_font_scale_factor / 100.;
|
||||
// approximate autoscale coefficients
|
||||
|
@ -184,6 +184,7 @@ typedef struct render_context_s {
|
||||
char* family;
|
||||
unsigned bold;
|
||||
unsigned italic;
|
||||
int treat_family_as_pattern;
|
||||
|
||||
} render_context_t;
|
||||
|
||||
@ -423,10 +424,12 @@ static void render_overlap(ass_image_t** last_tail, ass_image_t** tail, bitmap_h
|
||||
int ax = (*last_tail)->dst_x;
|
||||
int ay = (*last_tail)->dst_y;
|
||||
int aw = (*last_tail)->w;
|
||||
int as = (*last_tail)->stride;
|
||||
int ah = (*last_tail)->h;
|
||||
int bx = (*tail)->dst_x;
|
||||
int by = (*tail)->dst_y;
|
||||
int bw = (*tail)->w;
|
||||
int bs = (*tail)->stride;
|
||||
int bh = (*tail)->h;
|
||||
unsigned char* a;
|
||||
unsigned char* b;
|
||||
@ -434,6 +437,9 @@ static void render_overlap(ass_image_t** last_tail, ass_image_t** tail, bitmap_h
|
||||
if ((*last_tail)->bitmap == (*tail)->bitmap)
|
||||
return;
|
||||
|
||||
if ((*last_tail)->color != (*tail)->color)
|
||||
return;
|
||||
|
||||
// Calculate overlap coordinates
|
||||
left = (ax > bx) ? ax : bx;
|
||||
top = (ay > by) ? ay : by;
|
||||
@ -441,12 +447,12 @@ static void render_overlap(ass_image_t** last_tail, ass_image_t** tail, bitmap_h
|
||||
bottom = ((ay+ah) < (by+bh)) ? (ay+ah) : (by+bh);
|
||||
if ((right <= left) || (bottom <= top))
|
||||
return;
|
||||
old_left = left-(ax);
|
||||
old_top = top-(ay);
|
||||
old_left = left-ax;
|
||||
old_top = top-ay;
|
||||
w = right-left;
|
||||
h = bottom-top;
|
||||
cur_left = left-(bx);
|
||||
cur_top = top-(by);
|
||||
cur_left = left-bx;
|
||||
cur_top = top-by;
|
||||
|
||||
// Query cache
|
||||
memcpy(&hk.a, last_hash, sizeof(*last_hash));
|
||||
@ -469,16 +475,16 @@ static void render_overlap(ass_image_t** last_tail, ass_image_t** tail, bitmap_h
|
||||
// Allocate new bitmaps and copy over data
|
||||
a = (*last_tail)->bitmap;
|
||||
b = (*tail)->bitmap;
|
||||
(*last_tail)->bitmap = malloc(aw*ah);
|
||||
(*tail)->bitmap = malloc(bw*bh);
|
||||
memcpy((*last_tail)->bitmap, a, aw*ah);
|
||||
memcpy((*tail)->bitmap, b, bw*bh);
|
||||
(*last_tail)->bitmap = malloc(as*ah);
|
||||
(*tail)->bitmap = malloc(bs*bh);
|
||||
memcpy((*last_tail)->bitmap, a, as*ah);
|
||||
memcpy((*tail)->bitmap, b, bs*bh);
|
||||
|
||||
// Composite overlapping area
|
||||
for (y=0; y<h; y++)
|
||||
for (x=0; x<w; x++) {
|
||||
opos = (old_top+y)*(aw) + (old_left+x);
|
||||
cpos = (cur_top+y)*(bw) + (cur_left+x);
|
||||
opos = (old_top+y)*(as) + (old_left+x);
|
||||
cpos = (cur_top+y)*(bs) + (cur_left+x);
|
||||
m = (a[opos] > b[cpos]) ? a[opos] : b[cpos];
|
||||
(*last_tail)->bitmap[opos] = 0;
|
||||
(*tail)->bitmap[cpos] = m;
|
||||
@ -671,6 +677,7 @@ static void update_font(void)
|
||||
ass_renderer_t* priv = frame_context.ass_priv;
|
||||
ass_font_desc_t desc;
|
||||
desc.family = strdup(render_context.family);
|
||||
desc.treat_family_as_pattern = render_context.treat_family_as_pattern;
|
||||
|
||||
val = render_context.bold;
|
||||
// 0 = normal, 1 = bold, >1 = exact weight
|
||||
@ -1062,10 +1069,12 @@ static char* parse_tag(char* p, double pwr) {
|
||||
skip(')');
|
||||
mp_msg(MSGT_ASS, MSGL_DBG2, "org(%d, %d)\n", v1, v2);
|
||||
// render_context.evt_type = EVENT_POSITIONED;
|
||||
render_context.org_x = v1;
|
||||
render_context.org_y = v2;
|
||||
render_context.have_origin = 1;
|
||||
render_context.detect_collisions = 0;
|
||||
if (!render_context.have_origin) {
|
||||
render_context.org_x = v1;
|
||||
render_context.org_y = v2;
|
||||
render_context.have_origin = 1;
|
||||
render_context.detect_collisions = 0;
|
||||
}
|
||||
} else if (mystrcmp(&p, "t")) {
|
||||
double v[3];
|
||||
int v1, v2;
|
||||
@ -1355,6 +1364,7 @@ static void reset_render_context(void)
|
||||
if (render_context.family)
|
||||
free(render_context.family);
|
||||
render_context.family = strdup(render_context.style->FontName);
|
||||
render_context.treat_family_as_pattern = render_context.style->treat_fontname_as_pattern;
|
||||
render_context.bold = render_context.style->Bold;
|
||||
render_context.italic = render_context.style->Italic;
|
||||
update_font();
|
||||
@ -1797,75 +1807,46 @@ static void get_base_point(FT_BBox bbox, int alignment, int* bx, int* by)
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Multiply 4-vector by 4-matrix
|
||||
* \param a 4-vector
|
||||
* \param m 4-matrix]
|
||||
* \param b out: 4-vector
|
||||
* Calculates a * m and stores result in b
|
||||
* \brief Apply transformation to outline points of a glyph
|
||||
* Applies rotations given by frx, fry and frz and projects the points back
|
||||
* onto the screen plane.
|
||||
*/
|
||||
static inline void transform_point_3d(double *a, double *m, double *b)
|
||||
{
|
||||
b[0] = a[0] * m[0] + a[1] * m[4] + a[2] * m[8] + a[3] * m[12];
|
||||
b[1] = a[0] * m[1] + a[1] * m[5] + a[2] * m[9] + a[3] * m[13];
|
||||
b[2] = a[0] * m[2] + a[1] * m[6] + a[2] * m[10] + a[3] * m[14];
|
||||
b[3] = a[0] * m[3] + a[1] * m[7] + a[2] * m[11] + a[3] * m[15];
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Apply 3d transformation to a vector
|
||||
* \param v FreeType vector (2d)
|
||||
* \param m 4-matrix
|
||||
* Transforms v by m, projects the result back to the screen plane
|
||||
* Result is returned in v.
|
||||
*/
|
||||
static inline void transform_vector_3d(FT_Vector* v, double *m) {
|
||||
const double camera = 2500 * frame_context.border_scale; // camera distance
|
||||
const double cutoff_z = 10.;
|
||||
double a[4], b[4];
|
||||
a[0] = d6_to_double(v->x);
|
||||
a[1] = d6_to_double(v->y);
|
||||
a[2] = 0.;
|
||||
a[3] = 1.;
|
||||
transform_point_3d(a, m, b);
|
||||
/* Apply perspective projection with the following matrix:
|
||||
2500 0 0 0
|
||||
0 2500 0 0
|
||||
0 0 0 0
|
||||
0 0 8 2500
|
||||
where 2500 is camera distance, 8 - z-axis scale.
|
||||
Camera is always located in (org_x, org_y, -2500). This means
|
||||
that different subtitle events can be displayed at the same time
|
||||
using different cameras. */
|
||||
b[0] *= camera;
|
||||
b[1] *= camera;
|
||||
b[3] = 8 * b[2] + camera;
|
||||
if (b[3] < cutoff_z)
|
||||
b[3] = cutoff_z;
|
||||
v->x = double_to_d6(b[0] / b[3]);
|
||||
v->y = double_to_d6(b[1] / b[3]);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Apply 3d transformation to a glyph
|
||||
* \param glyph FreeType glyph
|
||||
* \param m 4-matrix
|
||||
* Transforms glyph by m, projects the result back to the screen plane
|
||||
* Result is returned in glyph.
|
||||
*/
|
||||
static inline void transform_glyph_3d(FT_Glyph glyph, double *m, FT_Vector shift) {
|
||||
int i;
|
||||
FT_Outline* outline = &((FT_OutlineGlyph)glyph)->outline;
|
||||
static void transform_3d_points(FT_Vector shift, FT_Glyph glyph, double frx, double fry, double frz) {
|
||||
double sx = sin(frx);
|
||||
double sy = sin(fry);
|
||||
double sz = sin(frz);
|
||||
double cx = cos(frx);
|
||||
double cy = cos(fry);
|
||||
double cz = cos(frz);
|
||||
FT_Outline *outline = &((FT_OutlineGlyph) glyph)->outline;
|
||||
FT_Vector* p = outline->points;
|
||||
double x, y, z, xx, yy, zz;
|
||||
int i;
|
||||
|
||||
for (i=0; i<outline->n_points; i++) {
|
||||
p[i].x += shift.x;
|
||||
p[i].y += shift.y;
|
||||
transform_vector_3d(p + i, m);
|
||||
p[i].x -= shift.x;
|
||||
p[i].y -= shift.y;
|
||||
}
|
||||
x = p[i].x + shift.x;
|
||||
y = p[i].y + shift.y;
|
||||
z = 0.;
|
||||
|
||||
//transform_vector_3d(&glyph->advance, m);
|
||||
xx = x*cz + y*sz;
|
||||
yy = -(x*sz - y*cz);
|
||||
zz = z;
|
||||
|
||||
x = xx;
|
||||
y = yy*cx + zz*sx;
|
||||
z = yy*sx - zz*cx;
|
||||
|
||||
xx = x*cy + z*sy;
|
||||
yy = y;
|
||||
zz = x*sy - z*cy;
|
||||
|
||||
zz = FFMAX(zz, -19000);
|
||||
|
||||
x = (xx * 20000) / (zz + 20000);
|
||||
y = (yy * 20000) / (zz + 20000);
|
||||
p[i].x = x - shift.x + 0.5;
|
||||
p[i].y = y - shift.y + 0.5;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1880,28 +1861,18 @@ static inline void transform_glyph_3d(FT_Glyph glyph, double *m, FT_Vector shift
|
||||
*/
|
||||
static void transform_3d(FT_Vector shift, FT_Glyph* glyph, FT_Glyph* glyph2, double frx, double fry, double frz)
|
||||
{
|
||||
fry = - fry; // FreeType's y axis goes in the opposite direction
|
||||
frx = - frx;
|
||||
frz = - frz;
|
||||
if (frx != 0. || fry != 0. || frz != 0.) {
|
||||
double m[16];
|
||||
double sx = sin(frx);
|
||||
double sy = sin(fry);
|
||||
double sz = sin(frz);
|
||||
double cx = cos(frx);
|
||||
double cy = cos(fry);
|
||||
double cz = cos(frz);
|
||||
m[0] = cy * cz; m[1] = cy*sz; m[2] = -sy; m[3] = 0.0;
|
||||
m[4] = -cx*sz + sx*sy*cz; m[5] = cx*cz + sx*sy*sz; m[6] = sx*cy; m[7] = 0.0;
|
||||
m[8] = sx*sz + cx*sy*cz; m[9] = -sx*cz + cx*sy*sz; m[10] = cx*cy; m[11] = 0.0;
|
||||
m[12] = 0.0; m[13] = 0.0; m[14] = 0.0; m[15] = 1.0;
|
||||
|
||||
if (glyph && *glyph)
|
||||
transform_glyph_3d(*glyph, m, shift);
|
||||
transform_3d_points(shift, *glyph, frx, fry, frz);
|
||||
|
||||
if (glyph2 && *glyph2)
|
||||
transform_glyph_3d(*glyph2, m, shift);
|
||||
transform_3d_points(shift, *glyph2, frx, fry, frz);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Main ass rendering function, glues everything together
|
||||
* \param event event to render
|
||||
@ -2145,11 +2116,11 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
|
||||
}
|
||||
|
||||
// fix clip coordinates (they depend on alignment)
|
||||
render_context.clip_x0 = x2scr(render_context.clip_x0);
|
||||
render_context.clip_x1 = x2scr(render_context.clip_x1);
|
||||
if (render_context.evt_type == EVENT_NORMAL ||
|
||||
render_context.evt_type == EVENT_HSCROLL ||
|
||||
render_context.evt_type == EVENT_VSCROLL) {
|
||||
render_context.clip_x0 = x2scr(render_context.clip_x0);
|
||||
render_context.clip_x1 = x2scr(render_context.clip_x1);
|
||||
if (valign == VALIGN_TOP) {
|
||||
render_context.clip_y0 = y2scr_top(render_context.clip_y0);
|
||||
render_context.clip_y1 = y2scr_top(render_context.clip_y1);
|
||||
@ -2161,8 +2132,10 @@ static int ass_render_event(ass_event_t* event, event_images_t* event_images)
|
||||
render_context.clip_y1 = y2scr_sub(render_context.clip_y1);
|
||||
}
|
||||
} else if (render_context.evt_type == EVENT_POSITIONED) {
|
||||
render_context.clip_y0 = y2scr(render_context.clip_y0);
|
||||
render_context.clip_y1 = y2scr(render_context.clip_y1);
|
||||
render_context.clip_x0 = x2scr_pos(render_context.clip_x0);
|
||||
render_context.clip_x1 = x2scr_pos(render_context.clip_x1);
|
||||
render_context.clip_y0 = y2scr_pos(render_context.clip_y0);
|
||||
render_context.clip_y1 = y2scr_pos(render_context.clip_y1);
|
||||
}
|
||||
|
||||
// calculate rotation parameters
|
||||
|
@ -58,6 +58,7 @@ typedef struct ass_style_s {
|
||||
int MarginV;
|
||||
// int AlphaLevel;
|
||||
int Encoding;
|
||||
int treat_fontname_as_pattern;
|
||||
} ass_style_t;
|
||||
|
||||
typedef struct render_priv_s render_priv_t;
|
||||
|
@ -1,114 +0,0 @@
|
||||
/*
|
||||
* NuppelVideo 0.05 file parser
|
||||
* for MPlayer
|
||||
* by Panagiotis Issaris <takis@lumumba.luc.ac.be>
|
||||
*
|
||||
* Reworked by alex
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "mp_msg.h"
|
||||
#include "mpbswap.h"
|
||||
|
||||
#include "libvo/fastmemcpy.h"
|
||||
|
||||
#include "libmpdemux/nuppelvideo.h"
|
||||
#include "rtjpegn.h"
|
||||
#include "libavutil/lzo.h"
|
||||
|
||||
#define KEEP_BUFFER
|
||||
|
||||
void decode_nuv( unsigned char *encoded, int encoded_size,
|
||||
unsigned char *decoded, int width, int height)
|
||||
{
|
||||
int r;
|
||||
unsigned int out_len = width * height + ( width * height ) / 2;
|
||||
struct rtframeheader *encodedh = ( struct rtframeheader* ) encoded;
|
||||
static unsigned char *buffer = 0; /* for RTJpeg with LZO decompress */
|
||||
#ifdef KEEP_BUFFER
|
||||
static unsigned char *previous_buffer = 0; /* to support Last-frame-copy */
|
||||
#endif
|
||||
|
||||
// printf("frametype: %c, comtype: %c, encoded_size: %d, width: %d, height: %d\n",
|
||||
// encodedh->frametype, encodedh->comptype, encoded_size, width, height);
|
||||
|
||||
le2me_rtframeheader(encodedh);
|
||||
switch(encodedh->frametype)
|
||||
{
|
||||
case 'D': /* additional data for compressors */
|
||||
{
|
||||
/* tables are in encoded */
|
||||
if (encodedh->comptype == 'R')
|
||||
{
|
||||
RTjpeg_init_decompress ( (unsigned long *)(encoded+12), width, height );
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "Found RTjpeg tables (size: %d, width: %d, height: %d)\n",
|
||||
encoded_size-12, width, height);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'V':
|
||||
{
|
||||
int in_len = encodedh->packetlength;
|
||||
#ifdef KEEP_BUFFER
|
||||
if (!previous_buffer)
|
||||
previous_buffer = ( unsigned char * ) malloc ( out_len + AV_LZO_OUTPUT_PADDING );
|
||||
#endif
|
||||
|
||||
switch(encodedh->comptype)
|
||||
{
|
||||
case '0': /* raw YUV420 */
|
||||
fast_memcpy(decoded, encoded + 12, out_len);
|
||||
break;
|
||||
case '1': /* RTJpeg */
|
||||
RTjpeg_decompressYUV420 ( ( __s8 * ) encoded + 12, decoded );
|
||||
break;
|
||||
case '2': /* RTJpeg with LZO */
|
||||
if (!buffer)
|
||||
buffer = ( unsigned char * ) malloc ( out_len + AV_LZO_OUTPUT_PADDING );
|
||||
if (!buffer)
|
||||
{
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Nuppelvideo: error decompressing\n");
|
||||
break;
|
||||
}
|
||||
r = av_lzo1x_decode ( buffer, &out_len, encoded + 12, &in_len );
|
||||
if ( r )
|
||||
{
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Nuppelvideo: error decompressing\n");
|
||||
break;
|
||||
}
|
||||
RTjpeg_decompressYUV420 ( ( __s8 * ) buffer, decoded );
|
||||
break;
|
||||
case '3': /* raw YUV420 with LZO */
|
||||
r = av_lzo1x_decode ( decoded, &out_len, encoded + 12, &in_len );
|
||||
if ( r )
|
||||
{
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Nuppelvideo: error decompressing\n");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 'N': /* black frame */
|
||||
memset ( decoded, 0, width * height );
|
||||
memset ( decoded + width * height, 127, width * height / 2);
|
||||
break;
|
||||
case 'L': /* copy last frame */
|
||||
#ifdef KEEP_BUFFER
|
||||
fast_memcpy ( decoded, previous_buffer, width*height*3/2);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
#ifdef KEEP_BUFFER
|
||||
fast_memcpy(previous_buffer, decoded, width*height*3/2);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
default:
|
||||
mp_msg(MSGT_DECVIDEO, MSGL_V, "Nuppelvideo: unknwon frametype: %c\n",
|
||||
encodedh->frametype);
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
@ -35,27 +35,10 @@
|
||||
#define __s32 int32_t
|
||||
#define __s64 int64_t
|
||||
|
||||
extern void RTjpeg_init_Q(__u8 Q);
|
||||
extern void RTjpeg_init_compress(__u32 *buf, int width, int height, __u8 Q);
|
||||
extern void RTjpeg_init_decompress(__u32 *buf, int width, int height);
|
||||
extern int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp);
|
||||
extern int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp);
|
||||
extern void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp);
|
||||
extern void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp);
|
||||
extern int RTjpeg_compress8(__s8 *sp, unsigned char *bp);
|
||||
extern void RTjpeg_decompress8(__s8 *sp, __u8 *bp);
|
||||
void RTjpeg_init_compress(__u32 *buf, int width, int height, __u8 Q);
|
||||
int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp);
|
||||
|
||||
extern void RTjpeg_init_mcompress(void);
|
||||
extern int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask);
|
||||
extern int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask);
|
||||
extern int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask);
|
||||
extern void RTjpeg_set_test(int i);
|
||||
|
||||
extern void RTjpeg_yuv420rgb(__u8 *buf, __u8 *rgb, int stride);
|
||||
extern void RTjpeg_yuv422rgb(__u8 *buf, __u8 *rgb, int stride);
|
||||
extern void RTjpeg_yuvrgb8(__u8 *buf, __u8 *rgb, int stride);
|
||||
extern void RTjpeg_yuvrgb16(__u8 *buf, __u8 *rgb, int stride);
|
||||
extern void RTjpeg_yuvrgb24(__u8 *buf, __u8 *rgb, int stride);
|
||||
extern void RTjpeg_yuvrgb32(__u8 *buf, __u8 *rgb, int stride);
|
||||
void RTjpeg_init_mcompress(void);
|
||||
int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask);
|
||||
|
||||
#endif /* MPLAYER_RTJPEGN_H */
|
||||
|
@ -29,7 +29,6 @@ extern const vd_functions_t mpcodecs_vd_vfwex;
|
||||
extern const vd_functions_t mpcodecs_vd_raw;
|
||||
extern const vd_functions_t mpcodecs_vd_hmblck;
|
||||
extern const vd_functions_t mpcodecs_vd_xanim;
|
||||
extern const vd_functions_t mpcodecs_vd_nuv;
|
||||
extern const vd_functions_t mpcodecs_vd_mpng;
|
||||
extern const vd_functions_t mpcodecs_vd_ijpg;
|
||||
extern const vd_functions_t mpcodecs_vd_mtga;
|
||||
@ -64,7 +63,6 @@ const vd_functions_t * const mpcodecs_vd_drivers[] = {
|
||||
&mpcodecs_vd_lzo,
|
||||
&mpcodecs_vd_raw,
|
||||
&mpcodecs_vd_hmblck,
|
||||
&mpcodecs_vd_nuv,
|
||||
#ifdef CONFIG_XANIM
|
||||
&mpcodecs_vd_xanim,
|
||||
#endif
|
||||
|
@ -1,54 +0,0 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "mp_msg.h"
|
||||
|
||||
#include "vd_internal.h"
|
||||
|
||||
static const vd_info_t info = {
|
||||
"NuppelVideo decoder",
|
||||
"nuv",
|
||||
"A'rpi",
|
||||
"Alex & Panagiotis Issaris <takis@lumumba.luc.ac.be>",
|
||||
"native codecs"
|
||||
};
|
||||
|
||||
LIBVD_EXTERN(nuv)
|
||||
|
||||
// to set/get/query special features/parameters
|
||||
static int control(sh_video_t *sh,int cmd,void* arg,...){
|
||||
return CONTROL_UNKNOWN;
|
||||
}
|
||||
|
||||
// init driver
|
||||
static int init(sh_video_t *sh){
|
||||
return mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_I420);
|
||||
}
|
||||
|
||||
// uninit driver
|
||||
static void uninit(sh_video_t *sh){
|
||||
}
|
||||
|
||||
//mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h);
|
||||
|
||||
void decode_nuv(
|
||||
unsigned char *encoded,
|
||||
int encoded_size,
|
||||
unsigned char *decoded,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
// decode a frame
|
||||
static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){
|
||||
mp_image_t* mpi;
|
||||
if(len<=0) return NULL; // skipped frame
|
||||
|
||||
mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0,
|
||||
sh->disp_w, sh->disp_h);
|
||||
if(!mpi) return NULL;
|
||||
|
||||
decode_nuv(data, len, mpi->planes[0], sh->disp_w, sh->disp_h);
|
||||
|
||||
return mpi;
|
||||
}
|
@ -19,13 +19,12 @@
|
||||
#include "mp_image.h"
|
||||
#include "vf.h"
|
||||
|
||||
#include "libmpdemux/nuppelvideo.h"
|
||||
#include "libavutil/intreadwrite.h"
|
||||
#include <lzo/lzo1x.h>
|
||||
#include "native/rtjpegn.h"
|
||||
|
||||
#define LZO_AL(size) (((size) + (sizeof(long) - 1)) / sizeof(long))
|
||||
#define LZO_IN_LEN (1024*1024L)
|
||||
#define LZO_OUT_LEN (LZO_IN_LEN + LZO_IN_LEN / 64 + 16 + 3)
|
||||
#define LZO_OUT_LEN(in) ((in) + (in) / 64 + 16 + 3)
|
||||
|
||||
//===========================================================================//
|
||||
|
||||
@ -68,6 +67,9 @@ m_option_t nuvopts_conf[]={
|
||||
//===========================================================================//
|
||||
|
||||
|
||||
#define COMPDATASIZE (128*4)
|
||||
#define FRAMEHEADERSIZE 12
|
||||
|
||||
static int config(struct vf_instance* vf,
|
||||
int width, int height, int d_width, int d_height,
|
||||
unsigned int flags, unsigned int outfmt){
|
||||
@ -75,14 +77,16 @@ static int config(struct vf_instance* vf,
|
||||
// We need a buffer wich can holda header and a whole YV12 picture
|
||||
// or a RTJpeg table
|
||||
vf->priv->buf_size = width*height*3/2+FRAMEHEADERSIZE;
|
||||
if(vf->priv->buf_size < (int)(128*sizeof(long int) + FRAMEHEADERSIZE))
|
||||
vf->priv->buf_size = 128*sizeof(long int) + FRAMEHEADERSIZE;
|
||||
if(vf->priv->buf_size < COMPDATASIZE + FRAMEHEADERSIZE)
|
||||
vf->priv->buf_size = COMPDATASIZE + FRAMEHEADERSIZE;
|
||||
|
||||
mux_v->bih->biWidth=width;
|
||||
mux_v->bih->biHeight=height;
|
||||
mux_v->bih->biSizeImage=mux_v->bih->biWidth*mux_v->bih->biHeight*(mux_v->bih->biBitCount/8);
|
||||
mux_v->aspect = (float)d_width/d_height;
|
||||
vf->priv->buffer = realloc(vf->priv->buffer,vf->priv->buf_size);
|
||||
if (vf->priv->lzo)
|
||||
vf->priv->zbuffer = realloc(vf->priv->zbuffer, FRAMEHEADERSIZE + LZO_OUT_LEN(vf->priv->buf_size));
|
||||
vf->priv->tbl_wrote = 0;
|
||||
|
||||
return 1;
|
||||
@ -99,29 +103,29 @@ static int query_format(struct vf_instance* vf, unsigned int fmt){
|
||||
}
|
||||
|
||||
static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
|
||||
struct rtframeheader* ench = (struct rtframeheader*)vf->priv->buffer;
|
||||
uint8_t *header = vf->priv->buffer;
|
||||
uint8_t* data = vf->priv->buffer + FRAMEHEADERSIZE;
|
||||
uint8_t* zdata = vf->priv->zbuffer + FRAMEHEADERSIZE;
|
||||
int len = 0, zlen = 0,r;
|
||||
int len = 0, r;
|
||||
size_t zlen = 0;
|
||||
|
||||
memset(vf->priv->buffer,0,FRAMEHEADERSIZE); // Reset the header
|
||||
memset(header, 0, FRAMEHEADERSIZE); // Reset the header
|
||||
if(vf->priv->lzo)
|
||||
memset(vf->priv->zbuffer,0,FRAMEHEADERSIZE);
|
||||
|
||||
// This has to be don here otherwise tv with sound doesn't work
|
||||
if(!vf->priv->tbl_wrote) {
|
||||
RTjpeg_init_compress((long int*)data,mpi->width,mpi->height,vf->priv->q);
|
||||
RTjpeg_init_compress((uint32_t *)data,mpi->width,mpi->height,vf->priv->q);
|
||||
RTjpeg_init_mcompress();
|
||||
|
||||
ench->frametype = 'D'; // compressor data
|
||||
ench->comptype = 'R'; // compressor data for RTjpeg
|
||||
ench->packetlength = 128*sizeof(long int);
|
||||
header[0] = 'D'; // frametype: compressor data
|
||||
header[1] = 'R'; // comptype: compressor data for RTjpeg
|
||||
AV_WL32(header + 8, COMPDATASIZE); // packetlength
|
||||
|
||||
le2me_rtframeheader(ench);
|
||||
mux_v->buffer=vf->priv->buffer;
|
||||
muxer_write_chunk(mux_v,FRAMEHEADERSIZE + 128*sizeof(long int), 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
|
||||
muxer_write_chunk(mux_v,FRAMEHEADERSIZE + COMPDATASIZE, 0x10, MP_NOPTS_VALUE, MP_NOPTS_VALUE);
|
||||
vf->priv->tbl_wrote = 1;
|
||||
memset(ench,0,FRAMEHEADERSIZE); // Reset the header
|
||||
memset(header, 0, FRAMEHEADERSIZE); // Reset the header
|
||||
}
|
||||
|
||||
// Raw picture
|
||||
@ -129,7 +133,7 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
|
||||
len = mpi->width*mpi->height*3/2;
|
||||
// Try lzo ???
|
||||
if(vf->priv->lzo) {
|
||||
r = lzo1x_1_compress(mpi->planes[0],mpi->width*mpi->height*3/2,
|
||||
r = lzo1x_1_compress(mpi->planes[0],len,
|
||||
zdata,&zlen,vf->priv->zmem);
|
||||
if(r != LZO_E_OK) {
|
||||
mp_msg(MSGT_VFILTER,MSGL_ERR,"LZO compress error\n");
|
||||
@ -139,10 +143,10 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
|
||||
|
||||
if(zlen <= 0 || zlen > len) {
|
||||
memcpy(data,mpi->planes[0],len);
|
||||
ench->comptype = '0';
|
||||
header[1] = '0'; // comptype: uncompressed
|
||||
} else { // Use lzo only if it's littler
|
||||
ench = (struct rtframeheader*)vf->priv->zbuffer;
|
||||
ench->comptype = '3';
|
||||
header = vf->priv->zbuffer;
|
||||
header[1] = '3'; //comptype: lzo
|
||||
len = zlen;
|
||||
}
|
||||
|
||||
@ -163,19 +167,18 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
|
||||
}
|
||||
|
||||
if(zlen <= 0 || zlen > len)
|
||||
ench->comptype = '1';
|
||||
header[1] = '1'; // comptype: RTjpeg
|
||||
else {
|
||||
ench = (struct rtframeheader*)vf->priv->zbuffer;
|
||||
ench->comptype = '2';
|
||||
header = vf->priv->zbuffer;
|
||||
header[1] = '2'; // comptype: RTjpeg + LZO
|
||||
len = zlen;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ench->frametype = 'V'; // video frame
|
||||
ench->packetlength = len;
|
||||
le2me_rtframeheader(ench);
|
||||
mux_v->buffer=(void*)ench;
|
||||
header[0] = 'V'; // frametype: video frame
|
||||
AV_WL32(header + 8, len); // packetlength
|
||||
mux_v->buffer = header;
|
||||
muxer_write_chunk(mux_v, len + FRAMEHEADERSIZE, 0x10, pts, pts);
|
||||
return 1;
|
||||
}
|
||||
@ -216,8 +219,7 @@ static int vf_open(vf_instance_t *vf, char* args){
|
||||
if(lzo_init() != LZO_E_OK) {
|
||||
mp_msg(MSGT_VFILTER,MSGL_WARN,"LZO init failed: no lzo compression\n");
|
||||
vf->priv->lzo = 0;
|
||||
}
|
||||
vf->priv->zbuffer = (lzo_bytep)malloc(FRAMEHEADERSIZE + LZO_OUT_LEN);
|
||||
} else
|
||||
vf->priv->zmem = malloc(sizeof(long)*LZO_AL(LZO1X_1_MEM_COMPRESS));
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ struct vf_priv_s {
|
||||
int max, last, cnt;
|
||||
};
|
||||
|
||||
#if HAVE_MMX
|
||||
#if HAVE_MMX && HAVE_EBX_AVAILABLE
|
||||
static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
|
||||
{
|
||||
volatile short out[4];
|
||||
@ -55,7 +55,7 @@ static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
|
||||
"emms \n\t"
|
||||
:
|
||||
: "S" (old), "D" (new), "a" ((long)os), "b" ((long)ns), "d" (out)
|
||||
: "memory"
|
||||
: "%ecx", "memory"
|
||||
);
|
||||
return out[0]+out[1]+out[2]+out[3];
|
||||
}
|
||||
@ -164,7 +164,7 @@ static int open(vf_instance_t *vf, char* args)
|
||||
p->frac = 0.33;
|
||||
if (args) sscanf(args, "%d:%d:%d:%f", &p->max, &p->hi, &p->lo, &p->frac);
|
||||
diff = diff_C;
|
||||
#if HAVE_MMX
|
||||
#if HAVE_MMX && HAVE_EBX_AVAILABLE
|
||||
if(gCpuCaps.hasMMX) diff = diff_MMX;
|
||||
#endif
|
||||
return 1;
|
||||
|
@ -33,7 +33,7 @@ struct vf_priv_s
|
||||
* diff_MMX and diff_C stolen from vf_decimate.c
|
||||
*/
|
||||
|
||||
#if HAVE_MMX
|
||||
#if HAVE_MMX && HAVE_EBX_AVAILABLE
|
||||
static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
|
||||
{
|
||||
volatile short out[4];
|
||||
@ -69,7 +69,7 @@ static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
|
||||
"emms \n\t"
|
||||
:
|
||||
: "S" (old), "D" (new), "a" ((long)os), "b" ((long)ns), "d" (out)
|
||||
: "memory"
|
||||
: "%ecx", "memory"
|
||||
);
|
||||
return out[0]+out[1]+out[2]+out[3];
|
||||
}
|
||||
@ -682,11 +682,10 @@ static int open(vf_instance_t *vf, char* args)
|
||||
if(!(p->history=calloc(sizeof *p->history, p->window)))
|
||||
goto nomem;
|
||||
|
||||
diff=
|
||||
#if HAVE_MMX
|
||||
gCpuCaps.hasMMX?diff_MMX:
|
||||
diff = diff_C;
|
||||
#if HAVE_MMX && HAVE_EBX_AVAILABLE
|
||||
if(gCpuCaps.hasMMX) diff = diff_MMX;
|
||||
#endif
|
||||
diff_C;
|
||||
|
||||
free(args);
|
||||
return 1;
|
||||
|
@ -2193,7 +2193,6 @@ if(trak->pos==0 && trak->stream_header_len>0){
|
||||
if (samplenr < 0)
|
||||
vo_sub = NULL;
|
||||
else if (samplenr != priv->current_sub) {
|
||||
av_unused sh_sub_t *sh = demuxer->sub->sh;
|
||||
off_t pos = trak->samples[samplenr].pos;
|
||||
int len = trak->samples[samplenr].size;
|
||||
double subpts = (double)trak->samples[samplenr].pts / (double)trak->timescale;
|
||||
|
@ -1,461 +0,0 @@
|
||||
/*
|
||||
* NuppelVideo 0.05 file parser
|
||||
* for MPlayer
|
||||
* by Panagiotis Issaris <takis@lumumba.luc.ac.be>
|
||||
*
|
||||
* Reworked by alex
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "config.h"
|
||||
#include "mp_msg.h"
|
||||
#include "help_mp.h"
|
||||
#include "stream/stream.h"
|
||||
#include "demuxer.h"
|
||||
#include "stheader.h"
|
||||
#include "nuppelvideo.h"
|
||||
|
||||
|
||||
struct nuv_signature
|
||||
{
|
||||
char finfo[12]; /* "NuppelVideo" + \0 */
|
||||
char version[5]; /* "0.05" + \0 */
|
||||
};
|
||||
|
||||
typedef struct nuv_position_t nuv_position_t;
|
||||
|
||||
struct nuv_position_t
|
||||
{
|
||||
off_t offset;
|
||||
float time;
|
||||
int frame;
|
||||
nuv_position_t* next;
|
||||
};
|
||||
|
||||
typedef struct nuv_info_t
|
||||
{
|
||||
int current_audio_frame;
|
||||
int current_video_frame;
|
||||
nuv_position_t *index_list;
|
||||
nuv_position_t *current_position;
|
||||
} nuv_priv_t;
|
||||
|
||||
/**
|
||||
* \brief find best matching bitrate (in kbps) out of a table
|
||||
* \param bitrate bitrate to find best match for
|
||||
* \return best match from table
|
||||
*/
|
||||
static int nearestBitrate(int bitrate) {
|
||||
const int rates[17] = {8000, 16000, 24000, 32000, 40000, 48000, 56000,
|
||||
64000, 80000, 96000, 112000, 128000, 160000,
|
||||
192000, 224000, 256000, 320000};
|
||||
int i;
|
||||
for (i = 0; i < 16; i++) {
|
||||
if ((rates[i] + rates[i + 1]) / 2 > bitrate)
|
||||
break;
|
||||
}
|
||||
return rates[i];
|
||||
}
|
||||
|
||||
/**
|
||||
* Seek to a position relative to the current position, indicated in time.
|
||||
*/
|
||||
static void demux_seek_nuv ( demuxer_t *demuxer, float rel_seek_secs, float audio_delay, int flags )
|
||||
{
|
||||
#define MAX_TIME 1000000
|
||||
nuv_priv_t* priv = demuxer->priv;
|
||||
struct rtframeheader rtjpeg_frameheader;
|
||||
off_t orig_pos;
|
||||
off_t curr_pos;
|
||||
float current_time = 0;
|
||||
float start_time = MAX_TIME;
|
||||
float target_time = start_time + rel_seek_secs * 1000; /* target_time, start_time are ms, rel_seek_secs s */
|
||||
|
||||
orig_pos = stream_tell ( demuxer->stream );
|
||||
|
||||
if ( rel_seek_secs > 0 )
|
||||
{
|
||||
/* Seeking forward */
|
||||
|
||||
|
||||
while(current_time < target_time )
|
||||
{
|
||||
if (stream_read ( demuxer->stream, (char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < sizeof(rtjpeg_frameheader))
|
||||
return; /* EOF */
|
||||
le2me_rtframeheader(&rtjpeg_frameheader);
|
||||
|
||||
if ( rtjpeg_frameheader.frametype == 'V' )
|
||||
{
|
||||
priv->current_position->next = (nuv_position_t*) malloc ( sizeof ( nuv_position_t ) );
|
||||
priv->current_position = priv->current_position->next;
|
||||
priv->current_position->frame = priv->current_video_frame++;
|
||||
priv->current_position->time = rtjpeg_frameheader.timecode;
|
||||
priv->current_position->offset = orig_pos;
|
||||
priv->current_position->next = NULL;
|
||||
|
||||
if ( start_time == MAX_TIME )
|
||||
{
|
||||
start_time = rtjpeg_frameheader.timecode;
|
||||
/* Recalculate target time with real start time */
|
||||
target_time = start_time + rel_seek_secs*1000;
|
||||
}
|
||||
|
||||
current_time = rtjpeg_frameheader.timecode;
|
||||
|
||||
curr_pos = stream_tell ( demuxer->stream );
|
||||
stream_seek ( demuxer->stream, curr_pos + rtjpeg_frameheader.packetlength );
|
||||
|
||||
/* Adjust current sequence pointer */
|
||||
}
|
||||
else if ( rtjpeg_frameheader.frametype == 'A' )
|
||||
{
|
||||
if ( start_time == MAX_TIME )
|
||||
{
|
||||
start_time = rtjpeg_frameheader.timecode;
|
||||
/* Recalculate target time with real start time */
|
||||
target_time = start_time + rel_seek_secs * 1000;
|
||||
}
|
||||
current_time = rtjpeg_frameheader.timecode;
|
||||
|
||||
|
||||
curr_pos = stream_tell ( demuxer->stream );
|
||||
stream_seek ( demuxer->stream, curr_pos + rtjpeg_frameheader.packetlength );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Seeking backward */
|
||||
nuv_position_t* p;
|
||||
start_time = priv->current_position->time;
|
||||
|
||||
/* Recalculate target time with real start time */
|
||||
target_time = start_time + rel_seek_secs * 1000;
|
||||
|
||||
|
||||
if(target_time < 0)
|
||||
target_time = 0;
|
||||
|
||||
// Search the target time in the index list, get the offset
|
||||
// and go to that offset.
|
||||
p = priv->index_list;
|
||||
while ( ( p->next != NULL ) && ( p->time < target_time ) )
|
||||
{
|
||||
p = p->next;
|
||||
}
|
||||
stream_seek ( demuxer->stream, p->offset );
|
||||
priv->current_video_frame = p->frame;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int demux_nuv_fill_buffer ( demuxer_t *demuxer, demux_stream_t *ds )
|
||||
{
|
||||
struct rtframeheader rtjpeg_frameheader;
|
||||
off_t orig_pos;
|
||||
nuv_priv_t* priv = demuxer->priv;
|
||||
int want_audio = (demuxer->audio)&&(demuxer->audio->id!=-2);
|
||||
|
||||
demuxer->filepos = orig_pos = stream_tell ( demuxer->stream );
|
||||
if (stream_read ( demuxer->stream, (char*)& rtjpeg_frameheader, sizeof ( rtjpeg_frameheader ) ) < sizeof(rtjpeg_frameheader))
|
||||
return 0; /* EOF */
|
||||
le2me_rtframeheader(&rtjpeg_frameheader);
|
||||
|
||||
#if 0
|
||||
printf("NUV frame: frametype: %c, comptype: %c, packetlength: %d\n",
|
||||
rtjpeg_frameheader.frametype, rtjpeg_frameheader.comptype,
|
||||
rtjpeg_frameheader.packetlength);
|
||||
#endif
|
||||
|
||||
/* Skip Seekpoint, Extended header and Sync for now */
|
||||
if ((rtjpeg_frameheader.frametype == 'R') ||
|
||||
(rtjpeg_frameheader.frametype == 'X') ||
|
||||
(rtjpeg_frameheader.frametype == 'S'))
|
||||
return 1;
|
||||
|
||||
/* Skip seektable and text (these have a payload) */
|
||||
if ((rtjpeg_frameheader.frametype == 'Q') ||
|
||||
(rtjpeg_frameheader.frametype == 'T')) {
|
||||
stream_skip(demuxer->stream, rtjpeg_frameheader.packetlength);
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (((rtjpeg_frameheader.frametype == 'D') &&
|
||||
(rtjpeg_frameheader.comptype == 'R')) ||
|
||||
(rtjpeg_frameheader.frametype == 'V'))
|
||||
{
|
||||
if ( rtjpeg_frameheader.frametype == 'V' )
|
||||
{
|
||||
priv->current_video_frame++;
|
||||
priv->current_position->next = (nuv_position_t*) malloc(sizeof(nuv_position_t));
|
||||
priv->current_position = priv->current_position->next;
|
||||
priv->current_position->frame = priv->current_video_frame;
|
||||
priv->current_position->time = rtjpeg_frameheader.timecode;
|
||||
priv->current_position->offset = orig_pos;
|
||||
priv->current_position->next = NULL;
|
||||
}
|
||||
/* put RTjpeg tables, Video info to video buffer */
|
||||
stream_seek ( demuxer->stream, orig_pos );
|
||||
ds_read_packet ( demuxer->video, demuxer->stream, rtjpeg_frameheader.packetlength + 12,
|
||||
rtjpeg_frameheader.timecode*0.001, orig_pos, 0 );
|
||||
|
||||
|
||||
} else
|
||||
if (demuxer->audio && (rtjpeg_frameheader.frametype == 'A'))
|
||||
{
|
||||
priv->current_audio_frame++;
|
||||
if (want_audio) {
|
||||
/* put Audio to audio buffer */
|
||||
ds_read_packet ( demuxer->audio, demuxer->stream,
|
||||
rtjpeg_frameheader.packetlength,
|
||||
rtjpeg_frameheader.timecode*0.001,
|
||||
orig_pos + 12, 0 );
|
||||
} else {
|
||||
/* skip audio block */
|
||||
stream_skip ( demuxer->stream,
|
||||
rtjpeg_frameheader.packetlength );
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Scan for the extended data in MythTV nuv streams */
|
||||
static int demux_xscan_nuv(demuxer_t* demuxer, int width, int height) {
|
||||
int i;
|
||||
off_t orig_pos = stream_tell(demuxer->stream);
|
||||
struct rtframeheader rtjpeg_frameheader;
|
||||
struct extendeddata ext;
|
||||
sh_video_t* sh_video = demuxer->video->sh;
|
||||
sh_audio_t* sh_audio = demuxer->audio->sh;
|
||||
|
||||
for (i = 0; i < 2; ++i) {
|
||||
if (stream_read(demuxer->stream, (char*)&rtjpeg_frameheader,
|
||||
sizeof(rtjpeg_frameheader)) < sizeof(rtjpeg_frameheader))
|
||||
goto out;
|
||||
le2me_rtframeheader(&rtjpeg_frameheader);
|
||||
|
||||
if (rtjpeg_frameheader.frametype != 'X')
|
||||
stream_skip(demuxer->stream, rtjpeg_frameheader.packetlength);
|
||||
}
|
||||
|
||||
if ( rtjpeg_frameheader.frametype != 'X' )
|
||||
goto out;
|
||||
|
||||
if (rtjpeg_frameheader.packetlength != sizeof(ext)) {
|
||||
mp_msg(MSGT_DEMUXER, MSGL_WARN,
|
||||
"NUV extended frame does not have expected length, ignoring\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (stream_read(demuxer->stream, (char*)&ext, sizeof(ext)) < sizeof(ext))
|
||||
goto out;
|
||||
le2me_extendeddata(&ext);
|
||||
|
||||
if (ext.version != 1) {
|
||||
mp_msg(MSGT_DEMUXER, MSGL_WARN,
|
||||
"NUV extended frame has unknown version number (%d), ignoring\n",
|
||||
ext.version);
|
||||
goto out;
|
||||
}
|
||||
|
||||
mp_msg(MSGT_DEMUXER, MSGL_V, "Detected MythTV stream\n");
|
||||
|
||||
/* Video parameters */
|
||||
mp_msg(MSGT_DEMUXER, MSGL_V, "FOURCC: %c%c%c%c\n",
|
||||
(ext.video_fourcc >> 24) & 0xff,
|
||||
(ext.video_fourcc >> 16) & 0xff,
|
||||
(ext.video_fourcc >> 8) & 0xff,
|
||||
(ext.video_fourcc) & 0xff);
|
||||
sh_video->format = ext.video_fourcc;
|
||||
sh_video->i_bps = ext.lavc_bitrate;
|
||||
|
||||
/* Audio parameters */
|
||||
if (ext.audio_fourcc == mmioFOURCC('L', 'A', 'M', 'E')) {
|
||||
sh_audio->format = 0x55;
|
||||
} else if (ext.audio_fourcc == mmioFOURCC('R', 'A', 'W', 'A')) {
|
||||
sh_audio->format = 0x1;
|
||||
} else {
|
||||
mp_msg(MSGT_DEMUXER, MSGL_WARN,
|
||||
"Unknown audio format 0x%x\n", ext.audio_fourcc);
|
||||
}
|
||||
|
||||
sh_audio->channels = ext.audio_channels;
|
||||
sh_audio->samplerate = ext.audio_sample_rate;
|
||||
sh_audio->i_bps = sh_audio->channels * sh_audio->samplerate *
|
||||
ext.audio_bits_per_sample;
|
||||
if (sh_audio->format != 0x1)
|
||||
sh_audio->i_bps = nearestBitrate(sh_audio->i_bps /
|
||||
ext.audio_compression_ratio);
|
||||
sh_audio->wf->wFormatTag = sh_audio->format;
|
||||
sh_audio->wf->nChannels = sh_audio->channels;
|
||||
sh_audio->wf->nSamplesPerSec = sh_audio->samplerate;
|
||||
sh_audio->wf->nAvgBytesPerSec = sh_audio->i_bps / 8;
|
||||
sh_audio->wf->nBlockAlign = sh_audio->channels * 2;
|
||||
sh_audio->wf->wBitsPerSample = ext.audio_bits_per_sample;
|
||||
sh_audio->wf->cbSize = 0;
|
||||
|
||||
mp_msg(MSGT_DEMUXER, MSGL_V,
|
||||
"channels=%d bitspersample=%d samplerate=%d compression_ratio=%d\n",
|
||||
ext.audio_channels, ext.audio_bits_per_sample,
|
||||
ext.audio_sample_rate, ext.audio_compression_ratio);
|
||||
return 1;
|
||||
out:
|
||||
stream_reset(demuxer->stream);
|
||||
stream_seek(demuxer->stream, orig_pos);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static demuxer_t* demux_open_nuv ( demuxer_t* demuxer )
|
||||
{
|
||||
sh_video_t *sh_video = NULL;
|
||||
sh_audio_t *sh_audio = NULL;
|
||||
struct rtfileheader rtjpeg_fileheader;
|
||||
nuv_priv_t* priv = (nuv_priv_t*) malloc ( sizeof ( nuv_priv_t) );
|
||||
demuxer->priv = priv;
|
||||
priv->current_audio_frame = 0;
|
||||
priv->current_video_frame = 0;
|
||||
|
||||
|
||||
/* Go to the start */
|
||||
stream_reset(demuxer->stream);
|
||||
stream_seek(demuxer->stream, 0);
|
||||
|
||||
stream_read ( demuxer->stream, (char*)& rtjpeg_fileheader, sizeof(rtjpeg_fileheader) );
|
||||
le2me_rtfileheader(&rtjpeg_fileheader);
|
||||
|
||||
/* no video */
|
||||
if (rtjpeg_fileheader.videoblocks == 0)
|
||||
{
|
||||
mp_msg(MSGT_DEMUXER, MSGL_INFO, MSGTR_MPDEMUX_NUV_NoVideoBlocksInFile);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* Create a new video stream header */
|
||||
sh_video = new_sh_video ( demuxer, 0 );
|
||||
|
||||
/* Make sure the demuxer knows about the new video stream header
|
||||
* (even though new_sh_video() ought to take care of it)
|
||||
*/
|
||||
demuxer->video->sh = sh_video;
|
||||
|
||||
/* Make sure that the video demuxer stream header knows about its
|
||||
* parent video demuxer stream (this is getting wacky), or else
|
||||
* video_read_properties() will choke
|
||||
*/
|
||||
sh_video->ds = demuxer->video;
|
||||
|
||||
/* Custom fourcc for internal MPlayer use */
|
||||
sh_video->format = mmioFOURCC('N', 'U', 'V', '1');
|
||||
|
||||
sh_video->disp_w = rtjpeg_fileheader.width;
|
||||
sh_video->disp_h = rtjpeg_fileheader.height;
|
||||
|
||||
/* NuppelVideo uses pixel aspect ratio
|
||||
here display aspect ratio is used.
|
||||
For the moment NuppelVideo only supports 1.0 thus
|
||||
1.33 == 4:3 aspect ratio.
|
||||
*/
|
||||
if(rtjpeg_fileheader.aspect == 1.0)
|
||||
sh_video->aspect = (float) 4.0f/3.0f;
|
||||
|
||||
/* Get the FPS */
|
||||
sh_video->fps = rtjpeg_fileheader.fps;
|
||||
sh_video->frametime = 1 / sh_video->fps;
|
||||
|
||||
if (rtjpeg_fileheader.audioblocks != 0)
|
||||
{
|
||||
sh_audio = new_sh_audio(demuxer, 0);
|
||||
demuxer->audio->id = 0;
|
||||
demuxer->audio->sh = sh_audio;
|
||||
sh_audio->ds = demuxer->audio;
|
||||
sh_audio->format = 0x1;
|
||||
sh_audio->channels = 2;
|
||||
sh_audio->samplerate = 44100;
|
||||
|
||||
sh_audio->wf = malloc(sizeof(WAVEFORMATEX));
|
||||
memset(sh_audio->wf, 0, sizeof(WAVEFORMATEX));
|
||||
sh_audio->wf->wFormatTag = sh_audio->format;
|
||||
sh_audio->wf->nChannels = sh_audio->channels;
|
||||
sh_audio->wf->wBitsPerSample = 16;
|
||||
sh_audio->wf->nSamplesPerSec = sh_audio->samplerate;
|
||||
sh_audio->wf->nAvgBytesPerSec = sh_audio->wf->nChannels*
|
||||
sh_audio->wf->wBitsPerSample*sh_audio->wf->nSamplesPerSec/8;
|
||||
sh_audio->wf->nBlockAlign = sh_audio->channels * 2;
|
||||
sh_audio->wf->cbSize = 0;
|
||||
}
|
||||
|
||||
/* Check for extended data (X frame) and read settings from it */
|
||||
if (!demux_xscan_nuv(demuxer, rtjpeg_fileheader.width,
|
||||
rtjpeg_fileheader.height))
|
||||
/* Otherwise assume defaults */
|
||||
mp_msg(MSGT_DEMUXER, MSGL_V, "No NUV extended frame, using defaults\n");
|
||||
|
||||
|
||||
priv->index_list = (nuv_position_t*) malloc(sizeof(nuv_position_t));
|
||||
priv->index_list->frame = 0;
|
||||
priv->index_list->time = 0;
|
||||
priv->index_list->offset = stream_tell ( demuxer->stream );
|
||||
priv->index_list->next = NULL;
|
||||
priv->current_position = priv->index_list;
|
||||
|
||||
return demuxer;
|
||||
}
|
||||
|
||||
static int nuv_check_file ( demuxer_t* demuxer )
|
||||
{
|
||||
struct nuv_signature ns;
|
||||
|
||||
/* Store original position */
|
||||
off_t orig_pos = stream_tell(demuxer->stream);
|
||||
|
||||
mp_msg ( MSGT_DEMUX, MSGL_V, "Checking for NuppelVideo\n" );
|
||||
|
||||
if(stream_read(demuxer->stream,(char*)&ns,sizeof(ns)) != sizeof(ns))
|
||||
return 0;
|
||||
|
||||
if ( strncmp ( ns.finfo, "NuppelVideo", 12 ) &&
|
||||
strncmp ( ns.finfo, "MythTVVideo", 12 ) )
|
||||
return 0; /* Not a NuppelVideo file */
|
||||
if ( strncmp ( ns.version, "0.05", 5 ) &&
|
||||
strncmp ( ns.version, "0.06", 5 ) &&
|
||||
strncmp ( ns.version, "0.07", 5 ) )
|
||||
return 0; /* Wrong version NuppelVideo file */
|
||||
|
||||
/* Return to original position */
|
||||
stream_seek ( demuxer->stream, orig_pos );
|
||||
return DEMUXER_TYPE_NUV;
|
||||
}
|
||||
|
||||
static void demux_close_nuv(demuxer_t* demuxer) {
|
||||
nuv_priv_t* priv = demuxer->priv;
|
||||
nuv_position_t* pos;
|
||||
if(!priv)
|
||||
return;
|
||||
for(pos = priv->index_list ; pos != NULL ; ) {
|
||||
nuv_position_t* p = pos;
|
||||
pos = pos->next;
|
||||
free(p);
|
||||
}
|
||||
free(priv);
|
||||
}
|
||||
|
||||
|
||||
const demuxer_desc_t demuxer_desc_nuv = {
|
||||
"NuppelVideo demuxer",
|
||||
"nuv",
|
||||
"NuppelVideo",
|
||||
"Panagiotis Issaris",
|
||||
"",
|
||||
DEMUXER_TYPE_NUV,
|
||||
1, // safe autodetect
|
||||
nuv_check_file,
|
||||
demux_nuv_fill_buffer,
|
||||
demux_open_nuv,
|
||||
demux_close_nuv,
|
||||
demux_seek_nuv,
|
||||
NULL
|
||||
};
|
@ -46,7 +46,6 @@ extern const demuxer_desc_t demuxer_desc_mf;
|
||||
extern const demuxer_desc_t demuxer_desc_avi;
|
||||
extern const demuxer_desc_t demuxer_desc_y4m;
|
||||
extern const demuxer_desc_t demuxer_desc_asf;
|
||||
extern const demuxer_desc_t demuxer_desc_nuv;
|
||||
extern const demuxer_desc_t demuxer_desc_real;
|
||||
extern const demuxer_desc_t demuxer_desc_smjpeg;
|
||||
extern const demuxer_desc_t demuxer_desc_matroska;
|
||||
@ -101,7 +100,6 @@ const demuxer_desc_t *const demuxer_list[] = {
|
||||
&demuxer_desc_y4m,
|
||||
&demuxer_desc_asf,
|
||||
&demuxer_desc_nsv,
|
||||
&demuxer_desc_nuv,
|
||||
&demuxer_desc_real,
|
||||
&demuxer_desc_smjpeg,
|
||||
&demuxer_desc_matroska,
|
||||
|
@ -34,7 +34,6 @@ struct MPOpts;
|
||||
#define DEMUXER_TYPE_FLI 10
|
||||
#define DEMUXER_TYPE_REAL 11
|
||||
#define DEMUXER_TYPE_Y4M 12
|
||||
#define DEMUXER_TYPE_NUV 13
|
||||
#define DEMUXER_TYPE_FILM 14
|
||||
#define DEMUXER_TYPE_ROQ 15
|
||||
#define DEMUXER_TYPE_MF 16
|
||||
|
@ -1,179 +0,0 @@
|
||||
/*
|
||||
nuppelvideo.h taken from NuppelVideo, by
|
||||
(c) Roman Hochleitner roman@mars.tuwien.ac.at
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
#ifndef MPLAYER_NUPPELVIDEO_H
|
||||
#define MPLAYER_NUPPELVIDEO_H
|
||||
|
||||
#include "libavutil/intfloat_readwrite.h"
|
||||
|
||||
typedef struct __attribute__((packed)) rtfileheader
|
||||
{
|
||||
char finfo[12]; // "NuppelVideo" + \0
|
||||
char version[5]; // "0.05" + \0
|
||||
char pad1[3];
|
||||
int width;
|
||||
int height;
|
||||
int desiredwidth; // 0 .. as it is
|
||||
int desiredheight; // 0 .. as it is
|
||||
char pimode; // P .. progressive
|
||||
// I .. interlaced (2 half pics) [NI]
|
||||
char pad2[3];
|
||||
double aspect; // 1.0 .. square pixel (1.5 .. e.g. width=480: width*1.5=720
|
||||
// for capturing for svcd material
|
||||
double fps;
|
||||
int videoblocks; // count of video-blocks -1 .. unknown 0 .. no video
|
||||
int audioblocks; // count of audio-blocks -1 .. unknown 0 .. no audio
|
||||
int textsblocks; // count of text-blocks -1 .. unknown 0 .. no text
|
||||
int keyframedist;
|
||||
} rtfileheader;
|
||||
|
||||
typedef struct __attribute__((packed)) rtframeheader
|
||||
{
|
||||
char frametype; // A .. Audio, V .. Video, S .. Sync, T .. Text
|
||||
// R .. Seekpoint: String RTjjjjjjjj (use full packet)
|
||||
// D .. Addition Data for Compressors
|
||||
// ct: R .. RTjpeg Tables
|
||||
|
||||
char comptype; // V: 0 .. Uncompressed [NI]
|
||||
// 1 .. RTJpeg
|
||||
// 2 .. RTJpeg with lzo afterwards
|
||||
// N .. black frame
|
||||
// L .. simply copy last frame (if lost frames)
|
||||
// A: 0 .. Uncompressed (44100/sec 16bit 2ch)
|
||||
// 1 .. lzo compression [NI]
|
||||
// 2 .. layer2 (packet) [NI]
|
||||
// 3 .. layer3 (packet) [NI]
|
||||
// F .. flac (lossless) [NI]
|
||||
// S .. shorten (lossless) [NI]
|
||||
// N .. null frame loudless
|
||||
// L .. simply copy last frame (may sound bad) NI
|
||||
// S: B .. Audio and Video sync point [NI]
|
||||
// A .. Audio Sync Information
|
||||
// timecode == effective dsp-frequency*100
|
||||
// when reaching this audio sync point
|
||||
// because many cheap soundcards are unexact
|
||||
// and have a range from 44000 to 44250
|
||||
// instead of the expected exact 44100 S./sec
|
||||
// V .. Next Video Sync
|
||||
// timecode == next video framenumber
|
||||
// S .. Audio,Video,Text Correlation [NI]
|
||||
char keyframe; // 0 .. keyframe
|
||||
// 1 .. nr of frame in gop => no keyframe
|
||||
|
||||
char filters; // Every bit stands for one type of filter
|
||||
// 1 .. Gauss 5 Pixel (8*m+2*l+2*r+2*a+2*b)/16 [NYI]
|
||||
// 2 .. Gauss 5 Pixel (8*m+1*l+1*r+1*a+1*b)/12 [NYI]
|
||||
// 4 .. Cartoon Filter [NI]
|
||||
// 8 .. Reserverd Filter [NI]
|
||||
// 16 .. Reserverd Filter [NI]
|
||||
// 32 .. Reserverd Filter [NI]
|
||||
// 64 .. Reserverd Filter [NI]
|
||||
// 128 .. Reserverd Filter [NI]
|
||||
|
||||
int timecode; // Timecodeinformation sec*1000 + msecs
|
||||
|
||||
int packetlength; // V,A,T: length of following data in stream
|
||||
// S: length of packet correl. information [NI]
|
||||
// R: do not use here! (fixed 'RTjjjjjjjjjjjjjj')
|
||||
} rtframeheader;
|
||||
|
||||
/* for MythTV */
|
||||
typedef struct __attribute__((packed)) extendeddata
|
||||
{
|
||||
int version; // yes, this is repeated from the file header
|
||||
int video_fourcc; // video encoding method used
|
||||
int audio_fourcc; // audio encoding method used
|
||||
// generic data
|
||||
int audio_sample_rate;
|
||||
int audio_bits_per_sample;
|
||||
int audio_channels;
|
||||
// codec specific
|
||||
// mp3lame
|
||||
int audio_compression_ratio;
|
||||
int audio_quality;
|
||||
// rtjpeg
|
||||
int rtjpeg_quality;
|
||||
int rtjpeg_luma_filter;
|
||||
int rtjpeg_chroma_filter;
|
||||
// libavcodec
|
||||
int lavc_bitrate;
|
||||
int lavc_qmin;
|
||||
int lavc_qmax;
|
||||
int lavc_maxqdiff;
|
||||
// unused for later -- total size of 128 integers.
|
||||
// new fields must be added at the end, above this comment.
|
||||
int expansion[113];
|
||||
} extendeddata;
|
||||
|
||||
#define FRAMEHEADERSIZE sizeof(rtframeheader)
|
||||
#define FILEHEADERSIZE sizeof(rtfileheader)
|
||||
|
||||
typedef struct vidbuffertype
|
||||
{
|
||||
int sample;
|
||||
int timecode;
|
||||
int freeToEncode;
|
||||
int freeToBuffer;
|
||||
unsigned char *buffer_offset;
|
||||
} vidbuffertyp;
|
||||
|
||||
typedef struct audbuffertype
|
||||
{
|
||||
int sample;
|
||||
int timecode;
|
||||
int freeToEncode;
|
||||
int freeToBuffer;
|
||||
unsigned char *buffer_offset;
|
||||
} audbuffertyp;
|
||||
|
||||
#define le2me_rtfileheader(h) { \
|
||||
(h)->width = le2me_32((h)->width); \
|
||||
(h)->height = le2me_32((h)->height); \
|
||||
(h)->desiredwidth = le2me_32((h)->desiredwidth); \
|
||||
(h)->desiredheight = le2me_32((h)->desiredheight); \
|
||||
(h)->aspect = av_int2dbl(le2me_64(*(uint64_t *)&(h)->aspect));\
|
||||
(h)->fps = av_int2dbl(le2me_64(*(uint64_t *)&(h)->fps)); \
|
||||
(h)->videoblocks = le2me_32((h)->videoblocks); \
|
||||
(h)->audioblocks = le2me_32((h)->audioblocks); \
|
||||
(h)->textsblocks = le2me_32((h)->textsblocks); \
|
||||
(h)->keyframedist = le2me_32((h)->keyframedist); \
|
||||
}
|
||||
#define le2me_rtframeheader(h) { \
|
||||
(h)->timecode = le2me_32((h)->timecode); \
|
||||
(h)->packetlength = le2me_32((h)->packetlength); \
|
||||
}
|
||||
#define le2me_extendeddata(h) { \
|
||||
(h)->version = le2me_32((h)->version); \
|
||||
(h)->video_fourcc = le2me_32((h)->video_fourcc); \
|
||||
(h)->audio_fourcc = le2me_32((h)->audio_fourcc); \
|
||||
(h)->audio_sample_rate = le2me_32((h)->audio_sample_rate); \
|
||||
(h)->audio_bits_per_sample = le2me_32((h)->audio_bits_per_sample);\
|
||||
(h)->audio_channels = le2me_32((h)->audio_channels); \
|
||||
(h)->audio_compression_ratio = le2me_32((h)->audio_compression_ratio);\
|
||||
(h)->audio_quality = le2me_32((h)->audio_quality); \
|
||||
(h)->rtjpeg_quality = le2me_32((h)->rtjpeg_quality); \
|
||||
(h)->rtjpeg_luma_filter = le2me_32((h)->rtjpeg_luma_filter); \
|
||||
(h)->rtjpeg_chroma_filter = le2me_32((h)->rtjpeg_chroma_filter);\
|
||||
(h)->lavc_bitrate = le2me_32((h)->lavc_bitrate); \
|
||||
(h)->lavc_qmin = le2me_32((h)->lavc_qmin); \
|
||||
(h)->lavc_qmax = le2me_32((h)->lavc_qmax); \
|
||||
(h)->lavc_maxqdiff = le2me_32((h)->lavc_maxqdiff); \
|
||||
}
|
||||
|
||||
#endif /* MPLAYER_NUPPELVIDEO_H */
|
@ -1622,7 +1622,7 @@ static void initMMX2HScaler(int dstW, int xInc, uint8_t *funnyCode, int16_t *fil
|
||||
}
|
||||
xpos+=xInc;
|
||||
}
|
||||
filterPos[i/2]= xpos>>16; // needed to jump to the next part
|
||||
filterPos[((i/2)+1)&(~1)]= xpos>>16; // needed to jump to the next part
|
||||
}
|
||||
#endif /* COMPILE_MMX2 */
|
||||
|
||||
@ -2726,7 +2726,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
|
||||
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]};
|
||||
uint8_t* src2[4]= {src[0], src[1], src[2], src[3]};
|
||||
|
||||
if (c->sliceDir == 0 && srcSliceY != 0 && srcSliceY + srcSliceH != c->srcH) {
|
||||
av_log(c, AV_LOG_ERROR, "Slices start in the middle!\n");
|
||||
@ -2800,21 +2800,23 @@ int sws_scale(SwsContext *c, uint8_t* src[], int srcStride[], int srcSliceY,
|
||||
// copy strides, so they can safely be modified
|
||||
if (c->sliceDir == 1) {
|
||||
// slices go from top to bottom
|
||||
int srcStride2[4]= {srcStride[0], srcStride[1], srcStride[2]};
|
||||
int dstStride2[4]= {dstStride[0], dstStride[1], dstStride[2]};
|
||||
int srcStride2[4]= {srcStride[0], srcStride[1], srcStride[2], srcStride[3]};
|
||||
int dstStride2[4]= {dstStride[0], dstStride[1], dstStride[2], dstStride[3]};
|
||||
return c->swScale(c, src2, srcStride2, srcSliceY, srcSliceH, dst, dstStride2);
|
||||
} else {
|
||||
// slices go from bottom to top => we flip the image internally
|
||||
uint8_t* dst2[4]= {dst[0] + (c->dstH-1)*dstStride[0],
|
||||
dst[1] + ((c->dstH>>c->chrDstVSubSample)-1)*dstStride[1],
|
||||
dst[2] + ((c->dstH>>c->chrDstVSubSample)-1)*dstStride[2]};
|
||||
int srcStride2[4]= {-srcStride[0], -srcStride[1], -srcStride[2]};
|
||||
int dstStride2[4]= {-dstStride[0], -dstStride[1], -dstStride[2]};
|
||||
dst[2] + ((c->dstH>>c->chrDstVSubSample)-1)*dstStride[2],
|
||||
dst[3] + (c->dstH-1)*dstStride[3]};
|
||||
int srcStride2[4]= {-srcStride[0], -srcStride[1], -srcStride[2], -srcStride[3]};
|
||||
int dstStride2[4]= {-dstStride[0], -dstStride[1], -dstStride[2], -dstStride[3]};
|
||||
|
||||
src2[0] += (srcSliceH-1)*srcStride[0];
|
||||
if (!usePal(c->srcFormat))
|
||||
src2[1] += ((srcSliceH>>c->chrSrcVSubSample)-1)*srcStride[1];
|
||||
src2[2] += ((srcSliceH>>c->chrSrcVSubSample)-1)*srcStride[2];
|
||||
src2[3] += (srcSliceH-1)*srcStride[3];
|
||||
|
||||
return c->swScale(c, src2, srcStride2, c->srcH-srcSliceY-srcSliceH, srcSliceH, dst2, dstStride2);
|
||||
}
|
||||
|
@ -228,6 +228,7 @@ const char *sws_format_name(int format);
|
||||
#define isPlanarYUV(x) ( \
|
||||
(x)==PIX_FMT_YUV410P \
|
||||
|| (x)==PIX_FMT_YUV420P \
|
||||
|| (x)==PIX_FMT_YUVA420P \
|
||||
|| (x)==PIX_FMT_YUV411P \
|
||||
|| (x)==PIX_FMT_YUV422P \
|
||||
|| (x)==PIX_FMT_YUV444P \
|
||||
|
@ -230,28 +230,28 @@
|
||||
"test %%"REG_S", %%"REG_S" \n\t"\
|
||||
" jnz 2b \n\t"\
|
||||
|
||||
#define YSCALEYUV2PACKEDX_YA(offset) \
|
||||
#define YSCALEYUV2PACKEDX_YA(offset,coeff,src1,src2,dst1,dst2) \
|
||||
"lea "offset"(%0), %%"REG_d" \n\t"\
|
||||
"mov (%%"REG_d"), %%"REG_S" \n\t"\
|
||||
"movq "VROUNDER_OFFSET"(%0), %%mm1 \n\t"\
|
||||
"movq %%mm1, %%mm7 \n\t"\
|
||||
"movq "VROUNDER_OFFSET"(%0), "#dst1" \n\t"\
|
||||
"movq "#dst1", "#dst2" \n\t"\
|
||||
ASMALIGN(4)\
|
||||
"2: \n\t"\
|
||||
"movq 8(%%"REG_d"), %%mm0 \n\t" /* filterCoeff */\
|
||||
"movq (%%"REG_S", %%"REG_a", 2), %%mm2 \n\t" /* Y1srcData */\
|
||||
"movq 8(%%"REG_S", %%"REG_a", 2), %%mm5 \n\t" /* Y2srcData */\
|
||||
"movq 8(%%"REG_d"), "#coeff" \n\t" /* filterCoeff */\
|
||||
"movq (%%"REG_S", %%"REG_a", 2), "#src1" \n\t" /* Y1srcData */\
|
||||
"movq 8(%%"REG_S", %%"REG_a", 2), "#src2" \n\t" /* Y2srcData */\
|
||||
"add $16, %%"REG_d" \n\t"\
|
||||
"mov (%%"REG_d"), %%"REG_S" \n\t"\
|
||||
"pmulhw %%mm0, %%mm2 \n\t"\
|
||||
"pmulhw %%mm0, %%mm5 \n\t"\
|
||||
"paddw %%mm2, %%mm1 \n\t"\
|
||||
"paddw %%mm5, %%mm7 \n\t"\
|
||||
"pmulhw "#coeff", "#src1" \n\t"\
|
||||
"pmulhw "#coeff", "#src2" \n\t"\
|
||||
"paddw "#src1", "#dst1" \n\t"\
|
||||
"paddw "#src2", "#dst2" \n\t"\
|
||||
"test %%"REG_S", %%"REG_S" \n\t"\
|
||||
" jnz 2b \n\t"\
|
||||
|
||||
#define YSCALEYUV2PACKEDX \
|
||||
YSCALEYUV2PACKEDX_UV \
|
||||
YSCALEYUV2PACKEDX_YA(LUM_MMX_FILTER_OFFSET) \
|
||||
YSCALEYUV2PACKEDX_YA(LUM_MMX_FILTER_OFFSET,%%mm0,%%mm2,%%mm5,%%mm1,%%mm7) \
|
||||
|
||||
#define YSCALEYUV2PACKEDX_END \
|
||||
:: "r" (&c->redDither), \
|
||||
@ -458,11 +458,11 @@
|
||||
"pmulhw "VG_COEFF"("#c"), %%mm4 \n\t"\
|
||||
/* mm2=(U-128)8, mm3=ug, mm4=vg mm5=(V-128)8 */\
|
||||
|
||||
#define REAL_YSCALEYUV2RGB_YA(index, c) \
|
||||
"movq (%0, "#index", 2), %%mm0 \n\t" /*buf0[eax]*/\
|
||||
"movq (%1, "#index", 2), %%mm1 \n\t" /*buf1[eax]*/\
|
||||
"movq 8(%0, "#index", 2), %%mm6 \n\t" /*buf0[eax]*/\
|
||||
"movq 8(%1, "#index", 2), %%mm7 \n\t" /*buf1[eax]*/\
|
||||
#define REAL_YSCALEYUV2RGB_YA(index, c, b1, b2) \
|
||||
"movq ("#b1", "#index", 2), %%mm0 \n\t" /*buf0[eax]*/\
|
||||
"movq ("#b2", "#index", 2), %%mm1 \n\t" /*buf1[eax]*/\
|
||||
"movq 8("#b1", "#index", 2), %%mm6 \n\t" /*buf0[eax]*/\
|
||||
"movq 8("#b2", "#index", 2), %%mm7 \n\t" /*buf1[eax]*/\
|
||||
"psubw %%mm1, %%mm0 \n\t" /* buf0[eax] - buf1[eax]*/\
|
||||
"psubw %%mm7, %%mm6 \n\t" /* buf0[eax] - buf1[eax]*/\
|
||||
"pmulhw "LUM_MMX_FILTER_OFFSET"+8("#c"), %%mm0 \n\t" /* (buf0[eax] - buf1[eax])yalpha1>>16*/\
|
||||
@ -501,11 +501,11 @@
|
||||
"packuswb %%mm6, %%mm5 \n\t"\
|
||||
"packuswb %%mm3, %%mm4 \n\t"\
|
||||
|
||||
#define YSCALEYUV2RGB_YA(index, c) REAL_YSCALEYUV2RGB_YA(index, c)
|
||||
#define YSCALEYUV2RGB_YA(index, c, b1, b2) REAL_YSCALEYUV2RGB_YA(index, c, b1, b2)
|
||||
|
||||
#define YSCALEYUV2RGB(index, c) \
|
||||
REAL_YSCALEYUV2RGB_UV(index, c) \
|
||||
REAL_YSCALEYUV2RGB_YA(index, c) \
|
||||
REAL_YSCALEYUV2RGB_YA(index, c, %0, %1) \
|
||||
REAL_YSCALEYUV2RGB_COEFF(c)
|
||||
|
||||
#define REAL_YSCALEYUV2PACKED1(index, c) \
|
||||
@ -1663,7 +1663,7 @@ static inline void RENAME(name ## _half)(uint8_t *dstU, uint8_t *dstV, uint8_t *
|
||||
{\
|
||||
int pix0= ((type*)src)[2*i+0];\
|
||||
int pix1= ((type*)src)[2*i+1];\
|
||||
int g= (pix0&(maskg|maska))+(pix1&(maskg|maska));\
|
||||
int g= (pix0&~(maskr|maskb))+(pix1&~(maskr|maskb));\
|
||||
int b= ((pix0+pix1-g)&(maskb|(2*maskb)))>>shb;\
|
||||
int r= ((pix0+pix1-g)&(maskr|(2*maskr)))>>shr;\
|
||||
g&= maskg|(2*maskg);\
|
||||
|
@ -23,20 +23,13 @@
|
||||
#include <inttypes.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef CONFIG_FASTMEMCPY
|
||||
#if HAVE_MMX || HAVE_MMX2 || HAVE_AMD3DNOW \
|
||||
/* || HAVE_SSE || HAVE_SSE2 */
|
||||
#if defined(CONFIG_FASTMEMCPY) && (HAVE_MMX || HAVE_MMX2 || HAVE_AMD3DNOW /* || HAVE_SSE || HAVE_SSE2 */)
|
||||
#include <stddef.h>
|
||||
|
||||
void * fast_memcpy(void * to, const void * from, size_t len);
|
||||
void * mem2agpcpy(void * to, const void * from, size_t len);
|
||||
|
||||
#else /* HAVE_MMX/MMX2/3DNOW/SSE/SSE2 */
|
||||
#define mem2agpcpy(a,b,c) memcpy(a,b,c)
|
||||
#define fast_memcpy(a,b,c) memcpy(a,b,c)
|
||||
#endif
|
||||
|
||||
#else /* CONFIG_FASTMEMCPY */
|
||||
#else
|
||||
#define mem2agpcpy(a,b,c) memcpy(a,b,c)
|
||||
#define fast_memcpy(a,b,c) memcpy(a,b,c)
|
||||
#endif
|
||||
|
@ -56,8 +56,8 @@
|
||||
#endif
|
||||
|
||||
char *subtitle_font_encoding = NULL;
|
||||
float text_font_scale_factor = 5.0;
|
||||
float osd_font_scale_factor = 6.0;
|
||||
float text_font_scale_factor = 3.5;
|
||||
float osd_font_scale_factor = 4.0;
|
||||
float subtitle_font_radius = 2.0;
|
||||
float subtitle_font_thickness = 2.0;
|
||||
// 0 = no autoscale
|
||||
|
@ -100,6 +100,7 @@ extern struct vo_driver video_out_mpegpes;
|
||||
extern struct vo_driver video_out_yuv4mpeg;
|
||||
extern struct vo_driver video_out_direct3d;
|
||||
extern struct vo_driver video_out_directx;
|
||||
extern struct vo_driver video_out_kva;
|
||||
extern struct vo_driver video_out_dxr2;
|
||||
extern struct vo_driver video_out_dxr3;
|
||||
extern struct vo_driver video_out_ivtv;
|
||||
@ -134,6 +135,9 @@ const struct vo_driver *video_out_drivers[] =
|
||||
#ifdef CONFIG_DIRECT3D
|
||||
&video_out_direct3d,
|
||||
#endif
|
||||
#ifdef CONFIG_KVA
|
||||
&video_out_kva,
|
||||
#endif
|
||||
#ifdef CONFIG_COREVIDEO
|
||||
&video_out_macosx,
|
||||
#endif
|
||||
|
@ -575,19 +575,19 @@ static int parse_suboptions(const char *arg) {
|
||||
char *pseudoargv[4], *osdcolor = NULL, *subcolor = NULL, **strings,
|
||||
*helpmsg = NULL;
|
||||
int pseudoargc, displayhelp = 0, *booleans;
|
||||
opt_t extra_opts[] = {
|
||||
const opt_t extra_opts[] = {
|
||||
{"osdcolor", OPT_ARG_MSTRZ, &osdcolor, NULL, 0},
|
||||
{"subcolor", OPT_ARG_MSTRZ, &subcolor, NULL, 0},
|
||||
{"help", OPT_ARG_BOOL, &displayhelp, NULL, 0} };
|
||||
opt_t *subopts = NULL, *p;
|
||||
char *strings_list[] = {"-driver", "-kbddriver", "-mousedriver", "-font",
|
||||
char * const strings_list[] = {"-driver", "-kbddriver", "-mousedriver", "-font",
|
||||
"-width", "-height", "-minwidth", "-minheight", "-maxwidth",
|
||||
"-maxheight", "-recwidth", "-recheight", "-bright", "-contrast",
|
||||
"-gamma", "-dimmul", "-boldmul", "-random" };
|
||||
char *booleans_list[] = {"-dim", "-bold", "-reverse", "-normal",
|
||||
char * const booleans_list[] = {"-dim", "-bold", "-reverse", "-normal",
|
||||
"-boldfont", "-inverse", "-extended", "-eight", "-dither",
|
||||
"-floyd_steinberg", "-error_distribution"};
|
||||
char *nobooleans_list[] = {"-nodim", "-nobold", "-noreverse", "-nonormal",
|
||||
char * const nobooleans_list[] = {"-nodim", "-nobold", "-noreverse", "-nonormal",
|
||||
"-noboldfont", "-noinverse", "-noextended", "-noeight", "-nodither",
|
||||
"-nofloyd_steinberg", "-noerror_distribution"};
|
||||
const int nstrings = sizeof(strings_list) / sizeof(char*);
|
||||
|
@ -175,7 +175,7 @@ static int preinit(const char *arg)
|
||||
strarg_t mode_str = {0, NULL};
|
||||
strarg_t par_str = {0, NULL};
|
||||
strarg_t dfb_params = {0, NULL};
|
||||
opt_t subopts[] = {
|
||||
const opt_t subopts[] = {
|
||||
{"input", OPT_ARG_BOOL, &use_input, NULL},
|
||||
{"buffermode", OPT_ARG_STR, &mode_str, check_mode},
|
||||
{"fieldparity", OPT_ARG_STR, &par_str, check_parity},
|
||||
|
@ -104,7 +104,7 @@ static char *gif_filename = NULL;
|
||||
// the default output filename
|
||||
#define DEFAULT_FILE "out.gif"
|
||||
|
||||
static opt_t subopts[] = {
|
||||
static const opt_t subopts[] = {
|
||||
{"output", OPT_ARG_MSTRZ, &gif_filename, NULL, 0},
|
||||
{"fps", OPT_ARG_FLOAT, &target_fps, NULL, 0},
|
||||
{NULL, 0, NULL, NULL, 0}
|
||||
|
@ -973,7 +973,7 @@ uninit(void)
|
||||
vo_uninit();
|
||||
}
|
||||
|
||||
static opt_t subopts[] = {
|
||||
static const opt_t subopts[] = {
|
||||
{"manyfmts", OPT_ARG_BOOL, &many_fmts, NULL},
|
||||
{"osd", OPT_ARG_BOOL, &use_osd, NULL},
|
||||
{"scaled-osd", OPT_ARG_BOOL, &scaled_osd, NULL},
|
||||
|
@ -844,7 +844,7 @@ uninit(void)
|
||||
vo_uninit();
|
||||
}
|
||||
|
||||
static opt_t subopts[] = {
|
||||
static const opt_t subopts[] = {
|
||||
{"yuv", OPT_ARG_INT, &use_yuv, (opt_test_f)int_non_neg},
|
||||
{"glfinish", OPT_ARG_BOOL, &use_glFinish, NULL},
|
||||
{NULL}
|
||||
|
@ -59,7 +59,7 @@ static vo_mpegpes_t *pes;
|
||||
static int output = -1;
|
||||
static char *device = NULL;
|
||||
|
||||
static opt_t subopts[] = {
|
||||
static const opt_t subopts[] = {
|
||||
{"output", OPT_ARG_INT, &output, (opt_test_f)int_non_neg},
|
||||
{"device", OPT_ARG_MSTRZ, &device, NULL},
|
||||
{NULL}
|
||||
|
@ -339,7 +339,7 @@ static int int_zero_hundred(int *val)
|
||||
|
||||
static int preinit(const char *arg)
|
||||
{
|
||||
opt_t subopts[] = {
|
||||
const opt_t subopts[] = {
|
||||
{"progressive", OPT_ARG_BOOL, &jpeg_progressive_mode, NULL, 0},
|
||||
{"baseline", OPT_ARG_BOOL, &jpeg_baseline, NULL, 0},
|
||||
{"optimize", OPT_ARG_INT, &jpeg_optimize,
|
||||
|
1075
libvo/vo_kva.c
Normal file
1075
libvo/vo_kva.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,4 +1,7 @@
|
||||
/*
|
||||
* Mac OS X video output driver
|
||||
* Copyright (c) 2005 Nicolas Plourde <nicolasplourde@gmail.com>
|
||||
*
|
||||
* This file is part of MPlayer.
|
||||
*
|
||||
* MPlayer is free software; you can redistribute it and/or modify
|
||||
@ -16,14 +19,6 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
/*
|
||||
vo_macosx.m
|
||||
by Nicolas Plourde <nicolasplourde@gmail.com>
|
||||
|
||||
MPlayer Mac OSX video out module.
|
||||
Copyright (c) Nicolas Plourde - 2005
|
||||
*/
|
||||
|
||||
#import "vo_macosx.h"
|
||||
#include <sys/types.h>
|
||||
#include <sys/ipc.h>
|
||||
@ -99,7 +94,7 @@ static BOOL isLeopardOrLater;
|
||||
|
||||
static vo_info_t info =
|
||||
{
|
||||
"Mac OSX Core Video",
|
||||
"Mac OS X Core Video",
|
||||
"macosx",
|
||||
"Nicolas Plourde <nicolas.plourde@gmail.com>",
|
||||
""
|
||||
@ -131,7 +126,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_
|
||||
}
|
||||
else
|
||||
{
|
||||
mp_msg(MSGT_VO, MSGL_FATAL, "Get device error: Device ID %d do not exist, falling back to main device.\n", screen_id);
|
||||
mp_msg(MSGT_VO, MSGL_FATAL, "Get device error: Device ID %d does not exist, falling back to main device.\n", screen_id);
|
||||
screen_handle = [screen_array objectAtIndex:0];
|
||||
screen_id = -1;
|
||||
}
|
||||
@ -216,7 +211,7 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_
|
||||
return 1;
|
||||
}
|
||||
|
||||
//connnect to mplayerosx
|
||||
//connect to mplayerosx
|
||||
mplayerosxProxy=[NSConnection rootProxyForConnectionWithRegisteredName:[NSString stringWithCString:buffer_name] host:nil];
|
||||
if ([mplayerosxProxy conformsToProtocol:@protocol(MPlayerOSXVOProto)]) {
|
||||
[mplayerosxProxy setProtocolForProxy:@protocol(MPlayerOSXVOProto)];
|
||||
@ -361,7 +356,7 @@ static int preinit(const char *arg)
|
||||
"Example: mplayer -vo macosx:device_id=1:shared_buffer:buffer_name=mybuff\n"
|
||||
"\nOptions:\n"
|
||||
" device_id=<0-...>\n"
|
||||
" Set screen device id for fullscreen.\n"
|
||||
" Set screen device ID for fullscreen.\n"
|
||||
" shared_buffer\n"
|
||||
" Write output to a shared memory buffer instead of displaying it.\n"
|
||||
" buffer_name=<name>\n"
|
||||
@ -812,7 +807,7 @@ static int control(uint32_t request, void *data)
|
||||
|
||||
curTime = TickCount()/60;
|
||||
|
||||
//auto hide mouse cursor (and future on-screen control?)
|
||||
//automatically hide mouse cursor (and future on-screen control?)
|
||||
if(isFullscreen && !mouseHide && !isRootwin)
|
||||
{
|
||||
if( ((curTime - lastMouseHide) >= 5) || (lastMouseHide == 0) )
|
||||
@ -963,8 +958,8 @@ static int control(uint32_t request, void *data)
|
||||
return;
|
||||
[NSApp sendEvent:event];
|
||||
// Without SDL's bootstrap code (include SDL.h in mplayer.c),
|
||||
// on Leopard, we got trouble to get the play window auto focused
|
||||
// when app is actived. Following code fix this problem.
|
||||
// on Leopard, we have trouble to get the play window automatically focused
|
||||
// when the app is actived. The Following code fix this problem.
|
||||
#ifndef CONFIG_SDL
|
||||
if (isLeopardOrLater && [event type] == NSAppKitDefined
|
||||
&& [event subtype] == NSApplicationActivatedEventType) {
|
||||
|
@ -107,7 +107,7 @@ static void md5sum_write_error(void) {
|
||||
|
||||
static int preinit(const char *arg)
|
||||
{
|
||||
opt_t subopts[] = {
|
||||
const opt_t subopts[] = {
|
||||
{"outfile", OPT_ARG_MSTRZ, &md5sum_outfile, NULL, 0},
|
||||
{NULL, 0, NULL, NULL, 0}
|
||||
};
|
||||
|
@ -229,7 +229,7 @@ static int int_zero_to_nine(int *sh)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static opt_t subopts[] = {
|
||||
static const opt_t subopts[] = {
|
||||
{"alpha", OPT_ARG_BOOL, &use_alpha, NULL, 0},
|
||||
{"z", OPT_ARG_INT, &z_compression, (opt_test_f)int_zero_to_nine},
|
||||
{NULL}
|
||||
|
@ -120,7 +120,7 @@ static int preinit(const char *arg)
|
||||
{
|
||||
int ppm_type = 0, pgm_type = 0, pgmyuv_type = 0,
|
||||
raw_mode = 0, ascii_mode = 0;
|
||||
opt_t subopts[] = {
|
||||
const opt_t subopts[] = {
|
||||
{"ppm", OPT_ARG_BOOL, &ppm_type, NULL, 0},
|
||||
{"pgm", OPT_ARG_BOOL, &pgm_type, NULL, 0},
|
||||
{"pgmyuv", OPT_ARG_BOOL, &pgmyuv_type, NULL, 0},
|
||||
|
@ -1526,7 +1526,7 @@ static int preinit(const char *arg)
|
||||
char * sdl_driver = NULL;
|
||||
int sdl_hwaccel;
|
||||
int sdl_forcexv;
|
||||
opt_t subopts[] = {
|
||||
const opt_t subopts[] = {
|
||||
{"forcexv", OPT_ARG_BOOL, &sdl_forcexv, NULL, 0},
|
||||
{"hwaccel", OPT_ARG_BOOL, &sdl_hwaccel, NULL, 0},
|
||||
{"driver", OPT_ARG_MSTRZ, &sdl_driver, NULL, 0},
|
||||
|
@ -53,7 +53,7 @@ static vo_mpegpes_t *pes;
|
||||
static int output = -1;
|
||||
static char *device = NULL;
|
||||
|
||||
static opt_t subopts[] = {
|
||||
static const opt_t subopts[] = {
|
||||
{"output", OPT_ARG_INT, &output, (opt_test_f)int_non_neg},
|
||||
{"device", OPT_ARG_MSTRZ, &device, NULL},
|
||||
{NULL}
|
||||
|
@ -786,6 +786,7 @@ static int draw_slice(uint8_t *image[], int stride[], int w, int h,
|
||||
break;
|
||||
case IMGFMT_VDPAU_H264:
|
||||
vdp_decoder_profile = VDP_DECODER_PROFILE_H264_HIGH;
|
||||
mp_msg(MSGT_VO, MSGL_V, "[vdpau] Creating H264 hardware decoder for %d reference frames.\n", max_refs);
|
||||
break;
|
||||
case IMGFMT_VDPAU_WMV3:
|
||||
vdp_decoder_profile = VDP_DECODER_PROFILE_VC1_MAIN;
|
||||
@ -949,7 +950,7 @@ static void uninit(void)
|
||||
dlclose(vdpau_lib_handle);
|
||||
}
|
||||
|
||||
static opt_t subopts[] = {
|
||||
static const opt_t subopts[] = {
|
||||
{"deint", OPT_ARG_INT, &deint, (opt_test_f)int_non_neg},
|
||||
{"pullup", OPT_ARG_BOOL, &pullup, NULL},
|
||||
{"denoise", OPT_ARG_FLOAT, &denoise, NULL},
|
||||
|
@ -317,8 +317,6 @@ static int config(struct vo *vo, uint32_t width, uint32_t height,
|
||||
ctx->current_buf = 0;
|
||||
ctx->current_ip_buf = 0;
|
||||
|
||||
if ((flags & VOFLAG_FULLSCREEN) && WinID <= 0)
|
||||
vo_fs = 1;
|
||||
|
||||
resize(vo);
|
||||
|
||||
@ -682,7 +680,7 @@ static int preinit(struct vo *vo, const char *arg)
|
||||
struct vo_x11_state *x11 = vo->x11;
|
||||
int xv_adaptor = -1;
|
||||
|
||||
opt_t subopts[] = {
|
||||
const opt_t subopts[] = {
|
||||
/* name arg type arg var test */
|
||||
{"port", OPT_ARG_INT, &x11->xv_port, (opt_test_f) int_pos},
|
||||
{"adaptor", OPT_ARG_INT, &xv_adaptor, (opt_test_f) int_non_neg},
|
||||
|
@ -379,7 +379,7 @@ static int preinit(const char *arg){
|
||||
int mc_ver,mc_rev;
|
||||
strarg_t ck_src_arg = { 0, NULL };
|
||||
strarg_t ck_method_arg = { 0, NULL };
|
||||
opt_t subopts [] =
|
||||
const opt_t subopts [] =
|
||||
{
|
||||
/* name arg type arg var test */
|
||||
{ "port", OPT_ARG_INT, &xv_port_request, (opt_test_f)int_pos },
|
||||
@ -664,8 +664,6 @@ skip_surface_allocation:
|
||||
#endif
|
||||
}
|
||||
|
||||
if ((flags & VOFLAG_FULLSCREEN) && WinID <= 0) vo_fs = 1;
|
||||
|
||||
//end vo_xv
|
||||
|
||||
/* store image dimesions for displaying */
|
||||
|
@ -513,7 +513,7 @@ static void check_events(void)
|
||||
static int preinit(const char *arg)
|
||||
{
|
||||
int il, il_bf;
|
||||
opt_t subopts[] = {
|
||||
const opt_t subopts[] = {
|
||||
{"interlaced", OPT_ARG_BOOL, &il, NULL},
|
||||
{"interlaced_bf", OPT_ARG_BOOL, &il_bf, NULL},
|
||||
{"file", OPT_ARG_MSTRZ, &yuv_filename, NULL},
|
||||
|
@ -209,7 +209,7 @@ static int preinit(const char *arg) {
|
||||
const char *dev = NULL;
|
||||
char *dev_arg = NULL, *norm_arg = NULL;
|
||||
int norm = VIDEO_MODE_AUTO, prebuf = 0;
|
||||
opt_t subopts[] = { /* don't want warnings with -Wall... */
|
||||
const opt_t subopts[] = { /* don't want warnings with -Wall... */
|
||||
{ "dev", OPT_ARG_MSTRZ, &dev_arg, NULL, 0 },
|
||||
{ "prebuf", OPT_ARG_BOOL, &prebuf, (opt_test_f)pbc, 0 },
|
||||
{ "norm", OPT_ARG_MSTRZ, &norm_arg, (opt_test_f)nc, 0 },
|
||||
|
@ -12,9 +12,9 @@
|
||||
#define real float /* ugly - but only way */
|
||||
|
||||
extern void (*dct64_MMX_func)(short*, short*, real*);
|
||||
static unsigned long long attribute_used __attribute__((aligned(8))) null_one = 0x0000ffff0000ffffULL;
|
||||
static unsigned long long attribute_used __attribute__((aligned(8))) one_null = 0xffff0000ffff0000ULL;
|
||||
unsigned int __attribute__((aligned(16))) costab_mmx[] =
|
||||
static const unsigned long long attribute_used __attribute__((aligned(8))) null_one = 0x0000ffff0000ffffULL;
|
||||
static const unsigned long long attribute_used __attribute__((aligned(8))) one_null = 0xffff0000ffff0000ULL;
|
||||
const unsigned int __attribute__((aligned(16))) costab_mmx[] =
|
||||
{
|
||||
1056974725,
|
||||
1057056395,
|
||||
@ -54,7 +54,7 @@ unsigned int __attribute__((aligned(16))) costab_mmx[] =
|
||||
make_decode_tables_MMX(32768), which had been implemented in (deleted since
|
||||
r23383) tabinit_MMX.c.
|
||||
*/
|
||||
static short __attribute__((aligned(8))) mp3lib_decwins[] =
|
||||
static const short __attribute__((aligned(8))) mp3lib_decwins[] =
|
||||
{
|
||||
0, 7, 54, 114, 510, 1288, 1644, 9372,
|
||||
18760, -9373, 1644, -1289, 510, -115, 54, -8,
|
||||
@ -191,7 +191,7 @@ int synth_1to1_MMX(real *bandPtr, int channel, short *samples)
|
||||
static short buffs[2][2][0x110] __attribute__((aligned(8)));
|
||||
static int bo = 1;
|
||||
short *b0, (*buf)[0x110], *a, *b;
|
||||
short* window;
|
||||
const short* window;
|
||||
int bo1, i = 8;
|
||||
|
||||
if (channel == 0) {
|
||||
|
@ -44,16 +44,16 @@ static real cos9[3],cos18[3];
|
||||
#endif
|
||||
|
||||
struct bandInfoStruct {
|
||||
int longIdx[23];
|
||||
int longDiff[22];
|
||||
int shortIdx[14];
|
||||
int shortDiff[13];
|
||||
uint16_t longIdx[23];
|
||||
uint8_t longDiff[22];
|
||||
uint16_t shortIdx[14];
|
||||
uint8_t shortDiff[13];
|
||||
};
|
||||
|
||||
static int longLimit[9][23];
|
||||
static int shortLimit[9][14];
|
||||
|
||||
static struct bandInfoStruct bandInfo[9] = {
|
||||
static const struct bandInfoStruct bandInfo[9] = {
|
||||
|
||||
/* MPEG 1.0 */
|
||||
{ {0,4,8,12,16,20,24,30,36,44,52,62,74, 90,110,134,162,196,238,288,342,418,576},
|
||||
@ -132,7 +132,7 @@ static void init_layer3(int down_sample_sblimit)
|
||||
|
||||
for (i=0;i<8;i++)
|
||||
{
|
||||
static double Ci[8]={-0.6,-0.535,-0.33,-0.185,-0.095,-0.041,-0.0142,-0.0037};
|
||||
static const double Ci[8]={-0.6,-0.535,-0.33,-0.185,-0.095,-0.041,-0.0142,-0.0037};
|
||||
double sq=sqrt(1.0+Ci[i]*Ci[i]);
|
||||
aa_cs[i] = 1.0/sq;
|
||||
aa_ca[i] = Ci[i]/sq;
|
||||
@ -180,7 +180,7 @@ static void init_layer3(int down_sample_sblimit)
|
||||
}
|
||||
|
||||
for(j=0;j<4;j++) {
|
||||
static int len[4] = { 36,36,12,36 };
|
||||
static const int len[4] = { 36,36,12,36 };
|
||||
for(i=0;i<len[j];i+=2)
|
||||
win1[j][i] = + win[j][i];
|
||||
for(i=1;i<len[j];i+=2)
|
||||
@ -213,10 +213,10 @@ static void init_layer3(int down_sample_sblimit)
|
||||
|
||||
for(j=0;j<9;j++)
|
||||
{
|
||||
struct bandInfoStruct *bi = &bandInfo[j];
|
||||
const struct bandInfoStruct *bi = &bandInfo[j];
|
||||
int *mp;
|
||||
int cb,lwin;
|
||||
int *bdf;
|
||||
const uint8_t *bdf;
|
||||
|
||||
mp = map[j][0] = mapbuf0[j];
|
||||
bdf = bi->longDiff;
|
||||
@ -984,7 +984,7 @@ static void III_i_stereo(real xr_buf[2][SBLIMIT][SSLIMIT],int *scalefac,
|
||||
struct gr_info_s *gr_info,int sfreq,int ms_stereo,int lsf)
|
||||
{
|
||||
real (*xr)[SBLIMIT*SSLIMIT] = (real (*)[SBLIMIT*SSLIMIT] ) xr_buf;
|
||||
struct bandInfoStruct *bi = &bandInfo[sfreq];
|
||||
const struct bandInfoStruct *bi = &bandInfo[sfreq];
|
||||
|
||||
const real *tab1,*tab2;
|
||||
|
||||
|
@ -70,6 +70,7 @@ typedef struct MPOpts {
|
||||
int use_lirc;
|
||||
int use_lircc;
|
||||
int use_ar; // apple remote
|
||||
int default_binds;
|
||||
} input;
|
||||
} MPOpts;
|
||||
|
||||
|
@ -1644,7 +1644,7 @@ const char *
|
||||
fsdp_get_media_format (const fsdp_media_description_t * dsc,
|
||||
unsigned int index)
|
||||
{
|
||||
if (!dsc || (index < dsc->formats_count))
|
||||
if (!dsc || (index < dsc->formats_count - 1))
|
||||
return NULL;
|
||||
return dsc->formats[index];
|
||||
}
|
||||
|
@ -507,7 +507,8 @@ rtp_setup_and_play (rtsp_t *rtsp_session)
|
||||
}
|
||||
|
||||
/* only MPEG-TS is supported at the moment */
|
||||
if (!strstr (fsdp_get_media_format (med_dsc, 0),
|
||||
if (!fsdp_get_media_format (med_dsc, 0) ||
|
||||
!strstr (fsdp_get_media_format (med_dsc, 0),
|
||||
RTSP_MEDIA_CONTAINER_MPEG_TS))
|
||||
{
|
||||
fsdp_description_delete (dsc);
|
||||
|
Loading…
Reference in New Issue
Block a user