Commit Graph

296 Commits

Author SHA1 Message Date
Stefano Sabatini
c6c98d0897 Move mm_support() from libavcodec to libavutil, make it a public
function and rename it to av_get_cpu_flags().

Originally committed as revision 25076 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-08 15:07:14 +00:00
Stefano Sabatini
ccf22d3ed1 Merge has_altivec() function into mm_support(), remove it and use
mm_support() instead.

Reduce complexity and simplify pending move to libavutil.

Originally committed as revision 25074 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-08 10:02:40 +00:00
Stefano Sabatini
7160bb716b Rename FF_MM_ symbols related to CPU features flags as AV_CPU_FLAG_
symbols, and move them from libavcodec/avcodec.h to libavutil/cpu.h.

Originally committed as revision 25040 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-04 09:59:08 +00:00
Måns Rullgård
c0ec9918b0 Remove global mm_flags variable
Originally committed as revision 24909 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-08-24 17:47:05 +00:00
Loren Merritt
1ee076b1b1 more credits to D. J. Bernstein for fft
Originally committed as revision 24308 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-18 20:06:42 +00:00
Måns Rullgård
a46b84d120 PPC: convert Altivec FFT to pure assembler
On PPC a leaf function has a 288-byte red zone below the stack pointer,
sparing these functions the chore of setting up a full stack frame.

When a function call is disguised within an inline asm block, the
compiler might not adjust the stack pointer as required before a
function call, resulting in the red zone being clobbered.

Moving the entire function to pure asm avoids this problem and also
results in somewhat better code.

Originally committed as revision 24044 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-04 18:33:47 +00:00
Måns Rullgård
deca86eab1 PPC: gas-preprocessor handles m[ft]spr shorthands
Originally committed as revision 24043 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-04 18:33:43 +00:00
Måns Rullgård
fe3d2e4b02 PPC: add some asm support macros
Originally committed as revision 24042 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-04 18:33:40 +00:00
Måns Rullgård
a075902f3d PPC: add _interleave versions of fft{4,6,16}_altivec
This removes the need for a post-swizzle with the small FFTs.

Originally committed as revision 24025 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-03 18:36:10 +00:00
Måns Rullgård
9bbb50648d PPC: fix build on OSX without gas-preprocessor
Originally committed as revision 23962 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-02 00:20:26 +00:00
Loren Merritt
cf61994a17 PPC: Altivec IMDCT
Patch by Loren Merritt

Originally committed as revision 23959 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-01 23:21:49 +00:00
Måns Rullgård
588d28ac08 Remove vestiges of radix-2 FFT
Patch (mostly) by Loren Merritt

Originally committed as revision 23957 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-01 23:21:42 +00:00
Måns Rullgård
bf7ba15372 PPC: Altivec split-radix FFT
1.8x faster than altivec radix-2 on a G4
8% faster vorbis decoding

Patch (mostly) by Loren Merritt

Originally committed as revision 23956 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-01 23:21:39 +00:00
Måns Rullgård
2f0c136e1f Check whether IBM or Apple PPC assembler syntax is used
This checks which assembler syntax is supported and defines macros
for register names accordingly.

Originally committed as revision 23952 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-01 23:21:27 +00:00
Vitor Sessak
060dd93000 Altivec-optimized mp{1,2,3} windowing
Originally committed as revision 23943 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-01 21:04:12 +00:00
Måns Rullgård
49bd8e4b84 Fix grammar errors in documentation
Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-30 15:38:06 +00:00
David Conrad
982fac7357 Altivec VP8 MC functions
Originally committed as revision 23884 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-29 06:42:17 +00:00
David Conrad
7bf4e9d7f7 Altivec: Add helper function to load from a constant misalignment
Originally committed as revision 23883 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-29 06:42:12 +00:00
Eli Friedman
b3858964d6 Add const to some pointer parameters.
Patch by Eli Friedman,  eli D friedman A gmail

Originally committed as revision 23826 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-27 15:11:38 +00:00
Måns Rullgård
2829ce4b40 Remove PPC perf counter support
This functionality is better accessed through tools like oprofile.

Originally committed as revision 23808 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-06-26 22:23:35 +00:00
Diego Biurrun
ba87f0801d Remove explicit filename from Doxygen @file commands.
Passing an explicit filename to this command is only necessary if the
documentation in the @file block refers to a file different from the
one the block resides in.

Originally committed as revision 22921 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-04-20 14:45:34 +00:00
Måns Rullgård
3bd74e9243 Simplify arch-specific object file lists
Originally committed as revision 22570 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-16 21:23:03 +00:00
Måns Rullgård
43f60eba19 Move arch-specific makefile parts into $arch/Makefile
Originally committed as revision 22569 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-16 21:22:59 +00:00
Måns Rullgård
4693b031a3 Move H264 dsputil functions into their own struct
This moves the H264-specific functions from DSPContext to the new
H264DSPContext.  The code is made conditional on CONFIG_H264DSP
which is set by the codecs requiring it.

The qpel and chroma MC functions are not moved as these are used by
non-h264 code.

Originally committed as revision 22565 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-16 01:17:00 +00:00
Martin Storsjö
b81786611a Move the local includes below the system includes
This fixes a compilation issue on OS X 10.4, where some system headers were
included implicitly through dsputil_altivec.h (with _POSIX_C_SOURCE defined),
and other system headers included later, with _POSIX_C_SOURCE undefined at
that time.

Originally committed as revision 22327 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-08 15:12:36 +00:00
Måns Rullgård
ddb8c2c0f1 PPC: move prototypes to headers and make some functions static
Originally committed as revision 22267 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-06 22:37:14 +00:00
Måns Rullgård
1429224b04 Move FFT parts from dsputil.h to fft.h
Originally committed as revision 22235 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-06 14:34:46 +00:00
Måns Rullgård
84dc2d8afa Remove DECLARE_ALIGNED_{8,16} macros
These macros are redundant.  All uses are replaced with the generic
DECLARE_ALIGNED macro instead.

Originally committed as revision 22233 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-03-06 14:24:59 +00:00
Måns Rullgård
c67278098d Move array specifiers outside DECLARE_ALIGNED() invocations
Originally committed as revision 21377 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-01-22 03:25:11 +00:00
Loren Merritt
b1159ad928 refactor and optimize scalarproduct
29-105% faster apply_filter, 6-90% faster ape decoding on core2
(Any x86 other than core2 probably gets much less, since this is mostly due to ssse3 cachesplit avoidance and I haven't written the full gamut of other cachesplit modes.)
9-123% faster ape decoding on G4.

Originally committed as revision 20739 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-12-05 15:09:10 +00:00
Måns Rullgård
35de5d2412 cosmetics: fix indentation after previous commit
Originally committed as revision 20062 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-27 16:52:00 +00:00
Måns Rullgård
952e872198 Drop unused args from vector_fmul_add_add, simpify code, and rename
The src3 and step arguments to vector_fmul_add_add() are always zero
and one, respectively.  This removes these arguments from the function,
simplifies the code accordingly, and renames the function to better
match the new operation.

Originally committed as revision 20061 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-27 16:51:54 +00:00
Måns Rullgård
f486321395 Move per-arch fft init bits into the corresponding subdirs
Originally committed as revision 19864 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-09-15 21:14:14 +00:00
Måns Rullgård
afe08a728a PPC: remove unnecessary alignment on local variables
Storing a single element from a vector where all elements have the same
value does not require an aligned destination.  Which element is stored
depends on the alignment of the destination address, but since they all
have the same value, the result is the same regardless of the alignment.

Originally committed as revision 19696 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-24 21:42:22 +00:00
Diego Biurrun
deb1b2b699 Add necessary #include for config.h.
Originally committed as revision 19692 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-24 10:59:14 +00:00
Måns Rullgård
b662e8395b PPC: simplify loading some values into altivec registers
Instead of filling a local array with the desired value and loading it,
load a single element and vec_splat() it to fill the vector.

Originally committed as revision 19691 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-24 10:36:13 +00:00
Måns Rullgård
c7312933ce Include required headers in {mips,ppc}/mathops.h
Originally committed as revision 19686 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-08-23 11:02:41 +00:00
Diego Biurrun
9be6f0d2f8 Do not check for both CONFIG_VC1_DECODER and CONFIG_WMV3_DECODER,
the former depends upon the latter.

Originally committed as revision 19533 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-29 09:54:49 +00:00
Diego Biurrun
99e5a9d1ea Do not redundantly check for both CONFIG_THEORA_DECODER and CONFIG_VP3_DECODER.
The Theora decoder depends on the VP3 decoder.

Originally committed as revision 19492 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-07-22 22:27:10 +00:00
Reimar Döffinger
34d11b875f Change HAVE_PPC64 to ARCH_PPC64.
As a side-effect this also gives it the correct value on e.g. PPC970FX-based
PPC64 systems, thus fixing "make test" (mp2/mp3 decoding).

Originally committed as revision 18953 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-26 05:00:51 +00:00
David Conrad
454403ba55 Altivec VP3 IDCT
Originally committed as revision 18949 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-25 22:19:35 +00:00
Diego Biurrun
76499b9ff1 Remove useless casts of vec_ld() parameters.
Gets rid of 'cast discards qualifiers from pointer target type' warnings.

Originally committed as revision 18867 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-18 08:21:50 +00:00
Måns Rullgård
014b7ecb66 PPC: 32-bit asm for MAC64 and MLS64
GCC makes a mess of these operations, so give it a hand.

55% faster MP3 decoding on G4.

Originally committed as revision 18794 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-11 02:41:50 +00:00
Diego Biurrun
f8c0692d8e Add necessary header for CONFIG_RUNTIME_CPUDETECT preprocessor definition.
Originally committed as revision 18774 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-09 12:26:05 +00:00
Måns Rullgård
3737dd1cd3 PPC: implement MULH() in assembler
Left to its own devices, gcc calculates the full 64-bit product only to
discard the low 32 bits.  This forces it to do the right thing.

20% faster MP3 decoding on G4.

Originally committed as revision 18737 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-05-04 17:31:15 +00:00
David Conrad
99cc7f8a02 Altivec version of avg_no_rnd_vc1_chroma_mc8
Originally committed as revision 18522 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-15 06:23:40 +00:00
David Conrad
c374691b28 Rename put_no_rnd_h264_chroma* to reflect its usage in VC1 only
Originally committed as revision 18517 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-14 23:55:39 +00:00
Diego Biurrun
5137235e0c Remove gcc_fixes.h. It only contains workarounds for unsupported gcc versions.
Originally committed as revision 18476 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-12 21:45:26 +00:00
Diego Biurrun
788cca4135 Remove AltiVec optimizations for Snow. They are hindering the development
of Snow, which is still in flux.

Originally committed as revision 18475 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-12 21:42:55 +00:00
Diego Biurrun
7a709548a7 Remove unnecessary gcc_fixes.h #include.
Originally committed as revision 18384 to svn://svn.ffmpeg.org/ffmpeg/trunk
2009-04-09 11:54:13 +00:00