mirror of
https://github.com/mpv-player/mpv
synced 2024-10-18 10:25:02 +02:00
Merge svn changes up to r28341
Conflicts: configure libmpcodecs/native/rtjpegn.c
This commit is contained in:
commit
79e1aa7cc7
@ -3560,7 +3560,8 @@ Mac OS X CoreVideo video output driver
|
||||
.PD 0
|
||||
.RSs
|
||||
.IPs device_id=<number>
|
||||
Choose the display device to use in fullscreen.
|
||||
Choose the display device to use for fullscreen or set it to \-1 to
|
||||
always use the same screen the video window is on (default: \-1 \- auto).
|
||||
.IPs shared_buffer
|
||||
Write output to a shared memory buffer instead of displaying it and
|
||||
try to open an existing NSConnection for communication with a GUI.
|
||||
|
@ -1,4 +1,4 @@
|
||||
.\" synced with r28126
|
||||
.\" synced with r28279
|
||||
.\" Encoding: iso-8859-1
|
||||
.\" MPlayer (C) 2000-2009 MPlayer Team
|
||||
.\" The English man page was/is done by Gabucino, Diego Biurrun, Jonas Jermann
|
||||
@ -33,7 +33,7 @@
|
||||
.\" Titre
|
||||
.\" --------------------------------------------------------------------------
|
||||
.
|
||||
.TH MPlayer 1 "1er janvier 2008" "The MPlayer Project" "Le Lecteur Vidéo"
|
||||
.TH MPlayer 1 "15 janvier 2009" "The MPlayer Project" "Le Lecteur Vidéo"
|
||||
.
|
||||
.SH NAME
|
||||
mplayer \- Lecteur vidéo
|
||||
@ -624,6 +624,7 @@ alang=en
|
||||
profile-desc="profil pour les flux dvdnav://"
|
||||
profile=protocol.dvd
|
||||
mouse-movements=yes
|
||||
nocache=yes
|
||||
|
||||
[extension.flv]
|
||||
profile-desc="profil pour les fichiers .flv"
|
||||
@ -1089,9 +1090,10 @@ Affiche le menu principal au lancement de MPlayer.
|
||||
.TP
|
||||
.B \-mouse\-movements
|
||||
Permet MPlayer de recevoir des évènements souris envoyés
|
||||
par le pilote de sortie vidéo (seuls ceux dérivés de X11 sont gérés
|
||||
pour le moment).
|
||||
par le pilote de sortie vidéo.
|
||||
Utilisé pour sélectioner les boutons des menus DVDs.
|
||||
Géré par par les VOs basés sur X11 (x11, xv, xvmc, etc.) ainsi que les VOs gl,
|
||||
gl2, direct3d et macosx.
|
||||
.
|
||||
.TP
|
||||
.B \-noar
|
||||
@ -1228,6 +1230,15 @@ Pour jouer des flux MPEG-TS, MPlayer/\:MEncoder utilisera le premier programme
|
||||
(si présent) avec le flux audio choisi.
|
||||
.
|
||||
.TP
|
||||
.B \-ausid <ID> (voir aussi \-alang)
|
||||
Sélectionne le canal du sous-flux audio.
|
||||
L'intervalle des valeurs valides est 0x55..0x75 et s'applique uniquement au
|
||||
démultiplexeur MPEG-TS natif (par celui de libavformat).
|
||||
Le type de format peut ne pas être correctement identifié puisque cette information n'est pas présente dans le flux, mais le démultiplexage des flux audios se fera correctement en présence de sous-flux multiples.
|
||||
MPlayer affiche tous les identifiants des sous-flux quand il est lancé avec
|
||||
l'option \-identify.
|
||||
.
|
||||
.TP
|
||||
.B \-alang <code de langue[,code de langue,...]> (voir aussi \-aid)
|
||||
Définit une liste de langues de pistes audio à jouer en priorité.
|
||||
Chaque format de conteneur utilise des codes de pays différents.
|
||||
@ -2181,8 +2192,8 @@ sous-titres et ceux contenus dans les pistes Matroska.
|
||||
Fonctionne avec \-embeddedfonts.
|
||||
.br
|
||||
.I NOTE\ :
|
||||
Quand fontconfig est activé à compilation, \-ass active \-fontconfig à moins
|
||||
que vous l'empêchiez explicitement avec l'option \-nofontconfig.
|
||||
Contrairement aux OSD normaux, libass utilise fontconfig par défaut.
|
||||
Pour désactiver ceci, utiliser l'option \-nofontconfig.
|
||||
.
|
||||
.TP
|
||||
.B \-ass\-border\-color <valeur>
|
||||
@ -2367,8 +2378,8 @@ Avec Fontconfig, cette option d
|
||||
Active l'utilisation des polices gérées par fontconfig.
|
||||
.br
|
||||
.I NOTE\ :
|
||||
\-ass active cette option automatiquement à moins que vous l'empêchiez
|
||||
explicitement avec l'option \-nofontconfig.
|
||||
Par défaut fontconfig est utilisé pour afficher les sous-titres rendus par libass.
|
||||
Cette option active aussi le rendu de l'OSD avec fontconfig.
|
||||
.
|
||||
.TP
|
||||
.B \-forcedsubsonly
|
||||
@ -2910,6 +2921,10 @@ Nom du client qui pass
|
||||
.IPs (no)estimate
|
||||
Estime le délai audio, supposé réduire les à-coups lors de la lecture
|
||||
vidéo (par défaut\ : activé).
|
||||
.IPs (no)autostart
|
||||
Démarre le serveur jackd si nécessaire (par défaut\ : désactivé)
|
||||
Notez que cette option ne semble pas fiable et polluera la console avec plein
|
||||
de messages du serveur jackd.
|
||||
.RE
|
||||
.PD 1
|
||||
.
|
||||
@ -3724,6 +3739,13 @@ pilote de sortie vid
|
||||
.RSs
|
||||
.IPs device_id=<numéro>
|
||||
Choisir le moniteur à utiliser en plein-écran.
|
||||
.IPs shared_buffer
|
||||
Écrit la sortie dans un tampon partagé au lieu de l'afficher, et essaye
|
||||
d'établir une NSConnection avec une IHM existante.
|
||||
.IPs buffer_name=<name>
|
||||
Nom du tampon partagé créé avec shm_open pour effectuer la NSConnection avec
|
||||
une IHM (defaut\ : "mplayerosx").
|
||||
Définir l'option buffer_name active shared_buffer implicitement.
|
||||
.RE
|
||||
.PD 1
|
||||
.
|
||||
@ -11705,7 +11727,7 @@ MPlayer
|
||||
Voir le fichier AUTHORS pour la liste de certains des nombreux autres
|
||||
contributeurs.
|
||||
.TP
|
||||
MPlayer est (C) 2000\-2008 The MPlayer Team
|
||||
MPlayer est (C) 2000\-2009 The MPlayer Team
|
||||
.TP
|
||||
Cette page de man est basée sur sa version en langue anglaise, écrite et
|
||||
maintenue par Gabucino, Jonas Jermann et Diego Biurrun
|
||||
|
60
configure
vendored
60
configure
vendored
@ -523,7 +523,7 @@ _libavcodec_a=auto
|
||||
_libamr_nb=auto
|
||||
_libamr_wb=auto
|
||||
_libavdecoders_all=`sed -n 's/^[^#]*DEC.*(.*, *\(.*\)).*/\1_decoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
|
||||
_libavdecoders=` echo $_libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s/MPEG4AAC_DECODER// -e s/H264_VDPAU_DECODER// `
|
||||
_libavdecoders=` echo $_libavdecoders_all | sed -e 's/ LIB[A-Z0-9_]*_DECODER//g' -e s/MPEG4AAC_DECODER// -e s/H264_VDPAU_DECODER// -e s/MPEG_VDPAU_DECODER// -e s/MPEG1_VDPAU_DECODER//`
|
||||
_libavencoders_all=`sed -n 's/^[^#]*ENC.*(.*, *\(.*\)).*/\1_encoder/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
|
||||
_libavencoders=` echo $_libavencoders_all | sed 's/ LIB[A-Z0-9_]*_ENCODER//g'`
|
||||
_libavparsers_all=`sed -n 's/^[^#]*PARSER.*(.*, *\(.*\)).*/\1_parser/p' ffmpeg/libavcodec/allcodecs.c | tr '[a-z]' '[A-Z]'`
|
||||
@ -1690,7 +1690,7 @@ EOF
|
||||
fi
|
||||
|
||||
|
||||
_arch_all='X86 X86_32 X86_64 IA64 SPARC ARM SH PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX BFIN XTENSA GENERIC'
|
||||
_arch_all='X86 X86_32 X86_64 IA64 SPARC ARM SH4 PPC ALPHA SGI_MIPS PA_RISC S390 S390X VAX BFIN XTENSA GENERIC'
|
||||
case "$host_arch" in
|
||||
i[3-9]86|x86|x86pc|k5|k6|k6-2|k6-3|pentium*|athlon*|i586-i686)
|
||||
_arch='X86 X86_32'
|
||||
@ -2049,10 +2049,10 @@ EOF
|
||||
iproc='arm'
|
||||
;;
|
||||
|
||||
sh)
|
||||
_arch='SH'
|
||||
_target_arch='ARCH_SH = yes'
|
||||
iproc='sh'
|
||||
sh|sh4)
|
||||
_arch='SH4'
|
||||
_target_arch='ARCH_SH4 = yes'
|
||||
iproc='sh4'
|
||||
;;
|
||||
|
||||
ppc|ppc64|powerpc|powerpc64)
|
||||
@ -2496,7 +2496,7 @@ if test $_yasm ; then
|
||||
_have_yasm="yes"
|
||||
echores "$_yasm"
|
||||
else
|
||||
_def_yasm='#undef HAVE_YASM'
|
||||
_def_yasm='#define HAVE_YASM 0'
|
||||
fft_mmx="no"
|
||||
_have_yasm="no"
|
||||
echores "no"
|
||||
@ -2617,7 +2617,7 @@ EOF
|
||||
echores "$_iwmmxt"
|
||||
fi
|
||||
|
||||
_cpuexts_all='ALTIVEC BSWAP MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP IWMMXT MLIB MMI SH4 VIS MVI'
|
||||
_cpuexts_all='ALTIVEC BSWAP MMX MMX2 3DNOW 3DNOWEX SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP IWMMXT MMI VIS MVI'
|
||||
test "$_altivec" = yes && _cpuexts="ALTIVEC $_cpuexts"
|
||||
test "$_mmx" = yes && _cpuexts="MMX $_cpuexts"
|
||||
test "$_mmxext" = yes && _cpuexts="MMX2 $_cpuexts"
|
||||
@ -5541,6 +5541,7 @@ fi
|
||||
echores "$_sunaudio"
|
||||
|
||||
|
||||
def_mlib='#define CONFIG_MLIB 0'
|
||||
if sunos; then
|
||||
echocheck "Sun mediaLib"
|
||||
if test "$_mlib" = auto ; then
|
||||
@ -5549,9 +5550,8 @@ if test "$_mlib" = auto ; then
|
||||
#include <mlib.h>
|
||||
int main(void) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
|
||||
EOF
|
||||
cc_check -lmlib && _mlib=yes
|
||||
cc_check -lmlib && _mlib=yes && def_mlib='#define CONFIG_MLIB 1'
|
||||
fi
|
||||
test "$_mlib" = yes && _cpuexts="MLIB $_cpuexts"
|
||||
echores "$_mlib"
|
||||
fi #if sunos
|
||||
|
||||
@ -6240,10 +6240,10 @@ if test "$_mp3lib" = auto ; then
|
||||
fi
|
||||
if test "$_mp3lib" = yes ; then
|
||||
_def_mp3lib='#define CONFIG_MP3LIB 1'
|
||||
_codecmodules="mp3lib $_codecmodules"
|
||||
_codecmodules="mp3lib(internal) $_codecmodules"
|
||||
else
|
||||
_def_mp3lib='#undef CONFIG_MP3LIB'
|
||||
_nocodecmodules="mp3lib $_nocodecmodules"
|
||||
_nocodecmodules="mp3lib(internal) $_nocodecmodules"
|
||||
fi
|
||||
echores "$_mp3lib"
|
||||
|
||||
@ -6288,10 +6288,10 @@ if test "$_libmpeg2" = auto ; then
|
||||
fi
|
||||
if test "$_libmpeg2" = yes ; then
|
||||
_def_libmpeg2='#define CONFIG_LIBMPEG2 1'
|
||||
_codecmodules="libmpeg2 $_codecmodules"
|
||||
_codecmodules="libmpeg2(internal) $_codecmodules"
|
||||
else
|
||||
_def_libmpeg2='#undef CONFIG_LIBMPEG2'
|
||||
_nocodecmodules="libmpeg2 $_nocodecmodules"
|
||||
_nocodecmodules="libmpeg2(internal) $_nocodecmodules"
|
||||
fi
|
||||
echores "$_libmpeg2"
|
||||
|
||||
@ -6422,7 +6422,11 @@ fi
|
||||
|
||||
if test "$_faad" = yes ; then
|
||||
_def_faad='#define CONFIG_FAAD 1'
|
||||
if test "$_faad_internal" = yes ; then
|
||||
_codecmodules="faad2(internal) $_codecmodules"
|
||||
else
|
||||
_codecmodules="faad2 $_codecmodules"
|
||||
fi
|
||||
else
|
||||
_faad=no
|
||||
_nocodecmodules="faad2 $_nocodecmodules"
|
||||
@ -6641,7 +6645,7 @@ elif test "$_libavutil_so" = auto ; then
|
||||
_libavutil_so=no
|
||||
cat > $TMPC << EOF
|
||||
#include <libavutil/common.h>
|
||||
int main(void) { ff_gcd(1,1); return 0; }
|
||||
int main(void) { av_gcd(1,1); return 0; }
|
||||
EOF
|
||||
if $_pkg_config --exists libavutil ; then
|
||||
_inc_libavutil=`$_pkg_config --cflags libavutil`
|
||||
@ -6704,7 +6708,7 @@ test "$_libavcodec_so" = yes && _def_libavcodec_so='#define CONFIG_LIBAVCODEC_SO
|
||||
test "$_libavcodec_mpegaudio_hp" = yes \
|
||||
&& _def_libavcodec_mpegaudio_hp='#define CONFIG_MPEGAUDIO_HP 1'
|
||||
if test "$_libavcodec_a" = yes ; then
|
||||
_codecmodules="libavcodec $_codecmodules"
|
||||
_codecmodules="libavcodec(internal) $_codecmodules"
|
||||
elif test "$_libavcodec_so" = yes ; then
|
||||
_codecmodules="libavcodec.so $_codecmodules"
|
||||
else
|
||||
@ -7824,11 +7828,12 @@ if test "$_dvdnav" = yes ; then
|
||||
_def_dvdnav='#define CONFIG_DVDNAV 1'
|
||||
if test "$dvdnav_internal" = yes ; then
|
||||
_inc_extra="$_inc_extra -Ilibdvdnav"
|
||||
_inputmodules="dvdnav(internal) $_inputmodules"
|
||||
else
|
||||
_inc_extra="$_inc_extra `$_dvdnavconfig --cflags`"
|
||||
_ld_extra="$_ld_extra `$_dvdnavconfig --minilibs`"
|
||||
fi
|
||||
_inputmodules="dvdnav $_inputmodules"
|
||||
fi
|
||||
else
|
||||
_def_dvdnav='#undef CONFIG_DVDNAV'
|
||||
_noinputmodules="dvdnav $_noinputmodules"
|
||||
@ -8205,9 +8210,8 @@ test -z "$_nprefix" && _nprefix='CONFIG'
|
||||
for part in $1; do
|
||||
if ` echo $2 | grep -q -E "(^| )$part($| )" `; then
|
||||
echo "#define ${_nprefix}_$part 1"
|
||||
echo "#define ENABLE_$part 1"
|
||||
else
|
||||
echo "#define ENABLE_$part 0"
|
||||
echo "#define ${_nprefix}_$part 0"
|
||||
fi
|
||||
done
|
||||
}
|
||||
@ -8587,29 +8591,21 @@ $_def_libswscale_so
|
||||
$_def_dcbzl
|
||||
$def_fast_64bit
|
||||
$_def_fast_unaligned
|
||||
$def_mlib
|
||||
$_def_mkstemp
|
||||
$_def_pthreads
|
||||
$_def_threads
|
||||
#ifdef HAVE_THREADS
|
||||
#define ENABLE_THREADS 1
|
||||
#else
|
||||
#define ENABLE_THREADS 0
|
||||
#endif
|
||||
$_def_yasm
|
||||
|
||||
#define CONFIG_GPL 1
|
||||
#define ENABLE_SMALL 0
|
||||
#define ENABLE_GRAY 0
|
||||
#define CONFIG_SMALL 0
|
||||
#define CONFIG_GRAY 0
|
||||
|
||||
/* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
|
||||
#define CONFIG_AANDCT 1
|
||||
#define ENABLE_AANDCT 1
|
||||
#define CONFIG_FFT 1
|
||||
#define ENABLE_FFT 1
|
||||
#define CONFIG_GOLOMB 1
|
||||
#define ENABLE_GOLOMB 1
|
||||
#define CONFIG_MDCT 1
|
||||
#define ENABLE_MDCT 1
|
||||
|
||||
/* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
|
||||
#define HAVE_EBX_AVAILABLE 1
|
||||
@ -8618,12 +8614,8 @@ $_def_yasm
|
||||
#endif
|
||||
|
||||
#define CONFIG_DECODERS 1
|
||||
#define ENABLE_DECODERS 1
|
||||
#define CONFIG_ENCODERS 1
|
||||
#define ENABLE_ENCODERS 1
|
||||
|
||||
#define CONFIG_DEMUXERS 1
|
||||
#define ENABLE_DEMUXERS 1
|
||||
|
||||
$_def_muxers
|
||||
|
||||
|
44
cpudetect.c
44
cpudetect.c
@ -9,7 +9,7 @@ CpuCaps gCpuCaps;
|
||||
#endif
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef ARCH_X86
|
||||
#if ARCH_X86
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@ -57,7 +57,7 @@ static int has_cpuid(void)
|
||||
long a, c;
|
||||
|
||||
// code from libavcodec:
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
#define PUSHF "pushfq\n\t"
|
||||
#define POPF "popfq\n\t"
|
||||
#else
|
||||
@ -212,27 +212,27 @@ void GetCpuCaps( CpuCaps *caps)
|
||||
// caps->hasMMX = 0;
|
||||
|
||||
#ifndef RUNTIME_CPUDETECT
|
||||
#ifndef HAVE_MMX
|
||||
#if !HAVE_MMX
|
||||
if(caps->hasMMX) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"MMX supported but disabled\n");
|
||||
caps->hasMMX=0;
|
||||
#endif
|
||||
#ifndef HAVE_MMX2
|
||||
#if !HAVE_MMX2
|
||||
if(caps->hasMMX2) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"MMX2 supported but disabled\n");
|
||||
caps->hasMMX2=0;
|
||||
#endif
|
||||
#ifndef HAVE_SSE
|
||||
#if !HAVE_SSE
|
||||
if(caps->hasSSE) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"SSE supported but disabled\n");
|
||||
caps->hasSSE=0;
|
||||
#endif
|
||||
#ifndef HAVE_SSE2
|
||||
#if !HAVE_SSE2
|
||||
if(caps->hasSSE2) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"SSE2 supported but disabled\n");
|
||||
caps->hasSSE2=0;
|
||||
#endif
|
||||
#ifndef HAVE_3DNOW
|
||||
#if !HAVE_3DNOW
|
||||
if(caps->has3DNow) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNow supported but disabled\n");
|
||||
caps->has3DNow=0;
|
||||
#endif
|
||||
#ifndef HAVE_3DNOWEX
|
||||
#if !HAVE_3DNOWEX
|
||||
if(caps->has3DNowExt) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNowExt supported but disabled\n");
|
||||
caps->has3DNowExt=0;
|
||||
#endif
|
||||
@ -304,7 +304,7 @@ char *GetCpuFriendlyName(unsigned int regs[], unsigned int regs2[]){
|
||||
#undef CPUID_STEPPING
|
||||
|
||||
|
||||
#if defined(__linux__) && defined(_POSIX_SOURCE) && !defined(ARCH_X86_64)
|
||||
#if defined(__linux__) && defined(_POSIX_SOURCE) && !ARCH_X86_64
|
||||
static void sigill_handler_sse( int signal, struct sigcontext sc )
|
||||
{
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_V, "SIGILL, " );
|
||||
@ -371,7 +371,7 @@ ULONG _System os2_sig_handler_sse( PEXCEPTIONREPORTRECORD p1,
|
||||
|
||||
static void check_os_katmai_support( void )
|
||||
{
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
gCpuCaps.hasSSE=1;
|
||||
gCpuCaps.hasSSE2=1;
|
||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__APPLE__)
|
||||
@ -511,7 +511,7 @@ void GetCpuCaps( CpuCaps *caps)
|
||||
caps->hasSSE4a=0;
|
||||
caps->isX86=0;
|
||||
caps->hasAltiVec = 0;
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
#ifdef __APPLE__
|
||||
/*
|
||||
rip-off from ffmpeg altivec detection code.
|
||||
@ -558,47 +558,47 @@ void GetCpuCaps( CpuCaps *caps)
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"AltiVec %sfound\n", (caps->hasAltiVec ? "" : "not "));
|
||||
#endif /* HAVE_ALTIVEC */
|
||||
|
||||
#ifdef ARCH_IA64
|
||||
#if ARCH_IA64
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Intel Itanium\n");
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_SPARC
|
||||
#if ARCH_SPARC
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Sun Sparc\n");
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_ARMV4L
|
||||
#if ARCH_ARM
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: ARM\n");
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_PPC
|
||||
#if ARCH_PPC
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: PowerPC\n");
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_ALPHA
|
||||
#if ARCH_ALPHA
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Digital Alpha\n");
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_SGI_MIPS
|
||||
#if ARCH_SGI_MIPS
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: SGI MIPS\n");
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_PA_RISC
|
||||
#if ARCH_PA_RISC
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Hewlett-Packard PA-RISC\n");
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_S390
|
||||
#if ARCH_S390
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: IBM S/390\n");
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_S390X
|
||||
#if ARCH_S390X
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: IBM S/390X\n");
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_VAX
|
||||
#if ARCH_VAX
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO, "CPU: Digital VAX\n" );
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_XTENSA
|
||||
#if ARCH_XTENSA
|
||||
mp_msg(MSGT_CPUDETECT,MSGL_INFO, "CPU: Tensilica Xtensa\n" );
|
||||
#endif
|
||||
}
|
||||
|
@ -6,7 +6,7 @@
|
||||
#define CPUTYPE_I586 5
|
||||
#define CPUTYPE_I686 6
|
||||
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
# define REGa rax
|
||||
# define REGb rbx
|
||||
# define REGBP rbp
|
||||
|
@ -38,6 +38,7 @@ videocodec ffmimic
|
||||
info "FFmpeg Mimic video"
|
||||
status working
|
||||
fourcc ML20
|
||||
fourcc LM20 ; mimic in avi
|
||||
out I420
|
||||
driver ffmpeg
|
||||
dll "mimic"
|
||||
@ -1717,6 +1718,14 @@ videocodec psiv
|
||||
dll "psiv.dll"
|
||||
out BGR32,BGR24 query,flip
|
||||
|
||||
videocodec midivid3
|
||||
info "www.midivid.com/codec/mv3codec.html"
|
||||
status working
|
||||
fourcc MV30
|
||||
driver vfw
|
||||
dll "MV3.dll"
|
||||
out BGR24,BGR16
|
||||
|
||||
videocodec nsvideo
|
||||
info "Power VideoWorks video"
|
||||
status working
|
||||
@ -2126,6 +2135,14 @@ videocodec tridvfw
|
||||
dll "TRICDC32.DRV"
|
||||
out BGR24 flip
|
||||
|
||||
videocodec vdtzvfw
|
||||
info "Telegeny VDTZ"
|
||||
status working
|
||||
fourcc VDTZ
|
||||
driver vfw
|
||||
dll "VTZ32.DLL"
|
||||
out BGR24 flip
|
||||
|
||||
videocodec vivd2
|
||||
info "SoftMedia ViVD V2 codec VfW"
|
||||
status working
|
||||
|
@ -107,7 +107,7 @@ struct a52_state_s {
|
||||
#define DELTA_BIT_NONE (2)
|
||||
#define DELTA_BIT_RESERVED (3)
|
||||
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
# define REG_a "rax"
|
||||
# define REG_d "rdx"
|
||||
# define REG_S "rsi"
|
||||
|
@ -37,7 +37,7 @@
|
||||
#define ALT_BITSTREAM_READER
|
||||
|
||||
/* used to avoid misaligned exceptions on some archs (alpha, ...) */
|
||||
#if defined (ARCH_X86) || defined(HAVE_ARMV6)
|
||||
#if ARCH_X86 || defined(HAVE_ARMV6)
|
||||
# define unaligned32(a) (*(uint32_t*)(a))
|
||||
#else
|
||||
# ifdef __GNUC__
|
||||
|
@ -56,7 +56,7 @@ void downmix_accel_init(uint32_t mm_accel)
|
||||
{
|
||||
a52_upmix= upmix_C;
|
||||
a52_downmix= downmix_C;
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
if(mm_accel & MM_ACCEL_X86_MMX) a52_upmix= upmix_MMX;
|
||||
if(mm_accel & MM_ACCEL_X86_SSE) a52_downmix= downmix_SSE;
|
||||
if(mm_accel & MM_ACCEL_X86_3DNOW) a52_downmix= downmix_3dnow;
|
||||
@ -686,7 +686,7 @@ void upmix_C (sample_t * samples, int acmod, int output)
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
static void mix2to1_SSE (sample_t * dest, sample_t * src, sample_t bias)
|
||||
{
|
||||
__asm__ volatile(
|
||||
|
@ -54,6 +54,7 @@ void (*a52_imdct_512) (sample_t * data, sample_t * delay, sample_t bias);
|
||||
|
||||
#ifdef RUNTIME_CPUDETECT
|
||||
#undef HAVE_3DNOWEX
|
||||
#define HAVE_3DNOWEX 0
|
||||
#endif
|
||||
|
||||
typedef struct complex_s {
|
||||
@ -118,7 +119,7 @@ static complex_t __attribute__((aligned(16))) * w[7] = {w_1, w_2, w_4, w_8, w_16
|
||||
static sample_t __attribute__((aligned(16))) xcos1[128];
|
||||
static sample_t __attribute__((aligned(16))) xsin1[128];
|
||||
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
// NOTE: SSE needs 16byte alignment or it will segfault
|
||||
//
|
||||
static float __attribute__((aligned(16))) sseSinCos1c[256];
|
||||
@ -365,7 +366,7 @@ void imdct_do_512 (sample_t * data, sample_t * delay, sample_t bias)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
|
||||
#ifdef HAVE_ALTIVEC_H
|
||||
#include <altivec.h>
|
||||
@ -710,10 +711,9 @@ imdct_do_512_altivec(sample_t data[],sample_t delay[], sample_t bias)
|
||||
|
||||
// Stuff below this line is borrowed from libac3
|
||||
#include "srfftp.h"
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#ifndef HAVE_3DNOW
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_3DNOW 1
|
||||
#endif
|
||||
#include "srfftp_3dnow.h"
|
||||
|
||||
const i_cmplx_t x_plus_minus_3dnow __attribute__ ((aligned (8))) = {{ 0x00000000UL, 0x80000000UL }};
|
||||
@ -721,8 +721,10 @@ const i_cmplx_t x_minus_plus_3dnow __attribute__ ((aligned (8))) = {{ 0x80000000
|
||||
const complex_t HSQRT2_3DNOW __attribute__ ((aligned (8))) = { 0.707106781188, 0.707106781188 };
|
||||
|
||||
#undef HAVE_3DNOWEX
|
||||
#define HAVE_3DNOWEX 0
|
||||
#include "imdct_3dnow.h"
|
||||
#define HAVE_3DNOWEX
|
||||
#undef HAVE_3DNOWEX
|
||||
#define HAVE_3DNOWEX 1
|
||||
#include "imdct_3dnow.h"
|
||||
|
||||
void
|
||||
@ -1202,7 +1204,7 @@ void a52_imdct_init (uint32_t mm_accel)
|
||||
w[i][k].imag = sin (-M_PI * k / j);
|
||||
}
|
||||
}
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
for (i = 0; i < 128; i++) {
|
||||
sseSinCos1c[2*i+0]= xcos1[i];
|
||||
sseSinCos1c[2*i+1]= -xcos1[i];
|
||||
@ -1256,7 +1258,7 @@ void a52_imdct_init (uint32_t mm_accel)
|
||||
ifft128 = ifft128_c;
|
||||
ifft64 = ifft64_c;
|
||||
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
if(mm_accel & MM_ACCEL_X86_SSE)
|
||||
{
|
||||
fprintf (stderr, "Using SSE optimized IMDCT transform\n");
|
||||
@ -1276,7 +1278,7 @@ void a52_imdct_init (uint32_t mm_accel)
|
||||
}
|
||||
else
|
||||
#endif // ARCH_X86 || ARCH_X86_64
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
if (mm_accel & MM_ACCEL_PPC_ALTIVEC)
|
||||
{
|
||||
fprintf(stderr, "Using AltiVec optimized IMDCT transform\n");
|
||||
@ -1285,7 +1287,7 @@ void a52_imdct_init (uint32_t mm_accel)
|
||||
else
|
||||
#endif
|
||||
|
||||
#ifdef LIBA52_DJBFFT
|
||||
#if LIBA52_DJBFFT
|
||||
if (mm_accel & MM_ACCEL_DJBFFT) {
|
||||
fprintf (stderr, "Using djbfft for IMDCT transform\n");
|
||||
ifft128 = (void (*) (complex_t *)) fftc4_un128;
|
||||
|
@ -26,7 +26,7 @@
|
||||
#undef FFT_ASMB16_3DNOW
|
||||
#undef FFT_128P_3DNOW
|
||||
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
#define FFT_4_3DNOW fft_4_3dnowex
|
||||
#define FFT_8_3DNOW fft_8_3dnowex
|
||||
#define FFT_ASMB_3DNOW fft_asmb_3dnowex
|
||||
@ -52,7 +52,7 @@ static void FFT_4_3DNOW(complex_t *x)
|
||||
"pxor %3, %%mm1\n\t" /* -mm1.re | mm1.im */
|
||||
"pfadd %%mm1, %%mm3\n\t" /* vi.im = x[3].re - x[1].re; */
|
||||
"movq %%mm3, %%mm4\n\t" /* vi.re =-x[3].im + x[1].im; mm4 = vi */
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
"pswapd %%mm4, %%mm4\n\t"
|
||||
#else
|
||||
"punpckldq %%mm4, %%mm5\n\t"
|
||||
@ -129,7 +129,7 @@ static void FFT_8_3DNOW(complex_t *x)
|
||||
"movq (%1), %%mm1\n\t"
|
||||
"movq 16(%1), %%mm4\n\t"
|
||||
"movq %%mm1, %%mm2\n\t"
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
"pswapd %%mm3, %%mm3\n\t"
|
||||
#else
|
||||
"punpckldq %%mm3, %%mm6\n\t"
|
||||
@ -160,7 +160,7 @@ static void FFT_8_3DNOW(complex_t *x)
|
||||
"movq %2, %%mm1\n\t"
|
||||
"movq 56(%3), %%mm3\n\t"
|
||||
"pfsub 40(%3), %%mm0\n\t"
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
"pswapd %%mm1, %%mm1\n\t"
|
||||
#else
|
||||
"punpckldq %%mm1, %%mm2\n\t"
|
||||
@ -168,7 +168,7 @@ static void FFT_8_3DNOW(complex_t *x)
|
||||
#endif
|
||||
"pxor %%mm7, %%mm1\n\t"
|
||||
"pfadd %%mm1, %%mm0\n\t"
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
"pswapd %%mm3, %%mm3\n\t"
|
||||
#else
|
||||
"punpckldq %%mm3, %%mm2\n\t"
|
||||
@ -182,7 +182,7 @@ static void FFT_8_3DNOW(complex_t *x)
|
||||
"pfmul %4, %%mm0\n\t"
|
||||
|
||||
"movq 40(%3), %%mm5\n\t"
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
"pswapd %%mm5, %%mm5\n\t"
|
||||
#else
|
||||
"punpckldq %%mm5, %%mm1\n\t"
|
||||
@ -205,7 +205,7 @@ static void FFT_8_3DNOW(complex_t *x)
|
||||
/* x[3] x[7] */
|
||||
__asm__ volatile(
|
||||
"movq %1, %%mm0\n\t"
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
"pswapd %3, %%mm1\n\t"
|
||||
#else
|
||||
"movq %3, %%mm1\n\t"
|
||||
@ -218,7 +218,7 @@ static void FFT_8_3DNOW(complex_t *x)
|
||||
"movq 56(%4), %%mm3\n\t"
|
||||
"pxor %%mm7, %%mm3\n\t"
|
||||
"pfadd %%mm3, %%mm2\n\t"
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
"pswapd %%mm2, %%mm2\n\t"
|
||||
#else
|
||||
"punpckldq %%mm2, %%mm5\n\t"
|
||||
@ -331,7 +331,7 @@ static void FFT_128P_3DNOW(complex_t *a)
|
||||
}
|
||||
|
||||
static void
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
imdct_do_512_3dnowex
|
||||
#else
|
||||
imdct_do_512_3dnow
|
||||
@ -371,14 +371,14 @@ imdct_do_512_3dnow
|
||||
"punpckldq %4, %%mm1\n\t" /* mm1 = xcos[j] | xsin[j] */
|
||||
"movq %%mm0, %%mm2\n\t"
|
||||
"pfmul %%mm1, %%mm0\n\t"
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
"pswapd %%mm1, %%mm1\n\t"
|
||||
#else
|
||||
"punpckldq %%mm1, %%mm5\n\t"
|
||||
"punpckhdq %%mm5, %%mm1\n\t"
|
||||
#endif
|
||||
"pfmul %%mm1, %%mm2\n\t"
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
"pfpnacc %%mm2, %%mm0\n\t"
|
||||
#else
|
||||
"pxor %%mm7, %%mm0\n\t"
|
||||
@ -445,7 +445,7 @@ imdct_do_512_3dnow
|
||||
__asm__ volatile (
|
||||
"movq %1, %%mm0\n\t" /* ac3_buf[i].re | ac3_buf[i].im */
|
||||
"movq %%mm0, %%mm1\n\t" /* ac3_buf[i].re | ac3_buf[i].im */
|
||||
#ifndef HAVE_3DNOWEX
|
||||
#if !HAVE_3DNOWEX
|
||||
"punpckldq %%mm1, %%mm2\n\t"
|
||||
"punpckhdq %%mm2, %%mm1\n\t"
|
||||
#else
|
||||
@ -455,7 +455,7 @@ imdct_do_512_3dnow
|
||||
"punpckldq %2, %%mm3\n\t" /* ac3_xsin[i] | ac3_xcos[i] */
|
||||
"pfmul %%mm3, %%mm0\n\t"
|
||||
"pfmul %%mm3, %%mm1\n\t"
|
||||
#ifndef HAVE_3DNOWEX
|
||||
#if !HAVE_3DNOWEX
|
||||
"pxor %%mm7, %%mm0\n\t"
|
||||
"pfacc %%mm1, %%mm0\n\t"
|
||||
"punpckldq %%mm0, %%mm1\n\t"
|
||||
@ -543,7 +543,7 @@ imdct_do_512_3dnow
|
||||
"movd (%1), %%mm1\n\t"
|
||||
"punpckldq (%2), %%mm0\n\t"
|
||||
"punpckldq 508(%2), %%mm1\n\t"
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
"pswapd (%3), %%mm3\n\t"
|
||||
"pswapd -512(%3), %%mm4\n\t"
|
||||
#else
|
||||
|
@ -38,18 +38,18 @@ int (* a52_resample) (float * _f, int16_t * s16)=NULL;
|
||||
|
||||
#include "resample_c.c"
|
||||
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
#include "resample_mmx.c"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
#include "resample_altivec.c"
|
||||
#endif
|
||||
|
||||
void* a52_resample_init(uint32_t mm_accel,int flags,int chans){
|
||||
void* tmp;
|
||||
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
if(mm_accel&MM_ACCEL_X86_MMX){
|
||||
tmp=a52_resample_MMX(flags,chans);
|
||||
if(tmp){
|
||||
@ -59,7 +59,7 @@ void* tmp;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
if(mm_accel&MM_ACCEL_PPC_ALTIVEC){
|
||||
tmp=a52_resample_altivec(flags,chans);
|
||||
if(tmp){
|
||||
|
@ -76,7 +76,7 @@ static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){
|
||||
static int a52_resample_STEREO_to_2_MMX(float * _f, int16_t * s16){
|
||||
int32_t * f = (int32_t *) _f;
|
||||
/* benchmark scores are 0.3% better with SSE but we would need to set bias=0 and premultiply it
|
||||
#ifdef HAVE_SSE
|
||||
#if HAVE_SSE
|
||||
__asm__ volatile(
|
||||
"mov $-1024, %%"REG_S" \n\t"
|
||||
"1: \n\t"
|
||||
|
@ -46,7 +46,7 @@ typedef struct
|
||||
"m"(x_minus_plus_3dnow)\
|
||||
:"memory");
|
||||
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
#define PSWAP_MM(mm_base,mm_hlp) "pswapd "mm_base","mm_base"\n\t"
|
||||
#else
|
||||
#define PSWAP_MM(mm_base,mm_hlp)\
|
||||
@ -54,7 +54,7 @@ typedef struct
|
||||
"psrlq $32, "mm_base"\n\t"\
|
||||
"punpckldq "mm_hlp","mm_base"\n\t"
|
||||
#endif
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
#define PFNACC_MM(mm_base,mm_hlp) "pfnacc "mm_base","mm_base"\n\t"
|
||||
#else
|
||||
#define PFNACC_MM(mm_base,mm_hlp)\
|
||||
|
@ -93,7 +93,7 @@ extern int* af_cpu_speed;
|
||||
|
||||
// Default init type
|
||||
#ifndef AF_INIT_TYPE
|
||||
#if defined(HAVE_SSE) || defined(HAVE_3DNOW)
|
||||
#if HAVE_SSE || HAVE_3DNOW
|
||||
#define AF_INIT_TYPE (af_cpu_speed?*af_cpu_speed:AF_INIT_FAST)
|
||||
#else
|
||||
#define AF_INIT_TYPE (af_cpu_speed?*af_cpu_speed:AF_INIT_SLOW)
|
||||
|
@ -36,7 +36,7 @@
|
||||
slow and to 16 if the machine is fast and has MMX.
|
||||
*/
|
||||
|
||||
#if !defined(HAVE_MMX) // This machine is slow
|
||||
#if !HAVE_MMX // This machine is slow
|
||||
#define L8
|
||||
#else
|
||||
#define L16
|
||||
@ -201,7 +201,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
|
||||
}
|
||||
|
||||
// Calculate up and down sampling factors
|
||||
d=ff_gcd(af->data->rate,n->rate);
|
||||
d=av_gcd(af->data->rate,n->rate);
|
||||
|
||||
// If sloppy resampling is enabled limit the upsampling factor
|
||||
if(((s->setup & FREQ_MASK) == FREQ_SLOPPY) && (af->data->rate/d > 5000)){
|
||||
@ -209,7 +209,7 @@ static int control(struct af_instance_s* af, int cmd, void* arg)
|
||||
int dn=n->rate/2;
|
||||
int m=2;
|
||||
while(af->data->rate/(d*m) > 5000){
|
||||
d=ff_gcd(up,dn);
|
||||
d=av_gcd(up,dn);
|
||||
up/=2; dn/=2; m*=2;
|
||||
}
|
||||
d*=m;
|
||||
|
@ -419,7 +419,7 @@ void *decode_video(sh_video_t *sh_video, unsigned char *start, int in_size,
|
||||
|
||||
//------------------------ frame decoded. --------------------
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
// some codecs are broken, and doesn't restore MMX state :(
|
||||
// it happens usually with broken/damaged files.
|
||||
if (gCpuCaps.has3DNow) {
|
||||
|
@ -26,14 +26,11 @@
|
||||
#include <string.h>
|
||||
|
||||
#include "config.h"
|
||||
#ifdef HAVE_MMX
|
||||
#define MMX
|
||||
#endif
|
||||
|
||||
#include "mpbswap.h"
|
||||
#include "rtjpegn.h"
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
#include "mmx.h"
|
||||
#endif
|
||||
|
||||
@ -68,7 +65,7 @@ static const __u64 RTjpeg_aan_tab[64]={
|
||||
1184891264ULL, 1643641088ULL, 1548224000ULL, 1393296000ULL, 1184891264ULL, 931136000ULL, 641204288ULL, 326894240ULL,
|
||||
};
|
||||
|
||||
#ifndef MMX
|
||||
#if !HAVE_MMX
|
||||
static __s32 RTjpeg_ws[64+31];
|
||||
#endif
|
||||
__u8 RTjpeg_alldata[2*64+4*64+4*64+4*64+4*64+32];
|
||||
@ -88,7 +85,7 @@ static int RTjpeg_Ysize, RTjpeg_Csize;
|
||||
|
||||
static __s16 *RTjpeg_old=NULL;
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
mmx_t RTjpeg_lmask;
|
||||
mmx_t RTjpeg_cmask;
|
||||
#else
|
||||
@ -541,7 +538,7 @@ static int RTjpeg_s2b(__s16 *data, __s8 *strm, __u8 bt8, __u32 *qtbl)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(MMX)
|
||||
#if HAVE_MMX
|
||||
static void RTjpeg_quant_init(void)
|
||||
{
|
||||
int i;
|
||||
@ -610,7 +607,7 @@ static void RTjpeg_quant(__s16 *block, __s32 *qtbl)
|
||||
/*
|
||||
* Perform the forward DCT on one block of samples.
|
||||
*/
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
static mmx_t RTjpeg_C4 ={0x2D412D412D412D41LL};
|
||||
static mmx_t RTjpeg_C6 ={0x187E187E187E187ELL};
|
||||
static mmx_t RTjpeg_C2mC6={0x22A322A322A322A3LL};
|
||||
@ -642,7 +639,7 @@ static void RTjpeg_dct_init(void)
|
||||
|
||||
static void RTjpeg_dctY(__u8 *idata, __s16 *odata, int rskip)
|
||||
{
|
||||
#ifndef MMX
|
||||
#if !HAVE_MMX
|
||||
__s32 tmp0, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7;
|
||||
__s32 tmp10, tmp11, tmp12, tmp13;
|
||||
__s32 z1, z2, z3, z4, z5, z11, z13;
|
||||
@ -1570,7 +1567,7 @@ static void RTjpeg_idct_init(void)
|
||||
|
||||
static void RTjpeg_idct(__u8 *odata, __s16 *data, int rskip)
|
||||
{
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
|
||||
static mmx_t fix_141 = {0x5a825a825a825a82LL};
|
||||
static mmx_t fix_184n261 = {0xcf04cf04cf04cf04LL};
|
||||
@ -2864,7 +2861,7 @@ int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp)
|
||||
register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1);
|
||||
register int i, j, k;
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
sb=sp;
|
||||
@ -2904,7 +2901,7 @@ int RTjpeg_compressYUV420(__s8 *sp, unsigned char *bp)
|
||||
bp3+=RTjpeg_width<<2;
|
||||
|
||||
}
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
return (sp-sb);
|
||||
@ -2917,7 +2914,7 @@ int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp)
|
||||
register __s8 * bp3 = bp2 + RTjpeg_Csize;
|
||||
register int i, j, k;
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
sb=sp;
|
||||
@ -2948,7 +2945,7 @@ int RTjpeg_compressYUV422(__s8 *sp, unsigned char *bp)
|
||||
bp3+=RTjpeg_width<<2;
|
||||
|
||||
}
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
return (sp-sb);
|
||||
@ -2959,7 +2956,7 @@ int RTjpeg_compress8(__s8 *sp, unsigned char *bp)
|
||||
__s8 * sb;
|
||||
int i, j;
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
|
||||
@ -2976,7 +2973,7 @@ int RTjpeg_compress8(__s8 *sp, unsigned char *bp)
|
||||
bp+=RTjpeg_width;
|
||||
}
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
return (sp-sb);
|
||||
@ -2988,7 +2985,7 @@ void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp)
|
||||
register __s8 * bp3 = bp2 + (RTjpeg_Csize);
|
||||
int i, j,k;
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
|
||||
@ -3025,7 +3022,7 @@ void RTjpeg_decompressYUV422(__s8 *sp, __u8 *bp)
|
||||
bp2+=RTjpeg_width<<2;
|
||||
bp3+=RTjpeg_width<<2;
|
||||
}
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
}
|
||||
@ -3037,7 +3034,7 @@ void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp)
|
||||
register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1);
|
||||
int i, j,k;
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
|
||||
@ -3087,7 +3084,7 @@ void RTjpeg_decompressYUV420(__s8 *sp, __u8 *bp)
|
||||
bp2+=RTjpeg_width<<2;
|
||||
bp3+=RTjpeg_width<<2;
|
||||
}
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
}
|
||||
@ -3096,7 +3093,7 @@ void RTjpeg_decompress8(__s8 *sp, __u8 *bp)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
|
||||
@ -3141,7 +3138,7 @@ void RTjpeg_init_mcompress(void)
|
||||
memset(RTjpeg_old, 0, ((4*RTjpeg_width*RTjpeg_height)));
|
||||
}
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
|
||||
static int RTjpeg_bcomp(__s16 *old, mmx_t *mask)
|
||||
{
|
||||
@ -3218,7 +3215,7 @@ int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask
|
||||
register __s8 * bp3 = bp2 + (RTjpeg_Csize>>1);
|
||||
register int i, j, k;
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
RTjpeg_lmask.uq=((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask;
|
||||
RTjpeg_cmask.uq=((__u64)cmask<<48)|((__u64)cmask<<32)|((__u64)cmask<<16)|cmask;
|
||||
@ -3294,7 +3291,7 @@ int RTjpeg_mcompressYUV420(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask
|
||||
bp3+=RTjpeg_width<<2;
|
||||
|
||||
}
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
return (sp-sb);
|
||||
@ -3309,7 +3306,7 @@ int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask
|
||||
register __s8 * bp3;
|
||||
register int i, j, k;
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
RTjpeg_lmask.uq=((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask;
|
||||
RTjpeg_cmask.uq=((__u64)cmask<<48)|((__u64)cmask<<32)|((__u64)cmask<<16)|cmask;
|
||||
@ -3371,7 +3368,7 @@ int RTjpeg_mcompressYUV422(__s8 *sp, unsigned char *bp, __u16 lmask, __u16 cmask
|
||||
bp3+=RTjpeg_width<<2;
|
||||
}
|
||||
printf ("%d\n", block - RTjpeg_old);
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
return (sp-sb);
|
||||
@ -3383,7 +3380,7 @@ int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask)
|
||||
__s16 *block;
|
||||
int i, j;
|
||||
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
RTjpeg_lmask.uq=((__u64)lmask<<48)|((__u64)lmask<<32)|((__u64)lmask<<16)|lmask;
|
||||
#else
|
||||
@ -3409,7 +3406,7 @@ int RTjpeg_mcompress8(__s8 *sp, unsigned char *bp, __u16 lmask)
|
||||
}
|
||||
bp+=RTjpeg_width<<3;
|
||||
}
|
||||
#ifdef MMX
|
||||
#if HAVE_MMX
|
||||
emms();
|
||||
#endif
|
||||
return (sp-sb);
|
||||
|
@ -9,8 +9,8 @@
|
||||
|
||||
|
||||
|
||||
#ifdef ARCH_X86
|
||||
#ifdef HAVE_MMX
|
||||
#if ARCH_X86
|
||||
#if HAVE_MMX
|
||||
static int diff_y_mmx(unsigned char *a, unsigned char *b, int s)
|
||||
{
|
||||
int ret;
|
||||
@ -767,8 +767,8 @@ void pullup_init_context(struct pullup_context *c)
|
||||
c->diff = diff_y;
|
||||
c->comb = licomb_y;
|
||||
c->var = var_y;
|
||||
#ifdef ARCH_X86
|
||||
#ifdef HAVE_MMX
|
||||
#if ARCH_X86
|
||||
#if HAVE_MMX
|
||||
if (c->cpu & PULLUP_CPU_MMX) {
|
||||
c->diff = diff_y_mmx;
|
||||
c->comb = licomb_y_mmx;
|
||||
|
@ -78,12 +78,12 @@ static int init(sh_video_t *sh){
|
||||
accel |= MPEG2_ACCEL_X86_SSE2;
|
||||
if(gCpuCaps.hasAltiVec)
|
||||
accel |= MPEG2_ACCEL_PPC_ALTIVEC;
|
||||
#ifdef ARCH_ALPHA
|
||||
#if ARCH_ALPHA
|
||||
accel |= MPEG2_ACCEL_ALPHA;
|
||||
#elif ARCH_ARM
|
||||
accel |= MPEG2_ACCEL_ARM;
|
||||
#endif
|
||||
#ifdef HAVE_MVI
|
||||
#if HAVE_MVI
|
||||
accel |= MPEG2_ACCEL_ALPHA_MVI;
|
||||
#elif HAVE_VIS
|
||||
accel |= MPEG2_ACCEL_SPARC_VIS;
|
||||
|
@ -19,7 +19,7 @@ struct vf_priv_s {
|
||||
int max, last, cnt;
|
||||
};
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
|
||||
{
|
||||
volatile short out[4];
|
||||
@ -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;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
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
|
||||
*/
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static int diff_MMX(unsigned char *old, unsigned char *new, int os, int ns)
|
||||
{
|
||||
volatile short out[4];
|
||||
@ -683,7 +683,7 @@ static int open(vf_instance_t *vf, char* args)
|
||||
goto nomem;
|
||||
|
||||
diff=
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
gCpuCaps.hasMMX?diff_MMX:
|
||||
#endif
|
||||
diff_C;
|
||||
|
@ -26,7 +26,7 @@ static struct vf_priv_s {
|
||||
0
|
||||
};
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static void process_MMX(unsigned char *dest, int dstride, unsigned char *src, int sstride,
|
||||
int w, int h, int brightness, int contrast)
|
||||
{
|
||||
@ -215,7 +215,7 @@ static int open(vf_instance_t *vf, char* args)
|
||||
if (args) sscanf(args, "%d:%d", &vf->priv->brightness, &vf->priv->contrast);
|
||||
|
||||
process = process_C;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX) process = process_MMX;
|
||||
#endif
|
||||
|
||||
|
@ -106,7 +106,7 @@ void create_lut (eq2_param_t *par)
|
||||
par->lut_clean = 1;
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static
|
||||
void affine_1d_MMX (eq2_param_t *par, unsigned char *dst, unsigned char *src,
|
||||
unsigned w, unsigned h, unsigned dstride, unsigned sstride)
|
||||
@ -275,7 +275,7 @@ void check_values (eq2_param_t *par)
|
||||
if ((par->c == 1.0) && (par->b == 0.0) && (par->g == 1.0)) {
|
||||
par->adjust = NULL;
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
else if (par->g == 1.0 && gCpuCaps.hasMMX) {
|
||||
par->adjust = &affine_1d_MMX;
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ block_metrics_3dnow(unsigned char *a, unsigned char *b, int as, int bs,
|
||||
int lines, struct vf_priv_s *p, struct frame_stats *s)
|
||||
{
|
||||
struct metrics tm;
|
||||
#ifndef HAVE_3DNOW
|
||||
#if !HAVE_3DNOW
|
||||
mp_msg(MSGT_VFILTER, MSGL_FATAL, "block_metrics_3dnow: internal error\n");
|
||||
#else
|
||||
static const unsigned long long ones = 0x0101010101010101ull;
|
||||
@ -460,7 +460,7 @@ block_metrics_mmx2(unsigned char *a, unsigned char *b, int as, int bs,
|
||||
int lines, struct vf_priv_s *p, struct frame_stats *s)
|
||||
{
|
||||
struct metrics tm;
|
||||
#ifndef HAVE_MMX
|
||||
#if !HAVE_MMX
|
||||
mp_msg(MSGT_VFILTER, MSGL_FATAL, "block_metrics_mmx2: internal error\n");
|
||||
#else
|
||||
static const unsigned long long ones = 0x0101010101010101ull;
|
||||
@ -589,7 +589,7 @@ static inline int
|
||||
dint_copy_line_mmx2(unsigned char *dst, unsigned char *a, long bos,
|
||||
long cos, int ds, int ss, int w, int t)
|
||||
{
|
||||
#ifndef HAVE_MMX
|
||||
#if !HAVE_MMX
|
||||
mp_msg(MSGT_VFILTER, MSGL_FATAL, "dint_copy_line_mmx2: internal error\n");
|
||||
return 0;
|
||||
#else
|
||||
@ -1421,10 +1421,10 @@ static int open(vf_instance_t *vf, char* args)
|
||||
}
|
||||
if (p->mmx2 > 2)
|
||||
p->mmx2 = 0;
|
||||
#ifndef HAVE_MMX
|
||||
#if !HAVE_MMX
|
||||
p->mmx2 = 0;
|
||||
#endif
|
||||
#ifndef HAVE_3DNOW
|
||||
#if !HAVE_3DNOW
|
||||
p->mmx2 &= 1;
|
||||
#endif
|
||||
p->thres.odd = p->thres.even;
|
||||
|
@ -101,7 +101,7 @@ struct vf_priv_s { //align 16 !
|
||||
};
|
||||
|
||||
|
||||
#ifndef HAVE_MMX
|
||||
#if !HAVE_MMX
|
||||
|
||||
//This func reads from 1 slice, 1 and clears 0 & 1
|
||||
static void store_slice_c(uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale)
|
||||
@ -557,10 +557,10 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
|
||||
#endif
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
|
||||
#endif
|
||||
return vf_next_put_image(vf,dmpi, pts);
|
||||
@ -702,7 +702,7 @@ const vf_info_t vf_info_fspp = {
|
||||
#define THRESHOLD(r,x,t) if(((unsigned)((x)+t))>t*2) r=(x);else r=0;
|
||||
#define DESCALE(x,n) (((x) + (1 << ((n)-1))) >> n)
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
|
||||
DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_382683433)=FIX64(0.382683433, 14);
|
||||
DECLARE_ASM_CONST(8, uint64_t, MM_FIX_0_541196100)=FIX64(0.541196100, 14);
|
||||
@ -738,7 +738,7 @@ static const int16_t FIX_1_082392200=FIX(1.082392200, 13);
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_MMX
|
||||
#if !HAVE_MMX
|
||||
|
||||
static void column_fidct_c(int16_t* thr_adr, DCTELEM *data, DCTELEM *output, int cnt)
|
||||
{
|
||||
@ -1598,7 +1598,7 @@ static void column_fidct_mmx(int16_t* thr_adr, DCTELEM *data, DCTELEM *output,
|
||||
|
||||
#endif // HAVE_MMX
|
||||
|
||||
#ifndef HAVE_MMX
|
||||
#if !HAVE_MMX
|
||||
|
||||
static void row_idct_c(DCTELEM* workspace,
|
||||
int16_t* output_adr, int output_stride, int cnt)
|
||||
@ -1867,7 +1867,7 @@ static void row_idct_mmx (DCTELEM* workspace,
|
||||
|
||||
#endif // HAVE_MMX
|
||||
|
||||
#ifndef HAVE_MMX
|
||||
#if !HAVE_MMX
|
||||
|
||||
static void row_fdct_c(DCTELEM *data, const uint8_t *pixels, int line_size, int cnt)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ struct vf_priv_s {
|
||||
int field;
|
||||
};
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static void halfpack_MMX(unsigned char *dst, unsigned char *src[3],
|
||||
int dststride, int srcstride[3],
|
||||
int w, int h)
|
||||
@ -204,7 +204,7 @@ static int open(vf_instance_t *vf, char* args)
|
||||
if (args) sscanf(args, "%d", &vf->priv->field);
|
||||
|
||||
halfpack = halfpack_C;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX) halfpack = halfpack_MMX;
|
||||
#endif
|
||||
return 1;
|
||||
|
@ -160,7 +160,7 @@ static int open(vf_instance_t *vf, char* args)
|
||||
vf->priv->hue *= M_PI / 180.0;
|
||||
|
||||
process = process_C;
|
||||
#ifdef HAVE_MMXX
|
||||
#if HAVE_MMXX
|
||||
if(gCpuCaps.hasMMX) process = process_MMX;
|
||||
#endif
|
||||
|
||||
|
@ -57,7 +57,7 @@ static void pack_li_1_C(unsigned char *dst, unsigned char *y,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static void pack_nn_MMX(unsigned char *dst, unsigned char *y,
|
||||
unsigned char *u, unsigned char *v, int w)
|
||||
{
|
||||
@ -93,7 +93,7 @@ static void pack_li_0_MMX(unsigned char *dst, unsigned char *y,
|
||||
{
|
||||
__asm__ volatile (""
|
||||
"push %%"REG_BP" \n\t"
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
"mov %6, %%"REG_BP" \n\t"
|
||||
#else
|
||||
"movl 4(%%"REG_d"), %%"REG_BP" \n\t"
|
||||
@ -186,7 +186,7 @@ static void pack_li_0_MMX(unsigned char *dst, unsigned char *y,
|
||||
"pop %%"REG_BP" \n\t"
|
||||
:
|
||||
: "S" (y), "D" (dst), "a" (u), "b" (v), "c" (w/16),
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
"d" ((long)us), "r" ((long)vs)
|
||||
#else
|
||||
"d" (&us)
|
||||
@ -201,7 +201,7 @@ static void pack_li_1_MMX(unsigned char *dst, unsigned char *y,
|
||||
{
|
||||
__asm__ volatile (""
|
||||
"push %%"REG_BP" \n\t"
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
"mov %6, %%"REG_BP" \n\t"
|
||||
#else
|
||||
"movl 4(%%"REG_d"), %%"REG_BP" \n\t"
|
||||
@ -298,7 +298,7 @@ static void pack_li_1_MMX(unsigned char *dst, unsigned char *y,
|
||||
"pop %%"REG_BP" \n\t"
|
||||
:
|
||||
: "S" (y), "D" (dst), "a" (u), "b" (v), "c" (w/16),
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
"d" ((long)us), "r" ((long)vs)
|
||||
#else
|
||||
"d" (&us)
|
||||
@ -396,7 +396,7 @@ static int open(vf_instance_t *vf, char* args)
|
||||
pack_nn = (pack_func_t *)pack_nn_C;
|
||||
pack_li_0 = pack_li_0_C;
|
||||
pack_li_1 = pack_li_1_C;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX) {
|
||||
pack_nn = (pack_func_t *)pack_nn_MMX;
|
||||
pack_li_0 = pack_li_0_MMX;
|
||||
|
@ -40,7 +40,7 @@ enum {
|
||||
F_SHOW
|
||||
};
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static void block_diffs_MMX(struct metrics *m, unsigned char *old, unsigned char *new, int os, int ns)
|
||||
{
|
||||
int i;
|
||||
@ -516,7 +516,7 @@ static int open(vf_instance_t *vf, char* args)
|
||||
p->first = 1;
|
||||
if (args) sscanf(args, "%d", &p->drop);
|
||||
block_diffs = block_diffs_C;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX) block_diffs = block_diffs_MMX;
|
||||
#endif
|
||||
return 1;
|
||||
|
@ -145,7 +145,7 @@ static int8_t *initNoise(FilterParam *fp){
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){
|
||||
long mmx_len= len&(~7);
|
||||
noise+=shift;
|
||||
@ -174,7 +174,7 @@ static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int
|
||||
#endif
|
||||
|
||||
//duplicate of previous except movntq
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
static inline void lineNoise_MMX2(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){
|
||||
long mmx_len= len&(~7);
|
||||
noise+=shift;
|
||||
@ -216,7 +216,7 @@ static inline void lineNoise_C(uint8_t *dst, uint8_t *src, int8_t *noise, int le
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static inline void lineNoiseAvg_MMX(uint8_t *dst, uint8_t *src, int len, int8_t **shift){
|
||||
long mmx_len= len&(~7);
|
||||
|
||||
@ -356,10 +356,10 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
|
||||
|
||||
vf_clone_mpi_attributes(dmpi, mpi);
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
|
||||
#endif
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
|
||||
#endif
|
||||
|
||||
@ -447,13 +447,13 @@ static int open(vf_instance_t *vf, char* args){
|
||||
}
|
||||
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX){
|
||||
lineNoise= lineNoise_MMX;
|
||||
lineNoiseAvg= lineNoiseAvg_MMX;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
if(gCpuCaps.hasMMX2) lineNoise= lineNoise_MMX2;
|
||||
// if(gCpuCaps.hasMMX) lineNoiseAvg= lineNoiseAvg_MMX2;
|
||||
#endif
|
||||
|
@ -155,7 +155,7 @@ static void dctB_c(DCTELEM *dst, DCTELEM *src){
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static void dctB_mmx(DCTELEM *dst, DCTELEM *src){
|
||||
__asm__ volatile (
|
||||
"movq (%0), %%mm0 \n\t"
|
||||
@ -397,10 +397,10 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
|
||||
memcpy_pic(dmpi->planes[2], mpi->planes[2], mpi->w>>mpi->chroma_x_shift, mpi->h>>mpi->chroma_y_shift, dmpi->stride[2], mpi->stride[2]);
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
|
||||
#endif
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
|
||||
#endif
|
||||
|
||||
@ -464,7 +464,7 @@ static int open(vf_instance_t *vf, char* args){
|
||||
case 2: requantize= mediumthresh_c; break;
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX){
|
||||
dctB= dctB_mmx;
|
||||
}
|
||||
|
@ -555,7 +555,7 @@ void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, Sw
|
||||
static int firstTime=1;
|
||||
*flags=0;
|
||||
|
||||
#ifdef ARCH_X86
|
||||
#if ARCH_X86
|
||||
if(gCpuCaps.hasMMX)
|
||||
__asm__ volatile("emms\n\t"::: "memory"); //FIXME this should not be required but it IS (even for non-MMX versions)
|
||||
#endif
|
||||
|
@ -146,7 +146,7 @@ static void softthresh_c(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *perm
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static void hardthresh_mmx(DCTELEM dst[64], DCTELEM src[64], int qp, uint8_t *permutation){
|
||||
int bias= 0; //FIXME
|
||||
unsigned int threshold1;
|
||||
@ -327,7 +327,7 @@ static void store_slice_c(uint8_t *dst, int16_t *src, int dst_stride, int src_st
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static void store_slice_mmx(uint8_t *dst, int16_t *src, int dst_stride, int src_stride, int width, int height, int log2_scale){
|
||||
int y;
|
||||
|
||||
@ -499,10 +499,10 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
|
||||
#endif
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
|
||||
#endif
|
||||
|
||||
@ -589,7 +589,7 @@ static int open(vf_instance_t *vf, char* args){
|
||||
case 1: requantize= softthresh_c; break;
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX){
|
||||
store_slice= store_slice_mmx;
|
||||
switch(vf->priv->mode&3){
|
||||
|
@ -47,7 +47,7 @@ static void deint(unsigned char *dest, int ds, unsigned char *src, int ss, int w
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
static void qpel_li_3DNOW(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up)
|
||||
{
|
||||
int i, j, ssd=ss;
|
||||
@ -83,7 +83,7 @@ static void qpel_li_3DNOW(unsigned char *d, unsigned char *s, int w, int h, int
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
static void qpel_li_MMX2(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up)
|
||||
{
|
||||
int i, j, ssd=ss;
|
||||
@ -120,7 +120,7 @@ static void qpel_li_MMX2(unsigned char *d, unsigned char *s, int w, int h, int d
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static void qpel_li_MMX(unsigned char *d, unsigned char *s, int w, int h, int ds, int ss, int up)
|
||||
{
|
||||
int i, j, ssd=ss;
|
||||
@ -480,14 +480,14 @@ static int open(vf_instance_t *vf, char* args)
|
||||
if (args) sscanf(args, "%d:%d", &vf->priv->mode, &vf->priv->parity);
|
||||
qpel_li = qpel_li_C;
|
||||
qpel_4tap = qpel_4tap_C;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX) qpel_li = qpel_li_MMX;
|
||||
if(gCpuCaps.hasMMX) qpel_4tap = qpel_4tap_MMX;
|
||||
#endif
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
if(gCpuCaps.hasMMX2) qpel_li = qpel_li_MMX2;
|
||||
#endif
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
if(gCpuCaps.has3DNow) qpel_li = qpel_li_3DNOW;
|
||||
#endif
|
||||
return 1;
|
||||
|
@ -192,11 +192,11 @@ static int put_image( struct vf_instance* vf, mp_image_t *mpi, double pts) {
|
||||
|
||||
vf_clone_mpi_attributes(dmpi, mpi);
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX)
|
||||
__asm__ volatile ("emms\n\t");
|
||||
#endif
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
if(gCpuCaps.hasMMX2)
|
||||
__asm__ volatile ("sfence\n\t");
|
||||
#endif
|
||||
|
@ -291,10 +291,10 @@ static int put_image(struct vf_instance* vf, mp_image_t *mpi, double pts){
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(gCpuCaps.hasMMX) __asm__ volatile ("emms\n\t");
|
||||
#endif
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
if(gCpuCaps.hasMMX2) __asm__ volatile ("sfence\n\t");
|
||||
#endif
|
||||
|
||||
@ -370,7 +370,7 @@ static int open(vf_instance_t *vf, char* args){
|
||||
if(vf->priv->qp < 0)
|
||||
vf->priv->qp = 0;
|
||||
|
||||
// #ifdef HAVE_MMX
|
||||
// #if HAVE_MMX
|
||||
// if(gCpuCaps.hasMMX){
|
||||
// store_slice= store_slice_mmx;
|
||||
// }
|
||||
|
@ -69,7 +69,7 @@ static void store_ref(struct vf_priv_s *p, uint8_t *src[3], int src_stride[3], i
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(HAVE_MMX) && defined(NAMED_ASM_ARGS)
|
||||
#if HAVE_MMX && defined(NAMED_ASM_ARGS)
|
||||
|
||||
#define LOAD4(mem,dst) \
|
||||
"movd "mem", "#dst" \n\t"\
|
||||
@ -282,7 +282,7 @@ static void filter_line_mmx2(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, u
|
||||
#undef CHECK2
|
||||
#undef FILTER
|
||||
|
||||
#endif /* defined(HAVE_MMX) && defined(NAMED_ASM_ARGS) */
|
||||
#endif /* HAVE_MMX && defined(NAMED_ASM_ARGS) */
|
||||
|
||||
static void filter_line_c(struct vf_priv_s *p, uint8_t *dst, uint8_t *prev, uint8_t *cur, uint8_t *next, int w, int refs, int parity){
|
||||
int x;
|
||||
@ -364,7 +364,7 @@ static void filter(struct vf_priv_s *p, uint8_t *dst[3], int dst_stride[3], int
|
||||
}
|
||||
}
|
||||
}
|
||||
#if defined(HAVE_MMX) && defined(NAMED_ASM_ARGS)
|
||||
#if HAVE_MMX && defined(NAMED_ASM_ARGS)
|
||||
if(gCpuCaps.hasMMX2) __asm__ volatile("emms \n\t" : : : "memory");
|
||||
#endif
|
||||
}
|
||||
@ -503,7 +503,7 @@ static int open(vf_instance_t *vf, char* args){
|
||||
if (args) sscanf(args, "%d:%d", &vf->priv->mode, &vf->priv->parity);
|
||||
|
||||
filter_line = filter_line_c;
|
||||
#if defined(HAVE_MMX) && defined(NAMED_ASM_ARGS)
|
||||
#if HAVE_MMX && defined(NAMED_ASM_ARGS)
|
||||
if(gCpuCaps.hasMMX2) filter_line = filter_line_mmx2;
|
||||
#endif
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "mpbswap.h"
|
||||
|
||||
|
||||
#ifdef ARCH_X86
|
||||
#if ARCH_X86
|
||||
#define ASF_LOAD_GUID_PREFIX(guid) (*(uint32_t *)(guid))
|
||||
#else
|
||||
#define ASF_LOAD_GUID_PREFIX(guid) AV_RL32(guid)
|
||||
|
@ -261,7 +261,7 @@ static void handle_stream(demuxer_t *demuxer, AVFormatContext *avfc, int i) {
|
||||
sh_audio->audio.dwScale= codec->block_align ? codec->block_align*8 : 8;
|
||||
sh_audio->audio.dwRate = codec->bit_rate;
|
||||
}
|
||||
g= ff_gcd(sh_audio->audio.dwScale, sh_audio->audio.dwRate);
|
||||
g= av_gcd(sh_audio->audio.dwScale, sh_audio->audio.dwRate);
|
||||
sh_audio->audio.dwScale /= g;
|
||||
sh_audio->audio.dwRate /= g;
|
||||
// printf("sca:%d rat:%d fs:%d sr:%d ba:%d\n", sh_audio->audio.dwScale, sh_audio->audio.dwRate, codec->frame_size, codec->sample_rate, codec->block_align);
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
#include "cpudetect.h"
|
||||
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
static inline uint32_t arch_accel (uint32_t accel)
|
||||
{
|
||||
/* Use MPlayer CPU detection instead of libmpeg2 variant. */
|
||||
@ -150,7 +150,7 @@ static inline uint32_t arch_accel (uint32_t accel)
|
||||
}
|
||||
#endif /* ARCH_X86 || ARCH_X86_64 */
|
||||
|
||||
#if defined(ACCEL_DETECT) && (defined(ARCH_PPC) || defined(ARCH_SPARC))
|
||||
#if defined(ACCEL_DETECT) && (ARCH_PPC || ARCH_SPARC)
|
||||
#include <signal.h>
|
||||
#include <setjmp.h>
|
||||
|
||||
@ -169,7 +169,7 @@ static RETSIGTYPE sigill_handler (int sig)
|
||||
}
|
||||
#endif /* ACCEL_DETECT && (ARCH_PPC || ARCH_SPARC) */
|
||||
|
||||
#ifdef ARCH_PPC
|
||||
#if ARCH_PPC
|
||||
static uint32_t arch_accel (uint32_t accel)
|
||||
{
|
||||
#ifdef ACCEL_DETECT
|
||||
@ -206,7 +206,7 @@ static uint32_t arch_accel (uint32_t accel)
|
||||
}
|
||||
#endif /* ARCH_PPC */
|
||||
|
||||
#ifdef ARCH_SPARC
|
||||
#if ARCH_SPARC
|
||||
static uint32_t arch_accel (uint32_t accel)
|
||||
{
|
||||
if (accel & MPEG2_ACCEL_SPARC_VIS2)
|
||||
@ -252,7 +252,7 @@ static uint32_t arch_accel (uint32_t accel)
|
||||
}
|
||||
#endif /* ARCH_SPARC */
|
||||
|
||||
#ifdef ARCH_ALPHA
|
||||
#if ARCH_ALPHA
|
||||
static inline uint32_t arch_accel (uint32_t accel)
|
||||
{
|
||||
if (accel & MPEG2_ACCEL_ALPHA_MVI)
|
||||
@ -276,7 +276,7 @@ static inline uint32_t arch_accel (uint32_t accel)
|
||||
|
||||
uint32_t mpeg2_detect_accel (uint32_t accel)
|
||||
{
|
||||
#if defined (ARCH_X86) || defined (ARCH_X86_64) || defined (ARCH_PPC) || defined (ARCH_ALPHA) || defined (ARCH_SPARC)
|
||||
#if ARCH_X86 || ARCH_X86_64 || ARCH_PPC || ARCH_ALPHA || ARCH_SPARC
|
||||
accel = arch_accel (accel);
|
||||
#endif
|
||||
return accel;
|
||||
|
@ -29,21 +29,21 @@
|
||||
#include "mpeg2.h"
|
||||
#include "attributes.h"
|
||||
#include "mpeg2_internal.h"
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
#include "mmx.h"
|
||||
#endif
|
||||
|
||||
void (* mpeg2_cpu_state_save) (cpu_state_t * state) = NULL;
|
||||
void (* mpeg2_cpu_state_restore) (cpu_state_t * state) = NULL;
|
||||
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
static void state_restore_mmx (cpu_state_t * state)
|
||||
{
|
||||
emms ();
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_PPC
|
||||
#if ARCH_PPC
|
||||
#if defined(__APPLE_CC__) /* apple */
|
||||
#define LI(a,b) "li r" #a "," #b "\n\t"
|
||||
#define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t"
|
||||
@ -115,12 +115,12 @@ static void state_restore_altivec (cpu_state_t * state)
|
||||
|
||||
void mpeg2_cpu_state_init (uint32_t accel)
|
||||
{
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
if (accel & MPEG2_ACCEL_X86_MMX) {
|
||||
mpeg2_cpu_state_restore = state_restore_mmx;
|
||||
}
|
||||
#endif
|
||||
#ifdef ARCH_PPC
|
||||
#if ARCH_PPC
|
||||
if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
|
||||
mpeg2_cpu_state_save = state_save_altivec;
|
||||
mpeg2_cpu_state_restore = state_restore_altivec;
|
||||
|
@ -239,7 +239,7 @@ static void mpeg2_idct_add_c (const int last, int16_t * block,
|
||||
|
||||
void mpeg2_idct_init (uint32_t accel)
|
||||
{
|
||||
#ifdef HAVE_SSE2
|
||||
#if HAVE_SSE2
|
||||
if (accel & MPEG2_ACCEL_X86_SSE2) {
|
||||
mpeg2_idct_copy = mpeg2_idct_copy_sse2;
|
||||
mpeg2_idct_add = mpeg2_idct_add_sse2;
|
||||
@ -258,14 +258,14 @@ void mpeg2_idct_init (uint32_t accel)
|
||||
mpeg2_idct_mmx_init ();
|
||||
} else
|
||||
#endif
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
if (accel & MPEG2_ACCEL_PPC_ALTIVEC) {
|
||||
mpeg2_idct_copy = mpeg2_idct_copy_altivec;
|
||||
mpeg2_idct_add = mpeg2_idct_add_altivec;
|
||||
mpeg2_idct_altivec_init ();
|
||||
} else
|
||||
#endif
|
||||
#ifdef HAVE_MVI
|
||||
#if HAVE_MVI
|
||||
if (accel & MPEG2_ACCEL_ALPHA_MVI) {
|
||||
mpeg2_idct_copy = mpeg2_idct_copy_mvi;
|
||||
mpeg2_idct_add = mpeg2_idct_add_mvi;
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef ARCH_ALPHA
|
||||
#if ARCH_ALPHA
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <inttypes.h>
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef ARCH_PPC
|
||||
#if ARCH_PPC
|
||||
|
||||
#ifdef HAVE_ALTIVEC_H
|
||||
#include <altivec.h>
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
|
@ -37,37 +37,37 @@ mpeg2_mc_t mpeg2_mc;
|
||||
|
||||
void mpeg2_mc_init (uint32_t accel)
|
||||
{
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
if (accel & MPEG2_ACCEL_X86_MMXEXT)
|
||||
mpeg2_mc = mpeg2_mc_mmxext;
|
||||
else
|
||||
#endif
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
if (accel & MPEG2_ACCEL_X86_3DNOW)
|
||||
mpeg2_mc = mpeg2_mc_3dnow;
|
||||
else
|
||||
#endif
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if (accel & MPEG2_ACCEL_X86_MMX)
|
||||
mpeg2_mc = mpeg2_mc_mmx;
|
||||
else
|
||||
#endif
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
if (accel & MPEG2_ACCEL_PPC_ALTIVEC)
|
||||
mpeg2_mc = mpeg2_mc_altivec;
|
||||
else
|
||||
#endif
|
||||
#ifdef ARCH_ALPHA
|
||||
#if ARCH_ALPHA
|
||||
if (accel & MPEG2_ACCEL_ALPHA)
|
||||
mpeg2_mc = mpeg2_mc_alpha;
|
||||
else
|
||||
#endif
|
||||
#ifdef HAVE_VIS
|
||||
#if HAVE_VIS
|
||||
if (accel & MPEG2_ACCEL_SPARC_VIS)
|
||||
mpeg2_mc = mpeg2_mc_vis;
|
||||
else
|
||||
#endif
|
||||
#ifdef ARCH_ARM
|
||||
#if ARCH_ARM
|
||||
if (accel & MPEG2_ACCEL_ARM)
|
||||
mpeg2_mc = mpeg2_mc_arm;
|
||||
else
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef ARCH_ALPHA
|
||||
#if ARCH_ALPHA
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef ARCH_PPC
|
||||
#if ARCH_PPC
|
||||
|
||||
#ifdef HAVE_ALTIVEC_H
|
||||
#include <altivec.h>
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef ARCH_ARM
|
||||
#if ARCH_ARM
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#if defined(ARCH_X86) || defined(ARCH_X86_64)
|
||||
#if ARCH_X86 || ARCH_X86_64
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef ARCH_SPARC
|
||||
#if ARCH_SPARC
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
|
@ -238,7 +238,7 @@ struct mpeg2dec_s {
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
#ifdef ARCH_PPC
|
||||
#if ARCH_PPC
|
||||
uint8_t regv[12*16];
|
||||
#endif
|
||||
int dummy;
|
||||
|
@ -88,7 +88,7 @@ void (*yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2, const uint8_t *sr
|
||||
long srcStride1, long srcStride2,
|
||||
long srcStride3, long dstStride);
|
||||
|
||||
#if defined(ARCH_X86) && defined(CONFIG_GPL)
|
||||
#if ARCH_X86 && CONFIG_GPL
|
||||
DECLARE_ASM_CONST(8, uint64_t, mmx_null) = 0x0000000000000000ULL;
|
||||
DECLARE_ASM_CONST(8, uint64_t, mmx_one) = 0xFFFFFFFFFFFFFFFFULL;
|
||||
DECLARE_ASM_CONST(8, uint64_t, mask32b) = 0x000000FF000000FFULL;
|
||||
@ -122,7 +122,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_16mask) = 0x0000001f0000001fULL;
|
||||
DECLARE_ASM_CONST(8, uint64_t, red_15mask) = 0x00007c0000007c00ULL;
|
||||
DECLARE_ASM_CONST(8, uint64_t, green_15mask) = 0x000003e0000003e0ULL;
|
||||
DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL;
|
||||
#endif /* defined(ARCH_X86) */
|
||||
#endif /* ARCH_X86 */
|
||||
|
||||
#define RGB2YUV_SHIFT 8
|
||||
#define BY ((int)( 0.098*(1<<RGB2YUV_SHIFT)+0.5))
|
||||
@ -141,35 +141,35 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL;
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#undef HAVE_SSE2
|
||||
#define HAVE_MMX 0
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 0
|
||||
#define HAVE_SSE2 0
|
||||
#define RENAME(a) a ## _C
|
||||
#include "rgb2rgb_template.c"
|
||||
|
||||
#if defined(ARCH_X86) && defined(CONFIG_GPL)
|
||||
#if ARCH_X86 && CONFIG_GPL
|
||||
|
||||
//MMX versions
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#undef HAVE_SSE2
|
||||
#undef HAVE_MMX
|
||||
#define HAVE_MMX 1
|
||||
#define RENAME(a) a ## _MMX
|
||||
#include "rgb2rgb_template.c"
|
||||
|
||||
//MMX2 versions
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#define HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#undef HAVE_SSE2
|
||||
#undef HAVE_MMX2
|
||||
#define HAVE_MMX2 1
|
||||
#define RENAME(a) a ## _MMX2
|
||||
#include "rgb2rgb_template.c"
|
||||
|
||||
//3DNOW versions
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#define HAVE_3DNOW
|
||||
#undef HAVE_SSE2
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 1
|
||||
#define RENAME(a) a ## _3DNOW
|
||||
#include "rgb2rgb_template.c"
|
||||
|
||||
@ -183,7 +183,7 @@ DECLARE_ASM_CONST(8, uint64_t, blue_15mask) = 0x0000001f0000001fULL;
|
||||
*/
|
||||
|
||||
void sws_rgb2rgb_init(int flags){
|
||||
#if (defined(HAVE_MMX2) || defined(HAVE_3DNOW) || defined(HAVE_MMX)) && defined(CONFIG_GPL)
|
||||
#if (HAVE_MMX2 || HAVE_3DNOW || HAVE_MMX) && CONFIG_GPL
|
||||
if (flags & SWS_CPU_CAPS_MMX2)
|
||||
rgb2rgb_init_MMX2();
|
||||
else if (flags & SWS_CPU_CAPS_3DNOW)
|
||||
@ -191,7 +191,7 @@ void sws_rgb2rgb_init(int flags){
|
||||
else if (flags & SWS_CPU_CAPS_MMX)
|
||||
rgb2rgb_init_MMX();
|
||||
else
|
||||
#endif /* defined(HAVE_MMX2) || defined(HAVE_3DNOW) || defined(HAVE_MMX) */
|
||||
#endif /* HAVE_MMX2 || HAVE_3DNOW || HAVE_MMX */
|
||||
rgb2rgb_init_C();
|
||||
}
|
||||
|
||||
|
@ -37,17 +37,17 @@
|
||||
#undef PREFETCHW
|
||||
#undef PAVGB
|
||||
|
||||
#ifdef HAVE_SSE2
|
||||
#if HAVE_SSE2
|
||||
#define MMREG_SIZE 16
|
||||
#else
|
||||
#define MMREG_SIZE 8
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
#define PREFETCH "prefetch"
|
||||
#define PREFETCHW "prefetchw"
|
||||
#define PAVGB "pavgusb"
|
||||
#elif defined (HAVE_MMX2)
|
||||
#elif HAVE_MMX2
|
||||
#define PREFETCH "prefetchnta"
|
||||
#define PREFETCHW "prefetcht0"
|
||||
#define PAVGB "pavgb"
|
||||
@ -56,14 +56,14 @@
|
||||
#define PREFETCHW " # nop"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
/* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */
|
||||
#define EMMS "femms"
|
||||
#else
|
||||
#define EMMS "emms"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
#define MOVNTQ "movntq"
|
||||
#define SFENCE "sfence"
|
||||
#else
|
||||
@ -76,11 +76,11 @@ static inline void RENAME(rgb24tobgr32)(const uint8_t *src, uint8_t *dst, long s
|
||||
uint8_t *dest = dst;
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint8_t *mm_end;
|
||||
#endif
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
|
||||
mm_end = end - 23;
|
||||
__asm__ volatile("movq %0, %%mm7"::"m"(mask32):"memory");
|
||||
@ -136,11 +136,11 @@ static inline void RENAME(rgb32tobgr24)(const uint8_t *src, uint8_t *dst, long s
|
||||
uint8_t *dest = dst;
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint8_t *mm_end;
|
||||
#endif
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
|
||||
mm_end = end - 31;
|
||||
while (s < mm_end)
|
||||
@ -230,7 +230,7 @@ static inline void RENAME(rgb15to16)(const uint8_t *src, uint8_t *dst, long src_
|
||||
register const uint8_t *end;
|
||||
const uint8_t *mm_end;
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*s));
|
||||
__asm__ volatile("movq %0, %%mm4"::"m"(mask15s));
|
||||
mm_end = end - 15;
|
||||
@ -279,7 +279,7 @@ static inline void RENAME(rgb16to15)(const uint8_t *src, uint8_t *dst, long src_
|
||||
register const uint8_t *end;
|
||||
const uint8_t *mm_end;
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*s));
|
||||
__asm__ volatile("movq %0, %%mm7"::"m"(mask15rg));
|
||||
__asm__ volatile("movq %0, %%mm6"::"m"(mask15b));
|
||||
@ -332,12 +332,12 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, long src_
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint8_t *mm_end;
|
||||
#endif
|
||||
uint16_t *d = (uint16_t *)dst;
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
mm_end = end - 15;
|
||||
#if 1 //is faster only if multiplies are reasonably fast (FIXME figure out on which CPUs this is faster, on Athlon it is slightly faster)
|
||||
__asm__ volatile(
|
||||
@ -430,12 +430,12 @@ static inline void RENAME(rgb32tobgr16)(const uint8_t *src, uint8_t *dst, long s
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint8_t *mm_end;
|
||||
#endif
|
||||
uint16_t *d = (uint16_t *)dst;
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
|
||||
__asm__ volatile(
|
||||
"movq %0, %%mm7 \n\t"
|
||||
@ -491,12 +491,12 @@ static inline void RENAME(rgb32to15)(const uint8_t *src, uint8_t *dst, long src_
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint8_t *mm_end;
|
||||
#endif
|
||||
uint16_t *d = (uint16_t *)dst;
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
mm_end = end - 15;
|
||||
#if 1 //is faster only if multiplies are reasonably fast (FIXME figure out on which CPUs this is faster, on Athlon it is slightly faster)
|
||||
__asm__ volatile(
|
||||
@ -589,12 +589,12 @@ static inline void RENAME(rgb32tobgr15)(const uint8_t *src, uint8_t *dst, long s
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint8_t *mm_end;
|
||||
#endif
|
||||
uint16_t *d = (uint16_t *)dst;
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
|
||||
__asm__ volatile(
|
||||
"movq %0, %%mm7 \n\t"
|
||||
@ -650,12 +650,12 @@ static inline void RENAME(rgb24tobgr16)(const uint8_t *src, uint8_t *dst, long s
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint8_t *mm_end;
|
||||
#endif
|
||||
uint16_t *d = (uint16_t *)dst;
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
|
||||
__asm__ volatile(
|
||||
"movq %0, %%mm7 \n\t"
|
||||
@ -713,12 +713,12 @@ static inline void RENAME(rgb24to16)(const uint8_t *src, uint8_t *dst, long src_
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint8_t *mm_end;
|
||||
#endif
|
||||
uint16_t *d = (uint16_t *)dst;
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
|
||||
__asm__ volatile(
|
||||
"movq %0, %%mm7 \n\t"
|
||||
@ -776,12 +776,12 @@ static inline void RENAME(rgb24tobgr15)(const uint8_t *src, uint8_t *dst, long s
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint8_t *mm_end;
|
||||
#endif
|
||||
uint16_t *d = (uint16_t *)dst;
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
|
||||
__asm__ volatile(
|
||||
"movq %0, %%mm7 \n\t"
|
||||
@ -839,12 +839,12 @@ static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, long src_
|
||||
{
|
||||
const uint8_t *s = src;
|
||||
const uint8_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint8_t *mm_end;
|
||||
#endif
|
||||
uint16_t *d = (uint16_t *)dst;
|
||||
end = s + src_size;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*src):"memory");
|
||||
__asm__ volatile(
|
||||
"movq %0, %%mm7 \n\t"
|
||||
@ -922,13 +922,13 @@ static inline void RENAME(rgb24to15)(const uint8_t *src, uint8_t *dst, long src_
|
||||
static inline void RENAME(rgb15tobgr24)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint16_t *mm_end;
|
||||
#endif
|
||||
uint8_t *d = dst;
|
||||
const uint16_t *s = (const uint16_t*)src;
|
||||
end = s + src_size/2;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
|
||||
mm_end = end - 7;
|
||||
while (s < mm_end)
|
||||
@ -1064,13 +1064,13 @@ static inline void RENAME(rgb15tobgr24)(const uint8_t *src, uint8_t *dst, long s
|
||||
static inline void RENAME(rgb16tobgr24)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint16_t *mm_end;
|
||||
#endif
|
||||
uint8_t *d = (uint8_t *)dst;
|
||||
const uint16_t *s = (const uint16_t *)src;
|
||||
end = s + src_size/2;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
|
||||
mm_end = end - 7;
|
||||
while (s < mm_end)
|
||||
@ -1205,13 +1205,13 @@ static inline void RENAME(rgb16tobgr24)(const uint8_t *src, uint8_t *dst, long s
|
||||
static inline void RENAME(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint16_t *mm_end;
|
||||
#endif
|
||||
uint8_t *d = dst;
|
||||
const uint16_t *s = (const uint16_t *)src;
|
||||
end = s + src_size/2;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
|
||||
__asm__ volatile("pxor %%mm7,%%mm7 \n\t":::"memory");
|
||||
mm_end = end - 3;
|
||||
@ -1283,13 +1283,13 @@ static inline void RENAME(rgb15to32)(const uint8_t *src, uint8_t *dst, long src_
|
||||
static inline void RENAME(rgb16to32)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
{
|
||||
const uint16_t *end;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
const uint16_t *mm_end;
|
||||
#endif
|
||||
uint8_t *d = dst;
|
||||
const uint16_t *s = (const uint16_t*)src;
|
||||
end = s + src_size/2;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(PREFETCH" %0"::"m"(*s):"memory");
|
||||
__asm__ volatile("pxor %%mm7,%%mm7 \n\t":::"memory");
|
||||
mm_end = end - 3;
|
||||
@ -1357,7 +1357,7 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long s
|
||||
long idx = 15 - src_size;
|
||||
const uint8_t *s = src-idx;
|
||||
uint8_t *d = dst-idx;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
"test %0, %0 \n\t"
|
||||
"jns 2f \n\t"
|
||||
@ -1371,7 +1371,7 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long s
|
||||
PREFETCH" 32(%1, %0) \n\t"
|
||||
"movq (%1, %0), %%mm0 \n\t"
|
||||
"movq 8(%1, %0), %%mm1 \n\t"
|
||||
# ifdef HAVE_MMX2
|
||||
# if HAVE_MMX2
|
||||
"pshufw $177, %%mm0, %%mm3 \n\t"
|
||||
"pshufw $177, %%mm1, %%mm5 \n\t"
|
||||
"pand %%mm7, %%mm0 \n\t"
|
||||
@ -1419,7 +1419,7 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long s
|
||||
static inline void RENAME(rgb24tobgr24)(const uint8_t *src, uint8_t *dst, long src_size)
|
||||
{
|
||||
unsigned i;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
long mmx_size= 23 - src_size;
|
||||
__asm__ volatile (
|
||||
"test %%"REG_a", %%"REG_a" \n\t"
|
||||
@ -1494,7 +1494,7 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u
|
||||
const long chromWidth= width>>1;
|
||||
for (y=0; y<height; y++)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
//FIXME handle 2 lines at once (fewer prefetches, reuse some chroma, but very likely memory-limited anyway)
|
||||
__asm__ volatile(
|
||||
"xor %%"REG_a", %%"REG_a" \n\t"
|
||||
@ -1531,7 +1531,7 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u
|
||||
);
|
||||
#else
|
||||
|
||||
#if defined ARCH_ALPHA && defined HAVE_MVI
|
||||
#if ARCH_ALPHA && HAVE_MVI
|
||||
#define pl2yuy2(n) \
|
||||
y1 = yc[n]; \
|
||||
y2 = yc2[n]; \
|
||||
@ -1619,7 +1619,7 @@ static inline void RENAME(yuvPlanartoyuy2)(const uint8_t *ysrc, const uint8_t *u
|
||||
ysrc += lumStride;
|
||||
dst += dstStride;
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__( EMMS" \n\t"
|
||||
SFENCE" \n\t"
|
||||
:::"memory");
|
||||
@ -1646,7 +1646,7 @@ static inline void RENAME(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *u
|
||||
const long chromWidth= width>>1;
|
||||
for (y=0; y<height; y++)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
//FIXME handle 2 lines at once (fewer prefetches, reuse some chroma, but very likely memory-limited anyway)
|
||||
__asm__ volatile(
|
||||
"xor %%"REG_a", %%"REG_a" \n\t"
|
||||
@ -1725,7 +1725,7 @@ static inline void RENAME(yuvPlanartouyvy)(const uint8_t *ysrc, const uint8_t *u
|
||||
ysrc += lumStride;
|
||||
dst += dstStride;
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__( EMMS" \n\t"
|
||||
SFENCE" \n\t"
|
||||
:::"memory");
|
||||
@ -1776,7 +1776,7 @@ static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
|
||||
const long chromWidth= width>>1;
|
||||
for (y=0; y<height; y+=2)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
"xor %%"REG_a", %%"REG_a" \n\t"
|
||||
"pcmpeqw %%mm7, %%mm7 \n\t"
|
||||
@ -1881,7 +1881,7 @@ static inline void RENAME(yuy2toyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
|
||||
ydst += lumStride;
|
||||
src += srcStride;
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile( EMMS" \n\t"
|
||||
SFENCE" \n\t"
|
||||
:::"memory");
|
||||
@ -1914,7 +1914,7 @@ static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, long srcWi
|
||||
dst+= dstStride;
|
||||
|
||||
for (y=1; y<srcHeight; y++){
|
||||
#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
|
||||
#if HAVE_MMX2 || HAVE_3DNOW
|
||||
const long mmxSize= srcWidth&~15;
|
||||
__asm__ volatile(
|
||||
"mov %4, %%"REG_a" \n\t"
|
||||
@ -1993,7 +1993,7 @@ static inline void RENAME(planar2x)(const uint8_t *src, uint8_t *dst, long srcWi
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile( EMMS" \n\t"
|
||||
SFENCE" \n\t"
|
||||
:::"memory");
|
||||
@ -2014,7 +2014,7 @@ static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
|
||||
const long chromWidth= width>>1;
|
||||
for (y=0; y<height; y+=2)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
"xor %%"REG_a", %%"REG_a" \n\t"
|
||||
"pcmpeqw %%mm7, %%mm7 \n\t"
|
||||
@ -2119,7 +2119,7 @@ static inline void RENAME(uyvytoyv12)(const uint8_t *src, uint8_t *ydst, uint8_t
|
||||
ydst += lumStride;
|
||||
src += srcStride;
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile( EMMS" \n\t"
|
||||
SFENCE" \n\t"
|
||||
:::"memory");
|
||||
@ -2139,7 +2139,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
|
||||
{
|
||||
long y;
|
||||
const long chromWidth= width>>1;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
for (y=0; y<height-2; y+=2)
|
||||
{
|
||||
long i;
|
||||
@ -2229,7 +2229,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
|
||||
"1: \n\t"
|
||||
PREFETCH" 64(%0, %%"REG_d") \n\t"
|
||||
PREFETCH" 64(%1, %%"REG_d") \n\t"
|
||||
#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
|
||||
#if HAVE_MMX2 || HAVE_3DNOW
|
||||
"movq (%0, %%"REG_d"), %%mm0 \n\t"
|
||||
"movq (%1, %%"REG_d"), %%mm1 \n\t"
|
||||
"movq 6(%0, %%"REG_d"), %%mm2 \n\t"
|
||||
@ -2290,7 +2290,7 @@ static inline void RENAME(rgb24toyv12)(const uint8_t *src, uint8_t *ydst, uint8_
|
||||
"packssdw %%mm1, %%mm0 \n\t" // V1 V0 U1 U0
|
||||
"psraw $7, %%mm0 \n\t"
|
||||
|
||||
#if defined (HAVE_MMX2) || defined (HAVE_3DNOW)
|
||||
#if HAVE_MMX2 || HAVE_3DNOW
|
||||
"movq 12(%0, %%"REG_d"), %%mm4 \n\t"
|
||||
"movq 12(%1, %%"REG_d"), %%mm1 \n\t"
|
||||
"movq 18(%0, %%"REG_d"), %%mm2 \n\t"
|
||||
@ -2438,8 +2438,8 @@ static void RENAME(interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dest,
|
||||
{
|
||||
long w;
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#ifdef HAVE_SSE2
|
||||
#if HAVE_MMX
|
||||
#if HAVE_SSE2
|
||||
__asm__(
|
||||
"xor %%"REG_a", %%"REG_a" \n\t"
|
||||
"1: \n\t"
|
||||
@ -2501,7 +2501,7 @@ static void RENAME(interleaveBytes)(uint8_t *src1, uint8_t *src2, uint8_t *dest,
|
||||
src1 += src1Stride;
|
||||
src2 += src2Stride;
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__(
|
||||
EMMS" \n\t"
|
||||
SFENCE" \n\t"
|
||||
@ -2518,7 +2518,7 @@ static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
|
||||
{
|
||||
long y,x,w,h;
|
||||
w=width/2; h=height/2;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
PREFETCH" %0 \n\t"
|
||||
PREFETCH" %1 \n\t"
|
||||
@ -2528,7 +2528,7 @@ static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
|
||||
const uint8_t* s1=src1+srcStride1*(y>>1);
|
||||
uint8_t* d=dst1+dstStride1*y;
|
||||
x=0;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
for (;x<w-31;x+=32)
|
||||
{
|
||||
__asm__ volatile(
|
||||
@ -2568,7 +2568,7 @@ static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
|
||||
const uint8_t* s2=src2+srcStride2*(y>>1);
|
||||
uint8_t* d=dst2+dstStride2*y;
|
||||
x=0;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
for (;x<w-31;x+=32)
|
||||
{
|
||||
__asm__ volatile(
|
||||
@ -2604,7 +2604,7 @@ static inline void RENAME(vu9_to_vu12)(const uint8_t *src1, const uint8_t *src2,
|
||||
#endif
|
||||
for (;x<w;x++) d[2*x]=d[2*x+1]=s2[x];
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__(
|
||||
EMMS" \n\t"
|
||||
SFENCE" \n\t"
|
||||
@ -2627,7 +2627,7 @@ static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2
|
||||
const uint8_t* vp=src3+srcStride3*(y>>2);
|
||||
uint8_t* d=dst+dstStride*y;
|
||||
x=0;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
for (;x<w-7;x+=8)
|
||||
{
|
||||
__asm__ volatile(
|
||||
@ -2695,7 +2695,7 @@ static inline void RENAME(yvu9_to_yuy2)(const uint8_t *src1, const uint8_t *src2
|
||||
d[8*x+7] = vp[x];
|
||||
}
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__(
|
||||
EMMS" \n\t"
|
||||
SFENCE" \n\t"
|
||||
|
@ -118,7 +118,7 @@ static int doTest(uint8_t *ref[3], int refStride[3], int w, int h, int srcFormat
|
||||
sws_scale(dstContext, src, srcStride, 0, srcH, dst, dstStride);
|
||||
sws_scale(outContext, dst, dstStride, 0, dstH, out, refStride);
|
||||
|
||||
#if defined(ARCH_X86)
|
||||
#if ARCH_X86
|
||||
__asm__ volatile ("emms\n\t");
|
||||
#endif
|
||||
|
||||
@ -208,7 +208,7 @@ int main(int argc, char **argv){
|
||||
}
|
||||
sws_scale(sws, rgb_src, rgb_stride, 0, H, src, stride);
|
||||
|
||||
#if defined(ARCH_X86)
|
||||
#if ARCH_X86
|
||||
__asm__ volatile ("emms\n\t");
|
||||
#endif
|
||||
|
||||
|
@ -62,7 +62,7 @@ untested special converters
|
||||
#include <unistd.h>
|
||||
#include "config.h"
|
||||
#include <assert.h>
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
#if HAVE_SYS_MMAN_H
|
||||
#include <sys/mman.h>
|
||||
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
|
||||
#define MAP_ANONYMOUS MAP_ANON
|
||||
@ -202,7 +202,7 @@ add BGR4 output support
|
||||
write special BGR->BGR scaler
|
||||
*/
|
||||
|
||||
#if defined(ARCH_X86) && defined (CONFIG_GPL)
|
||||
#if ARCH_X86 && CONFIG_GPL
|
||||
DECLARE_ASM_CONST(8, uint64_t, bF8)= 0xF8F8F8F8F8F8F8F8LL;
|
||||
DECLARE_ASM_CONST(8, uint64_t, bFC)= 0xFCFCFCFCFCFCFCFCLL;
|
||||
DECLARE_ASM_CONST(8, uint64_t, w10)= 0x0010001000100010LL;
|
||||
@ -257,7 +257,7 @@ DECLARE_ASM_CONST(8, uint64_t, ff_bgr24toUV[2][4]) = {
|
||||
|
||||
DECLARE_ASM_CONST(8, uint64_t, ff_bgr24toUVOffset)= 0x0040400000404000ULL;
|
||||
|
||||
#endif /* defined(ARCH_X86) */
|
||||
#endif /* ARCH_X86 */
|
||||
|
||||
// clipping helper table for C implementations:
|
||||
static unsigned char clip_table[768];
|
||||
@ -454,6 +454,10 @@ const char *sws_format_name(enum PixelFormat format)
|
||||
return "yuv440p";
|
||||
case PIX_FMT_VDPAU_H264:
|
||||
return "vdpau_h264";
|
||||
case PIX_FMT_VDPAU_MPEG1:
|
||||
return "vdpau_mpeg1";
|
||||
case PIX_FMT_VDPAU_MPEG2:
|
||||
return "vdpau_mpeg2";
|
||||
default:
|
||||
return "Unknown format";
|
||||
}
|
||||
@ -947,27 +951,27 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t *
|
||||
|
||||
//Note: we have C, X86, MMX, MMX2, 3DNOW version therse no 3DNOW+MMX2 one
|
||||
//Plain C versions
|
||||
#if !defined (HAVE_MMX) || defined (RUNTIME_CPUDETECT) || !defined(CONFIG_GPL)
|
||||
#if !HAVE_MMX || defined (RUNTIME_CPUDETECT) || !CONFIG_GPL
|
||||
#define COMPILE_C
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_PPC
|
||||
#if (defined (HAVE_ALTIVEC) || defined (RUNTIME_CPUDETECT)) && defined (CONFIG_GPL)
|
||||
#if ARCH_PPC
|
||||
#if (HAVE_ALTIVEC || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL
|
||||
#define COMPILE_ALTIVEC
|
||||
#endif //HAVE_ALTIVEC
|
||||
#endif //ARCH_PPC
|
||||
|
||||
#if defined(ARCH_X86)
|
||||
#if ARCH_X86
|
||||
|
||||
#if ((defined (HAVE_MMX) && !defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT)) && defined (CONFIG_GPL)
|
||||
#if ((HAVE_MMX && !HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL
|
||||
#define COMPILE_MMX
|
||||
#endif
|
||||
|
||||
#if (defined (HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && defined (CONFIG_GPL)
|
||||
#if (HAVE_MMX2 || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL
|
||||
#define COMPILE_MMX2
|
||||
#endif
|
||||
|
||||
#if ((defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT)) && defined (CONFIG_GPL)
|
||||
#if ((HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)) && CONFIG_GPL
|
||||
#define COMPILE_3DNOW
|
||||
#endif
|
||||
#endif //ARCH_X86 || ARCH_X86_64
|
||||
@ -975,24 +979,26 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t *
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#undef HAVE_ALTIVEC
|
||||
#define HAVE_MMX 0
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 0
|
||||
#define HAVE_ALTIVEC 0
|
||||
|
||||
#ifdef COMPILE_C
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#undef HAVE_ALTIVEC
|
||||
#define RENAME(a) a ## _C
|
||||
#include "swscale_template.c"
|
||||
#endif
|
||||
|
||||
#ifdef COMPILE_ALTIVEC
|
||||
#undef RENAME
|
||||
#define HAVE_ALTIVEC
|
||||
#undef HAVE_ALTIVEC
|
||||
#define HAVE_ALTIVEC 1
|
||||
#define RENAME(a) a ## _altivec
|
||||
#include "swscale_template.c"
|
||||
#endif
|
||||
|
||||
#if defined(ARCH_X86)
|
||||
#if ARCH_X86
|
||||
|
||||
//X86 versions
|
||||
/*
|
||||
@ -1007,9 +1013,12 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t *
|
||||
//MMX versions
|
||||
#ifdef COMPILE_MMX
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 0
|
||||
#define RENAME(a) a ## _MMX
|
||||
#include "swscale_template.c"
|
||||
#endif
|
||||
@ -1017,9 +1026,12 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t *
|
||||
//MMX2 versions
|
||||
#ifdef COMPILE_MMX2
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#define HAVE_MMX2
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 1
|
||||
#define HAVE_3DNOW 0
|
||||
#define RENAME(a) a ## _MMX2
|
||||
#include "swscale_template.c"
|
||||
#endif
|
||||
@ -1027,9 +1039,12 @@ static inline void yuv2rgbXinC_full(SwsContext *c, int16_t *lumFilter, int16_t *
|
||||
//3DNOW versions
|
||||
#ifdef COMPILE_3DNOW
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#define HAVE_3DNOW
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 1
|
||||
#define RENAME(a) a ## _3DNow
|
||||
#include "swscale_template.c"
|
||||
#endif
|
||||
@ -1061,7 +1076,7 @@ static inline int initFilter(int16_t **outFilter, int16_t **filterPos, int *outF
|
||||
int64_t *filter2=NULL;
|
||||
const int64_t fone= 1LL<<54;
|
||||
int ret= -1;
|
||||
#if defined(ARCH_X86)
|
||||
#if ARCH_X86
|
||||
if (flags & SWS_CPU_CAPS_MMX)
|
||||
__asm__ volatile("emms\n\t"::: "memory"); //FIXME this should not be required but it IS (even for non-MMX versions)
|
||||
#endif
|
||||
@ -1617,8 +1632,8 @@ static void globalInit(void){
|
||||
|
||||
static SwsFunc getSwsFunc(int flags){
|
||||
|
||||
#if defined(RUNTIME_CPUDETECT) && defined (CONFIG_GPL)
|
||||
#if defined(ARCH_X86)
|
||||
#if defined(RUNTIME_CPUDETECT) && CONFIG_GPL
|
||||
#if ARCH_X86
|
||||
// ordered per speed fastest first
|
||||
if (flags & SWS_CPU_CAPS_MMX2)
|
||||
return swScale_MMX2;
|
||||
@ -1630,22 +1645,22 @@ static SwsFunc getSwsFunc(int flags){
|
||||
return swScale_C;
|
||||
|
||||
#else
|
||||
#ifdef ARCH_PPC
|
||||
#if ARCH_PPC
|
||||
if (flags & SWS_CPU_CAPS_ALTIVEC)
|
||||
return swScale_altivec;
|
||||
else
|
||||
return swScale_C;
|
||||
#endif
|
||||
return swScale_C;
|
||||
#endif /* defined(ARCH_X86) */
|
||||
#endif /* ARCH_X86 */
|
||||
#else //RUNTIME_CPUDETECT
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
return swScale_MMX2;
|
||||
#elif defined (HAVE_3DNOW)
|
||||
#elif HAVE_3DNOW
|
||||
return swScale_3DNow;
|
||||
#elif defined (HAVE_MMX)
|
||||
#elif HAVE_MMX
|
||||
return swScale_MMX;
|
||||
#elif defined (HAVE_ALTIVEC)
|
||||
#elif HAVE_ALTIVEC
|
||||
return swScale_altivec;
|
||||
#else
|
||||
return swScale_C;
|
||||
@ -2169,22 +2184,22 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
|
||||
int unscaled, needsDither;
|
||||
int srcRange, dstRange;
|
||||
SwsFilter dummyFilter= {NULL, NULL, NULL, NULL};
|
||||
#if defined(ARCH_X86)
|
||||
#if ARCH_X86
|
||||
if (flags & SWS_CPU_CAPS_MMX)
|
||||
__asm__ volatile("emms\n\t"::: "memory");
|
||||
#endif
|
||||
|
||||
#if !defined(RUNTIME_CPUDETECT) || !defined (CONFIG_GPL) //ensure that the flags match the compiled variant if cpudetect is off
|
||||
#if !defined(RUNTIME_CPUDETECT) || !CONFIG_GPL //ensure that the flags match the compiled variant if cpudetect is off
|
||||
flags &= ~(SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2|SWS_CPU_CAPS_3DNOW|SWS_CPU_CAPS_ALTIVEC|SWS_CPU_CAPS_BFIN);
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_MMX2;
|
||||
#elif defined (HAVE_3DNOW)
|
||||
#elif HAVE_3DNOW
|
||||
flags |= SWS_CPU_CAPS_MMX|SWS_CPU_CAPS_3DNOW;
|
||||
#elif defined (HAVE_MMX)
|
||||
#elif HAVE_MMX
|
||||
flags |= SWS_CPU_CAPS_MMX;
|
||||
#elif defined (HAVE_ALTIVEC)
|
||||
#elif HAVE_ALTIVEC
|
||||
flags |= SWS_CPU_CAPS_ALTIVEC;
|
||||
#elif defined (ARCH_BFIN)
|
||||
#elif ARCH_BFIN
|
||||
flags |= SWS_CPU_CAPS_BFIN;
|
||||
#endif
|
||||
#endif /* RUNTIME_CPUDETECT */
|
||||
@ -2311,7 +2326,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
|
||||
{
|
||||
c->swScale= PlanarToNV12Wrapper;
|
||||
}
|
||||
#ifdef CONFIG_GPL
|
||||
#if CONFIG_GPL
|
||||
/* yuv2bgr */
|
||||
if ((srcFormat==PIX_FMT_YUV420P || srcFormat==PIX_FMT_YUV422P) && (isBGR(dstFormat) || isRGB(dstFormat))
|
||||
&& !(flags & SWS_ACCURATE_RND) && !(dstH&1))
|
||||
@ -2410,7 +2425,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
|
||||
c->swScale= gray16swap;
|
||||
}
|
||||
|
||||
#ifdef ARCH_BFIN
|
||||
#if ARCH_BFIN
|
||||
if (flags & SWS_CPU_CAPS_BFIN)
|
||||
ff_bfin_get_unscaled_swscale (c);
|
||||
#endif
|
||||
@ -2518,7 +2533,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
|
||||
(flags&SWS_BICUBLIN) ? (flags|SWS_BILINEAR) : flags,
|
||||
srcFilter->chrV, dstFilter->chrV, c->param);
|
||||
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
c->vYCoeffsBank = av_malloc(sizeof (vector signed short)*c->vLumFilterSize*c->dstH);
|
||||
c->vCCoeffsBank = av_malloc(sizeof (vector signed short)*c->vChrFilterSize*c->chrDstH);
|
||||
|
||||
@ -2648,7 +2663,7 @@ SwsContext *sws_getContext(int srcW, int srcH, enum PixelFormat srcFormat, int d
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(ARCH_X86)
|
||||
#if ARCH_X86
|
||||
av_log(c, AV_LOG_VERBOSE, "using X86-Asm scaler for horizontal scaling\n");
|
||||
#else
|
||||
if (flags & SWS_FAST_BILINEAR)
|
||||
@ -3115,7 +3130,7 @@ void sws_freeContext(SwsContext *c){
|
||||
av_freep(&c->vChrFilter);
|
||||
av_freep(&c->hLumFilter);
|
||||
av_freep(&c->hChrFilter);
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
av_freep(&c->vYCoeffsBank);
|
||||
av_freep(&c->vCCoeffsBank);
|
||||
#endif
|
||||
@ -3125,7 +3140,7 @@ void sws_freeContext(SwsContext *c){
|
||||
av_freep(&c->hLumFilterPos);
|
||||
av_freep(&c->hChrFilterPos);
|
||||
|
||||
#if defined(ARCH_X86) && defined(CONFIG_GPL)
|
||||
#if ARCH_X86 && CONFIG_GPL
|
||||
#ifdef MAP_ANONYMOUS
|
||||
if (c->funnyYCode) munmap(c->funnyYCode, MAX_FUNNY_CODE_SIZE);
|
||||
if (c->funnyUVCode) munmap(c->funnyUVCode, MAX_FUNNY_CODE_SIZE);
|
||||
@ -3135,7 +3150,7 @@ void sws_freeContext(SwsContext *c){
|
||||
#endif
|
||||
c->funnyYCode=NULL;
|
||||
c->funnyUVCode=NULL;
|
||||
#endif /* defined(ARCH_X86) */
|
||||
#endif /* ARCH_X86 */
|
||||
|
||||
av_freep(&c->lumMmx2Filter);
|
||||
av_freep(&c->chrMmx2Filter);
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#ifdef HAVE_ALTIVEC_H
|
||||
#if HAVE_ALTIVEC_H
|
||||
#include <altivec.h>
|
||||
#endif
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
#define ALT32_CORR 1
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
# define APCK_PTR2 8
|
||||
# define APCK_COEF 16
|
||||
# define APCK_SIZE 24
|
||||
@ -175,7 +175,7 @@ typedef struct SwsContext{
|
||||
uint64_t u_temp __attribute__((aligned(8)));
|
||||
uint64_t v_temp __attribute__((aligned(8)));
|
||||
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
|
||||
vector signed short CY;
|
||||
vector signed short CRV;
|
||||
@ -189,7 +189,7 @@ typedef struct SwsContext{
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef ARCH_BFIN
|
||||
#if ARCH_BFIN
|
||||
uint32_t oy __attribute__((aligned(4)));
|
||||
uint32_t oc __attribute__((aligned(4)));
|
||||
uint32_t zero __attribute__((aligned(4)));
|
||||
@ -203,7 +203,7 @@ typedef struct SwsContext{
|
||||
uint32_t gmask __attribute__((aligned(4)));
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_VIS
|
||||
#if HAVE_VIS
|
||||
uint64_t sparc_coeffs[10] __attribute__((aligned(8)));
|
||||
#endif
|
||||
|
||||
|
@ -29,17 +29,17 @@
|
||||
#undef EMMS
|
||||
#undef SFENCE
|
||||
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
/* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */
|
||||
#define EMMS "femms"
|
||||
#else
|
||||
#define EMMS "emms"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
#define PREFETCH "prefetch"
|
||||
#define PREFETCHW "prefetchw"
|
||||
#elif defined (HAVE_MMX2)
|
||||
#elif HAVE_MMX2
|
||||
#define PREFETCH "prefetchnta"
|
||||
#define PREFETCHW "prefetcht0"
|
||||
#else
|
||||
@ -47,26 +47,26 @@
|
||||
#define PREFETCHW " # nop"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
#define SFENCE "sfence"
|
||||
#else
|
||||
#define SFENCE " # nop"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
#define PAVGB(a,b) "pavgb " #a ", " #b " \n\t"
|
||||
#elif defined (HAVE_3DNOW)
|
||||
#elif HAVE_3DNOW
|
||||
#define PAVGB(a,b) "pavgusb " #a ", " #b " \n\t"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
#define REAL_MOVNTQ(a,b) "movntq " #a ", " #b " \n\t"
|
||||
#else
|
||||
#define REAL_MOVNTQ(a,b) "movq " #a ", " #b " \n\t"
|
||||
#endif
|
||||
#define MOVNTQ(a,b) REAL_MOVNTQ(a,b)
|
||||
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
#include "swscale_altivec_template.c"
|
||||
#endif
|
||||
|
||||
@ -865,7 +865,7 @@
|
||||
"cmp "#dstw", "#index" \n\t"\
|
||||
" jb 1b \n\t"
|
||||
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
#undef WRITEBGR24
|
||||
#define WRITEBGR24(dst, dstw, index) WRITEBGR24MMX2(dst, dstw, index)
|
||||
#else
|
||||
@ -895,7 +895,7 @@ static inline void RENAME(yuv2yuvX)(SwsContext *c, int16_t *lumFilter, int16_t *
|
||||
int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
|
||||
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(!(c->flags & SWS_BITEXACT)){
|
||||
if (c->flags & SWS_ACCURATE_RND){
|
||||
if (uDest){
|
||||
@ -915,7 +915,7 @@ static inline void RENAME(yuv2yuvX)(SwsContext *c, int16_t *lumFilter, int16_t *
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
yuv2yuvX_altivec_real(lumFilter, lumSrc, lumFilterSize,
|
||||
chrFilter, chrSrc, chrFilterSize,
|
||||
dest, uDest, vDest, dstW, chrDstW);
|
||||
@ -939,7 +939,7 @@ static inline void RENAME(yuv2yuv1)(SwsContext *c, int16_t *lumSrc, int16_t *chr
|
||||
uint8_t *dest, uint8_t *uDest, uint8_t *vDest, long dstW, long chrDstW)
|
||||
{
|
||||
int i;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(!(c->flags & SWS_BITEXACT)){
|
||||
long p= uDest ? 3 : 1;
|
||||
uint8_t *src[3]= {lumSrc + dstW, chrSrc + chrDstW, chrSrc + VOFW + chrDstW};
|
||||
@ -1006,7 +1006,7 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_
|
||||
int16_t *chrFilter, int16_t **chrSrc, int chrFilterSize,
|
||||
uint8_t *dest, long dstW, long dstY)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
long dummy=0;
|
||||
if(!(c->flags & SWS_BITEXACT)){
|
||||
if (c->flags & SWS_ACCURATE_RND){
|
||||
@ -1133,7 +1133,7 @@ static inline void RENAME(yuv2packedX)(SwsContext *c, int16_t *lumFilter, int16_
|
||||
}
|
||||
}
|
||||
#endif /* HAVE_MMX */
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
/* The following list of supported dstFormat values should
|
||||
match what's found in the body of altivec_yuv2packedX() */
|
||||
if (c->dstFormat==PIX_FMT_ABGR || c->dstFormat==PIX_FMT_BGRA ||
|
||||
@ -1159,7 +1159,7 @@ static inline void RENAME(yuv2packed2)(SwsContext *c, uint16_t *buf0, uint16_t *
|
||||
int uvalpha1=4095-uvalpha;
|
||||
int i;
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(!(c->flags & SWS_BITEXACT)){
|
||||
switch(c->dstFormat)
|
||||
{
|
||||
@ -1270,7 +1270,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t *
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if(!(flags & SWS_BITEXACT)){
|
||||
if (uvalpha < 2048) // note this is not correct (shifts chrominance by 0.5 pixels) but it is a bit faster
|
||||
{
|
||||
@ -1464,7 +1464,7 @@ static inline void RENAME(yuv2packed1)(SwsContext *c, uint16_t *buf0, uint16_t *
|
||||
|
||||
static inline void RENAME(yuy2ToY)(uint8_t *dst, uint8_t *src, long width, uint32_t *unused)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
"movq "MANGLE(bm01010101)", %%mm2 \n\t"
|
||||
"mov %0, %%"REG_a" \n\t"
|
||||
@ -1489,7 +1489,7 @@ static inline void RENAME(yuy2ToY)(uint8_t *dst, uint8_t *src, long width, uint3
|
||||
|
||||
static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, long width, uint32_t *unused)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
"movq "MANGLE(bm01010101)", %%mm4 \n\t"
|
||||
"mov %0, %%"REG_a" \n\t"
|
||||
@ -1526,7 +1526,7 @@ static inline void RENAME(yuy2ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1,
|
||||
* yuy2ToY/UV)(dst, src+1, ...) would have 100% unaligned accesses. */
|
||||
static inline void RENAME(uyvyToY)(uint8_t *dst, uint8_t *src, long width, uint32_t *unused)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
"mov %0, %%"REG_a" \n\t"
|
||||
"1: \n\t"
|
||||
@ -1550,7 +1550,7 @@ static inline void RENAME(uyvyToY)(uint8_t *dst, uint8_t *src, long width, uint3
|
||||
|
||||
static inline void RENAME(uyvyToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, long width, uint32_t *unused)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
"movq "MANGLE(bm01010101)", %%mm4 \n\t"
|
||||
"mov %0, %%"REG_a" \n\t"
|
||||
@ -1643,7 +1643,7 @@ BGR2UV(uint16_t, bgr15ToUV, 0, 0, 0, 0x001F, 0x03E0, 0x7C00, RU<<10, GU<<5, BU
|
||||
BGR2UV(uint16_t, rgb16ToUV, 0, 0, 0, 0xF800, 0x07E0, 0x001F, RU , GU<<5, BU<<11, RV , GV<<5, BV<<11, RGB2YUV_SHIFT+8)
|
||||
BGR2UV(uint16_t, rgb15ToUV, 0, 0, 0, 0x7C00, 0x03E0, 0x001F, RU , GU<<5, BU<<10, RV , GV<<5, BV<<10, RGB2YUV_SHIFT+7)
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
static inline void RENAME(bgr24ToY_mmx)(uint8_t *dst, uint8_t *src, long width, int srcFormat)
|
||||
{
|
||||
|
||||
@ -1758,7 +1758,7 @@ static inline void RENAME(bgr24ToUV_mmx)(uint8_t *dstU, uint8_t *dstV, uint8_t *
|
||||
|
||||
static inline void RENAME(bgr24ToY)(uint8_t *dst, uint8_t *src, long width, uint32_t *unused)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
RENAME(bgr24ToY_mmx)(dst, src, width, PIX_FMT_BGR24);
|
||||
#else
|
||||
int i;
|
||||
@ -1775,7 +1775,7 @@ static inline void RENAME(bgr24ToY)(uint8_t *dst, uint8_t *src, long width, uint
|
||||
|
||||
static inline void RENAME(bgr24ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, long width, uint32_t *unused)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_BGR24);
|
||||
#else
|
||||
int i;
|
||||
@ -1809,7 +1809,7 @@ static inline void RENAME(bgr24ToUV_half)(uint8_t *dstU, uint8_t *dstV, uint8_t
|
||||
|
||||
static inline void RENAME(rgb24ToY)(uint8_t *dst, uint8_t *src, long width, uint32_t *unused)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
RENAME(bgr24ToY_mmx)(dst, src, width, PIX_FMT_RGB24);
|
||||
#else
|
||||
int i;
|
||||
@ -1826,7 +1826,7 @@ static inline void RENAME(rgb24ToY)(uint8_t *dst, uint8_t *src, long width, uint
|
||||
|
||||
static inline void RENAME(rgb24ToUV)(uint8_t *dstU, uint8_t *dstV, uint8_t *src1, uint8_t *src2, long width, uint32_t *unused)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
assert(src1==src2);
|
||||
RENAME(bgr24ToUV_mmx)(dstU, dstV, src1, width, PIX_FMT_RGB24);
|
||||
#else
|
||||
@ -1908,7 +1908,7 @@ static inline void RENAME(monoblack2Y)(uint8_t *dst, uint8_t *src, long width, u
|
||||
static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW, int xInc,
|
||||
int16_t *filter, int16_t *filterPos, long filterSize)
|
||||
{
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
assert(filterSize % 4 == 0 && filterSize>0);
|
||||
if (filterSize==4) // Always true for upscaling, sometimes for down, too.
|
||||
{
|
||||
@ -2064,7 +2064,7 @@ static inline void RENAME(hScale)(int16_t *dst, int dstW, uint8_t *src, int srcW
|
||||
);
|
||||
}
|
||||
#else
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
hScale_altivec_real(dst, dstW, src, srcW, xInc, filter, filterPos, filterSize);
|
||||
#else
|
||||
int i;
|
||||
@ -2169,7 +2169,7 @@ static inline void RENAME(hyscale)(SwsContext *c, uint16_t *dst, long dstWidth,
|
||||
src= formatConvBuffer;
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
// Use the new MMX scaler if the MMX2 one can't be used (it is faster than the x86 ASM one).
|
||||
if (!(flags&SWS_FAST_BILINEAR) || (!canMMX2BeUsed))
|
||||
#else
|
||||
@ -2180,8 +2180,8 @@ static inline void RENAME(hyscale)(SwsContext *c, uint16_t *dst, long dstWidth,
|
||||
}
|
||||
else // fast bilinear upscale / crap downscale
|
||||
{
|
||||
#if defined(ARCH_X86)
|
||||
#ifdef HAVE_MMX2
|
||||
#if ARCH_X86
|
||||
#if HAVE_MMX2
|
||||
int i;
|
||||
#if defined(PIC)
|
||||
uint64_t ebxsave __attribute__((aligned(8)));
|
||||
@ -2202,7 +2202,7 @@ static inline void RENAME(hyscale)(SwsContext *c, uint16_t *dst, long dstWidth,
|
||||
PREFETCH" 32(%%"REG_c") \n\t"
|
||||
PREFETCH" 64(%%"REG_c") \n\t"
|
||||
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
|
||||
#define FUNNY_Y_CODE \
|
||||
"movl (%%"REG_b"), %%esi \n\t"\
|
||||
@ -2292,7 +2292,7 @@ FUNNY_Y_CODE
|
||||
:: "r" (src), "m" (dst), "m" (dstWidth), "m" (xInc_shr16), "m" (xInc_mask)
|
||||
: "%"REG_a, "%"REG_d, "%ecx", "%"REG_D, "%esi"
|
||||
);
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
} //if MMX2 can't be used
|
||||
#endif
|
||||
#else
|
||||
@ -2305,7 +2305,7 @@ FUNNY_Y_CODE
|
||||
dst[i]= (src[xx]<<7) + (src[xx+1] - src[xx])*xalpha;
|
||||
xpos+=xInc;
|
||||
}
|
||||
#endif /* defined(ARCH_X86) */
|
||||
#endif /* ARCH_X86 */
|
||||
}
|
||||
|
||||
if(c->srcRange != c->dstRange && !(isRGB(c->dstFormat) || isBGR(c->dstFormat))){
|
||||
@ -2441,7 +2441,7 @@ inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth,
|
||||
src2= formatConvBuffer+VOFW;
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
// Use the new MMX scaler if the MMX2 one can't be used (it is faster than the x86 ASM one).
|
||||
if (!(flags&SWS_FAST_BILINEAR) || (!canMMX2BeUsed))
|
||||
#else
|
||||
@ -2453,8 +2453,8 @@ inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth,
|
||||
}
|
||||
else // fast bilinear upscale / crap downscale
|
||||
{
|
||||
#if defined(ARCH_X86)
|
||||
#ifdef HAVE_MMX2
|
||||
#if ARCH_X86
|
||||
#if HAVE_MMX2
|
||||
int i;
|
||||
#if defined(PIC)
|
||||
uint64_t ebxsave __attribute__((aligned(8)));
|
||||
@ -2475,7 +2475,7 @@ inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth,
|
||||
PREFETCH" 32(%%"REG_c") \n\t"
|
||||
PREFETCH" 64(%%"REG_c") \n\t"
|
||||
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
|
||||
#define FUNNY_UV_CODE \
|
||||
"movl (%%"REG_b"), %%esi \n\t"\
|
||||
@ -2573,7 +2573,7 @@ FUNNY_UV_CODE
|
||||
|
||||
/* GCC 3.3 makes MPlayer crash on IA-32 machines when using "g" operand here,
|
||||
which is needed to support GCC 4.0. */
|
||||
#if defined(ARCH_X86_64) && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
||||
#if ARCH_X86_64 && ((__GNUC__ > 3) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
||||
:: "m" (src1), "m" (dst), "g" ((long)dstWidth), "m" (xInc_shr16), "m" (xInc_mask),
|
||||
#else
|
||||
:: "m" (src1), "m" (dst), "m" ((long)dstWidth), "m" (xInc_shr16), "m" (xInc_mask),
|
||||
@ -2581,7 +2581,7 @@ FUNNY_UV_CODE
|
||||
"r" (src2)
|
||||
: "%"REG_a, "%"REG_d, "%ecx", "%"REG_D, "%esi"
|
||||
);
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
} //if MMX2 can't be used
|
||||
#endif
|
||||
#else
|
||||
@ -2599,7 +2599,7 @@ FUNNY_UV_CODE
|
||||
*/
|
||||
xpos+=xInc;
|
||||
}
|
||||
#endif /* defined(ARCH_X86) */
|
||||
#endif /* ARCH_X86 */
|
||||
}
|
||||
if(c->srcRange != c->dstRange && !(isRGB(c->dstFormat) || isBGR(c->dstFormat))){
|
||||
int i;
|
||||
@ -2821,7 +2821,7 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s
|
||||
break; //we can't output a dstY line so let's try with the next slice
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
c->blueDither= ff_dither8[dstY&1];
|
||||
if (c->dstFormat == PIX_FMT_RGB555 || c->dstFormat == PIX_FMT_BGR555)
|
||||
c->greenDither= ff_dither8[dstY&1];
|
||||
@ -2833,7 +2833,7 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s
|
||||
{
|
||||
int16_t **lumSrcPtr= lumPixBuf + lumBufIndex + firstLumSrcY - lastInLumBuf + vLumBufSize;
|
||||
int16_t **chrSrcPtr= chrPixBuf + chrBufIndex + firstChrSrcY - lastInChrBuf + vChrBufSize;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
int i;
|
||||
if (flags & SWS_ACCURATE_RND){
|
||||
int s= APCK_SIZE / 8;
|
||||
@ -2987,7 +2987,7 @@ static int RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int s
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(SFENCE:::"memory");
|
||||
__asm__ volatile(EMMS:::"memory");
|
||||
#endif
|
||||
|
@ -45,28 +45,26 @@ extern const uint8_t dither_8x8_32[8][8];
|
||||
extern const uint8_t dither_8x8_73[8][8];
|
||||
extern const uint8_t dither_8x8_220[8][8];
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
|
||||
/* hope these constant values are cache line aligned */
|
||||
DECLARE_ASM_CONST(8, uint64_t, mmx_00ffw) = 0x00ff00ff00ff00ffULL;
|
||||
DECLARE_ASM_CONST(8, uint64_t, mmx_redmask) = 0xf8f8f8f8f8f8f8f8ULL;
|
||||
DECLARE_ASM_CONST(8, uint64_t, mmx_grnmask) = 0xfcfcfcfcfcfcfcfcULL;
|
||||
|
||||
#undef HAVE_MMX
|
||||
|
||||
//MMX versions
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 0
|
||||
#define RENAME(a) a ## _MMX
|
||||
#include "yuv2rgb_template.c"
|
||||
|
||||
//MMX2 versions
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#define HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#undef HAVE_MMX2
|
||||
#define HAVE_MMX2 1
|
||||
#define RENAME(a) a ## _MMX2
|
||||
#include "yuv2rgb_template.c"
|
||||
|
||||
@ -485,7 +483,7 @@ EPILOG(1)
|
||||
|
||||
SwsFunc yuv2rgb_get_func_ptr (SwsContext *c)
|
||||
{
|
||||
#if defined(HAVE_MMX2) || defined(HAVE_MMX)
|
||||
#if HAVE_MMX2 || HAVE_MMX
|
||||
if (c->flags & SWS_CPU_CAPS_MMX2){
|
||||
switch(c->dstFormat){
|
||||
case PIX_FMT_RGB32: return yuv420_rgb32_MMX2;
|
||||
@ -503,19 +501,19 @@ SwsFunc yuv2rgb_get_func_ptr (SwsContext *c)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_VIS
|
||||
#if HAVE_VIS
|
||||
{
|
||||
SwsFunc t= yuv2rgb_init_vis(c);
|
||||
if (t) return t;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_MLIB
|
||||
#if CONFIG_MLIB
|
||||
{
|
||||
SwsFunc t= yuv2rgb_init_mlib(c);
|
||||
if (t) return t;
|
||||
}
|
||||
#endif
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
if (c->flags & SWS_CPU_CAPS_ALTIVEC)
|
||||
{
|
||||
SwsFunc t = yuv2rgb_init_altivec(c);
|
||||
@ -523,7 +521,7 @@ SwsFunc yuv2rgb_get_func_ptr (SwsContext *c)
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ARCH_BFIN
|
||||
#if ARCH_BFIN
|
||||
if (c->flags & SWS_CPU_CAPS_BFIN)
|
||||
{
|
||||
SwsFunc t = ff_bfin_yuv2rgb_get_func_ptr (c);
|
||||
|
@ -30,14 +30,14 @@
|
||||
#undef EMMS
|
||||
#undef SFENCE
|
||||
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
/* On K6 femms is faster than emms. On K7 femms is directly mapped to emms. */
|
||||
#define EMMS "femms"
|
||||
#else
|
||||
#define EMMS "emms"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
#define MOVNTQ "movntq"
|
||||
#define SFENCE "sfence"
|
||||
#else
|
||||
@ -335,7 +335,7 @@ static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStr
|
||||
"1: \n\t"
|
||||
YUV2RGB
|
||||
/* mm0=B, %%mm2=G, %%mm1=R */
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
"movq "MANGLE(ff_M24A)", %%mm4 \n\t"
|
||||
"movq "MANGLE(ff_M24C)", %%mm7 \n\t"
|
||||
"pshufw $0x50, %%mm0, %%mm5 \n\t" /* B3 B2 B3 B2 B1 B0 B1 B0 */
|
||||
|
@ -18,31 +18,31 @@
|
||||
//Feel free to fine-tune the above 2, it might be possible to get some speedup with them :)
|
||||
|
||||
//#define STATISTICS
|
||||
#ifdef ARCH_X86
|
||||
#if ARCH_X86
|
||||
#define CAN_COMPILE_X86_ASM
|
||||
#endif
|
||||
|
||||
//Note: we have MMX, MMX2, 3DNOW version there is no 3DNOW+MMX2 one
|
||||
//Plain C versions
|
||||
//#if !defined (HAVE_MMX) || defined (RUNTIME_CPUDETECT)
|
||||
//#if !HAVE_MMX || defined (RUNTIME_CPUDETECT)
|
||||
//#define COMPILE_C
|
||||
//#endif
|
||||
|
||||
#ifdef CAN_COMPILE_X86_ASM
|
||||
|
||||
#if (defined (HAVE_MMX) && !defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT)
|
||||
#if (HAVE_MMX && !HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)
|
||||
#define COMPILE_MMX
|
||||
#endif
|
||||
|
||||
#if (defined (HAVE_MMX2) && !defined (HAVE_SSE2)) || defined (RUNTIME_CPUDETECT)
|
||||
#if (HAVE_MMX2 && !HAVE_SSE2) || defined (RUNTIME_CPUDETECT)
|
||||
#define COMPILE_MMX2
|
||||
#endif
|
||||
|
||||
#if (defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT)
|
||||
#if (HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)
|
||||
#define COMPILE_3DNOW
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_SSE2) || defined (RUNTIME_CPUDETECT)
|
||||
#if HAVE_SSE2 || defined (RUNTIME_CPUDETECT)
|
||||
#define COMPILE_SSE
|
||||
#endif
|
||||
|
||||
@ -51,12 +51,23 @@
|
||||
#undef HAVE_3DNOW
|
||||
#undef HAVE_SSE
|
||||
#undef HAVE_SSE2
|
||||
#define HAVE_MMX 0
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 0
|
||||
#define HAVE_SSE 0
|
||||
#define HAVE_SSE2 0
|
||||
/*
|
||||
#ifdef COMPILE_C
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#undef ARCH_X86
|
||||
#undef HAVE_SSE
|
||||
#undef HAVE_SSE2
|
||||
#define HAVE_MMX 0
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 0
|
||||
#define HAVE_SSE 0
|
||||
#define HAVE_SSE2 0
|
||||
#define RENAME(a) a ## _C
|
||||
#include "aclib_template.c"
|
||||
#endif
|
||||
@ -64,11 +75,16 @@
|
||||
//MMX versions
|
||||
#ifdef COMPILE_MMX
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#undef HAVE_SSE
|
||||
#undef HAVE_SSE2
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 0
|
||||
#define HAVE_SSE 0
|
||||
#define HAVE_SSE2 0
|
||||
#define RENAME(a) a ## _MMX
|
||||
#include "aclib_template.c"
|
||||
#endif
|
||||
@ -76,11 +92,16 @@
|
||||
//MMX2 versions
|
||||
#ifdef COMPILE_MMX2
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#define HAVE_MMX2
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#undef HAVE_SSE
|
||||
#undef HAVE_SSE2
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 1
|
||||
#define HAVE_3DNOW 0
|
||||
#define HAVE_SSE 0
|
||||
#define HAVE_SSE2 0
|
||||
#define RENAME(a) a ## _MMX2
|
||||
#include "aclib_template.c"
|
||||
#endif
|
||||
@ -88,11 +109,16 @@
|
||||
//3DNOW versions
|
||||
#ifdef COMPILE_3DNOW
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#define HAVE_3DNOW
|
||||
#undef HAVE_3DNOW
|
||||
#undef HAVE_SSE
|
||||
#undef HAVE_SSE2
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 1
|
||||
#define HAVE_SSE 0
|
||||
#define HAVE_SSE2 0
|
||||
#define RENAME(a) a ## _3DNow
|
||||
#include "aclib_template.c"
|
||||
#endif
|
||||
@ -100,11 +126,16 @@
|
||||
//SSE versions (only used on SSE2 cpus)
|
||||
#ifdef COMPILE_SSE
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#define HAVE_MMX2
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_SSE
|
||||
#define HAVE_SSE2
|
||||
#undef HAVE_SSE
|
||||
#undef HAVE_SSE2
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 1
|
||||
#define HAVE_3DNOW 0
|
||||
#define HAVE_SSE 1
|
||||
#define HAVE_SSE2 1
|
||||
#define RENAME(a) a ## _SSE
|
||||
#include "aclib_template.c"
|
||||
#endif
|
||||
@ -130,13 +161,13 @@ void * fast_memcpy(void * to, const void * from, size_t len)
|
||||
#endif //CAN_COMPILE_X86_ASM
|
||||
memcpy(to, from, len); // prior to mmx we use the standart memcpy
|
||||
#else
|
||||
#ifdef HAVE_SSE2
|
||||
#if HAVE_SSE2
|
||||
fast_memcpy_SSE(to, from, len);
|
||||
#elif defined (HAVE_MMX2)
|
||||
#elif HAVE_MMX2
|
||||
fast_memcpy_MMX2(to, from, len);
|
||||
#elif defined (HAVE_3DNOW)
|
||||
#elif HAVE_3DNOW
|
||||
fast_memcpy_3DNow(to, from, len);
|
||||
#elif defined (HAVE_MMX)
|
||||
#elif HAVE_MMX
|
||||
fast_memcpy_MMX(to, from, len);
|
||||
#else
|
||||
memcpy(to, from, len); // prior to mmx we use the standart memcpy
|
||||
@ -164,13 +195,13 @@ void * mem2agpcpy(void * to, const void * from, size_t len)
|
||||
#endif //CAN_COMPILE_X86_ASM
|
||||
memcpy(to, from, len); // prior to mmx we use the standart memcpy
|
||||
#else
|
||||
#ifdef HAVE_SSE2
|
||||
#if HAVE_SSE2
|
||||
mem2agpcpy_SSE(to, from, len);
|
||||
#elif defined (HAVE_MMX2)
|
||||
#elif HAVE_MMX2
|
||||
mem2agpcpy_MMX2(to, from, len);
|
||||
#elif defined (HAVE_3DNOW)
|
||||
#elif HAVE_3DNOW
|
||||
mem2agpcpy_3DNow(to, from, len);
|
||||
#elif defined (HAVE_MMX)
|
||||
#elif HAVE_MMX
|
||||
mem2agpcpy_MMX(to, from, len);
|
||||
#else
|
||||
memcpy(to, from, len); // prior to mmx we use the standart memcpy
|
||||
|
@ -3,7 +3,7 @@
|
||||
This file contains functions which improve and expand standard C-library
|
||||
*/
|
||||
|
||||
#ifndef HAVE_SSE2
|
||||
#if !HAVE_SSE2
|
||||
/*
|
||||
P3 processor has only one SSE decoder so can execute only 1 sse insn per
|
||||
cpu clock, but it has 3 mmx decoders (include load/store unit)
|
||||
@ -13,6 +13,7 @@
|
||||
I have doubts. Anyway SSE2 version of this code can be written better.
|
||||
*/
|
||||
#undef HAVE_SSE
|
||||
#define HAVE_SSE 0
|
||||
#endif
|
||||
|
||||
|
||||
@ -65,7 +66,7 @@ If you have questions please contact with me: Nick Kurshev: nickols_k@mail.ru.
|
||||
|
||||
|
||||
#undef HAVE_ONLY_MMX1
|
||||
#if defined(HAVE_MMX) && !defined(HAVE_MMX2) && !defined(HAVE_3DNOW) && !defined(HAVE_SSE)
|
||||
#if HAVE_MMX && !HAVE_MMX2 && !HAVE_3DNOW && !HAVE_SSE
|
||||
/* means: mmx v.1. Note: Since we added alignment of destinition it speedups
|
||||
of memory copying on PentMMX, Celeron-1 and P2 upto 12% versus
|
||||
standard (non MMX-optimized) version.
|
||||
@ -76,7 +77,7 @@ If you have questions please contact with me: Nick Kurshev: nickols_k@mail.ru.
|
||||
|
||||
|
||||
#undef HAVE_K6_2PLUS
|
||||
#if !defined( HAVE_MMX2) && defined( HAVE_3DNOW)
|
||||
#if !HAVE_MMX2 && HAVE_3DNOW
|
||||
#define HAVE_K6_2PLUS
|
||||
#endif
|
||||
|
||||
@ -95,7 +96,7 @@ __asm__ volatile(\
|
||||
}
|
||||
|
||||
#undef MMREG_SIZE
|
||||
#ifdef HAVE_SSE
|
||||
#if HAVE_SSE
|
||||
#define MMREG_SIZE 16
|
||||
#else
|
||||
#define MMREG_SIZE 64 //8
|
||||
@ -104,23 +105,23 @@ __asm__ volatile(\
|
||||
#undef PREFETCH
|
||||
#undef EMMS
|
||||
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
#define PREFETCH "prefetchnta"
|
||||
#elif defined ( HAVE_3DNOW )
|
||||
#elif HAVE_3DNOW
|
||||
#define PREFETCH "prefetch"
|
||||
#else
|
||||
#define PREFETCH " # nop"
|
||||
#endif
|
||||
|
||||
/* On K6 femms is faster of emms. On K7 femms is directly mapped on emms. */
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
#define EMMS "femms"
|
||||
#else
|
||||
#define EMMS "emms"
|
||||
#endif
|
||||
|
||||
#undef MOVNTQ
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
#define MOVNTQ "movntq"
|
||||
#else
|
||||
#define MOVNTQ "movq"
|
||||
@ -183,7 +184,7 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
|
||||
perform reading and writing to be multiple to a number of
|
||||
processor's decoders, but it's not always possible.
|
||||
*/
|
||||
#ifdef HAVE_SSE /* Only P3 (may be Cyrix3) */
|
||||
#if HAVE_SSE /* Only P3 (may be Cyrix3) */
|
||||
if(((unsigned long)from) & 15)
|
||||
/* if SRC is misaligned */
|
||||
for(; i>0; i--)
|
||||
@ -343,12 +344,12 @@ static void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
|
||||
}
|
||||
|
||||
#endif /* Have SSE */
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
/* since movntq is weakly-ordered, a "sfence"
|
||||
* is needed to become ordered again. */
|
||||
__asm__ volatile ("sfence":::"memory");
|
||||
#endif
|
||||
#ifndef HAVE_SSE
|
||||
#if !HAVE_SSE
|
||||
/* enables to use FPU */
|
||||
__asm__ volatile (EMMS:::"memory");
|
||||
#endif
|
||||
@ -427,7 +428,7 @@ static void * RENAME(mem2agpcpy)(void * to, const void * from, size_t len)
|
||||
from=((const unsigned char *)from)+64;
|
||||
to=((unsigned char *)to)+64;
|
||||
}
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
/* since movntq is weakly-ordered, a "sfence"
|
||||
* is needed to become ordered again. */
|
||||
__asm__ volatile ("sfence":::"memory");
|
||||
|
@ -24,8 +24,8 @@
|
||||
#include <string.h>
|
||||
|
||||
#ifdef CONFIG_FASTMEMCPY
|
||||
#if defined(HAVE_MMX) || defined(HAVE_MMX2) || defined(HAVE_3DNOW) \
|
||||
/* || defined(HAVE_SSE) || defined(HAVE_SSE2) */
|
||||
#if HAVE_MMX || HAVE_MMX2 || HAVE_3DNOW \
|
||||
/* || HAVE_SSE || HAVE_SSE2 */
|
||||
#include <stddef.h>
|
||||
|
||||
void * fast_memcpy(void * to, const void * from, size_t len);
|
||||
|
86
libvo/osd.c
86
libvo/osd.c
@ -11,7 +11,7 @@
|
||||
#include <inttypes.h>
|
||||
#include "cpudetect.h"
|
||||
|
||||
#ifdef ARCH_X86
|
||||
#if ARCH_X86
|
||||
#define CAN_COMPILE_X86_ASM
|
||||
#endif
|
||||
|
||||
@ -23,21 +23,21 @@ static const unsigned long long mask24hl __attribute__((aligned(8))) = 0x0000FF
|
||||
|
||||
//Note: we have C, X86-nommx, MMX, MMX2, 3DNOW version therse no 3DNOW+MMX2 one
|
||||
//Plain C versions
|
||||
#if !defined (HAVE_MMX) || defined (RUNTIME_CPUDETECT)
|
||||
#if !HAVE_MMX || defined (RUNTIME_CPUDETECT)
|
||||
#define COMPILE_C
|
||||
#endif
|
||||
|
||||
#ifdef CAN_COMPILE_X86_ASM
|
||||
|
||||
#if (defined (HAVE_MMX) && !defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT)
|
||||
#if (HAVE_MMX && !HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)
|
||||
#define COMPILE_MMX
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_MMX2) || defined (RUNTIME_CPUDETECT)
|
||||
#if HAVE_MMX2 || defined (RUNTIME_CPUDETECT)
|
||||
#define COMPILE_MMX2
|
||||
#endif
|
||||
|
||||
#if (defined (HAVE_3DNOW) && !defined (HAVE_MMX2)) || defined (RUNTIME_CPUDETECT)
|
||||
#if (HAVE_3DNOW && !HAVE_MMX2) || defined (RUNTIME_CPUDETECT)
|
||||
#define COMPILE_3DNOW
|
||||
#endif
|
||||
#endif //CAN_COMPILE_X86_ASM
|
||||
@ -45,6 +45,9 @@ static const unsigned long long mask24hl __attribute__((aligned(8))) = 0x0000FF
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_MMX 0
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 0
|
||||
|
||||
#ifndef CAN_COMPILE_X86_ASM
|
||||
|
||||
@ -52,6 +55,9 @@ static const unsigned long long mask24hl __attribute__((aligned(8))) = 0x0000FF
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_MMX 0
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 0
|
||||
#define RENAME(a) a ## _C
|
||||
#include "osd_template.c"
|
||||
#endif
|
||||
@ -64,6 +70,9 @@ static const unsigned long long mask24hl __attribute__((aligned(8))) = 0x0000FF
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_MMX 0
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 0
|
||||
#define RENAME(a) a ## _X86
|
||||
#include "osd_template.c"
|
||||
#endif
|
||||
@ -71,9 +80,12 @@ static const unsigned long long mask24hl __attribute__((aligned(8))) = 0x0000FF
|
||||
//MMX versions
|
||||
#ifdef COMPILE_MMX
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 0
|
||||
#define RENAME(a) a ## _MMX
|
||||
#include "osd_template.c"
|
||||
#endif
|
||||
@ -81,9 +93,12 @@ static const unsigned long long mask24hl __attribute__((aligned(8))) = 0x0000FF
|
||||
//MMX2 versions
|
||||
#ifdef COMPILE_MMX2
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#define HAVE_MMX2
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 1
|
||||
#define HAVE_3DNOW 0
|
||||
#define RENAME(a) a ## _MMX2
|
||||
#include "osd_template.c"
|
||||
#endif
|
||||
@ -91,9 +106,12 @@ static const unsigned long long mask24hl __attribute__((aligned(8))) = 0x0000FF
|
||||
//3DNOW versions
|
||||
#ifdef COMPILE_3DNOW
|
||||
#undef RENAME
|
||||
#define HAVE_MMX
|
||||
#undef HAVE_MMX
|
||||
#undef HAVE_MMX2
|
||||
#define HAVE_3DNOW
|
||||
#undef HAVE_3DNOW
|
||||
#define HAVE_MMX 1
|
||||
#define HAVE_MMX2 0
|
||||
#define HAVE_3DNOW 1
|
||||
#define RENAME(a) a ## _3DNow
|
||||
#include "osd_template.c"
|
||||
#endif
|
||||
@ -116,13 +134,13 @@ void vo_draw_alpha_yv12(int w,int h, unsigned char* src, unsigned char *srca, in
|
||||
vo_draw_alpha_yv12_C(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#endif
|
||||
#else //RUNTIME_CPUDETECT
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
vo_draw_alpha_yv12_MMX2(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined (HAVE_3DNOW)
|
||||
#elif HAVE_3DNOW
|
||||
vo_draw_alpha_yv12_3DNow(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined (HAVE_MMX)
|
||||
#elif HAVE_MMX
|
||||
vo_draw_alpha_yv12_MMX(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined(ARCH_X86)
|
||||
#elif ARCH_X86
|
||||
vo_draw_alpha_yv12_X86(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#else
|
||||
vo_draw_alpha_yv12_C(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
@ -146,13 +164,13 @@ void vo_draw_alpha_yuy2(int w,int h, unsigned char* src, unsigned char *srca, in
|
||||
vo_draw_alpha_yuy2_C(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#endif
|
||||
#else //RUNTIME_CPUDETECT
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
vo_draw_alpha_yuy2_MMX2(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined (HAVE_3DNOW)
|
||||
#elif HAVE_3DNOW
|
||||
vo_draw_alpha_yuy2_3DNow(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined (HAVE_MMX)
|
||||
#elif HAVE_MMX
|
||||
vo_draw_alpha_yuy2_MMX(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined(ARCH_X86)
|
||||
#elif ARCH_X86
|
||||
vo_draw_alpha_yuy2_X86(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#else
|
||||
vo_draw_alpha_yuy2_C(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
@ -176,13 +194,13 @@ void vo_draw_alpha_uyvy(int w,int h, unsigned char* src, unsigned char *srca, in
|
||||
vo_draw_alpha_uyvy_C(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#endif
|
||||
#else //RUNTIME_CPUDETECT
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
vo_draw_alpha_uyvy_MMX2(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined (HAVE_3DNOW)
|
||||
#elif HAVE_3DNOW
|
||||
vo_draw_alpha_uyvy_3DNow(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined (HAVE_MMX)
|
||||
#elif HAVE_MMX
|
||||
vo_draw_alpha_uyvy_MMX(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined(ARCH_X86)
|
||||
#elif ARCH_X86
|
||||
vo_draw_alpha_uyvy_X86(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#else
|
||||
vo_draw_alpha_uyvy_C(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
@ -206,13 +224,13 @@ void vo_draw_alpha_rgb24(int w,int h, unsigned char* src, unsigned char *srca, i
|
||||
vo_draw_alpha_rgb24_C(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#endif
|
||||
#else //RUNTIME_CPUDETECT
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
vo_draw_alpha_rgb24_MMX2(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined (HAVE_3DNOW)
|
||||
#elif HAVE_3DNOW
|
||||
vo_draw_alpha_rgb24_3DNow(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined (HAVE_MMX)
|
||||
#elif HAVE_MMX
|
||||
vo_draw_alpha_rgb24_MMX(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined(ARCH_X86)
|
||||
#elif ARCH_X86
|
||||
vo_draw_alpha_rgb24_X86(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#else
|
||||
vo_draw_alpha_rgb24_C(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
@ -236,13 +254,13 @@ void vo_draw_alpha_rgb32(int w,int h, unsigned char* src, unsigned char *srca, i
|
||||
vo_draw_alpha_rgb32_C(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#endif
|
||||
#else //RUNTIME_CPUDETECT
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
vo_draw_alpha_rgb32_MMX2(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined (HAVE_3DNOW)
|
||||
#elif HAVE_3DNOW
|
||||
vo_draw_alpha_rgb32_3DNow(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined (HAVE_MMX)
|
||||
#elif HAVE_MMX
|
||||
vo_draw_alpha_rgb32_MMX(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#elif defined(ARCH_X86)
|
||||
#elif ARCH_X86
|
||||
vo_draw_alpha_rgb32_X86(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
#else
|
||||
vo_draw_alpha_rgb32_C(w, h, src, srca, srcstride, dstbase, dststride);
|
||||
@ -281,13 +299,13 @@ void vo_draw_alpha_init(void){
|
||||
mp_msg(MSGT_OSD,MSGL_INFO,"Using Unoptimized OnScreenDisplay\n");
|
||||
#endif
|
||||
#else //RUNTIME_CPUDETECT
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
mp_msg(MSGT_OSD,MSGL_INFO,"Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay\n");
|
||||
#elif defined (HAVE_3DNOW)
|
||||
#elif HAVE_3DNOW
|
||||
mp_msg(MSGT_OSD,MSGL_INFO,"Using MMX (with tiny bit 3DNow) Optimized OnScreenDisplay\n");
|
||||
#elif defined (HAVE_MMX)
|
||||
#elif HAVE_MMX
|
||||
mp_msg(MSGT_OSD,MSGL_INFO,"Using MMX Optimized OnScreenDisplay\n");
|
||||
#elif defined(ARCH_X86)
|
||||
#elif ARCH_X86
|
||||
mp_msg(MSGT_OSD,MSGL_INFO,"Using X86 Optimized OnScreenDisplay\n");
|
||||
#else
|
||||
mp_msg(MSGT_OSD,MSGL_INFO,"Using Unoptimized OnScreenDisplay\n");
|
||||
|
@ -7,11 +7,11 @@
|
||||
#undef PREFETCHW
|
||||
#undef PAVGB
|
||||
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
#define PREFETCH "prefetch"
|
||||
#define PREFETCHW "prefetchw"
|
||||
#define PAVGB "pavgusb"
|
||||
#elif defined ( HAVE_MMX2 )
|
||||
#elif HAVE_MMX2
|
||||
#define PREFETCH "prefetchnta"
|
||||
#define PREFETCHW "prefetcht0"
|
||||
#define PAVGB "pavgb"
|
||||
@ -20,7 +20,7 @@
|
||||
#define PREFETCHW " # nop"
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
/* On K6 femms is faster of emms. On K7 femms is directly mapped on emms. */
|
||||
#define EMMS "femms"
|
||||
#else
|
||||
@ -29,10 +29,10 @@
|
||||
|
||||
static inline void RENAME(vo_draw_alpha_yv12)(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){
|
||||
int y;
|
||||
#if defined(FAST_OSD) && !defined(HAVE_MMX)
|
||||
#if defined(FAST_OSD) && !HAVE_MMX
|
||||
w=w>>1;
|
||||
#endif
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
"pcmpeqb %%mm5, %%mm5\n\t" // F..F
|
||||
"movq %%mm5, %%mm4\n\t"
|
||||
@ -43,7 +43,7 @@ static inline void RENAME(vo_draw_alpha_yv12)(int w,int h, unsigned char* src, u
|
||||
#endif
|
||||
for(y=0;y<h;y++){
|
||||
register int x;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
PREFETCHW" %0\n\t"
|
||||
PREFETCH" %1\n\t"
|
||||
@ -91,7 +91,7 @@ static inline void RENAME(vo_draw_alpha_yv12)(int w,int h, unsigned char* src, u
|
||||
srca+=srcstride;
|
||||
dstbase+=dststride;
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(EMMS:::"memory");
|
||||
#endif
|
||||
return;
|
||||
@ -99,10 +99,10 @@ static inline void RENAME(vo_draw_alpha_yv12)(int w,int h, unsigned char* src, u
|
||||
|
||||
static inline void RENAME(vo_draw_alpha_yuy2)(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){
|
||||
int y;
|
||||
#if defined(FAST_OSD) && !defined(HAVE_MMX)
|
||||
#if defined(FAST_OSD) && !HAVE_MMX
|
||||
w=w>>1;
|
||||
#endif
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
"pxor %%mm7, %%mm7\n\t"
|
||||
"pcmpeqb %%mm5, %%mm5\n\t" // F..F
|
||||
@ -114,7 +114,7 @@ static inline void RENAME(vo_draw_alpha_yuy2)(int w,int h, unsigned char* src, u
|
||||
#endif
|
||||
for(y=0;y<h;y++){
|
||||
register int x;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
PREFETCHW" %0\n\t"
|
||||
PREFETCH" %1\n\t"
|
||||
@ -163,7 +163,7 @@ static inline void RENAME(vo_draw_alpha_yuy2)(int w,int h, unsigned char* src, u
|
||||
srca+=srcstride;
|
||||
dstbase+=dststride;
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(EMMS:::"memory");
|
||||
#endif
|
||||
return;
|
||||
@ -195,7 +195,7 @@ static inline void RENAME(vo_draw_alpha_uyvy)(int w,int h, unsigned char* src, u
|
||||
|
||||
static inline void RENAME(vo_draw_alpha_rgb24)(int w,int h, unsigned char* src, unsigned char *srca, int srcstride, unsigned char* dstbase,int dststride){
|
||||
int y;
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
"pxor %%mm7, %%mm7\n\t"
|
||||
"pcmpeqb %%mm6, %%mm6\n\t" // F..F
|
||||
@ -204,8 +204,8 @@ static inline void RENAME(vo_draw_alpha_rgb24)(int w,int h, unsigned char* src,
|
||||
for(y=0;y<h;y++){
|
||||
register unsigned char *dst = dstbase;
|
||||
register int x;
|
||||
#if defined(ARCH_X86) && (!defined(ARCH_X86_64) || defined(HAVE_MMX))
|
||||
#ifdef HAVE_MMX
|
||||
#if ARCH_X86 && (!ARCH_X86_64 || HAVE_MMX)
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(
|
||||
PREFETCHW" %0\n\t"
|
||||
PREFETCH" %1\n\t"
|
||||
@ -295,7 +295,7 @@ static inline void RENAME(vo_draw_alpha_rgb24)(int w,int h, unsigned char* src,
|
||||
srca+=srcstride;
|
||||
dstbase+=dststride;
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(EMMS:::"memory");
|
||||
#endif
|
||||
return;
|
||||
@ -306,8 +306,8 @@ static inline void RENAME(vo_draw_alpha_rgb32)(int w,int h, unsigned char* src,
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
dstbase++;
|
||||
#endif
|
||||
#ifdef HAVE_MMX
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_MMX
|
||||
#if HAVE_3DNOW
|
||||
__asm__ volatile(
|
||||
"pxor %%mm7, %%mm7\n\t"
|
||||
"pcmpeqb %%mm6, %%mm6\n\t" // F..F
|
||||
@ -324,9 +324,9 @@ static inline void RENAME(vo_draw_alpha_rgb32)(int w,int h, unsigned char* src,
|
||||
#endif /* HAVE_MMX */
|
||||
for(y=0;y<h;y++){
|
||||
register int x;
|
||||
#if defined(ARCH_X86) && (!defined(ARCH_X86_64) || defined(HAVE_MMX))
|
||||
#ifdef HAVE_MMX
|
||||
#ifdef HAVE_3DNOW
|
||||
#if ARCH_X86 && (!ARCH_X86_64 || HAVE_MMX)
|
||||
#if HAVE_MMX
|
||||
#if HAVE_3DNOW
|
||||
__asm__ volatile(
|
||||
PREFETCHW" %0\n\t"
|
||||
PREFETCH" %1\n\t"
|
||||
@ -460,7 +460,7 @@ static inline void RENAME(vo_draw_alpha_rgb32)(int w,int h, unsigned char* src,
|
||||
srca+=srcstride;
|
||||
dstbase+=dststride;
|
||||
}
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
__asm__ volatile(EMMS:::"memory");
|
||||
#endif
|
||||
return;
|
||||
|
@ -50,8 +50,7 @@ BOOL shared_buffer = false;
|
||||
static char *buffer_name;
|
||||
|
||||
//Screen
|
||||
int screen_id;
|
||||
BOOL screen_force;
|
||||
int screen_id = -1;
|
||||
NSRect screen_frame;
|
||||
NSScreen *screen_handle;
|
||||
NSArray *screen_array;
|
||||
@ -110,13 +109,13 @@ static int config(uint32_t width, uint32_t height, uint32_t d_width, uint32_t d_
|
||||
screen_array = [NSScreen screens];
|
||||
if(screen_id < [screen_array count])
|
||||
{
|
||||
screen_handle = [screen_array objectAtIndex:screen_id];
|
||||
screen_handle = [screen_array objectAtIndex:(screen_id < 0 ? 0 : screen_id)];
|
||||
}
|
||||
else
|
||||
{
|
||||
mp_msg(MSGT_VO, MSGL_FATAL, "Get device error: Device ID %d do not exist, falling back to main device.\n", screen_id);
|
||||
screen_handle = [screen_array objectAtIndex:0];
|
||||
screen_id = 0;
|
||||
screen_id = -1;
|
||||
}
|
||||
screen_frame = [screen_handle frame];
|
||||
vo_screenwidth = screen_frame.size.width;
|
||||
@ -324,7 +323,7 @@ static void uninit(void)
|
||||
}
|
||||
|
||||
static opt_t subopts[] = {
|
||||
{"device_id", OPT_ARG_INT, &screen_id, (opt_test_f)int_non_neg},
|
||||
{"device_id", OPT_ARG_INT, &screen_id, NULL},
|
||||
{"shared_buffer", OPT_ARG_BOOL, &shared_buffer, NULL},
|
||||
{"buffer_name", OPT_ARG_MSTRZ,&buffer_name, NULL},
|
||||
{NULL}
|
||||
@ -334,7 +333,7 @@ static int preinit(const char *arg)
|
||||
{
|
||||
|
||||
// set defaults
|
||||
screen_id = 0;
|
||||
screen_id = -1;
|
||||
shared_buffer = false;
|
||||
buffer_name = NULL;
|
||||
|
||||
@ -858,7 +857,7 @@ static int control(uint32_t request, void *data)
|
||||
}
|
||||
|
||||
old_frame = [window frame]; //save main window size & position
|
||||
if(screen_force)
|
||||
if(screen_id >= 0)
|
||||
screen_frame = [screen_handle frame];
|
||||
else {
|
||||
screen_frame = [[window screen] frame];
|
||||
|
@ -3328,7 +3328,7 @@ static WIN_BOOL WINAPI expFindNextFileA(HANDLE h,LPWIN32_FIND_DATAA lpfd)
|
||||
strcpy(lpfd->cFileName,d->d_name);
|
||||
// sprintf(lpfd->cAlternateFileName,"%-8s.qtx",d->d_name);
|
||||
strcpy(lpfd->cAlternateFileName,"foobar.qtx");
|
||||
printf("### FindNext: %s\n",lpfd->cFileName);
|
||||
dbgprintf("### FindNext: %s\n",lpfd->cFileName);
|
||||
return 1;
|
||||
}
|
||||
closedir(qtx_dir); qtx_dir=NULL;
|
||||
@ -3345,7 +3345,7 @@ static HANDLE WINAPI expFindFirstFileA(LPCSTR s, LPWIN32_FIND_DATAA lpfd)
|
||||
#ifdef QTX
|
||||
if(strstr(s, "quicktime\\*.QTX")){
|
||||
dbgprintf("FindFirstFileA(0x%x='%s', 0x%x) => QTX\n", s, s, lpfd);
|
||||
printf("\n### Searching for QuickTime plugins (*.qtx) at %s...\n",def_path);
|
||||
dbgprintf("\n### Searching for QuickTime plugins (*.qtx) at %s...\n",def_path);
|
||||
qtx_dir=opendir(def_path);
|
||||
if(!qtx_dir) return (HANDLE)-1;
|
||||
memset(lpfd,0,sizeof(*lpfd));
|
||||
|
14
mencoder.c
14
mencoder.c
@ -427,7 +427,7 @@ audio_encoder_t *aencoder = NULL;
|
||||
|
||||
/* Test for cpu capabilities (and corresponding OS support) for optimizing */
|
||||
GetCpuCaps(&gCpuCaps);
|
||||
#ifdef ARCH_X86
|
||||
#if ARCH_X86
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"CPUflags: Type: %d MMX: %d MMX2: %d 3DNow: %d 3DNow2: %d SSE: %d SSE2: %d\n",
|
||||
gCpuCaps.cpuType,gCpuCaps.hasMMX,gCpuCaps.hasMMX2,
|
||||
gCpuCaps.has3DNow, gCpuCaps.has3DNowExt,
|
||||
@ -436,22 +436,22 @@ audio_encoder_t *aencoder = NULL;
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO, MSGTR_CompiledWithRuntimeDetection);
|
||||
#else
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO, MSGTR_CompiledWithCPUExtensions);
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," MMX");
|
||||
#endif
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," MMX2");
|
||||
#endif
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," 3DNow");
|
||||
#endif
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," 3DNowEx");
|
||||
#endif
|
||||
#ifdef HAVE_SSE
|
||||
#if HAVE_SSE
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," SSE");
|
||||
#endif
|
||||
#ifdef HAVE_SSE2
|
||||
#if HAVE_SSE2
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," SSE2");
|
||||
#endif
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"\n\n");
|
||||
|
@ -102,7 +102,7 @@ static int synth_1to1_mono2stereo(real *bandPtr,unsigned char *samples,int *pnt)
|
||||
|
||||
static synth_func_t synth_func;
|
||||
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
#define dct64_base(a,b,c) if(gCpuCaps.hasAltiVec) dct64_altivec(a,b,c); else dct64(a,b,c)
|
||||
#else /* HAVE_ALTIVEC */
|
||||
#define dct64_base(a,b,c) dct64(a,b,c)
|
||||
@ -121,7 +121,7 @@ static int synth_1to1(real *bandPtr,int channel,unsigned char *out,int *pnt)
|
||||
*pnt += 128;
|
||||
|
||||
/* optimized for x86 */
|
||||
#ifdef ARCH_X86
|
||||
#if ARCH_X86
|
||||
if ( synth_func )
|
||||
{
|
||||
// printf("Calling %p, bandPtr=%p channel=%d samples=%p\n",synth_func,bandPtr,channel,samples);
|
||||
|
22
mp3lib/sr1.c
22
mp3lib/sr1.c
@ -27,10 +27,12 @@
|
||||
|
||||
#include "libvo/fastmemcpy.h"
|
||||
|
||||
#ifdef ARCH_X86_64
|
||||
#if ARCH_X86_64
|
||||
// 3DNow! and 3DNow!Ext routines don't compile under AMD64
|
||||
#undef HAVE_3DNOW
|
||||
#undef HAVE_3DNOWEX
|
||||
#define HAVE_3DNOW 0
|
||||
#define HAVE_3DNOWEX 0
|
||||
#endif
|
||||
|
||||
//static FILE* mp3_file=NULL;
|
||||
@ -134,7 +136,7 @@ LOCAL unsigned int getbits_fast(short number_of_bits)
|
||||
// if(MP3_frames>=7741) printf("getbits_fast: bits=%d bitsleft=%d wordptr=%x\n",number_of_bits,bitsleft,wordpointer);
|
||||
if((bitsleft-=number_of_bits)<0) return 0;
|
||||
if(!number_of_bits) return 0;
|
||||
#ifdef ARCH_X86
|
||||
#if ARCH_X86
|
||||
rval = bswap_16(*((uint16_t *)wordpointer));
|
||||
#else
|
||||
/*
|
||||
@ -177,7 +179,7 @@ LOCAL void set_pointer(int backstep)
|
||||
|
||||
LOCAL int stream_head_read(unsigned char *hbuf,uint32_t *newhead){
|
||||
if(mp3_read(hbuf,4) != 4) return FALSE;
|
||||
#ifdef ARCH_X86
|
||||
#if ARCH_X86
|
||||
*newhead = bswap_32(*((uint32_t*)hbuf));
|
||||
#else
|
||||
/*
|
||||
@ -413,7 +415,7 @@ void MP3_Init(void){
|
||||
|
||||
make_decode_tables(outscale);
|
||||
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
if (gCpuCaps.hasMMX)
|
||||
{
|
||||
_has_mmx = 1;
|
||||
@ -421,7 +423,7 @@ void MP3_Init(void){
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
if (gCpuCaps.has3DNowExt)
|
||||
{
|
||||
dct36_func=dct36_3dnowex;
|
||||
@ -430,7 +432,7 @@ void MP3_Init(void){
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
if (gCpuCaps.has3DNow)
|
||||
{
|
||||
dct36_func = dct36_3dnow;
|
||||
@ -439,7 +441,7 @@ void MP3_Init(void){
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef HAVE_SSE
|
||||
#if HAVE_SSE
|
||||
if (gCpuCaps.hasSSE)
|
||||
{
|
||||
dct64_MMX_func = dct64_sse;
|
||||
@ -447,8 +449,8 @@ void MP3_Init(void){
|
||||
}
|
||||
else
|
||||
#endif
|
||||
#ifdef ARCH_X86_32
|
||||
#ifdef HAVE_MMX
|
||||
#if ARCH_X86_32
|
||||
#if HAVE_MMX
|
||||
if (gCpuCaps.hasMMX)
|
||||
{
|
||||
dct64_MMX_func = dct64_MMX;
|
||||
@ -463,7 +465,7 @@ void MP3_Init(void){
|
||||
}
|
||||
else
|
||||
#endif /* ARCH_X86_32 */
|
||||
#ifdef HAVE_ALTIVEC
|
||||
#if HAVE_ALTIVEC
|
||||
if (gCpuCaps.hasAltiVec)
|
||||
{
|
||||
mp_msg(MSGT_DECAUDIO,MSGL_V,"mp3lib: using AltiVec optimized decore!\n");
|
||||
|
16
mplayer.c
16
mplayer.c
@ -1947,7 +1947,7 @@ static int fill_audio_out_buffers(struct MPContext *mpctx)
|
||||
// handle audio-only case:
|
||||
// this is where mplayer sleeps during audio-only playback
|
||||
// to avoid 100% CPU use
|
||||
sleep_time = (ao_data.outburst - bytes_to_write) * 1000 / ao_data.samplerate;
|
||||
sleep_time = (ao_data.outburst - bytes_to_write) * 1000 / ao_data.bps;
|
||||
if (sleep_time < 10) sleep_time = 10; // limit to 100 wakeups per second
|
||||
usec_sleep(sleep_time * 1000);
|
||||
}
|
||||
@ -2412,7 +2412,7 @@ static void print_version(void){
|
||||
|
||||
/* Test for CPU capabilities (and corresponding OS support) for optimizing */
|
||||
GetCpuCaps(&gCpuCaps);
|
||||
#ifdef ARCH_X86
|
||||
#if ARCH_X86
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"CPUflags: MMX: %d MMX2: %d 3DNow: %d 3DNow2: %d SSE: %d SSE2: %d\n",
|
||||
gCpuCaps.hasMMX,gCpuCaps.hasMMX2,
|
||||
gCpuCaps.has3DNow, gCpuCaps.has3DNowExt,
|
||||
@ -2421,22 +2421,22 @@ static void print_version(void){
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO, MSGTR_CompiledWithRuntimeDetection);
|
||||
#else
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO, MSGTR_CompiledWithCPUExtensions);
|
||||
#ifdef HAVE_MMX
|
||||
#if HAVE_MMX
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," MMX");
|
||||
#endif
|
||||
#ifdef HAVE_MMX2
|
||||
#if HAVE_MMX2
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," MMX2");
|
||||
#endif
|
||||
#ifdef HAVE_3DNOW
|
||||
#if HAVE_3DNOW
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," 3DNow");
|
||||
#endif
|
||||
#ifdef HAVE_3DNOWEX
|
||||
#if HAVE_3DNOWEX
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," 3DNowEx");
|
||||
#endif
|
||||
#ifdef HAVE_SSE
|
||||
#if HAVE_SSE
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," SSE");
|
||||
#endif
|
||||
#ifdef HAVE_SSE2
|
||||
#if HAVE_SSE2
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO," SSE2");
|
||||
#endif
|
||||
mp_msg(MSGT_CPLAYER,MSGL_INFO,"\n");
|
||||
|
@ -21,7 +21,7 @@ FILETYPE VFT_APP
|
||||
VALUE "FileDescription", "MPlayer - Movie Player\000"
|
||||
VALUE "FileVersion",VERSION
|
||||
VALUE "InternalName", "Counter Counter\000"
|
||||
VALUE "LegalCopyright", " (C) 2000-2008 MPlayer Team\000"
|
||||
VALUE "LegalCopyright", " (C) 2000-2009 MPlayer Team\000"
|
||||
//VALUE "LegalTrademarks"," \000";
|
||||
VALUE "OriginalFilename", "mplayer.exe\000"
|
||||
VALUE "ProductName", "MPlayer - The Movie Player\000"
|
||||
|
@ -43,7 +43,7 @@
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#ifdef ARCH_ALPHA
|
||||
#if ARCH_ALPHA
|
||||
#include <sys/io.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
@ -91,7 +91,7 @@ static int mem_fd = -1;
|
||||
|
||||
void *map_phys_mem(unsigned long base, unsigned long size)
|
||||
{
|
||||
#ifdef ARCH_ALPHA
|
||||
#if ARCH_ALPHA
|
||||
/* TODO: move it into sysdep */
|
||||
base += bus_base();
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user