Commit graph

24 commits

Author SHA1 Message Date
Arun Raghavan
a1ae17ef69 audiorsample: Fix build on 32-bit x86
Turns out _mm_cvtsi128_si64() isn't available on 32-bit, so only build
SSE 4.1 optimisations on x86-64 for now.
2016-09-29 19:45:16 +05:30
Arun Raghavan
4b5f78337a audioresample: Separate out CFLAGS used for SSE* code
This makes sure that we only build files that need explicit SIMD support
with the relevant CFLAGS. This allows the rest of the code to be built
without, and specific SSE* code is only called after runtime checks for
CPU features.

https://bugzilla.gnome.org/show_bug.cgi?id=729276
2016-09-29 18:37:08 +05:30
Sebastian Dröge
0582d5a1bc audio-resampler: Use _mm_set_epi64x(0, x) instead of _mm_cvtsi64_si128(x) in more places 2016-03-29 12:11:48 +03:00
Sebastian Dröge
38a5a3614e resampler: Use _mm_set_epi64x(0, x) instead of _mm_cvtsi64_si128(x)
The latter is only available on x86-64 for some reason.
2016-03-29 10:15:07 +03:00
Wim Taymans
984ee8a3f6 audio-resampler: small optimizations 2016-03-28 13:25:55 +02:00
Wim Taymans
33855f0fe1 audio-resampler: unroll some more loops
Unroll some loops.
2016-03-28 13:25:55 +02:00
Wim Taymans
90a41b81dc audio-resampler: keep precision
Transpose and add before applying the cubic interpolation to avoid
overflows when using full precision.
2016-03-28 13:25:55 +02:00
Wim Taymans
6dd5e5259f audio-resampler: avoid overflow in cubic interpolation
Shift out an extra bit to have some more headroom when doing cubic
interpolation.
2016-03-28 13:25:54 +02:00
Wim Taymans
027165621b audio-resampler: avoid some format conversion
Store the filter in the desired sample format so that we can simply do a
linear or cubic interpolation to get the new filter instead of having to
go through gdouble and then convert.
2016-03-28 13:25:53 +02:00
Wim Taymans
d969a7a9d8 audio-resampler: reorder filter coefficients for more speed
Reorder the filter coefficients to make it easier to use SIMD for
interpolation.
Fix orc flags a little.
Add specialized nearest resampling function.
2016-03-28 13:25:53 +02:00
Wim Taymans
107f53ea0a audio-resampler: remove stereo optimizations
The stereo optimizations don't give enough benefit.
Rename none to full to make it clear that we use a full filter instead
of an interpolated one
2016-03-28 13:25:53 +02:00
Wim Taymans
d5abdd83c9 audio-resampler: add neon optimizations
Unroll some more loops in the fallback code that seems to work fine
for ARM.
Add some simple ARM optimizations taken from speex.
2016-03-28 13:25:53 +02:00
Wim Taymans
524ea147cc audio-resampler: improve filter construction
Remove some unused variables from the inner product functions.
Make filter coefficients by interpolating if required.
Rename some fields.
Try hard to not recalculate filters when just chaging the rate.
Add more proprties to audioresample.
2016-03-28 13:25:52 +02:00
Wim Taymans
4cb52f1831 audio-resampler: add more optimizations 2016-03-28 13:25:52 +02:00
Wim Taymans
bdf194a09a audio-resample: fix taps conversion
We do taps conversion in place so make sure we don't overwrite the
input with temporary data.
Optimize some more gint16 functions.
2016-03-28 13:25:52 +02:00
Wim Taymans
f6e0481ab5 audio-resampler: Improve taps memory layout
Rearrange the oversampled taps in memory to make it easier to use
SIMD instructions on them. this simplifies some sse code.
Add some more optimizations
2016-03-28 13:25:52 +02:00
Wim Taymans
e9fc039bb1 audio-resampler: add cubic interpolation 2016-03-28 13:25:52 +02:00
Wim Taymans
58dcd0587d audio-resampler: add more functions
Use some macros to generate more functions
2016-03-28 13:25:51 +02:00
Wim Taymans
e02af5c534 audio-resampler: add linear interpolation method
Make more functions into macros.
Add linear interpolation of filter coefficients.
2016-03-28 13:25:51 +02:00
Wim Taymans
2555317a71 audio-resampler: add float stereo SSE function 2016-03-28 13:25:50 +02:00
Wim Taymans
e74c207433 audio-resampler: Fix compilation of intrinsics
Only compile intrinsics when we are building for the selected
architecture.
Add sse4.1 optimized int32 resampler code.
2016-03-28 13:25:50 +02:00
Wim Taymans
6f685410b1 audio-resampler: also enable sse when sse2 is available 2016-03-28 13:25:50 +02:00
Wim Taymans
71871c5048 audio-resampler: optimizations
Improve int16 resampling by using pmaddwd
Use intrinsics to scale and pack int16 samples
Align the coefficients so that we can use aligned loads
Add padding to taps and samples so that we don't have to use partial
loads for the remainder of the loops.
Remove copy_n, we can reuse the plain copy function with some new
parameters.
Align and pad the sample array.
2016-03-28 13:25:50 +02:00
Wim Taymans
f55a67ca7c audio-resampler: make pluggable optimized functions
Add support for x86 specialized functions and select them at runtime.
2016-03-28 13:25:50 +02:00
Renamed from gst-libs/gst/audio/audio-resampler-core.h (Browse further)