platform/upstream/gst-plugins-base.git
8 years agosmartencoder: Only accept TIME segments for real
Sebastian Dröge [Mon, 25 Apr 2016 14:16:04 +0000 (17:16 +0300)]
smartencoder: Only accept TIME segments for real

... and don't try to push pending data without ever having received a SEGMENT
event before EOS

https://bugzilla.gnome.org/show_bug.cgi?id=765541

8 years agocodec-utils: H265 level idc 0 is not valid
Sebastian Dröge [Mon, 25 Apr 2016 13:48:36 +0000 (16:48 +0300)]
codec-utils: H265 level idc 0 is not valid

Don't put level=0 into the caps, it confuses other elements.

https://bugzilla.gnome.org/show_bug.cgi?id=765538

8 years agocodec-utils: H264 level idc 0 is not valid
Sebastian Dröge [Mon, 25 Apr 2016 13:47:00 +0000 (16:47 +0300)]
codec-utils: H264 level idc 0 is not valid

Don't put level=0 into the caps, it confuses other elements.

https://bugzilla.gnome.org/show_bug.cgi?id=765538

8 years agoencoding-profile: Remove codec_data and streamheader fields from constraint caps
Sebastian Dröge [Mon, 25 Apr 2016 13:06:39 +0000 (16:06 +0300)]
encoding-profile: Remove codec_data and streamheader fields from constraint caps

When converting discoverer output to an encoding profile, it makes sense to
omit these. It's very very unlikely that our encoder is going to produce bit
by bit the same codec_data or streamheader.

https://bugzilla.gnome.org/show_bug.cgi?id=765534

8 years agoencoding-profile: Don't put G_BEGIN_DECLS around #include statements
Sebastian Dröge [Mon, 25 Apr 2016 12:05:36 +0000 (15:05 +0300)]
encoding-profile: Don't put G_BEGIN_DECLS around #include statements

It should only be around our own declarations.

8 years agovideo-converter: add more fastpaths for I420 -> RGB
Wim Taymans [Fri, 22 Apr 2016 13:07:10 +0000 (15:07 +0200)]
video-converter: add more fastpaths for I420 -> RGB

Use the I420->BGRA and a new I420->ARGB to speed up any I420 to RGB
operation.

8 years agosdp: update since markers to 1.8.1 for some new APIs
Josep Torra [Tue, 19 Apr 2016 15:36:20 +0000 (17:36 +0200)]
sdp: update since markers to 1.8.1 for some new APIs

As we decided to backport some fixes we update the since markers.

8 years agotests: vorbisenc: fix with CK_FORK=no
Tim-Philipp Müller [Sun, 17 Apr 2016 15:21:32 +0000 (16:21 +0100)]
tests: vorbisenc: fix with CK_FORK=no

8 years agodecodebin: Always add a multiqueue in single-stream use-buffering pipelines
Vivia Nikolaidou [Tue, 12 Apr 2016 13:32:20 +0000 (16:32 +0300)]
decodebin: Always add a multiqueue in single-stream use-buffering pipelines

If we are configured to use buffering and there is no demuxer in the chain, we
still want a multiqueue, otherwise we will ignore the use-buffering property.
In that case, we will insert a multiqueue after the parser or decoder - not
elsewhere, otherwise we won't have timestamps.

https://bugzilla.gnome.org/show_bug.cgi?id=764948

8 years agogst-play: call gst_deinit()
Guillaume Desmottes [Mon, 18 Apr 2016 14:39:02 +0000 (17:39 +0300)]
gst-play: call gst_deinit()

So we can use gst-play to track memory leaks.

https://bugzilla.gnome.org/show_bug.cgi?id=765216

8 years agowin32: update .def for new API
Tim-Philipp Müller [Fri, 15 Apr 2016 16:48:26 +0000 (17:48 +0100)]
win32: update .def for new API

8 years agoRevert "audioringbuffer: start ringbuffer if needed upon commit"
Jan Schmidt [Fri, 15 Apr 2016 16:11:59 +0000 (02:11 +1000)]
Revert "audioringbuffer: start ringbuffer if needed upon commit"

This reverts commit 13ee94ef1091f8a8a90dbd395b39876c26c5188e.

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

8 years agosdpmessage: new gst_sdp_media_parse_keymgmt/gst_sdp_media_parse_keymgmt
Aleix Conchillo Flaqué [Fri, 15 Apr 2016 07:18:50 +0000 (00:18 -0700)]
sdpmessage: new gst_sdp_media_parse_keymgmt/gst_sdp_media_parse_keymgmt

We add a couple of new functions gst_sdp_media_parse_keymgmt and
gst_sdp_media_parse_keymgmt. We also implement
gst_sdp_message_attributes_to_caps and gst_sdp_media_attributes_to_caps
in terms of these new functions and also gst_mikey_message_to_caps.

8 years agomikey: add new function gst_mikey_message_to_caps
Aleix Conchillo Flaqué [Fri, 15 Apr 2016 06:29:34 +0000 (23:29 -0700)]
mikey: add new function gst_mikey_message_to_caps

8 years agosubparse: fix build with GCC 4.6.3
Vincent Penquerc'h [Fri, 15 Apr 2016 11:54:32 +0000 (12:54 +0100)]
subparse: fix build with GCC 4.6.3

gstsubparse.c: In function ‘parse_subrip’:
gstsubparse.c:988:7: error: ignoring return value of ‘strtol’, declared with attribute warn_unused_result [-Werror=unused-result]
cc1: all warnings being treated as errors

https://bugzilla.gnome.org/show_bug.cgi?id=765042

8 years ago.gitignore: add test-resample binary
Josep Torra [Fri, 15 Apr 2016 11:08:38 +0000 (13:08 +0200)]
.gitignore: add test-resample binary

8 years agomikey: allow passing srtp or srtcp to create mikey message
Aleix Conchillo Flaqué [Fri, 15 Apr 2016 00:26:54 +0000 (17:26 -0700)]
mikey: allow passing srtp or srtcp to create mikey message

Current implementation requires all srtp and srtcp parameters to be
given in the caps. MIKEY uses only one algorithm for encryption and one
for authentication so we now allow passing srtp or srtcp parameters. If
both are given srtp parametres will be preferred.

https://bugzilla.gnome.org/show_bug.cgi?id=765027

8 years agoAutomatic update of common submodule
Julien Isorce [Thu, 14 Apr 2016 09:00:06 +0000 (10:00 +0100)]
Automatic update of common submodule

From 6f2d209 to ac2f647

8 years agovideometa: Initialize all fields of all metas with default values
Sebastian Dröge [Wed, 13 Apr 2016 07:07:33 +0000 (10:07 +0300)]
videometa: Initialize all fields of all metas with default values

The metas are not allocated with all fields initialized to zeroes.

https://bugzilla.gnome.org/show_bug.cgi?id=764902

8 years agovideometa: Explicitly initialize GstVideoCropMeta on init
Arjen Veenhuizen [Mon, 11 Apr 2016 15:28:00 +0000 (15:28 +0000)]
videometa: Explicitly initialize GstVideoCropMeta on init

It is not allocated with all fields initialized to 0.

https://bugzilla.gnome.org/show_bug.cgi?id=764902

8 years agoalsa: properly convert position-less channels from ALSA
Guillaume Desmottes [Mon, 21 Mar 2016 15:34:37 +0000 (16:34 +0100)]
alsa: properly convert position-less channels from ALSA

The only way for ALSA to expose a position-less multi channels is to
return an array full of SND_CHMAP_MONO. Converting this to a
GST_AUDIO_CHANNEL_POSITION_MONO array would be invalid as
GST_AUDIO_CHANNEL_POSITION_MONO is meant to be used only with one
channel.

Fix this by using GST_AUDIO_CHANNEL_POSITION_NONE which is meant to be
used for position-less channels.

https://bugzilla.gnome.org/show_bug.cgi?id=763799

8 years agoaudioringbuffer: don't attempt to reorder position-less channels
Guillaume Desmottes [Mon, 21 Mar 2016 15:29:39 +0000 (16:29 +0100)]
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

8 years agoaudio: add debug output if channels mapping does not match
Guillaume Desmottes [Mon, 21 Mar 2016 11:26:50 +0000 (07:26 -0400)]
audio: add debug output if channels mapping does not match

https://bugzilla.gnome.org/show_bug.cgi?id=763985

8 years agoalsa: add some debugging output to alsa_detect_channels_mapping()
Guillaume Desmottes [Mon, 21 Mar 2016 10:58:13 +0000 (11:58 +0100)]
alsa: add some debugging output to alsa_detect_channels_mapping()

https://bugzilla.gnome.org/show_bug.cgi?id=763985

8 years agogst-audio: add gst_audio_channel_positions_to_string()
Guillaume Desmottes [Mon, 21 Mar 2016 10:46:45 +0000 (11:46 +0100)]
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

8 years agoalsa: factor out alsa_detect_channels_mapping()
Guillaume Desmottes [Mon, 21 Mar 2016 09:09:10 +0000 (05:09 -0400)]
alsa: factor out alsa_detect_channels_mapping()

This code was duplicated in alsasrc and alsasink.

https://bugzilla.gnome.org/show_bug.cgi?id=763985

8 years agoalsa: coding style fix
Guillaume Desmottes [Mon, 21 Mar 2016 09:06:18 +0000 (05:06 -0400)]
alsa: coding style fix

Was using tabs instead of spaces.

https://bugzilla.gnome.org/show_bug.cgi?id=763985

8 years agofdmemory, rtpbasedepayload: Ran gst-indent
Vivia Nikolaidou [Tue, 12 Apr 2016 13:34:00 +0000 (16:34 +0300)]
fdmemory, rtpbasedepayload: Ran gst-indent

https://bugzilla.gnome.org/show_bug.cgi?id=764948

8 years agodecodebin: Rename misleading variable is_parser_converter into is_parser
Vivia Nikolaidou [Tue, 12 Apr 2016 13:25:12 +0000 (16:25 +0300)]
decodebin: Rename misleading variable is_parser_converter into is_parser

In that place, the variable isn't checking whether the element is a
converter, only if it is a parser.

https://bugzilla.gnome.org/show_bug.cgi?id=764948

8 years agoaudio: Fix a race with the audioringbuffer thread
Fabrice Bellet [Mon, 11 Apr 2016 09:28:09 +0000 (11:28 +0200)]
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

8 years agotests: libscpp: test RTP/RTCP buffer init macros with C++ compiler
Tim-Philipp Müller [Wed, 6 Apr 2016 16:57:28 +0000 (17:57 +0100)]
tests: libscpp: test RTP/RTCP buffer init macros with C++ compiler

8 years agosubtitleoverlay: Don't complain when stream-start is the first event.
Jan Schmidt [Wed, 6 Apr 2016 11:03:19 +0000 (21:03 +1000)]
subtitleoverlay: Don't complain when stream-start is the first event.

When blocking the subtitle pad, it's expected that stream-start
is the first event, and that it can precede caps arriving on the
peer pad - in fact the caps can only have arrived on the peer
pad when it was pre-primed with sticky events previously.

Instead, just pass the stream-start and don't block, because
stream-start is sticky anyway.

8 years agosubparse: WebVTT Cue identifiers are optional
Jan Schmidt [Wed, 6 Apr 2016 11:00:10 +0000 (21:00 +1000)]
subparse: WebVTT Cue identifiers are optional

Don't require a cue identifier preceding the time range line
when parsing WebVTT. We could also store the CueID, but it's
not using anywhere, so just ignore it for now.

8 years agowin32: Add new libgstaudio symbols
Sebastian Dröge [Tue, 5 Apr 2016 11:26:55 +0000 (14:26 +0300)]
win32: Add new libgstaudio symbols

8 years agolibs: audio: split allocation query caps and pad caps
Víctor Manuel Jáquez Leal [Fri, 1 Apr 2016 10:25:14 +0000 (12:25 +0200)]
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

8 years agolibs: video: split allocation query caos and pad caps
Víctor Manuel Jáquez Leal [Thu, 31 Mar 2016 13:31:31 +0000 (15:31 +0200)]
libs: video: split allocation query caos and pad caps

Since the allocation query caps contains memory size and the pad's caps
contains the display size, a video encoder or decoder might need to allocate
a different frame size than the size negotiated in the caps.

This patch splits this logic distinction for videodecoder and videoencoder.

The user if needs a different allocation caps, should set the allocation_caps
in the GstVideoCodecState before calling negotiate() vmethod. Otherwise the
allocation_caps will be the same as the caps set in the src pad.

https://bugzilla.gnome.org/show_bug.cgi?id=764421

