Commit Graph

62 Commits

Author SHA1 Message Date
Ronald S. Bultje 5959bfaca3 floatdsp: move butterflies_float from dsputil to avfloatdsp.
This makes wmadec/enc, twinvq and mpegaudiodec (i.e. mp2/mp3)
independent of dsputil.
2013-01-22 11:55:42 -08:00
Ronald S. Bultje 42d3246948 floatdsp: move vector_fmul_reverse from dsputil to avfloatdsp.
Now, nellymoserenc and aacenc no longer depends on dsputil. Independent
of this patch, wmaprodec also does not depend on dsputil, so I removed
it from there also.
2013-01-22 11:55:42 -08:00
Ronald S. Bultje 55aa03b9f8 floatdsp: move vector_fmul_add from dsputil to avfloatdsp. 2013-01-22 11:55:42 -08:00
Justin Ruggles e034cc6c60 lavc: Move vector_fmul_window to AVFloatDSPContext
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-01-16 10:45:45 +01:00
Mans Rullgard b57c1da81e arm: detect cpu features at runtime on Linux
This allows compiling optimised functions for features not enabled
in the core build and selecting these at runtime if the system has
the necessary support.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:04 +00:00
Mans Rullgard b326755989 arm: rename ARMVFP config symbol to VFP
This is consistent with usual ARM nomenclature as well as with the
VFPV3 and NEON symbols which both lack the ARM prefix.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:04 +00:00
Mans Rullgard a7831d509f arm: use HAVE*_INLINE/EXTERNAL macros for conditional compilation
These macros reflect the actual capabilities required here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-12-07 16:54:03 +00:00
Justin Ruggles 284ea790d8 dsputil: move vector_fmul_scalar() to AVFloatDSPContext in libavutil 2012-11-26 11:29:06 -05:00
Diego Biurrun 9734b8ba56 Move avutil tables only used in libavcodec to libavcodec. 2012-10-11 18:29:36 +02:00
Mans Rullgard 51a15ed740 ARM: use numeric ID for Tag_ABI_align_preserved
Some old assemblers still in use do not support named tags.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-03 11:49:55 +01:00
Mans Rullgard 1ca3b62b10 ARM: bswap: drop armcc version of av_bswap16()
This function causes several versions of armcc to miscompile code,
and the performance impact is small.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-02 19:47:56 +01:00
Mans Rullgard 5e826fd65e ARM: set Tag_ABI_align_preserved in all asm files
All our ARM asm preserves alignment so setting this attribute
in a common location is simpler.  This removes numerous warnings
when linking with armcc.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-02 19:47:56 +01:00
Mans Rullgard 7bda4ed780 ARM: fix Thumb PIC on Apple
LDR with register offset and PC as base register is not available in
the Thumb instruction set so the addition must be done separately.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-10-02 13:12:33 +01:00
Mans Rullgard 8995d34972 ARM: use 2-operand syntax for ADD Rd, PC in Apple PIC code
The Apple assembler refuses to assemble the 3-operand form
in Thumb2 even though it is valid syntax.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-09-21 07:07:58 +01:00
Mans Rullgard cdb7db5acd ARM: align PIC offset pools to 4 bytes
When building Thumb2 code, the end of a function, where the PIC
offsets are placed, need not be aligned.  Although the values
are only accessed with instructions allowing unaligned addresses,
keeping them aligned is preferable.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-09-21 07:07:58 +01:00
Mans Rullgard a27a690fac ARM: swap source operands in some add instructions
This allows using a 16-bit opcode when generating Thumb2 code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-09-20 17:07:18 +01:00
Mans Rullgard 7689eea49a flacdsp: arm optimised lpc filter 2012-09-15 23:54:21 +01:00
Mans Rullgard 87fa05a0da ARM: intmath: use native-size return types for clipping functions
This avoids having the compiler redundantly mask the values to
the smaller size.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-13 14:51:52 +01:00
Mans Rullgard 6c4975eaaf libavutil: add saturating addition functions
Fixed-point audio codecs often use saturating arithmetic, and
special instructions for these operations are common.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-13 01:03:10 +01:00
Mans Rullgard 0d735ca214 ARM: add missing "cc" clobber in av_clipl_int32_arm()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-10 10:51:10 +01:00
Mans Rullgard ec9d2c15c1 ARM: use Q/R inline asm operand modifiers only if supported
Some compilers do not support the Q/R modifiers used to access
the low/high parts of a 64-bit register pair.  Check for this
and disable all uses of it when not supported.

Fixes bug #337.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-08-07 21:13:30 +01:00
Mans Rullgard 62634158b7 ARM: generate position independent code to access data symbols
This creates proper position independent code when accessing
data symbols if CONFIG_PIC is set.

References to external symbols should now use the movrelx macro.
Some additional code changes are required since this macro may
need a register to hold the GOT pointer.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-07-01 11:25:06 +01:00
Diego Biurrun a5a93fa8f5 cosmetics: do not use full path for local headers 2012-06-22 10:49:40 +02:00
Justin Ruggles cb5042d02c float_dsp: Move vector_fmac_scalar() from libavcodec to libavutil 2012-06-18 18:01:14 -04:00
Mans Rullgard a839d6abf8 ARM: fix float_dsp breakage from d5a7229
Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-06-08 19:45:37 +01:00
Justin Ruggles d5a7229ba4 Add a float DSP framework to libavutil
Move vector_fmul() from DSPContext to AVFloatDSPContext.
2012-06-08 13:14:38 -04:00
Justin Ruggles 94d2b0d2fd ARM: Move asm.S from libavcodec to libavutil
This will allow for easier implementation of ARM-optimized functions in
libraries other than libavcodec.
2012-06-08 13:14:38 -04:00
Diego Biurrun dbe6ba55a3 build: cosmetics: Add missing end-of-line backslashes to item lists. 2012-05-07 14:17:40 +02:00
Mans Rullgard c02efacc8f arm: intreadwrite: revert 16-bit load asm to old version for gcc < 4.6
Commit adebad0 "arm: intreadwrite: fix inline asm constraints for gcc
4.6 and later" caused some older gcc versions to miscompile code.
This reverts to the old version of the code for these compilers.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-03 21:40:19 +01:00
Mans Rullgard ababec7b95 arm: intreadwrite: disable inline asm for gcc 4.7 and later
Starting with version 4.7, gcc properly supports unaligned
memory accesses on ARM.  Not using the inline asm with these
compilers results in better code.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-02 17:26:39 +01:00
Mans Rullgard adebad07e0 arm: intreadwrite: fix inline asm constraints for gcc 4.6 and later
With a dereferenced type-cast pointer as memory operand, gcc 4.6
and later will sometimes copy the data to a temporary location,
the address of which is used as the operand value, if it thinks
the target address might be misaligned.  Using a pointer to a
packed struct type instead does the right thing.

The 16-bit case is special since the ldrh instruction addressing
modes are limited compared to ldr.  The "Uq" constraint produces a
memory reference suitable for an ldrsb instruction, which supports
the same addressing modes as ldrh.  However, the restrictions appear
to apply only when the operand addresses a single byte.  The memory
reference must thus be split into two operands each targeting one
byte.  Finally, the "Uq" constraint is only available in ARM mode.
The Thumb-2 ldrh instruction supports most addressing modes so the
normal "m" constraint can be used there.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-05-02 17:26:38 +01:00
Mans Rullgard d526c5338d ARM: allow runtime masking of CPU features
This allows masking CPU features with the -cpuflags avconv option
which is useful for testing different optimisations without rebuilding.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2012-04-22 12:30:45 +01:00
Janne Grunau 363bd1c62c remove iwmmxt optimizations
The were broken since August of 2010 without anyone noticing until
three weeks ago. Nobody cares about it anymore and hopefully Marvell
will support NEON like in the PXA978 from now on.
2012-03-12 22:46:56 +01:00
Mans Rullgard f64c2e710f bswap: make generic implementation more compiler-friendly
With these changes, gcc 4.5 and later recognise it as a bswap
and use the proper instructions on ARM and x86.  On x86, the
16-bit bswap is recognised from gcc 4.1.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-12-12 12:14:14 +00:00
Mans Rullgard 8986fddc2b ARM: allow building in Thumb2 mode
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-06-23 07:31:54 +01:00
Mans Rullgard 6bb70dfd74 ARM: simplify inline asm with 64-bit operands
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-30 21:19:57 +01:00
Mans Rullgard a84f82560e ARM: improve FASTDIV asm
This uses one register less.  Also add missing "cc" clobber.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-28 15:00:17 +01:00
Mans Rullgard ca7d8256e3 ARM: add ARMv6 optimised av_clip_uintp2
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-26 20:13:00 +01:00
Mans Rullgard 77cd6efc33 ARM: remove volatile from asm statements in libavutil/intmath
The volatile qualifiers are not needed on these statements as
their effects are fully specified by constraints.

Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-26 20:13:00 +01:00
Mans Rullgard 74cc8c52ed ARM: fix av_clipl_int32_arm()
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-05-26 20:12:59 +01:00
Mans Rullgard 2912e87a6c Replace FFmpeg with Libav in licence headers
Signed-off-by: Mans Rullgard <mans@mansr.com>
2011-03-19 13:33:20 +00:00
Jason Garrett-Glaser eb3755a5aa Force inlining of avutil common routines
On some versions of gcc, these weren't always getting inlined due to hitting
the inline cap limit in some files.  This is generally bad, as most of these
functions are smaller inlined than not.
2011-02-17 15:25:25 -08:00
Janne Grunau 2c3589bfda consolidate .gitignore patters into a single file
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-18 21:32:05 +01:00
Janne Grunau 348b8218f7 convert svn:ignore properties to .gitignore files
Signed-off-by: Janne Grunau <janne-ffmpeg@jannau.net>
2011-01-17 15:50:14 +01:00
Måns Rullgård 3288177150 ARM: change return type of AV_RN16() to unsigned
This prevents gcc inserting useless UXTH instructions, at least
in some cases.

Originally committed as revision 25212 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-26 21:01:20 +00:00
Måns Rullgård 9275438a19 Clean up av_get_cpu_flag()
Instead of defining functions in per-arch header files included
by the main cpu.c, define them normally and call them from the
generic one.

Originally committed as revision 25084 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-09-09 18:51:45 +00:00
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
Måns Rullgård 8fc0162ac4 Add av_ prefix to bswap macros
Originally committed as revision 24170 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-10 22:12:30 +00:00
Måns Rullgård 9077e29ecc ARM: optimised integer clip functions
Originally committed as revision 24089 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-07 17:27:51 +00:00
Måns Rullgård edd7fa82d7 ARM: intmath.h cosmetics
Originally committed as revision 24088 to svn://svn.ffmpeg.org/ffmpeg/trunk
2010-07-07 17:27:48 +00:00