diff options
author | Sebastian Dröge <slomo@circular-chaos.org> | 2007-08-10 05:20:06 +0000 |
---|---|---|
committer | Sebastian Dröge <slomo@circular-chaos.org> | 2007-08-10 05:20:06 +0000 |
commit | ec97d6774103cff9394062dde81ad934ba99718e (patch) | |
tree | d36aa956b995c2476409ba3ca77bda38e306c0bd /gst/filter/gstbpwsinc.h | |
parent | 11131b7a44ce855d89959c7af1b5773da1630ad7 (diff) | |
download | gst-plugins-bad-ec97d6774103cff9394062dde81ad934ba99718e.tar.gz gst-plugins-bad-ec97d6774103cff9394062dde81ad934ba99718e.tar.bz2 gst-plugins-bad-ec97d6774103cff9394062dde81ad934ba99718e.zip |
gst/filter/gstbpwsinc.*: Apply the same changes to the bandpass filter:
Original commit message from CVS:
* gst/filter/gstbpwsinc.c: (gst_bpwsinc_class_init),
(gst_bpwsinc_init), (process_32), (process_64),
(bpwsinc_build_kernel), (bpwsinc_setup), (bpwsinc_get_unit_size),
(bpwsinc_transform), (bpwsinc_set_property),
(bpwsinc_get_property):
* gst/filter/gstbpwsinc.h:
Apply the same changes to the bandpass filter:
- Support double input
- Fix processing for input with >1 channels
- Specify frequency in Hz
- Specify actual filter kernel length
- Use transform instead of transform_ip as we're working
out of place anyway
- Factor out filter kernel generation and update the filter
kernel when the properties are set
Fix bandpass filter kernel generation to actually generate
a bandpass filter by creating a highpass instead of a second
lowpass.
* gst/filter/gstlpwsinc.c: (gst_lpwsinc_class_init):
Small formatting fix.
Diffstat (limited to 'gst/filter/gstbpwsinc.h')
-rw-r--r-- | gst/filter/gstbpwsinc.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gst/filter/gstbpwsinc.h b/gst/filter/gstbpwsinc.h index af5938d5..3bbb3e01 100644 --- a/gst/filter/gstbpwsinc.h +++ b/gst/filter/gstbpwsinc.h @@ -25,10 +25,6 @@ * chapter 16 * available at http://www.dspguide.com/ * - * FIXME: - * - this filter is totally unoptimized ! - * - we do not destroy the allocated memory for filters and residue - * - this might be improved upon with bytestream */ #ifndef __GST_BPWSINC_H__ @@ -54,6 +50,8 @@ G_BEGIN_DECLS typedef struct _GstBPWSinc GstBPWSinc; typedef struct _GstBPWSincClass GstBPWSincClass; +typedef void (*GstBPWSincProcessFunc) (GstBPWSinc *, guint8 *, guint8 *, guint); + /** * GstBPWSinc: * @@ -62,13 +60,15 @@ typedef struct _GstBPWSincClass GstBPWSincClass; struct _GstBPWSinc { GstAudioFilter element; - double frequency; - double lower_frequency, upper_frequency; - int wing_size; /* length of a "wing" of the filter; - actual length is 2 * wing_size + 1 */ + GstBPWSincProcessFunc process; + + gdouble frequency; + gdouble lower_frequency, upper_frequency; + gint kernel_length; /* length of the filter kernel */ - gfloat *residue; /* buffer for left-over samples from previous buffer */ - double *kernel; + gdouble *residue; /* buffer for left-over samples from previous buffer */ + gdouble *kernel; + gboolean have_kernel; }; struct _GstBPWSincClass { |