8 years agoaudioencoder: fix gtk-doc comment format
Víctor Manuel Jáquez Leal [Mon, 4 Apr 2016 14:39:21 +0000 (16:39 +0200)]
audioencoder: fix gtk-doc comment format

8 years agortpbasedepayload: look at ssrc before sequence numbers
Mikhail Fludkov [Sat, 2 Apr 2016 08:37:55 +0000 (10:37 +0200)]
rtpbasedepayload: look at ssrc before sequence numbers

Doing so prevents us dropping buffers in the rare, but possible, situations,
when the stream changes SSRC and new sequence numbers does not differ
much from the last sequence number from previous SSRC. For example:
ssrc - 0xaaaa 101,102,103,104 ssrc - 0xbbbb 102, 103, 104, 105...
In the scenario above we don't want to drop the first 3 packets of
0xbbbb stream.

https://bugzilla.gnome.org/show_bug.cgi?id=764459

8 years agovideorate: Don't fill up the segment with duplicate buffers if drop_only==TRUE
Sebastian Dröge [Sun, 3 Apr 2016 08:40:50 +0000 (11:40 +0300)]
videorate: Don't fill up the segment with duplicate buffers if drop_only==TRUE

8 years agovideorate: Remove dead code
Sebastian Dröge [Sun, 3 Apr 2016 08:38:28 +0000 (11:38 +0300)]
videorate: Remove dead code

We never get into this code path at all if drop_only==TRUE.

8 years agovideorate: avoid useless buffer copy in drop-only mode
Frédéric Bertolus [Tue, 29 Mar 2016 15:19:41 +0000 (17:19 +0200)]
videorate: avoid useless buffer copy in drop-only mode

Make writable the buffer before pushing it lead to a buffer copy. It's
because a reference is keep for the previous buffer.
The previous buffer reference is only need to duplicate the buffer. In
drop-only mode, the previous buffer is release just after pushing the
buffer so a copy is done but it's useless.

https://bugzilla.gnome.org/show_bug.cgi?id=764319

8 years agovideo: fix example code in gst_video_frame_map() docs
Tim-Philipp Müller [Sat, 2 Apr 2016 14:19:44 +0000 (15:19 +0100)]
video: fix example code in gst_video_frame_map() docs

GST_VIDEO_FRAME_PLANE_PSTRIDE() does not exist.

https://bugzilla.gnome.org/show_bug.cgi?id=764414

8 years agodiscoverer: copy over result and seekable fields when copying a discoverer info
Tim-Philipp Müller [Sat, 2 Apr 2016 09:09:07 +0000 (10:09 +0100)]
discoverer: copy over result and seekable fields when copying a discoverer info

The function gst_discoverer_info_copy doesn't copy the data members seekable
and result of the source GstDiscovererInfo.

In the case of copying a GstDiscovererInfo for later use, the seekbale will be
undefined, which in practice usually will be false, even though the seekable of
the original GstDiscovererInfo is true.

https://bugzilla.gnome.org/show_bug.cgi?id=762710

8 years agovideo-format: Fix macro documentation
Nicolas Dufresne [Thu, 31 Mar 2016 17:32:32 +0000 (13:32 -0400)]
video-format: Fix macro documentation

The parameter type was wrongly documenting that a GstVideoInfo structure
pointer was needed, while it needs a GstVideoFormatInfo structure
pointer.

https://bugzilla.gnome.org/show_bug.cgi?id=764414

8 years agotest: fix indentation
Tim-Philipp Müller [Sat, 26 Mar 2016 20:53:08 +0000 (20:53 +0000)]
test: fix indentation

8 years agortp: rtcpbuffer: fix indentation
Tim-Philipp Müller [Sat, 26 Mar 2016 20:52:16 +0000 (20:52 +0000)]
rtp: rtcpbuffer: fix indentation

https://bugzilla.gnome.org/show_bug.cgi?id=761944

8 years agortp: rtpcbuffer: fix Since markers
Tim-Philipp Müller [Sat, 26 Mar 2016 20:50:31 +0000 (20:50 +0000)]
rtp: rtpcbuffer: fix Since markers

https://bugzilla.gnome.org/show_bug.cgi?id=761944

8 years agoaudio-resampler: disable neon on arm64
Alessandro Decina [Wed, 30 Mar 2016 00:16:49 +0000 (11:16 +1100)]
audio-resampler: disable neon on arm64

