Commit 8baaed78 authored by Paul B Mahol's avatar Paul B Mahol

avfilter: add sinc source filter

Signed-off-by: 's avatarPaul B Mahol <onemda@gmail.com>
parent db4771af
...@@ -34,6 +34,7 @@ version <next>: ...@@ -34,6 +34,7 @@ version <next>:
- audio denoiser as afftdn filter - audio denoiser as afftdn filter
- AV1 parser - AV1 parser
- SER demuxer - SER demuxer
- sinc audio filter source
version 4.0: version 4.0:
......
...@@ -5370,6 +5370,49 @@ Set number of samples per each frame. ...@@ -5370,6 +5370,49 @@ Set number of samples per each frame.
Set window function to be used when generating FIR coefficients. Set window function to be used when generating FIR coefficients.
@end table @end table
@section sinc
Generate a sinc kaiser-windowed low-pass, high-pass, band-pass, or band-reject FIR coefficients.
The resulting stream can be used with @ref{afir} filter for filtering the audio signal.
The filter accepts the following options:
@table @option
@item sample_rate, r
Set sample rate, default is 44100.
@item nb_samples, n
Set number of samples per each frame. Default is 1024.
@item hp
Set high-pass frequency. Default is 0.
@item lp
Set low-pass frequency. Default is 0.
If high-pass frequency is lower than low-pass frequency and low-pass frequency
is higher than 0 then filter will create band-pass filter coefficients,
otherwise band-reject filter coefficients.
@item phase
Set filter phase response. Default is 50. Allowed range is from 0 to 100.
@item beta
Set Kaiser window beta.
@item att
Set stop-band attenuation. Default is 120dB, allowed range is from 40 to 180 dB.
@item round
Enable rounding, by default is disabled.
@item hptaps
Set number of taps for high-pass filter.
@item lptaps
Set number of taps for low-pass filter.
@end table
@section sine @section sine
Generate an audio signal made of a sine wave with amplitude 1/8. Generate an audio signal made of a sine wave with amplitude 1/8.
......
...@@ -141,6 +141,7 @@ OBJS-$(CONFIG_ANOISESRC_FILTER) += asrc_anoisesrc.o ...@@ -141,6 +141,7 @@ OBJS-$(CONFIG_ANOISESRC_FILTER) += asrc_anoisesrc.o
OBJS-$(CONFIG_ANULLSRC_FILTER) += asrc_anullsrc.o OBJS-$(CONFIG_ANULLSRC_FILTER) += asrc_anullsrc.o
OBJS-$(CONFIG_FLITE_FILTER) += asrc_flite.o OBJS-$(CONFIG_FLITE_FILTER) += asrc_flite.o
OBJS-$(CONFIG_HILBERT_FILTER) += asrc_hilbert.o OBJS-$(CONFIG_HILBERT_FILTER) += asrc_hilbert.o
OBJS-$(CONFIG_SINC_FILTER) += asrc_sinc.o
OBJS-$(CONFIG_SINE_FILTER) += asrc_sine.o OBJS-$(CONFIG_SINE_FILTER) += asrc_sine.o
OBJS-$(CONFIG_ANULLSINK_FILTER) += asink_anullsink.o OBJS-$(CONFIG_ANULLSINK_FILTER) += asink_anullsink.o
......
...@@ -134,6 +134,7 @@ extern AVFilter ff_asrc_anoisesrc; ...@@ -134,6 +134,7 @@ extern AVFilter ff_asrc_anoisesrc;
extern AVFilter ff_asrc_anullsrc; extern AVFilter ff_asrc_anullsrc;
extern AVFilter ff_asrc_flite; extern AVFilter ff_asrc_flite;
extern AVFilter ff_asrc_hilbert; extern AVFilter ff_asrc_hilbert;
extern AVFilter ff_asrc_sinc;
extern AVFilter ff_asrc_sine; extern AVFilter ff_asrc_sine;
extern AVFilter ff_asink_anullsink; extern AVFilter ff_asink_anullsink;
......
This diff is collapsed.
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
#include "libavutil/version.h" #include "libavutil/version.h"
#define LIBAVFILTER_VERSION_MAJOR 7 #define LIBAVFILTER_VERSION_MAJOR 7
#define LIBAVFILTER_VERSION_MINOR 33 #define LIBAVFILTER_VERSION_MINOR 34
#define LIBAVFILTER_VERSION_MICRO 101 #define LIBAVFILTER_VERSION_MICRO 100
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \ LIBAVFILTER_VERSION_MINOR, \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment