[FFmpeg-devel] [PATCH] swresample/resample: improve bessel function accuracy

Michael Niedermayer michael at niedermayer.cc
Tue Nov 3 04:57:19 CET 2015


On Mon, Nov 02, 2015 at 09:32:13PM -0500, Ganesh Ajjanagadde wrote:
> On Mon, Nov 2, 2015 at 6:49 PM, Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:
> > On Mon, Nov 2, 2015 at 6:37 PM, wm4 <nfxjfg at googlemail.com> wrote:
> >> On Mon,  2 Nov 2015 14:49:54 -0500
> >> Ganesh Ajjanagadde <gajjanagadde at gmail.com> wrote:
> >>
> >>> This improves accuracy for the bessel function, and this in turn should
> >>> improve the quality of the Kaiser window.
> >>
> >>
> >> "Should"? Does it or does it not? If you don't know, why the patch?
> >
> > It improves the window in the sense of mathematically matching the
> > Kaiser window expression due to the improved bessel function accuracy.
> > That claim I have verified and placed in the commit message with
> > evidence.
> >
> > What that translates into in terms of resampling accuracy, I don't
> > know. Normally, such things do help reduce the noise floor, but I
> > don't know an easy way to test via FATE or associated tools. I put
> > that caveat in the bottom lines of the patch.
> 
> Turns out the init speed is definitely improved as well (~20% boost
> with default settings).
> I did a cheap trick of calling build filter 1000 times to get a large
> number of runs.
> Results (x86-64, Haswell, GNU/Linux):
> 
> test: fate-swr-resample-dblp-44100-2626
> 
> new:
> 995894468 decicycles in build_filter(loop 1000),     256 runs,      0 skips
> 1029719302 decicycles in build_filter(loop 1000),     512 runs,      0 skips
> 984101131 decicycles in build_filter(loop 1000),    1024 runs,      0 skips
> 
> old:
> 1250020763 decicycles in build_filter(loop 1000),     256 runs,      0 skips
> 1246353282 decicycles in build_filter(loop 1000),     512 runs,      0 skips
> 1220017565 decicycles in build_filter(loop 1000),    1024 runs,      0 skips
> 
> Thus, this patch has both things going for it luckily. Will leave to
> the maintainer (Michael I believe) to give details of accuracy
> benefits as translated to the actual resampling if easily testable,
> and I will add the perf numbers to the message.

the patch should be ok
its faster, its more accurate

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

Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- 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/20151103/53b46248/attachment.sig>


More information about the ffmpeg-devel mailing list