[Libav-user] Histogram based implementation within EBU R128 scanner filter

Paul B Mahol onemda at gmail.com
Wed Nov 23 11:40:00 EET 2022


On 11/23/22, rohit khali <khali.rohit at gmail.com> wrote:
>  Hi,
>
> I was going through histogram based implementation to compute program
> loudness in ffmpeg\libavfilter\ebur128.c. This implementation uses static
> tables like "histogram_energy_boundaries[]" and "histogram_energies[]" in 3
> main steps to compute gated loudness.
>
> **
>
> 1. Using histogram_energy_boundaries[], loudness sum is first recorded into
> "block_energy_histogram[]" in the form of an increment in the corresponding
> energy index.
>
> 2. Relative threshold is computed using “block_energy_histogram[]" and
> "histogram_energies[]".
>
> 3. Finally , gated loudness is computed using "block_energy_histogram[]"
> and "histogram_energies[]" as per computed "relative threshold".
>
> **
>
> At first look, it looks like an optimised implementation over conventional
> implementation of storing and using loudness sums in a growing linked list
> to compute gated loudness.
>
> However, I am wondering if there is any reference documentation or a
> summary which can help me to understand this implementation a bit more
> including
> associated drawbacks such as precision loss over conventional
> implementation

Which other "conventional" implementation?

The libebur128 (used by loudnorm) iiuc does not use histogram approach
by default, but there is flag to enable it in source code.

IMHO the difference in marginal. And can be even smaller if number of
bins in ebur128 filter is increased iiuc.


More information about the Libav-user mailing list