Fix the build on arm64 by using HAVE_ARM_NEON instead of __ARM_NEON__.

8 years agosubparse: Add more parsing guards
Jan Schmidt [Tue, 29 Mar 2016 11:16:38 +0000 (22:16 +1100)]
subparse: Add more parsing guards

Insert extra checks for the validity of the incoming
data when parsing subrip/webvtt content and debug log
output for invalid content.

Should fix Coverity warnings.

8 years agosubparse: add missing break between formats
Luis de Bethencourt [Tue, 29 Mar 2016 09:23:08 +0000 (10:23 +0100)]
subparse: add missing break between formats

A break is missing at the end of case GST_SUB_PARSE_FORMAT_LRC or it will
fallthrough to WebVTT. This fixes commit fd2a14144a7a.

8 years agoaudio-resampler: Use _mm_set_epi64x(0, x) instead of _mm_cvtsi64_si128(x) in more...
Sebastian Dröge [Tue, 29 Mar 2016 09:11:22 +0000 (12:11 +0300)]
audio-resampler: Use _mm_set_epi64x(0, x) instead of _mm_cvtsi64_si128(x) in more places

8 years agowin32: Update exports for new video formats
Sreerenj Balachandran [Tue, 29 Mar 2016 08:25:15 +0000 (11:25 +0300)]
win32: Update exports for new video formats

Update win32 exports for P010_10BE and P010_10LE
video formats.

8 years agovideo: add P010 format support
Scott D Phillips [Tue, 29 Mar 2016 08:16:42 +0000 (11:16 +0300)]
video: add P010 format support

P010 is a YUV420 format with an interleaved U-V plane and 2-bytes per
component with the the color value stored in the 10 most significant
bits.

https://bugzilla.gnome.org/show_bug.cgi?id=761607
---
Changes since v2:
- Set bits=16 in DPTH10_10_10_HI
Changes since v1:
- Fixed x-offset calculation in uv.
- Added 6-bit shifts to FormatInfo.

8 years agoresampler: Use _mm_set_epi64x(0, x) instead of _mm_cvtsi64_si128(x)
Sebastian Dröge [Tue, 29 Mar 2016 07:15:07 +0000 (10:15 +0300)]
resampler: Use _mm_set_epi64x(0, x) instead of _mm_cvtsi64_si128(x)

The latter is only available on x86-64 for some reason.

8 years agoaudio: Fix distcheck
Edward Hervey [Tue, 29 Mar 2016 06:21:54 +0000 (08:21 +0200)]
audio: Fix distcheck

Don't forget to dist the needed files (which don't need to be installed)

8 years agoaudio-resampler: estimate memory usage in auto mode
Wim Taymans [Mon, 28 Mar 2016 13:37:36 +0000 (15:37 +0200)]
audio-resampler: estimate memory usage in auto mode

Estimate the memory usage and use this to decide between full or
interpolated filter.

8 years agoaudioresample: remove last ORC remains
Wim Taymans [Mon, 28 Mar 2016 10:51:26 +0000 (12:51 +0200)]
audioresample: remove last ORC remains

8 years agoaudio-resampler: small optimizations
Wim Taymans [Wed, 16 Mar 2016 11:55:56 +0000 (12:55 +0100)]
audio-resampler: small optimizations

8 years agoaudio-resampler: improve non-interleaved flags
Wim Taymans [Fri, 4 Mar 2016 16:15:44 +0000 (17:15 +0100)]
audio-resampler: improve non-interleaved flags

Make it possible to have different interleaving on input and output
because we can quite trivially do that.

8 years agoaudio-resampler: unroll some more loops
Wim Taymans [Wed, 2 Mar 2016 10:40:15 +0000 (11:40 +0100)]
audio-resampler: unroll some more loops

Unroll some loops.

8 years agoaudio-resampler: keep precision
Wim Taymans [Tue, 1 Mar 2016 15:31:18 +0000 (16:31 +0100)]
audio-resampler: keep precision

Transpose and add before applying the cubic interpolation to avoid
overflows when using full precision.

8 years agoaudio-resampler: small cleanups
Wim Taymans [Tue, 1 Mar 2016 15:26:15 +0000 (16:26 +0100)]
audio-resampler: small cleanups

