Michael Olbrich
44da322083
audioclock: use GST_STIME_FORMAT for the correct argument
...
GST_STIME_ARGS is used for time_offset not for last_time.
This fixes the format string accordingly.
https://bugzilla.gnome.org/show_bug.cgi?id=768990
2016-07-20 12:28:54 +01:00
Sebastian Dröge
61f59857a7
audio: Ship audio-resampler-neon.h
2016-07-07 00:27:18 +03:00
Sebastian Dröge
e5d7064b29
audiodecoder: Protect samples_in/bytes_out and audio info with object lock
...
It might cause invalid calculations during the CONVERT query otherwise.
2016-07-04 11:12:55 +02:00
Sebastian Dröge
5cbd1a7bca
audioencoder: Protect samples_in/bytes_out and audio info with object lock
...
It might cause invalid calculations during the CONVERT query otherwise.
2016-07-04 11:12:55 +02:00
Sebastian Dröge
8d8262a00c
audioencoder/decoder: Move encoded audio conversion function to a common place
...
No need to duplicate this non-trivial function.
2016-07-04 11:12:55 +02:00
Vincent Penquerc'h
c76e8c77eb
audiodecoder: fix criticals fixating a non existent field
...
https://bugzilla.gnome.org/show_bug.cgi?id=766970
2016-07-04 10:05:45 +01:00
Sebastian Dröge
5de9d5809b
audioconvert: Handle fallback channel mask for mono correctly
...
It's 0 and no mask should be set for mono at all.
https://bugzilla.gnome.org/show_bug.cgi?id=757472
2016-06-29 18:14:51 +02:00
Mikhail Fludkov
8d4f79b640
audiodecoder: fix invalid timestamps when PLC and delay
...
Elements inherited from GstAudioDecoder, supporting PLC and introducing
delay produce invalid timestamps. Good example is opusdec with in-band FEC
enabled. After receiving GAP event it delays the audio concealment until
the next buffer arrives. The next buffer will have DISCONT flag set which
will make GstAudioDecoder to reset it's internal state, thus forgetting
the timestamp of GAP event. As a result the concealed audio will have the
timestamp of the next buffer (with DISCONT flag) but not the timestamp
from the event.
2016-06-16 11:01:04 +01:00
Tim-Philipp Müller
d52a74f32e
g-i: pass compiler env to g-ir-scanner
...
It's what introspection.mak does as well. Should
fix spurious build failures on gnome-continuous.
2016-05-24 00:44:21 +01:00
Kipp Cannon
f7a31a79f4
audio: Add const to segment parameter of gst_audio_buffer_clip()
...
e.g., allows this to be used with the reference retrieved by
gst_event_parse_segment().
https://bugzilla.gnome.org/show_bug.cgi?id=765663
2016-04-27 12:26:07 +03:00
Jan Schmidt
802eae296a
Revert "audioringbuffer: start ringbuffer if needed upon commit"
...
This reverts commit 13ee94ef10
.
Causes audio glitches at startup by starting to output segments
from the ringbuffer before it has been filled / fully prerolled.
https://bugzilla.gnome.org/show_bug.cgi?id=657076
2016-04-16 02:13:15 +10:00
Guillaume Desmottes
7c5dfd713c
audioringbuffer: don't attempt to reorder position-less channels
...
As said in its doc GST_AUDIO_CHANNEL_POSITION_NONE is meant to be used
for "position-less channels, e.g. from a sound card that records 1024
channels; mutually exclusive with any other channel position".
But at the moment using such positions would raise a
'g_return_if_reached' warning as gst_audio_get_channel_reorder_map()
would reject it.
Fix this by preventing any attempt to reorder in such case as that's not
what we want anyway.
https://bugzilla.gnome.org/show_bug.cgi?id=763799
2016-04-12 14:48:30 -04:00
Guillaume Desmottes
1c56cfa144
audio: add debug output if channels mapping does not match
...
https://bugzilla.gnome.org/show_bug.cgi?id=763985
2016-04-12 14:48:30 -04:00
Guillaume Desmottes
3cb08304da
gst-audio: add gst_audio_channel_positions_to_string()
...
We currently don't log much about channel positions making debugging
harder as it should be. This is the first step in my attempt to improve
this.
https://bugzilla.gnome.org/show_bug.cgi?id=763985
2016-04-12 14:48:30 -04:00
Fabrice Bellet
bfcd0737b7
audio: Fix a race with the audioringbuffer thread
...
There is a small window of time where the audio ringbuffer thread
can access the parent thread variable, before it's initialized
by the parent thread. The patch replaces this variable use by
g_thread_self().
https://bugzilla.gnome.org/show_bug.cgi?id=764865
2016-04-11 21:43:13 +10:00
Víctor Manuel Jáquez Leal
37c4915109
libs: audio: split allocation query caps and pad caps
...
Since the allocation query caps contains memory size and the pad's caps
contains the display size, an audio encoder or decoder might need to allocate
a different buffer size than the size negotiated in the caps.
This patch splits this logic distinction for audiodecoder and audioencoder.
Thus the user, if needs a different allocation caps, should set it through
gst_audio_{encoder,decoder}_set_allocation_cap() before calling the negotiate()
vmethod. Otherwise the allocation_caps will be the same as the caps in the
src pad.
https://bugzilla.gnome.org/show_bug.cgi?id=764421
2016-04-05 11:37:15 +02:00
Víctor Manuel Jáquez Leal
052fe11949
audioencoder: fix gtk-doc comment format
2016-04-04 17:12:16 +02:00
Alessandro Decina
74efde50ad
audio-resampler: disable neon on arm64
...
Fix the build on arm64 by using HAVE_ARM_NEON instead of __ARM_NEON__.
2016-03-30 11:16:49 +11:00
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
Edward Hervey
de2ded9557
audio: Fix distcheck
...
Don't forget to dist the needed files (which don't need to be installed)
2016-03-29 08:22:29 +02:00
Wim Taymans
19f7d9ca46
audio-resampler: estimate memory usage in auto mode
...
Estimate the memory usage and use this to decide between full or
interpolated filter.
2016-03-28 15:37:36 +02:00
Wim Taymans
984ee8a3f6
audio-resampler: small optimizations
2016-03-28 13:25:55 +02:00
Wim Taymans
cf9059f070
audio-resampler: improve non-interleaved flags
...
Make it possible to have different interleaving on input and output
because we can quite trivially do that.
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
cc9d8594fe
audio-resampler: small cleanups
2016-03-28 13:25:55 +02:00
Wim Taymans
e209c0d565
audio-resampler: optimize no resampling
...
Switch to the faster nearest resample method when are doing no rate
conversion.
2016-03-28 13:25:54 +02:00
Wim Taymans
f692d5e459
audio-resampler: add VARIABLE_RATE flag
...
Add a VARIABLE rate flag that selects an interpolating filter.
Move some function setup code in the _new function.
2016-03-28 13:25:54 +02:00
Wim Taymans
7bb149dcc1
audio-resampler: more neon optimizations
2016-03-28 13:25:54 +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
61460fdfad
audio-resampler: overread only 8 taps
...
We only need 8 taps of zeroes as headroom for the SIMD optimized
functions.
2016-03-28 13:25:54 +02:00
Wim Taymans
4772ebbddf
audio-converter: use helper to check intermediate format
2016-03-28 13:25:54 +02:00
Wim Taymans
00e5a8bab8
audio-resampler: fix phase
2016-03-28 13:25:54 +02:00
Wim Taymans
9182ea17b5
audio-resampler: fix neon assembler
2016-03-28 13:25:53 +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
2c33c2134c
audio-resampler: fix neon linear float interpolation
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
b820074a49
audio-resample: remove neon double stubs
...
NEON does not have double types.
2016-03-28 13:25:53 +02:00
Wim Taymans
6f9237dfb5
audio-resampler: add more neon optimizations
2016-03-28 13:25:53 +02:00
Wim Taymans
307f360cca
audio-resampler: add more neon optimizations
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
25d81ffb55
audio-resampler: give better hints about the precision
...
Give better hints to the compiler about the precision we expect from
the multiplications.
2016-03-28 13:25:53 +02:00
Wim Taymans
ea497b509f
audio-resample: small optimizations
...
Remove some inline functions that are called in the slow path.
Unroll C fallback functions a little.
2016-03-28 13:25:52 +02:00
Wim Taymans
167a415717
audio-resampler: Use n_phases when calculating taps offset
...
Tweak linear interpolation oversampling.
Clear filter cache on rate changes when using a full filter.
2016-03-28 13:25:52 +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
0f3ff9177f
audio-resampler: avoid overflow in fraction calculation
2016-03-28 13:25:52 +02:00
Wim Taymans
651ae201bc
audio-resampler: increase precision
2016-03-28 13:25:52 +02:00
Wim Taymans
4cb52f1831
audio-resampler: add more optimizations
2016-03-28 13:25:52 +02:00