[FFmpeg-devel] [PATCH 2/3] lavfi/loudnorm: add an internal libebur128 library

Kyle Swanson k at ylo.ph
Thu Nov 3 21:49:47 EET 2016


Hi,

>On Sun, Oct 16, 2016 at 2:32 PM, Marton Balint <cus at passwd.hu> wrote:

I haven't been checking ffmpeg-devel too much lately and just saw
these patches today. I'm glad to see that an ffmpeg libebur128 port is
being taken seriously now, I had some trouble getting traction on a
few similar patches earlier this year. A new version of libebur128 was
released a few days ago, so we can probably improve this port even
more. The loudnorm filter continues to be a popular ffmpeg feature. I
still get messages about af_loudnorm from users all the time, so it'd
be nice to remove the external library dependancy and open this up to
everyone.

> Also contains the following changes to the library:
> - add ff_ prefix to functions
> - remove cplusplus defines.
> - add FF_ prefix to contants and some structs
> - remove true peak calculation feature, since it uses its own resampler, and
>   af_audnorm does not need it.
I'd argue that we should include the true peak calculation because
after this port we'll want to replace the code in f_ebur128 as well.
Libebur128 v1.2 drops the speex resampler and includes its own small
resampler (fast and passes all the EBUR128 tests.) Also there's a
patch I sent in June which uses libavresample APIs.
> - remove version info and some fprintf(stderr) functions
> - convert to use av_malloc
> - always use histogram mode for LRA calculation, otherwise LRA data is slowly
>   consuming memory making af_loudnorm unfit for 24/7 operation. It also uses a
>   BSD style linked list implementation which is probably not available on all
>   platforms. So let's just remove the classic mode which not uses histogram.
Probably a good idea! Seems awkward to include the BSD `queue.h` file,
but probably not the end of the world.
> - add ff_thread_once for calculating static histogram tables
> - convert some functions to void which cannot fail
> - remove intrinsics and some unused headers
> - add support for planar audio

Any other thoughts? I'll take a closer look at the patches tonight.


Kyle


More information about the ffmpeg-devel mailing list