8 years agoaudio-resampler: optimize no resampling
Wim Taymans [Thu, 25 Feb 2016 14:38:46 +0000 (15:38 +0100)]
audio-resampler: optimize no resampling

Switch to the faster nearest resample method when are doing no rate
conversion.

8 years agoaudio-resampler: add VARIABLE_RATE flag
Wim Taymans [Thu, 25 Feb 2016 13:09:44 +0000 (14:09 +0100)]
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.

8 years agoaudio-resampler: more neon optimizations
Wim Taymans [Tue, 23 Feb 2016 09:46:55 +0000 (04:46 -0500)]
audio-resampler: more neon optimizations

8 years agoaudio-resampler: avoid overflow in cubic interpolation
Wim Taymans [Wed, 24 Feb 2016 11:57:26 +0000 (12:57 +0100)]
audio-resampler: avoid overflow in cubic interpolation

Shift out an extra bit to have some more headroom when doing cubic
interpolation.

8 years agoaudio-resampler: overread only 8 taps
Wim Taymans [Wed, 24 Feb 2016 11:56:39 +0000 (12:56 +0100)]
audio-resampler: overread only 8 taps

We only need 8 taps of zeroes as headroom for the SIMD optimized
functions.

8 years agoaudio-converter: use helper to check intermediate format
Wim Taymans [Wed, 24 Feb 2016 11:55:28 +0000 (12:55 +0100)]
audio-converter: use helper to check intermediate format

8 years agoaudio-resampler: fix phase
Wim Taymans [Tue, 23 Feb 2016 14:37:37 +0000 (15:37 +0100)]
audio-resampler: fix phase

8 years agoaudio-resampler: fix neon assembler
Wim Taymans [Mon, 22 Feb 2016 16:16:28 +0000 (11:16 -0500)]
audio-resampler: fix neon assembler

8 years agoaudio-resampler: avoid some format conversion
Wim Taymans [Mon, 22 Feb 2016 12:19:02 +0000 (13:19 +0100)]
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.

8 years agoaudio-resampler: fix neon linear float interpolation
Wim Taymans [Mon, 22 Feb 2016 08:28:21 +0000 (03:28 -0500)]
audio-resampler: fix neon linear float interpolation

8 years agoaudio-resampler: reorder filter coefficients for more speed
Wim Taymans [Fri, 19 Feb 2016 15:39:43 +0000 (16:39 +0100)]
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.

8 years agoaudio-resampler: remove stereo optimizations
Wim Taymans [Fri, 19 Feb 2016 09:40:03 +0000 (10:40 +0100)]
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

8 years agoaudio-resample: remove neon double stubs
Wim Taymans [Thu, 18 Feb 2016 17:48:45 +0000 (12:48 -0500)]
audio-resample: remove neon double stubs

NEON does not have double types.

8 years agoaudio-resampler: add more neon optimizations
Wim Taymans [Thu, 18 Feb 2016 17:38:49 +0000 (12:38 -0500)]
audio-resampler: add more neon optimizations

8 years agoaudio-resampler: add more neon optimizations
Wim Taymans [Thu, 18 Feb 2016 16:05:18 +0000 (11:05 -0500)]
audio-resampler: add more neon optimizations

8 years agoaudio-resampler: add neon optimizations
Wim Taymans [Wed, 17 Feb 2016 16:20:06 +0000 (11:20 -0500)]
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.

8 years agoaudio-resampler: give better hints about the precision
Wim Taymans [Wed, 17 Feb 2016 12:12:31 +0000 (13:12 +0100)]
audio-resampler: give better hints about the precision

Give better hints to the compiler about the precision we expect from
the multiplications.

8 years agoaudio-resample: small optimizations
Wim Taymans [Wed, 17 Feb 2016 11:05:58 +0000 (12:05 +0100)]
audio-resample: small optimizations

Remove some inline functions that are called in the slow path.
Unroll C fallback functions a little.

8 years agoaudio-resampler: Use n_phases when calculating taps offset
Wim Taymans [Tue, 16 Feb 2016 08:18:13 +0000 (09:18 +0100)]
audio-resampler: Use n_phases when calculating taps offset

Tweak linear interpolation oversampling.
Clear filter cache on rate changes when using a full filter.

