* is probably the bottleneck
* - Maybe allow cascading the filter to get a better stopband attenuation.
* Can be done by convolving a filter kernel with itself
+ * - Drop the first kernel_length/2 samples and append the same number of
+ * samples on EOS as the first few samples are essentialy zero.
+ */
+
+/**
+ * SECTION:element-bpwsinc
+ * @short_description: Windowed Sinc band pass and band reject filter
+ *
+ * <refsect2>
+ * <para>
+ * Attenuates all frequencies outside (bandpass) or inside (bandreject) of a frequency
+ * band. The length parameter controls the rolloff, the window parameter
+ * controls rolloff and stopband attenuation. The Hamming window provides a faster rolloff but a bit
+ * worse stopband attenuation, the other way around for the Blackman window.
+ * </para>
+ * <title>Example launch line</title>
+ * <para>
+ * <programlisting>
+ * gst-launch audiotestsrc freq=1500 ! audioconvert ! bpwsinc mode=band-pass lower-frequency=3000 upper-frequency=10000 length=501 window=blackman ! audioconvert ! alsasink
+ * gst-launch filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! bpwsinc mode=band-reject lower-frequency=59 upper-frequency=61 length=10001 window=hamming ! audioconvert ! alsasink
+ * gst-launch audiotestsrc wave=white-noise ! audioconvert ! bpwsinc mode=band-pass lower-frequency=1000 upper-frequency=2000 length=31 ! audioconvert ! alsasink
+ * </programlisting>
+ * </para>
+ * </refsect2>
*/
#ifdef HAVE_CONFIG_H
GST_DEBUG_CATEGORY_STATIC (GST_CAT_DEFAULT);
static const GstElementDetails bpwsinc_details =
-GST_ELEMENT_DETAILS ("Band-pass Windowed sinc filter",
+GST_ELEMENT_DETAILS ("Band-pass and Band-reject Windowed sinc filter",
"Filter/Effect/Audio",
"Band-pass Windowed sinc filter",
"Thomas <thomas@apestaart.org>, "
" channels = (int) [ 1, MAX ] "
#define DEBUG_INIT(bla) \
- GST_DEBUG_CATEGORY_INIT (gst_bpwsinc_debug, "bpwsinc", 0, "Band-pass Windowed sinc filter plugin");
+ GST_DEBUG_CATEGORY_INIT (gst_bpwsinc_debug, "bpwsinc", 0, "Band-pass and Band-reject Windowed sinc filter plugin");
GST_BOILERPLATE_FULL (GstBPWSinc, gst_bpwsinc, GstAudioFilter,
GST_TYPE_AUDIO_FILTER, DEBUG_INIT);
* when using FFT convolution as currently the convolution itself
* is probably the bottleneck
* - Maybe allow cascading the filter to get a better stopband attenuation.
- * Can be done by convolving a filter kernel with itself.
+ * Can be done by convolving a filter kernel with itself
+ * - Drop the first kernel_length/2 samples and append the same number of
+ * samples on EOS as the first few samples are essentialy zero.
+ */
+
+/**
+ * SECTION:element-lpwsinc
+ * @short_description: Windows Sinc low pass and high pass filter
+ *
+ * <refsect2>
+ * <para>
+ * Attenuates all frequencies above the cutoff frequency (low-pass) or all frequencies below the
+ * cutoff frequency (high-pass). The length parameter controls the rolloff, the window parameter
+ * controls rolloff and stopband attenuation. The Hamming window provides a faster rolloff but a bit
+ * worse stopband attenuation, the other way around for the Blackman window.
+ * </para>
+ * <title>Example launch line</title>
+ * <para>
+ * <programlisting>
+ * gst-launch audiotestsrc freq=1500 ! audioconvert ! lpwsinc mode=low-pass frequency=1000 length=501 ! audioconvert ! alsasink
+ * gst-launch filesrc location="melo1.ogg" ! oggdemux ! vorbisdec ! audioconvert ! lpwsinc mode=high-pass frequency=15000 length=501 ! audioconvert ! alsasink
+ * gst-launch audiotestsrc wave=white-noise ! audioconvert ! lpwsinc mode=low-pass frequency=1000 length=10001 window=blackman ! audioconvert ! alsasink
+ * </programlisting>
+ * </para>
+ * </refsect2>
*/
#ifdef HAVE_CONFIG_H