[FFmpeg-devel] [PATCH] avfilter/af_silenceremove: add optional tone when silence is removed

Moritz Barsnick barsnick at gmx.net
Fri Oct 14 22:33:20 EEST 2016


On Fri, Oct 14, 2016 at 18:09:51 +0000, Greg Rowe wrote:
> In the attached patch I've tried to make all of the changes you've
> pointed out. I also renamed tone_hz to tone_frequency on Moritz
> Barsnick's suggestion.

You attached the old patch. ;-)

> Is there a good way to generate the tone while avoiding floating
> point operations?

Good point: libavfilter/asrc_sine.c does exactly that, if I understand
the code correctly. And avoids math.h's sin() by creating a lookup
table. (I'm not sure whether your patch should have included math.h
explicitly. It was probably pulled in via avutil headers.)

Now I think you would be duplicating some stuff from there. Perhaps
something to be put into common functions and reused?

> I removed the unrelated changes.

They might be worthwhile anyway, later then.

Moritz


More information about the ffmpeg-devel mailing list