8 years agoaudio-resampler: improve filter construction
Wim Taymans [Mon, 15 Feb 2016 17:06:19 +0000 (18:06 +0100)]
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.

8 years agoaudio-resampler: avoid overflow in fraction calculation
Wim Taymans [Fri, 12 Feb 2016 09:00:22 +0000 (10:00 +0100)]
audio-resampler: avoid overflow in fraction calculation

8 years agoaudio-resampler: increase precision
Wim Taymans [Thu, 11 Feb 2016 18:42:31 +0000 (19:42 +0100)]
audio-resampler: increase precision

8 years agoaudio-resampler: add more optimizations
Wim Taymans [Thu, 11 Feb 2016 16:40:56 +0000 (17:40 +0100)]
audio-resampler: add more optimizations

8 years agoaudio-resample: fix taps conversion
Wim Taymans [Thu, 11 Feb 2016 12:23:07 +0000 (13:23 +0100)]
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.

8 years agoaudio-resampler: Improve taps memory layout
Wim Taymans [Thu, 11 Feb 2016 10:57:26 +0000 (11:57 +0100)]
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

8 years agoaudio-resampler: add cubic interpolation
Wim Taymans [Wed, 10 Feb 2016 16:28:24 +0000 (17:28 +0100)]
audio-resampler: add cubic interpolation

8 years agoaudio-resampler: add more functions
Wim Taymans [Wed, 10 Feb 2016 12:31:11 +0000 (13:31 +0100)]
audio-resampler: add more functions

Use some macros to generate more functions

8 years agoaudio-resampler: add linear interpolation method
Wim Taymans [Wed, 10 Feb 2016 11:04:12 +0000 (12:04 +0100)]
audio-resampler: add linear interpolation method

Make more functions into macros.
Add linear interpolation of filter coefficients.

8 years agotests: add resample test
Wim Taymans [Thu, 4 Feb 2016 14:22:39 +0000 (15:22 +0100)]
tests: add resample test

8 years agoaudio-resampler: add max-phase-error config
Wim Taymans [Thu, 4 Feb 2016 14:21:40 +0000 (15:21 +0100)]
audio-resampler: add max-phase-error config

8 years agoaudio-resampler: improve tap calculation
Wim Taymans [Thu, 4 Feb 2016 14:19:53 +0000 (15:19 +0100)]
audio-resampler: improve tap calculation

Return the taps from make_taps, this makes it possible to not actually
have to cache the taps when we want to.
Fix overflow in phase calculation.

8 years agoaudio-resampler: fix guint -> gint
Wim Taymans [Tue, 2 Feb 2016 11:06:44 +0000 (12:06 +0100)]
audio-resampler: fix guint -> gint

8 years agoaudio-resampler: improve phase error
Wim Taymans [Tue, 2 Feb 2016 10:48:16 +0000 (11:48 +0100)]
audio-resampler: improve phase error

Accept a phase error of maximum 10%, which turns out to be inaudible.

8 years agoaudio-resampler: improve phase calculation
Wim Taymans [Mon, 1 Feb 2016 16:18:32 +0000 (17:18 +0100)]
audio-resampler: improve phase calculation

Also calculate the GCD with the current phase so that we can accurately
represent the current phase with the new resample rates.

8 years agoaudio-resampler: fix history after buffer resize
Wim Taymans [Tue, 26 Jan 2016 21:53:33 +0000 (22:53 +0100)]
audio-resampler: fix history after buffer resize

When we resize the temp buffer, move the history in its new place.

8 years agoaudio-resampler: add reset function
Wim Taymans [Tue, 26 Jan 2016 15:42:16 +0000 (16:42 +0100)]
audio-resampler: add reset function

Add a function to reset the audio-resampler.
Use new function in audio-converter
Use the new functions in gstaudioresample and fixup drain functions.

8 years agoaudio-resampler: Small fixes
Wim Taymans [Tue, 26 Jan 2016 15:40:57 +0000 (16:40 +0100)]
audio-resampler: Small fixes

Fix the phase.
Reset the new sample buffer with 0.
Move samples around when we change the filter size.

8 years agoaudio-resampler: Rework make_taps
Wim Taymans [Tue, 26 Jan 2016 15:38:50 +0000 (16:38 +0100)]
audio-resampler: Rework make_taps

Make it return a pointer to the generated taps. That way we can later
decide to actually cache it or not.