x64 always has MMX, MMXEXT, SSE and SSE2 and this means
that some functions for MMX, MMXEXT and 3dnow are always
overridden by other functions (unless one e.g. explicitly
disables SSE2) for x64. So given that the only systems that
benefit from these functions are truely ancient 32bit x86s
they are removed.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Libav, for some reason, merged this as a public API function. This will
aid in future merges.
A define is left for backwards compat, just in case some person
used it, since it is in a public header.
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
This simplifies the code and improves quality at the expense of a slight
slowdown of a rarely used function (no fate test uses it).
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
As the function arguments change, we also change the function name
to ensure that anyone using this (non public) function doesnt end
with hard to debug crashes. The new name also has a proper prefix.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
To access data at multiple fixed offsets from a base address, this
code uses a single "m" operand and code of the form "32%0", relying on
the memory operand instantiation having no displacement, giving a final
result of the form "32(%rax)". If the compiler uses a register and
displacement, e.g. "64(%rax)", the end result becomes "3264(%rax)",
which obviously does not work.
Replacing the "m" operands with "r" operands allows safe addition of a
displacement. In theory, multiple memory operands could use a shared
base register with different index registers, "(%rax,%rbx)", potentially
making more efficient use of registers. In the cases at hand, no such
sharing is possible since the addresses involved are entirely unrelated.
After this change, the code somewhat rudely accesses memory without
using a corresponding memory operand, which in some cases can lead to
unwanted "optimisations" of surrounding code. However, the original
code also accesses memory not covered by a memory operand, so this is
not adding any defect not already present. It is also hightly unlikely
that any such optimisations could be performed here since the memory
locations in questions are not accessed elsewhere in the same functions.
This fixes crashes with suncc.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Refactoring mmx2/mmxext YASM code with cpuflags will force renames.
So switching to a consistent naming scheme beforehand is sensible.
The name "mmxext" is more official and widespread and also the name
of the CPU flag, as reported e.g. by the Linux kernel.
register starvation caused gcc4.2 to fail building 32 bit shared libs
on 64 bit OS X
Signed-off-by: Michael Bradshaw <mbradshaw@sorensonmedia.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Many functions have such a prefix, but do not actually use any
instructions or features from that set, thus giving the false
impression that swscale is highly optimized for a particular
system, whereas in reality it is not.
Many functions have such a prefix, but do not actually use any
instructions or features from that set, thus giving the false
impression that swscale is highly optimized for a particular
system, whereas in reality it is not.
This will be cleaned up in the next merge
Authorship / merged commits:
commit f668afd489
Author: Janne Grunau <janne-libav@jannau.net>
Date: Fri Apr 15 09:12:34 2011 +0200
swscale: fix "ISO C90 forbids mixed declarations and code" warning
only hit with --enable-runtime-cpudetect
commit 7f2ae5c7af
Author: Janne Grunau <janne-libav@jannau.net>
Date: Fri Apr 15 02:09:44 2011 +0200
swscale: fix compilation with --enable-runtime-cpudetect
commit b6cad3df82
Author: Janne Grunau <janne-libav@jannau.net>
Date: Fri Apr 15 00:31:04 2011 +0200
swscale: correct include path to fix ppc altivec build
commit 6216fc70b7
Author: Luca Barbato <lu_zero@gentoo.org>
Date: Thu Apr 14 22:03:45 2011 +0200
swscale: simplify rgb2rgb templating
MMX is always built. Drop the ifdefs
commit 33a0421bba
Author: Josh Allmann <joshua.allmann@gmail.com>
Date: Wed Apr 13 20:57:32 2011 +0200
swscale: simplify initialization code
Simplify the fallthrough case when no accelerated functions
can be initialized.
commit 735bf19511
Author: Josh Allmann <joshua.allmann@gmail.com>
Date: Wed Apr 13 20:57:31 2011 +0200
swscale: further cleanup swscale.c
Move x86-specific constants out of swscale.c
commit 86330b4c92
Author: Luca Barbato <lu_zero@gentoo.org>
Date: Wed Apr 13 20:57:30 2011 +0200
swscale: partially move the arch specific code left
PPC and x86 code is split off from swscale_template.c. Lots of code is
still duplicated and should be removed later.
Again uniformize the init system to be more similar to the dsputil one.
Unset h*scale_fast in the x86 init in order to make the output
consistent with the previous status. Thanks to Josh for spotting it.
commit c003832883
Author: Luca Barbato <lu_zero@gentoo.org>
Date: Wed Apr 13 20:57:29 2011 +0200
swscale: move away x86 specific code from rgb2rgb
Keep only the plain C code in the main rgb2rgb.c and move the x86
specific optimizations to x86/rgb2rgb.c
Change the initialization pattern a little so some of it can be
factorized to behave more like dsputils.
Conflicts:
libswscale/rgb2rgb.c
libswscale/swscale_template.c