[FFmpeg-devel] [PATCH] jack: fix timefilter feedback factor computation.
Nicolas George
nicolas.george at normalesup.org
Tue Dec 27 14:05:47 CET 2011
Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
---
This was not tested beyond build on Debian stable, but the PDF file in the
comments of timefilter.c say b=\sqrt{2}\omega rathar than b=\sqrt{2\omega},
and experimentally (on software-generated noised signal), it makes a huge
difference on the efficiency of the filter.
Regards,
--
Nicolas George
libavdevice/jack_audio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavdevice/jack_audio.c b/libavdevice/jack_audio.c
index d0a09ee..6f5138a 100644
--- a/libavdevice/jack_audio.c
+++ b/libavdevice/jack_audio.c
@@ -183,7 +183,7 @@ static int start_jack(AVFormatContext *context)
/* Create time filter */
period = (double) self->buffer_size / self->sample_rate;
o = 2 * M_PI * 1.5 * period; /// bandwidth: 1.5Hz
- self->timefilter = ff_timefilter_new (1.0 / self->sample_rate, sqrt(2 * o), o * o);
+ self->timefilter = ff_timefilter_new (1.0 / self->sample_rate, M_SQRT2 * o, o * o);
/* Create FIFO buffers */
self->filled_pkts = av_fifo_alloc(FIFO_PACKETS_NUM * sizeof(AVPacket));
--
1.7.2.5
More information about the ffmpeg-devel
mailing list