Commit graph

34 commits

Author SHA1 Message Date
Tim-Philipp Müller
230cf41cc9 Fix FSF address
https://bugzilla.gnome.org/show_bug.cgi?id=687520
2012-11-04 00:07:18 +00:00
Chris Pankow
6042bb1e6b audiofxbasefirfilter: Fix time-domain convolution for multichannel input
Fixes bug #674025.
2012-04-23 10:08:59 +02:00
Mark Nauwelaerts
9041a588f9 audiofx: adjust to changed semantics of audiofilter _setup method
... in that it will now call subclass with info on proposed audio format
without having set that info already in base class.  As such,
subclass can not rely on audio format info being available there.
2012-03-23 18:48:53 +01:00
Wim Taymans
3c292543bc audiofx: remove transform lock usage 2012-02-23 12:03:24 +01:00
Wim Taymans
583d39dd8d update for new memory API 2012-01-25 12:30:28 +01:00
Sebastian Dröge
686698bf72 audiofx: Port to the new multichannel caps and the new raw audio layout field 2012-01-05 10:30:31 +01:00
Matej Knopp
1e5dd9e315 Fix printf format compiler warnings on OS X / 64bit
https://bugzilla.gnome.org/show_bug.cgi?id=662615
2011-11-22 01:28:22 +00:00
Wim Taymans
6190312214 add parent to query function 2011-11-16 17:27:13 +01:00
Wim Taymans
49658dd5b5 remove query types 2011-11-09 11:53:01 +01:00
Stefan Sauer
fb162c8eb4 controller: port to new controller location and api 2011-11-04 20:15:48 +01:00
Wim Taymans
445bf71bd1 port to more audio api changes 2011-08-19 16:09:48 +02:00
Wim Taymans
90f5b31b4b port to new audio API and caps 2011-08-19 11:49:44 +02:00
Wim Taymans
984a0b54eb fixes for event handler changes 2011-07-22 21:19:45 +02:00
Edward Hervey
8c83978d56 audiofxbasefirfilter: Buffers no longer have caps 2011-06-07 11:22:35 +02:00
Wim Taymans
b121bb0ae9 audiofx: fix pad_alloc 2011-04-29 15:46:21 +02:00
Wim Taymans
237ca1631f port some more elements to 0.11 2011-04-25 12:49:36 +02:00
Sebastian Dröge
79e720052a audiofx: Sync properties to the stream time 2010-03-09 21:03:18 +00:00
Sebastian Dröge
a9a5e0c7e1 audiofxbasefirfilter: Add property for not draining the history on kernel changes
Currently this only works if the kernel size doesn't change, in the future
it will be possible to change the kernel size too without draining
the complete history and without loosing anything.

Partially based on a patch by
Thiago Santos <thiago.sousa.santos@collabora.co.uk>
2010-01-07 17:28:43 +01:00
Thiago Santos
173be1422c audiofxbasefirfilter: do not try to alloc really large buffers
When nsamples_out is larger than nsamples_in, using unsigned
ints lead to a overflow and the resulting value is wrong and
way too large for allocating a buffer. Use signed integers
and returning immediatelly when that happens.
2009-12-26 16:59:14 -03:00
Sebastian Dröge
119a6ce637 audiofxbasefirfilter: Fix frequency response calculation 2009-12-15 18:12:47 +01:00
Sebastian Dröge
8695581751 audiofxbasefirfilter: Remove dead assignments 2009-12-15 18:12:46 +01:00
Sebastian Dröge
cd2b1c1b58 audiofxbasefirfilter: Add special processing functions for Mono/Stereo
This provides another 7% speedup for the time domain convolution and 1.5%
speedup for the FFT convolution on Mono input.

This optimization assumes that the compiler simplifies calculations
and conditions on constant numbers and unrolls loops with a constant
number of repeats.
2009-12-15 18:12:46 +01:00
Sebastian Dröge
a3d7321c50 audiofxbasefirfilter: Add a "low-latency" mode
This will always use time-domain convolution, which lowers the latency.
With FFT convolution it's always a multiple of the kernel length,
with time domain convolution it's only the pre-latency of the filter kernel.
2009-12-15 18:12:46 +01:00
Sebastian Dröge
ca568ff079 audiofxbasefirfilter: Remove obsolete TODO comments 2009-12-15 18:12:46 +01:00
Sebastian Dröge
45edc1bbd8 audiofxbasefirfilter: Use samples everywhere instead of samples*channels sometimes 2009-12-15 18:12:46 +01:00
Sebastian Dröge
02960383c1 audiofxbasefirfilter: FFT convolution implementation
This provides a great speedup, especially the relationship between kernel
length and processing size is now logarithmic instead of linear. Below a
kernel size of 32 it's a bit slower, afterwards it's much faster:

17     0.788000 -> 0.950000
33     1.208000 -> 1.146000
65     2.166000 -> 1.146000
...
4097 107.444000 -> 1.508000

For sizes smaller 32 the normal time-domain convolution is chosen,
for larger sizes the FFT convolution is automatically used.

Fixes bug #594381.
2009-12-15 18:12:46 +01:00
Sebastian Dröge
ddafc20b28 audiofxbasefirfilter: Make most code parts independent of the processing functions and used convolution algorithm
Only remaining part is the residue pushing, which will be fixed later.
2009-12-15 18:12:46 +01:00
Sebastian Dröge
43576fb0cf audiofxbasefirfilter: Optimize time-domain convolution
Remove some redundant calculations, move comparisions out of
inner loops, etc.

This makes the convolution about 3 (!) times faster but
processing time is of course still proportional to the
filter size.
2009-12-15 18:12:46 +01:00
Sebastian Dröge
c5f955a3b6 audiofxbasefirfilter: Use _CAST macros in some places and do some calculations only once 2009-12-15 18:12:46 +01:00
Sebastian Dröge
abb437454e audiofxbasefirfilter: Rewrite timestamp tracking
It's much simpler now and doesn't introduce accumulating rounding
errors.
2009-12-15 18:12:46 +01:00
Sebastian Dröge
c57be62881 audiofxbasefirfilter: Rename some variables and change comments 2009-12-15 18:12:45 +01:00
Sebastian Dröge
742a7c7f50 audiofxbasefirfilter: Add const qualifier to the source data array 2009-12-15 18:12:45 +01:00
Josep Torra
00aa3421e0 audiofx: use G_GUINT64_FORMAT to fix warnings on OSX 2009-10-09 11:43:44 +02:00
Sebastian Dröge
0016658ace gst/audiofx/: Implement a base class for generic audio FIR filters.
Original commit message from CVS:
* gst/audiofx/Makefile.am:
* gst/audiofx/audiofxbasefirfilter.c:
(gst_audio_fx_base_fir_filter_dispose),
(gst_audio_fx_base_fir_filter_base_init),
(gst_audio_fx_base_fir_filter_class_init),
(gst_audio_fx_base_fir_filter_init),
(gst_audio_fx_base_fir_filter_push_residue),
(gst_audio_fx_base_fir_filter_setup),
(gst_audio_fx_base_fir_filter_transform),
(gst_audio_fx_base_fir_filter_start),
(gst_audio_fx_base_fir_filter_stop),
(gst_audio_fx_base_fir_filter_query),
(gst_audio_fx_base_fir_filter_query_type),
(gst_audio_fx_base_fir_filter_event),
(gst_audio_fx_base_fir_filter_set_kernel):
* gst/audiofx/audiofxbasefirfilter.h:
* gst/audiofx/audiofxbaseiirfilter.c:
Implement a base class for generic audio FIR filters.
* gst/audiofx/audiowsincband.c:
(gst_gst_audio_wsincband_mode_get_type),
(gst_gst_audio_wsincband_window_get_type),
(gst_audio_wsincband_base_init), (gst_audio_wsincband_class_init),
(gst_audio_wsincband_init), (gst_audio_wsincband_build_kernel),
(gst_audio_wsincband_setup), (gst_audio_wsincband_set_property),
(gst_audio_wsincband_get_property):
* gst/audiofx/audiowsincband.h:
* gst/audiofx/audiowsinclimit.c:
(gst_audio_wsinclimit_mode_get_type),
(gst_audio_wsinclimit_window_get_type),
(gst_audio_wsinclimit_base_init),
(gst_audio_wsinclimit_class_init), (gst_audio_wsinclimit_init),
(gst_audio_wsinclimit_build_kernel), (gst_audio_wsinclimit_setup),
(gst_audio_wsinclimit_set_property),
(gst_audio_wsinclimit_get_property):
* gst/audiofx/audiowsinclimit.h:
* tests/check/elements/audiowsincband.c: (GST_START_TEST):
* tests/check/elements/audiowsinclimit.c: (GST_START_TEST):
Use this new base class for audiowsincband and audiowsinclimit.
Also cleanup both elements.
2009-01-11 19:03:38 +00:00