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

Michael Niedermayer michael at niedermayer.cc
Sat Dec 17 23:59:14 EET 2016


On Mon, Oct 31, 2016 at 11:13:28AM -0400, Greg Rowe wrote:
> On 2016-10-18 2:20 PM, Michael Niedermayer wrote:
> >On Tue, Oct 18, 2016 at 12:46:56PM -0400, Greg Rowe wrote:
> >>>see
> >>>libavfilter/asrc_sine.c
> >>>this code should probably be reused / factored
> >>>(note, any code moving/factoring of existing code should be in a
> >>>seperate patch)
> >>
> >>Since silenceremove works only on AV_SAMPLE_FMT_DBL is it OK to use
> >>floating point for the generated tone or is it recommended to create
> >>the tone and then convert it to double samples or some other
> >>approach?
> >
> >can you write a fate test for the filter which is portable accross
> >platforms ?
> >
> >every filter should ideally have a fate test.
> >If you can write a working an portable fate test with float sine
> >then i have no objections to it
> 
> Do you have ideas on how I could implement this feature while
> avoiding floating point (or at least to implemented the feature in a
> portable manner)?  I agree that it would be better but I'm not sure
> how to do it.
> 
> I could change the entire silence remove filter to avoid floating
> point ops but that would be a big change and I don't think that's a
> good idea.
> 
> Would it work if I created the tone using asrc_since.c and then
> converted that to double samples within the filter?  (rather than my
> existing approach which generates the tone as doubles using sin()).

fate supports comparing things to a reference file
using a short 1sec file at low sampling rate should also be neglible
in file size, so float can be used if you prefer.
still it should only be used where it makes sense (sine) not for
anything timestamp related



[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Old school: Use the lowest level language in which you can solve the problem
            conveniently.
New school: Use the highest level language in which the latest supercomputer
            can solve the problem without the user falling asleep waiting.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20161217/dbd95952/attachment.sig>


More information about the ffmpeg-devel mailing list