James Almer
63dbba655e
swresample/resample: sse float linear interpolation
...
About two times faster
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Almer
fa25c4c400
swresample/resample: mmx2/sse2 int16 linear interpolation
...
About three times faster
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Almer
32291ba6ea
swresample: add swri_resample_float_sse
...
At least two times faster than the C version.
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Matt Oliver
8236747511
Automatically change MANGLE() into named inline asm operands when direct symbol reference in inline asm are not supported.
...
This is part of the patch-set for intel C inline asm on windows support
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Almer
3d48cbc56c
swresample: reuse COMMON_CORE asm where possible
...
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Almer
7c8bf09edd
swresample: change COMMON_CORE_INT16 asm from SSSE3 to SSE2
...
pshuf+paddd is slightly faster than phaddd.
The real gain is in pre-ssse3 processors like AMD K8 and K10, which get
a big boost in performance compared to the mmxext version
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6c6e4dd139
swr: check that the context for swr_convert() has been initialized
...
Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a66be60888
swresample: add swr_is_initialized()
...
Idea-from/based-on: 7e86c27b4e
Reviewed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
f284e2a58a
swresample: factorize clear_context() out
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Reimar Döffinger
e535897fad
Fix libswresample compilation with Apple Neon assembler.
...
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
11 years ago
Martin Storsjö
3dd04cbcf7
swresample: Add arm&x86 clobber tests
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Reimar Döffinger
cbeaf67888
Avoid using empty macro arguments.
...
These are not supported by all compilers (gcc 2.95 but also older SPARC
compilers, see gcc bug #33304 for example), and there is no real need for them.
One use of this feature remains in libavdevice/v4l2.c which can't be
replaced quite as easily.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
11 years ago
Stefano Sabatini
334e2e2363
lavu,lavc,lswr: do not hardcode AV_SAMPLE_FMT_NB value when setting sample format max value
...
The constant may change in libavutil but the library may be compiled
against an older version, thus rejecting a value which is otherwise
supported by the new libavutil.
INT_MAX is used here to denote the max allowed value for a sample format.
The opt-test code is changed to provide a valid reference example.
11 years ago
James Almer
56572787ae
Add Windows resource file support for shared libraries
...
Originally written by James Almer <jamrial@gmail.com>
With the following contributions by Timothy Gu <timothygu99@gmail.com>
* Use descriptions of libraries from the pkg-config file generation function
* Use "FFmpeg Project" as CompanyName (suggested by Alexander Strasser)
* Use "FFmpeg" for ProductName as MSDN says "name of the product with which the
file is distributed" [1].
* Use FFmpeg's version (N-xxxxx-gxxxxxxx) for ProductVersion per MSDN [1].
* Only build the .rc files when --enable-small is not enabled.
[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa381058.aspx
Signed-off-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
a6af5da7a2
swresample: use the internal buffer for resampling the last few samples
...
Fixes out of array read
Fixes Ticket3193
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Nicolas George
4a640a6ac8
lswr: fix assert failure on unknown layouts.
11 years ago
Stefano Sabatini
904c89ac1b
lswr/swresample: convert ocl and icl options to AV_OPT_TYPE_CHANNEL_LAYOUT
...
Improve interface flexibility. In particular makes it possible to set
channel layout through symbolic names using the av_opt_set() interface.
11 years ago
Ronald S. Bultje
ad75d2b590
x86: Fix compilation with nasm on PPC & OS/2
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Clément Bœsch
a89e9ad1c8
swr: fix example code and doxy indent.
11 years ago
Michael Niedermayer
9078b40d35
swresample: replace 2 av_free() by av_freep()
...
avoids leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
c56d4dab03
swr/rematrix: Fix handling of AV_CH_LAYOUT_STEREO_DOWNMIX output
...
Fixes Ticket2859
Note, testcases related to the downmix channels are welcome.
(id like to make sure this is working correctly now, as obviously it didnt
work before ...)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
6dfffe9200
swr: clean layouts before checking sanity
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
7ac12599fe
swresample: fix negative rematrix volumns
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
e2b718464e
swresample: Make rematrix maxvalue user settable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Timothy Gu
a9bbf59be7
cosmetics: Fix "dont" "wont" "doesnt" typos
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
ca2818b881
swresample/x86/audio_convert: add emms to CONV
...
Might fix Ticket1874
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d62030ffca
swresample/rematrix_template: Fix integer overflow in mix8to2
...
Fixes: CID1030352
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b04bbe6b86
swresample/rematrix_template: Fix integer overflow in mix6to2
...
Fixes: CID1030351
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3289670142
swr: dont treat 32 and 24 as equal in simple copy check
...
Fixes dithering from 32 to 24 bit
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6bc4e36ba7
swr: set scale for 32->32/24 dither
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
0804171104
swresample: set flags & description and add documentation for output_sample_bits
...
Allows users to actually use such option.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
495bf1b685
swr: Fix dithering of s16 with SIMD
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
4cfc92081d
swr: add native_simd_one
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b84de51f54
swresample/rematrix: add S32 mixing code
...
Needed for dithering S32
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f3c638eac1
wresample/rematrix_template: fix internal types
...
Should make no difference, but future commits will need it
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
6e29f39252
swr/rematrix: use av_calloc()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
03148fd174
buildsys: only include log2_tab per library for shared builds
...
Fix linking failures with -all_load due to multiple log2_tabs
Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
12 years ago
Rob Sykes
dc666d360b
soxr: libsoxr 0.1.1 support
...
Libsoxr 0.1.1 will be out very soon; no changes planned beyond what's currently in git.
It includes a couple of fixes (not affecting FFmpeg's current usage) and a minor API change (but remains ABI compatible).
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
35aaa306ac
swr: make the default of nopts for first_pts actually work
...
Fixes Ticket2210
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
8b3affda87
swr: support a seperate output sample bits.
...
This avoids user apps having to mangle dither scale. for pcm24
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
2abbe6d07a
swr: add duplicate cutoff for compatibility
...
Based on
commit 50f4337a2f
Author: Justin Ruggles <justin.ruggles@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
21cd905cd4
swr: check channel layouts before using them.
...
Fixes out of array accesses
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b5f544a0f9
swr: Dont use floats for S32->S32 when possible
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
be989f9236
swr: reorder init code to make rematrix status available earlier
...
This also makes some other fields available earlier which may
be usefull one day
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
24244cec2f
swr-test: Fix clip to 32bit
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
b8c55590d5
swr/resample: fix integer overflow, add missing cast
...
The effects of this are limited to numeric errors in the output
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
91debec976
swr/resample: fix filter rounding and cliping for s32
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
f9abeecd94
swr/ build_filter: use av_calloc() fix buffer overflow
...
Fixes integer & buffer overflow
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
167af704ea
swr: limit phase_shift to a less insane value.
...
This prevents potential crashes and out of memory issues if
the user manually sets such insane values.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
00cae86754
swr: support first_pts
...
Trolled-by: Daemon404
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago