Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EBU R 128 loudness normalization #1216

Merged
merged 25 commits into from Jul 12, 2023

Conversation

LebedevRI
Copy link
Contributor

@LebedevRI LebedevRI commented Jun 26, 2023

I'm happy that i have finally stumbled upon this software!
Finally, a audio player that supports CUE's.

One pain point remaining for me, is audio volume.
While there is Replay Gain support, i'm not sure it cuts it for my taste,
for a number of reasons:

  1. For files that do not come with appropriate tags, one would need to modify said files. Yuikes.
  2. It is impossible to know what is written into those tags. E.g. loudgain reuses them for non-RG values.
  3. What about multi-song files? They are not being read from CUE.
  4. ReplayGain is outdated. There's newer, better technology nowadays:

EBU R 128

EBU R 128 is a recommendation for loudness normalisation and maximum level of audio signals. It is primarily followed during audio mixing of television and radio programmes and adopted by broadcasters to measure and control programme loudness.[1] It was first issued by the European Broadcasting Union in August 2010 and most recently revised in August 2020.[2]

R 128 employs an international standard for measuring audio loudness, stated in the ITU-R BS.1770 recommendation and using the loudness measures LU (loudness units) and LUFS (loudness units referenced to full scale), specifically created with this purpose.[3] The EBU Tech 3341 document further clarified loudness metering implementation and practices in 2016.

This PR implements support for EBU R 128-based loudness normalization (to the specified Target Loudness)
based on an EBU R 128 song analysis, performed the same way the song fingerprinting is done,
automatically, without needing to touch the source files in any way.

Note that analysis, and normalization, are separate steps,
and normalization does not require the presence of libebur128,
while analysis does.

Two things i want to call out explicitly that this does not deal with are:

  1. Loudness range compression/expansion.
    While i have thought extensively about that, at least currently nothing is done for that.
  2. Peak limiting.
    First, with any luck, all of these filters are done in FP32 (might be good to force that?)
    because that is what the audio playback consumes, so clipping should not be an issue anyway.
    Secondly, i'm not sure where we'd want to clip, presumably after all filters.
    But clipping is lossy, and is unoptimal to those who further process (e.g. via easyeffects) audio.

In my limited testing, this is a working proof of concept,
although some further changes may be warranted.
I've hopefully did sufficiently granular commits.

Thoughts? :)

Copy link
Member

@jonaski jonaski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting. Looks mostly good to me, mostly code style changes.

General:

  • For consistency with the current code style. Add a newline after the function name, before function code, and at the end of the function code before }. For example.:
void function() {

line1
line2
line3

}
  • Add curly braces even on one-line if's.

Can you add libebur128 to the windows dependencies too?

CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
data/schema/device-schema.sql Outdated Show resolved Hide resolved
data/schema/schema.sql Outdated Show resolved Hide resolved
src/CMakeLists.txt Outdated Show resolved Hide resolved
src/engine/ebur128analysis.cpp Outdated Show resolved Hide resolved
src/engine/ebur128analysis.cpp Outdated Show resolved Hide resolved
src/engine/ebur128analysis.cpp Outdated Show resolved Hide resolved
src/engine/ebur128measures.h Outdated Show resolved Hide resolved
src/engine/ebur128analysis.cpp Show resolved Hide resolved
@LebedevRI
Copy link
Contributor Author

LebedevRI commented Jun 26, 2023

Interesting. Looks mostly good to me, mostly code style changes.

Thanks for taking a look!

General:

  • For consistency with the current code style. Add a newline after the function name, before function code, and at the end of the function code before }. For example.:
void function() {

line1
line2
line3

}
  • Add curly braces even on one-line if's.

Yeah, i knew this was coming. I have initially tried to follow my normal path of git-clang-format pre-commit hook,
but clearly the existing code is not clang-formatted, because i was getting lots of spurious diffs on the side.
Really, really unfortunate.

Can you add libebur128 to the windows dependencies too?

strawberrymusicplayer/strawberry-mxe#235 and strawberrymusicplayer/strawberry-msvc-dependencies#182.
I don't know anything about those ecosystems, and i don't quite care about those ecosystems, so if that doesn't happen to just work...

@LebedevRI
Copy link
Contributor Author

@jonaski thank you for taking a look!

I've tried to hopefully address review nits, but i suspect i only handled them in the letter, not the spirit,
so could you please generously sprinkle some more nits please? :)

@LebedevRI
Copy link
Contributor Author

I'm not sure if the windows failures are because the builds started
before appropriate builds in strawberry-mxe/strawberry-msvc-dependencies finished?
Also, looks like codacy is building without libebur128 package,
but i don't see where said job is defined.

@jonaski
Copy link
Member

jonaski commented Jun 27, 2023

There is a check that all libraries get's added to the windows installer that currently fails now.
EBUR128.dll for msvc and libebur128.dll for mingw needs to be added to the nullsoft installer file here: https://github.com/strawberrymusicplayer/strawberry/blob/master/dist/windows/strawberry.nsi.in
There is an !ifdef msvc and !ifdef mingw both for install and uninstall.

@jonaski
Copy link
Member

jonaski commented Jun 27, 2023

I think you can ignore the codacy errors, I don't see any settings for configuring what to build, so not sure how it works.

@LebedevRI
Copy link
Contributor Author

There is a check that all libraries get's added to the windows installer that currently fails now. EBUR128.dll for msvc and libebur128.dll for mingw needs to be added to the nullsoft installer file here: https://github.com/strawberrymusicplayer/strawberry/blob/master/dist/windows/strawberry.nsi.in There is an !ifdef msvc and !ifdef mingw both for install and uninstall.

Aha! Looks like i didn't search for that hard-enough,

@jonaski
Copy link
Member

jonaski commented Jun 27, 2023

There need to be a Delete entry too for each of the files under the Section "Uninstall" section at the bottom of the file.

src/CMakeLists.txt Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
src/engine/ebur128analysis.cpp Outdated Show resolved Hide resolved
src/settings/backendsettingspage.ui Outdated Show resolved Hide resolved
src/settings/backendsettingspage.ui Outdated Show resolved Hide resolved
src/settings/backendsettingspage.ui Outdated Show resolved Hide resolved
src/collection/collectionwatcher.cpp Outdated Show resolved Hide resolved
src/playlist/playlist.cpp Outdated Show resolved Hide resolved
src/engine/ebur128analysis.h Outdated Show resolved Hide resolved
@LebedevRI
Copy link
Contributor Author

LebedevRI commented Jun 27, 2023

Unless i messed up the benchmark (https://godbolt.org/z/xKTfMn9x5),
the optimal window size (for feeding frames into libebur128)
is 8 frames (assuming 2 channels), which is much better than i though,
and even one frame per call is still reasonably fine.

I'm not sure how many frames we get per NewBufferCallback,
but it certainly means we shouldn't temp-buffer the whole song.

$ ./ebur128_benchmark
$ ./test/ebur128_test --benchmark_counters_tabular=true --benchmark_min_warmup_time=0.5
2023-06-27T22:21:27+03:00
Running ./test/ebur128_test
Run on (32 X 3925 MHz CPU s)
CPU Caches:
  L1 Data 32 KiB (x16)
  L1 Instruction 32 KiB (x16)
  L2 Unified 512 KiB (x16)
  L3 Unified 32768 KiB (x2)
Load Average: 0.56, 0.84, 0.76
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Benchmark                                                                    Time             CPU   Iterations throughput_bytes throughput_duration throughput_frames window_bytes  window_ms
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:1               76.4 ms         76.4 ms            9       132.062M/s           785.019/s        34.6193M/s            4  0.0226757
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:2               61.9 ms         61.9 ms           11       163.113M/s           969.591/s         42.759M/s            8  0.0453515
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:4               57.3 ms         57.3 ms           12       176.082M/s           1046.69/s        46.1588M/s           16  0.0907029
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:8               56.4 ms         56.4 ms           12       179.011M/s            1064.1/s        46.9267M/s           32   0.181406
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:16              58.7 ms         58.7 ms           12       171.871M/s           1021.65/s        45.0549M/s           64   0.362812
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:32              60.0 ms         60.0 ms           12       168.344M/s           1000.69/s        44.1305M/s          128   0.725624
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:64              60.6 ms         60.6 ms           12       166.618M/s           990.427/s        43.6778M/s          256    1.45125
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:128             61.0 ms         61.0 ms           11       165.539M/s           984.017/s        43.3951M/s          512    2.90249
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:256             61.1 ms         61.1 ms           11        165.09M/s           981.344/s        43.2773M/s         1024    5.80499
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:512             61.2 ms         61.2 ms           11       165.007M/s           980.851/s        43.2555M/s           2k      11.61
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:1024            61.2 ms         61.2 ms           11       164.934M/s           980.418/s        43.2364M/s           4k      23.22
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:2048            61.2 ms         61.2 ms           11        164.89M/s           980.159/s         43.225M/s           8k    46.4399
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:4096            61.2 ms         61.2 ms           11       164.863M/s           979.997/s        43.2179M/s          16k    92.8798
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:8192            61.2 ms         61.2 ms           11        164.92M/s           980.338/s        43.2329M/s          32k     185.76
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:16384           61.2 ms         61.2 ms           11       164.896M/s            980.19/s        43.2264M/s          64k    371.519
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:32768           61.2 ms         61.2 ms           11       164.927M/s           980.376/s        43.2346M/s         128k    743.039
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:65536           61.2 ms         61.2 ms           11       164.922M/s           980.345/s        43.2332M/s         256k   1.48608k
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:131072          61.2 ms         61.2 ms           11       164.912M/s           980.289/s        43.2307M/s         512k   2.97215k
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:262144          61.2 ms         61.2 ms           11       164.954M/s           980.536/s        43.2416M/s        1024k   5.94431k
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:524288          61.2 ms         61.2 ms           11       164.928M/s           980.382/s        43.2348M/s           2M   11.8886k
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:1048576         61.2 ms         61.2 ms           11       164.929M/s            980.39/s        43.2352M/s           4M   23.7772k
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:2097152         61.2 ms         61.2 ms           11       164.913M/s           980.293/s        43.2309M/s           8M   47.5545k
BM_ebur128<int16_t>/sampling_freq:44100/frames_per_window:2646000         61.2 ms         61.2 ms           11       164.884M/s           980.122/s        43.2234M/s     10.0937M        60k
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:1               83.1 ms         83.1 ms            8       132.193M/s           721.948/s        34.6535M/s            4  0.0208333
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:2               66.4 ms         66.4 ms           11       165.487M/s           903.781/s        43.3815M/s            8  0.0416667
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:4               62.3 ms         62.3 ms           11       176.429M/s           963.539/s        46.2499M/s           16  0.0833333
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:8               61.4 ms         61.4 ms           11       179.071M/s           977.964/s        46.9423M/s           32   0.166667
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:16              63.9 ms         63.9 ms           11       171.824M/s           938.389/s        45.0427M/s           64   0.333333
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:32              65.4 ms         65.4 ms           11       167.886M/s           916.882/s        44.0103M/s          128   0.666667
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:64              66.0 ms         66.0 ms           11        166.58M/s           909.751/s         43.668M/s          256    1.33333
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:128             66.4 ms         66.4 ms           11       165.481M/s           903.747/s        43.3798M/s          512    2.66667
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:256             66.5 ms         66.5 ms           11       165.161M/s           901.997/s        43.2959M/s         1024    5.33333
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:512             66.6 ms         66.6 ms           11       165.019M/s           901.226/s        43.2588M/s           2k    10.6667
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:1024            66.6 ms         66.6 ms           11       164.923M/s           900.702/s        43.2337M/s           4k    21.3333
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:2048            66.6 ms         66.6 ms           11       164.911M/s           900.635/s        43.2305M/s           8k    42.6667
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:4096            66.6 ms         66.6 ms           11       164.847M/s           900.282/s        43.2135M/s          16k    85.3333
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:8192            66.6 ms         66.6 ms           11       164.872M/s           900.422/s        43.2203M/s          32k    170.667
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:16384           66.6 ms         66.6 ms           11       164.868M/s           900.397/s        43.2191M/s          64k    341.333
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:32768           66.6 ms         66.6 ms           11       164.903M/s           900.592/s        43.2284M/s         128k    682.667
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:65536           66.6 ms         66.6 ms           11       164.879M/s           900.457/s        43.2219M/s         256k   1.36533k
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:131072          66.6 ms         66.6 ms           11       164.895M/s           900.547/s        43.2263M/s         512k   2.73067k
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:262144          66.6 ms         66.6 ms           11       164.889M/s           900.515/s        43.2247M/s        1024k   5.46133k
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:524288          66.6 ms         66.6 ms           11       164.879M/s            900.46/s        43.2221M/s           2M   10.9227k
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:1048576         66.6 ms         66.6 ms           11       164.895M/s           900.547/s        43.2263M/s           4M   21.8453k
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:2097152         66.6 ms         66.6 ms           11       164.886M/s             900.5/s         43.224M/s           8M   43.6907k
BM_ebur128<int16_t>/sampling_freq:48000/frames_per_window:2880000         66.6 ms         66.6 ms           11       164.938M/s           900.782/s        43.2375M/s     10.9863M        60k
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:1               331 ms          331 ms            2        132.95M/s           181.521/s         34.852M/s            4   5.20833m
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:2               265 ms          265 ms            3       165.842M/s           226.429/s        43.4745M/s            8  0.0104167
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:4               249 ms          249 ms            3       176.389M/s           240.829/s        46.2393M/s           16  0.0208333
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:8               245 ms          245 ms            3       179.382M/s           244.916/s        47.0239M/s           32  0.0416667
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:16              256 ms          256 ms            3       171.823M/s           234.596/s        45.0424M/s           64  0.0833333
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:32              261 ms          261 ms            3        168.34M/s           229.841/s        44.1294M/s          128   0.166667
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:64              264 ms          264 ms            3       166.644M/s           227.525/s        43.6848M/s          256   0.333333
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:128             265 ms          265 ms            3       165.627M/s           226.136/s        43.4182M/s          512   0.666667
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:256             266 ms          266 ms            3       165.275M/s           225.656/s        43.3259M/s         1024    1.33333
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:512             266 ms          266 ms            3       165.128M/s           225.455/s        43.2873M/s           2k    2.66667
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:1024            266 ms          266 ms            3       165.031M/s           225.322/s        43.2619M/s           4k    5.33333
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:2048            266 ms          266 ms            3       164.969M/s           225.238/s        43.2456M/s           8k    10.6667
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:4096            266 ms          266 ms            3       164.991M/s           225.267/s        43.2513M/s          16k    21.3333
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:8192            266 ms          266 ms            3       164.975M/s           225.246/s        43.2473M/s          32k    42.6667
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:16384           266 ms          266 ms            3       164.958M/s           225.222/s        43.2427M/s          64k    85.3333
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:32768           266 ms          266 ms            3       164.965M/s           225.233/s        43.2447M/s         128k    170.667
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:65536           266 ms          266 ms            3       164.953M/s           225.216/s        43.2415M/s         256k    341.333
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:131072          266 ms          266 ms            3       164.956M/s           225.221/s        43.2423M/s         512k    682.667
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:262144          266 ms          266 ms            3       164.978M/s           225.249/s        43.2479M/s        1024k   1.36533k
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:524288          266 ms          266 ms            3       164.955M/s           225.219/s         43.242M/s           2M   2.73067k
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:1048576         266 ms          266 ms            3       164.956M/s           225.219/s        43.2421M/s           4M   5.46133k
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:2097152         266 ms          266 ms            3       164.974M/s           225.245/s        43.2471M/s           8M   10.9227k
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:4194304         266 ms          266 ms            3       164.952M/s           225.215/s        43.2412M/s          16M   21.8453k
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:8388608         266 ms          266 ms            3       164.949M/s           225.211/s        43.2405M/s          32M   43.6907k
BM_ebur128<int16_t>/sampling_freq:192000/frames_per_window:11520000        266 ms          266 ms            3       164.963M/s           225.229/s         43.244M/s     43.9453M        60k
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:1               76.5 ms         76.5 ms            9       263.789M/s           784.023/s        34.5754M/s            8  0.0226757
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:2               62.1 ms         62.1 ms           11       324.931M/s           965.746/s        42.5894M/s           16  0.0453515
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:4               56.3 ms         56.3 ms           12       358.791M/s           1066.38/s        47.0274M/s           32  0.0907029
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:8               56.1 ms         56.1 ms           12       359.808M/s            1069.4/s        47.1607M/s           64   0.181406
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:16              58.6 ms         58.6 ms           12        344.62M/s           1024.26/s          45.17M/s          128   0.362812
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:32              59.9 ms         59.9 ms           12       337.035M/s           1001.72/s        44.1759M/s          256   0.725624
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:64              60.5 ms         60.5 ms           12       333.478M/s           991.147/s        43.7096M/s          512    1.45125
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:128             60.9 ms         60.9 ms           12       331.563M/s           985.458/s        43.4587M/s         1024    2.90249
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:256             61.0 ms         61.0 ms           11       330.692M/s           982.869/s        43.3445M/s           2k    5.80499
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:512             61.1 ms         61.1 ms           11       330.267M/s           981.606/s        43.2888M/s           4k      11.61
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:1024            61.2 ms         61.2 ms           11        330.08M/s            981.05/s        43.2643M/s           8k      23.22
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:2048            61.2 ms         61.2 ms           11       329.945M/s           980.647/s        43.2465M/s          16k    46.4399
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:4096            61.2 ms         61.2 ms           11       329.912M/s           980.549/s        43.2422M/s          32k    92.8798
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:8192            61.2 ms         61.2 ms           11       329.947M/s           980.654/s        43.2468M/s          64k     185.76
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:16384           61.2 ms         61.2 ms           11       329.928M/s           980.597/s        43.2443M/s         128k    371.519
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:32768           61.2 ms         61.2 ms           11       329.973M/s           980.731/s        43.2502M/s         256k    743.039
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:65536           61.2 ms         61.2 ms           11       329.918M/s           980.567/s         43.243M/s         512k   1.48608k
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:131072          61.2 ms         61.2 ms           11       329.935M/s           980.618/s        43.2452M/s        1024k   2.97215k
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:262144          61.2 ms         61.2 ms           11       329.927M/s           980.595/s        43.2442M/s           2M   5.94431k
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:524288          61.2 ms         61.2 ms           11        329.92M/s           980.572/s        43.2432M/s           4M   11.8886k
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:1048576         61.2 ms         61.2 ms           11       329.931M/s           980.607/s        43.2448M/s           8M   23.7772k
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:2097152         61.2 ms         61.2 ms           11       330.009M/s           980.836/s        43.2549M/s          16M   47.5545k
BM_ebur128<int32_t>/sampling_freq:44100/frames_per_window:2646000         61.2 ms         61.2 ms           11       329.952M/s           980.668/s        43.2475M/s     20.1874M        60k
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:1               83.1 ms         83.1 ms            8       264.319M/s           721.767/s        34.6448M/s            8  0.0208333
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:2               66.3 ms         66.3 ms           11       331.369M/s           904.857/s        43.4332M/s           16  0.0416667
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:4               61.3 ms         61.3 ms           11       358.353M/s           978.542/s          46.97M/s           32  0.0833333
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:8               61.1 ms         61.1 ms           11       359.425M/s           981.469/s        47.1105M/s           64   0.166667
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:16              63.8 ms         63.8 ms           11       344.428M/s           940.519/s        45.1449M/s          128   0.333333
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:32              65.2 ms         65.2 ms           11       337.064M/s           920.408/s        44.1796M/s          256   0.666667
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:64              65.9 ms         65.9 ms           11       333.548M/s           910.809/s        43.7188M/s          512    1.33333
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:128             66.3 ms         66.3 ms           11       331.316M/s           904.713/s        43.4262M/s         1024    2.66667
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:256             66.4 ms         66.4 ms           11       330.699M/s           903.028/s        43.3453M/s           2k    5.33333
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:512             66.5 ms         66.5 ms           11       330.308M/s           901.962/s        43.2942M/s           4k    10.6667
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:1024            66.6 ms         66.6 ms           11       330.107M/s           901.412/s        43.2678M/s           8k    21.3333
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:2048            66.6 ms         66.6 ms           11        330.04M/s            901.23/s         43.259M/s          16k    42.6667
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:4096            66.6 ms         66.6 ms           11       330.001M/s           901.123/s        43.2539M/s          32k    85.3333
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:8192            66.6 ms         66.6 ms           11        330.03M/s           901.201/s        43.2577M/s          64k    170.667
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:16384           66.6 ms         66.6 ms           11       330.013M/s           901.155/s        43.2555M/s         128k    341.333
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:32768           66.6 ms         66.6 ms           11       330.034M/s           901.212/s        43.2582M/s         256k    682.667
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:65536           66.6 ms         66.6 ms           11       330.031M/s           901.206/s        43.2579M/s         512k   1.36533k
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:131072          66.6 ms         66.6 ms           11       330.009M/s           901.145/s         43.255M/s        1024k   2.73067k
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:262144          66.6 ms         66.6 ms           11       330.016M/s           901.163/s        43.2558M/s           2M   5.46133k
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:524288          66.6 ms         66.6 ms           11       330.052M/s           901.261/s        43.2605M/s           4M   10.9227k
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:1048576         66.6 ms         66.6 ms           11       329.986M/s           901.082/s        43.2519M/s           8M   21.8453k
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:2097152         66.6 ms         66.6 ms           11       330.048M/s            901.25/s          43.26M/s          16M   43.6907k
BM_ebur128<int32_t>/sampling_freq:48000/frames_per_window:2880000         66.6 ms         66.6 ms           11       330.034M/s           901.212/s        43.2582M/s     21.9727M        60k
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:1               330 ms          330 ms            2       266.088M/s            181.65/s        34.8767M/s            8   5.20833m
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:2               264 ms          264 ms            3       333.255M/s           227.502/s        43.6803M/s           16  0.0104167
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:4               245 ms          245 ms            3       358.195M/s           244.528/s        46.9493M/s           32  0.0208333
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:8               244 ms          244 ms            3       360.008M/s           245.765/s        47.1869M/s           64  0.0416667
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:16              255 ms          255 ms            3       344.646M/s           235.279/s        45.1735M/s          128  0.0833333
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:32              261 ms          261 ms            3       337.346M/s           230.295/s        44.2166M/s          256   0.166667
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:64              263 ms          263 ms            3       333.725M/s           227.823/s         43.742M/s          512   0.333333
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:128             265 ms          265 ms            3       331.599M/s           226.371/s        43.4633M/s         1024   0.666667
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:256             266 ms          266 ms            3       330.837M/s           225.852/s        43.3635M/s           2k    1.33333
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:512             266 ms          266 ms            3       330.478M/s           225.606/s        43.3164M/s           4k    2.66667
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:1024            266 ms          266 ms            3       330.293M/s            225.48/s        43.2922M/s           8k    5.33333
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:2048            266 ms          266 ms            3       330.193M/s           225.412/s        43.2791M/s          16k    10.6667
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:4096            266 ms          266 ms            3       330.216M/s           225.427/s         43.282M/s          32k    21.3333
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:8192            266 ms          266 ms            3       330.203M/s           225.418/s        43.2803M/s          64k    42.6667
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:16384           266 ms          266 ms            3       330.129M/s           225.368/s        43.2707M/s         128k    85.3333
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:32768           266 ms          266 ms            3       330.141M/s           225.376/s        43.2722M/s         256k    170.667
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:65536           266 ms          266 ms            3       330.135M/s           225.372/s        43.2715M/s         512k    341.333
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:131072          266 ms          266 ms            3       330.117M/s            225.36/s        43.2691M/s        1024k    682.667
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:262144          266 ms          266 ms            3       330.136M/s           225.373/s        43.2716M/s           2M   1.36533k
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:524288          266 ms          266 ms            3       330.145M/s           225.379/s        43.2727M/s           4M   2.73067k
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:1048576         266 ms          266 ms            3       330.128M/s           225.367/s        43.2706M/s           8M   5.46133k
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:2097152         266 ms          266 ms            3       330.137M/s           225.373/s        43.2717M/s          16M   10.9227k
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:4194304         266 ms          266 ms            3       330.117M/s            225.36/s        43.2691M/s          32M   21.8453k
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:8388608         266 ms          266 ms            3       330.108M/s           225.354/s        43.2679M/s          64M   43.6907k
BM_ebur128<int32_t>/sampling_freq:192000/frames_per_window:11520000        266 ms          266 ms            3       330.143M/s           225.378/s        43.2726M/s     87.8906M        60k
BM_ebur128<float>/sampling_freq:44100/frames_per_window:1                 77.7 ms         77.7 ms            9       259.951M/s           772.614/s        34.0723M/s            8  0.0226757
BM_ebur128<float>/sampling_freq:44100/frames_per_window:2                 60.9 ms         60.9 ms           12        331.36M/s           984.852/s         43.432M/s           16  0.0453515
BM_ebur128<float>/sampling_freq:44100/frames_per_window:4                 56.2 ms         56.2 ms           12       359.277M/s           1067.83/s        47.0911M/s           32  0.0907029
BM_ebur128<float>/sampling_freq:44100/frames_per_window:8                 56.0 ms         56.0 ms           13       360.791M/s           1072.33/s        47.2896M/s           64   0.181406
BM_ebur128<float>/sampling_freq:44100/frames_per_window:16                58.6 ms         58.6 ms           12       344.686M/s           1024.46/s        45.1787M/s          128   0.362812
BM_ebur128<float>/sampling_freq:44100/frames_per_window:32                59.8 ms         59.8 ms           12       337.314M/s           1002.55/s        44.2124M/s          256   0.725624
BM_ebur128<float>/sampling_freq:44100/frames_per_window:64                60.5 ms         60.5 ms           12       333.736M/s           991.914/s        43.7434M/s          512    1.45125
BM_ebur128<float>/sampling_freq:44100/frames_per_window:128               60.9 ms         60.9 ms           12       331.732M/s           985.959/s        43.4808M/s         1024    2.90249
BM_ebur128<float>/sampling_freq:44100/frames_per_window:256               61.0 ms         61.0 ms           11       330.943M/s           983.615/s        43.3774M/s           2k    5.80499
BM_ebur128<float>/sampling_freq:44100/frames_per_window:512               61.1 ms         61.1 ms           11       330.505M/s           982.311/s        43.3199M/s           4k      11.61
BM_ebur128<float>/sampling_freq:44100/frames_per_window:1024              61.1 ms         61.1 ms           11       330.263M/s           981.593/s        43.2883M/s           8k      23.22
BM_ebur128<float>/sampling_freq:44100/frames_per_window:2048              61.1 ms         61.1 ms           11       330.147M/s           981.249/s        43.2731M/s          16k    46.4399
BM_ebur128<float>/sampling_freq:44100/frames_per_window:4096              61.2 ms         61.1 ms           11       330.134M/s           981.208/s        43.2713M/s          32k    92.8798
BM_ebur128<float>/sampling_freq:44100/frames_per_window:8192              61.1 ms         61.1 ms           11       330.158M/s            981.28/s        43.2744M/s          64k     185.76
BM_ebur128<float>/sampling_freq:44100/frames_per_window:16384             61.2 ms         61.1 ms           11       330.138M/s           981.221/s        43.2718M/s         128k    371.519
BM_ebur128<float>/sampling_freq:44100/frames_per_window:32768             61.2 ms         61.1 ms           11        330.13M/s           981.196/s        43.2708M/s         256k    743.039
BM_ebur128<float>/sampling_freq:44100/frames_per_window:65536             61.2 ms         61.1 ms           11       330.129M/s           981.195/s        43.2707M/s         512k   1.48608k
BM_ebur128<float>/sampling_freq:44100/frames_per_window:131072            61.1 ms         61.1 ms           11       330.166M/s           981.303/s        43.2755M/s        1024k   2.97215k
BM_ebur128<float>/sampling_freq:44100/frames_per_window:262144            61.1 ms         61.1 ms           11       330.141M/s            981.23/s        43.2723M/s           2M   5.94431k
BM_ebur128<float>/sampling_freq:44100/frames_per_window:524288            61.1 ms         61.1 ms           11       330.177M/s           981.336/s        43.2769M/s           4M   11.8886k
BM_ebur128<float>/sampling_freq:44100/frames_per_window:1048576           61.1 ms         61.1 ms           11       330.153M/s           981.264/s        43.2738M/s           8M   23.7772k
BM_ebur128<float>/sampling_freq:44100/frames_per_window:2097152           61.1 ms         61.1 ms           11        330.15M/s           981.256/s        43.2734M/s          16M   47.5545k
BM_ebur128<float>/sampling_freq:44100/frames_per_window:2646000           61.1 ms         61.1 ms           11       330.177M/s           981.336/s        43.2769M/s     20.1874M        60k
BM_ebur128<float>/sampling_freq:48000/frames_per_window:1                 82.4 ms         82.4 ms            8        266.66M/s            728.16/s        34.9517M/s            8  0.0208333
BM_ebur128<float>/sampling_freq:48000/frames_per_window:2                 66.0 ms         66.0 ms           11       332.978M/s           909.251/s         43.644M/s           16  0.0416667
BM_ebur128<float>/sampling_freq:48000/frames_per_window:4                 61.0 ms         61.0 ms           11       360.147M/s           983.443/s        47.2052M/s           32  0.0833333
BM_ebur128<float>/sampling_freq:48000/frames_per_window:8                 60.9 ms         60.9 ms           11       360.841M/s           985.336/s        47.2961M/s           64   0.166667
BM_ebur128<float>/sampling_freq:48000/frames_per_window:16                63.8 ms         63.8 ms           11       344.504M/s           940.725/s        45.1548M/s          128   0.333333
BM_ebur128<float>/sampling_freq:48000/frames_per_window:32                65.2 ms         65.2 ms           11       337.173M/s           920.706/s        44.1939M/s          256   0.666667
BM_ebur128<float>/sampling_freq:48000/frames_per_window:64                65.9 ms         65.9 ms           11       333.573M/s           910.875/s         43.722M/s          512    1.33333
BM_ebur128<float>/sampling_freq:48000/frames_per_window:128               66.3 ms         66.3 ms           11       331.585M/s           905.449/s        43.4616M/s         1024    2.66667
BM_ebur128<float>/sampling_freq:48000/frames_per_window:256               66.4 ms         66.4 ms           11       330.859M/s           903.464/s        43.3663M/s           2k    5.33333
BM_ebur128<float>/sampling_freq:48000/frames_per_window:512               66.5 ms         66.5 ms           11         330.2M/s           901.667/s          43.28M/s           4k    10.6667
BM_ebur128<float>/sampling_freq:48000/frames_per_window:1024              66.6 ms         66.6 ms           11         330.1M/s           901.393/s        43.2669M/s           8k    21.3333
BM_ebur128<float>/sampling_freq:48000/frames_per_window:2048              66.5 ms         66.5 ms           11       330.234M/s            901.76/s        43.2845M/s          16k    42.6667
BM_ebur128<float>/sampling_freq:48000/frames_per_window:4096              66.5 ms         66.5 ms           11       330.236M/s           901.765/s        43.2847M/s          32k    85.3333
BM_ebur128<float>/sampling_freq:48000/frames_per_window:8192              66.5 ms         66.5 ms           11       330.206M/s           901.682/s        43.2807M/s          64k    170.667
BM_ebur128<float>/sampling_freq:48000/frames_per_window:16384             66.6 ms         66.6 ms           11       330.152M/s           901.535/s        43.2737M/s         128k    341.333
BM_ebur128<float>/sampling_freq:48000/frames_per_window:32768             66.6 ms         66.5 ms           11       330.174M/s           901.594/s        43.2765M/s         256k    682.667
BM_ebur128<float>/sampling_freq:48000/frames_per_window:65536             66.5 ms         66.5 ms           11       330.236M/s           901.765/s        43.2847M/s         512k   1.36533k
BM_ebur128<float>/sampling_freq:48000/frames_per_window:131072            66.5 ms         66.5 ms           11       330.212M/s             901.7/s        43.2816M/s        1024k   2.73067k
BM_ebur128<float>/sampling_freq:48000/frames_per_window:262144            66.5 ms         66.5 ms           11       330.209M/s           901.692/s        43.2812M/s           2M   5.46133k
BM_ebur128<float>/sampling_freq:48000/frames_per_window:524288            66.5 ms         66.5 ms           11       330.224M/s           901.732/s        43.2831M/s           4M   10.9227k
BM_ebur128<float>/sampling_freq:48000/frames_per_window:1048576           66.5 ms         66.5 ms           11       330.211M/s           901.696/s        43.2814M/s           8M   21.8453k
BM_ebur128<float>/sampling_freq:48000/frames_per_window:2097152           66.5 ms         66.5 ms           11       330.238M/s           901.769/s        43.2849M/s          16M   43.6907k
BM_ebur128<float>/sampling_freq:48000/frames_per_window:2880000           66.5 ms         66.5 ms           11       330.209M/s           901.691/s        43.2812M/s     21.9727M        60k
BM_ebur128<float>/sampling_freq:192000/frames_per_window:1                 330 ms          330 ms            2       266.507M/s           181.935/s        34.9316M/s            8   5.20833m
BM_ebur128<float>/sampling_freq:192000/frames_per_window:2                 265 ms          265 ms            3       332.275M/s           226.833/s        43.5519M/s           16  0.0104167
BM_ebur128<float>/sampling_freq:192000/frames_per_window:4                 244 ms          244 ms            3       359.649M/s            245.52/s        47.1399M/s           32  0.0208333
BM_ebur128<float>/sampling_freq:192000/frames_per_window:8                 243 ms          243 ms            3       360.978M/s           246.428/s        47.3141M/s           64  0.0416667
BM_ebur128<float>/sampling_freq:192000/frames_per_window:16                255 ms          255 ms            3       344.801M/s           235.384/s        45.1938M/s          128  0.0833333
BM_ebur128<float>/sampling_freq:192000/frames_per_window:32                260 ms          260 ms            3       337.417M/s           230.344/s         44.226M/s          256   0.166667
BM_ebur128<float>/sampling_freq:192000/frames_per_window:64                263 ms          263 ms            3       333.828M/s           227.893/s        43.7555M/s          512   0.333333
BM_ebur128<float>/sampling_freq:192000/frames_per_window:128               265 ms          265 ms            3       331.754M/s           226.478/s        43.4837M/s         1024   0.666667
BM_ebur128<float>/sampling_freq:192000/frames_per_window:256               266 ms          266 ms            3       330.998M/s           225.961/s        43.3845M/s           2k    1.33333
BM_ebur128<float>/sampling_freq:192000/frames_per_window:512               266 ms          266 ms            3       330.659M/s            225.73/s        43.3401M/s           4k    2.66667
BM_ebur128<float>/sampling_freq:192000/frames_per_window:1024              266 ms          266 ms            3       330.486M/s           225.612/s        43.3175M/s           8k    5.33333
BM_ebur128<float>/sampling_freq:192000/frames_per_window:2048              266 ms          266 ms            3       330.387M/s           225.544/s        43.3045M/s          16k    10.6667
BM_ebur128<float>/sampling_freq:192000/frames_per_window:4096              266 ms          266 ms            3       330.358M/s           225.525/s        43.3007M/s          32k    21.3333
BM_ebur128<float>/sampling_freq:192000/frames_per_window:8192              266 ms          266 ms            3        330.36M/s           225.525/s        43.3009M/s          64k    42.6667
BM_ebur128<float>/sampling_freq:192000/frames_per_window:16384             266 ms          266 ms            3       330.337M/s            225.51/s         43.298M/s         128k    85.3333
BM_ebur128<float>/sampling_freq:192000/frames_per_window:32768             266 ms          266 ms            3       330.304M/s           225.488/s        43.2937M/s         256k    170.667
BM_ebur128<float>/sampling_freq:192000/frames_per_window:65536             266 ms          266 ms            3       330.293M/s            225.48/s        43.2921M/s         512k    341.333
BM_ebur128<float>/sampling_freq:192000/frames_per_window:131072            266 ms          266 ms            3       330.264M/s            225.46/s        43.2884M/s        1024k    682.667
BM_ebur128<float>/sampling_freq:192000/frames_per_window:262144            266 ms          266 ms            3       330.288M/s           225.477/s        43.2915M/s           2M   1.36533k
BM_ebur128<float>/sampling_freq:192000/frames_per_window:524288            266 ms          266 ms            3       330.302M/s           225.486/s        43.2934M/s           4M   2.73067k
BM_ebur128<float>/sampling_freq:192000/frames_per_window:1048576           266 ms          266 ms            3       330.308M/s            225.49/s        43.2941M/s           8M   5.46133k
BM_ebur128<float>/sampling_freq:192000/frames_per_window:2097152           266 ms          266 ms            3       330.321M/s           225.499/s        43.2959M/s          16M   10.9227k
BM_ebur128<float>/sampling_freq:192000/frames_per_window:4194304           266 ms          266 ms            3       330.307M/s           225.489/s         43.294M/s          32M   21.8453k
BM_ebur128<float>/sampling_freq:192000/frames_per_window:8388608           266 ms          266 ms            3       330.318M/s           225.497/s        43.2955M/s          64M   43.6907k
BM_ebur128<float>/sampling_freq:192000/frames_per_window:11520000          266 ms          266 ms            3       330.313M/s           225.494/s        43.2948M/s     87.8906M        60k
BM_ebur128<double>/sampling_freq:44100/frames_per_window:1                75.4 ms         75.4 ms            9       535.434M/s           795.696/s        35.0902M/s           16  0.0226757
BM_ebur128<double>/sampling_freq:44100/frames_per_window:2                60.8 ms         60.8 ms           12       664.327M/s           987.241/s        43.5373M/s           32  0.0453515
BM_ebur128<double>/sampling_freq:44100/frames_per_window:4                56.3 ms         56.3 ms           12       717.465M/s           1066.21/s        47.0198M/s           64  0.0907029
BM_ebur128<double>/sampling_freq:44100/frames_per_window:8                55.7 ms         55.7 ms           13       725.348M/s           1077.92/s        47.5364M/s          128   0.181406
BM_ebur128<double>/sampling_freq:44100/frames_per_window:16               58.4 ms         58.4 ms           12       691.264M/s           1027.27/s        45.3027M/s          256   0.362812
BM_ebur128<double>/sampling_freq:44100/frames_per_window:32               59.7 ms         59.7 ms           12        675.84M/s           1004.35/s        44.2919M/s          512   0.725624
BM_ebur128<double>/sampling_freq:44100/frames_per_window:64               60.5 ms         60.5 ms           12       667.899M/s           992.549/s        43.7714M/s         1024    1.45125
BM_ebur128<double>/sampling_freq:44100/frames_per_window:128              60.8 ms         60.8 ms           12       663.618M/s           986.187/s        43.4908M/s           2k    2.90249
BM_ebur128<double>/sampling_freq:44100/frames_per_window:256              61.0 ms         61.0 ms           11       661.624M/s           983.224/s        43.3602M/s           4k    5.80499
BM_ebur128<double>/sampling_freq:44100/frames_per_window:512              61.1 ms         61.1 ms           11        660.68M/s           981.821/s        43.2983M/s           8k      11.61
BM_ebur128<double>/sampling_freq:44100/frames_per_window:1024             61.1 ms         61.1 ms           11       660.376M/s            981.37/s        43.2784M/s          16k      23.22
BM_ebur128<double>/sampling_freq:44100/frames_per_window:2048             61.2 ms         61.2 ms           11       660.068M/s           980.912/s        43.2582M/s          32k    46.4399
BM_ebur128<double>/sampling_freq:44100/frames_per_window:4096             61.2 ms         61.2 ms           11       660.172M/s           981.067/s        43.2651M/s          64k    92.8798
BM_ebur128<double>/sampling_freq:44100/frames_per_window:8192             61.2 ms         61.2 ms           11       660.216M/s           981.132/s        43.2679M/s         128k     185.76
BM_ebur128<double>/sampling_freq:44100/frames_per_window:16384            61.2 ms         61.2 ms           11       660.182M/s           981.081/s        43.2657M/s         256k    371.519
BM_ebur128<double>/sampling_freq:44100/frames_per_window:32768            61.2 ms         61.2 ms           11       659.997M/s           980.807/s        43.2536M/s         512k    743.039
BM_ebur128<double>/sampling_freq:44100/frames_per_window:65536            61.2 ms         61.2 ms           11        660.06M/s             980.9/s        43.2577M/s        1024k   1.48608k
BM_ebur128<double>/sampling_freq:44100/frames_per_window:131072           61.2 ms         61.2 ms           11       660.138M/s           981.016/s        43.2628M/s           2M   2.97215k
BM_ebur128<double>/sampling_freq:44100/frames_per_window:262144           61.2 ms         61.2 ms           11       660.187M/s           981.088/s         43.266M/s           4M   5.94431k
BM_ebur128<double>/sampling_freq:44100/frames_per_window:524288           61.2 ms         61.2 ms           11       660.165M/s           981.057/s        43.2646M/s           8M   11.8886k
BM_ebur128<double>/sampling_freq:44100/frames_per_window:1048576          61.2 ms         61.2 ms           11       660.137M/s           981.014/s        43.2627M/s          16M   23.7772k
BM_ebur128<double>/sampling_freq:44100/frames_per_window:2097152          61.2 ms         61.2 ms           11       660.169M/s           981.061/s        43.2648M/s          32M   47.5545k
BM_ebur128<double>/sampling_freq:44100/frames_per_window:2646000          61.2 ms         61.2 ms           11        660.23M/s           981.153/s        43.2688M/s     40.3748M        60k
BM_ebur128<double>/sampling_freq:48000/frames_per_window:1                82.1 ms         82.1 ms            9       535.544M/s           731.196/s        35.0974M/s           16  0.0208333
BM_ebur128<double>/sampling_freq:48000/frames_per_window:2                65.9 ms         65.9 ms           11       667.079M/s           910.785/s        43.7177M/s           32  0.0416667
BM_ebur128<double>/sampling_freq:48000/frames_per_window:4                61.3 ms         61.2 ms           11       717.477M/s           979.595/s        47.0205M/s           64  0.0833333
BM_ebur128<double>/sampling_freq:48000/frames_per_window:8                60.6 ms         60.6 ms           12       725.008M/s           989.877/s        47.5141M/s          128   0.166667
BM_ebur128<double>/sampling_freq:48000/frames_per_window:16               63.6 ms         63.6 ms           11       691.231M/s            943.76/s        45.3005M/s          256   0.333333
BM_ebur128<double>/sampling_freq:48000/frames_per_window:32               65.1 ms         65.1 ms           11       675.209M/s           921.885/s        44.2505M/s          512   0.666667
BM_ebur128<double>/sampling_freq:48000/frames_per_window:64               65.8 ms         65.8 ms           11       667.587M/s           911.478/s         43.751M/s         1024    1.33333
BM_ebur128<double>/sampling_freq:48000/frames_per_window:128              66.3 ms         66.3 ms           11       663.085M/s           905.332/s        43.4559M/s           2k    2.66667
BM_ebur128<double>/sampling_freq:48000/frames_per_window:256              66.5 ms         66.4 ms           11        661.34M/s            902.95/s        43.3416M/s           4k    5.33333
BM_ebur128<double>/sampling_freq:48000/frames_per_window:512              66.5 ms         66.5 ms           11       660.587M/s           901.922/s        43.2923M/s           8k    10.6667
BM_ebur128<double>/sampling_freq:48000/frames_per_window:1024             66.6 ms         66.6 ms           11       660.204M/s           901.398/s        43.2671M/s          16k    21.3333
BM_ebur128<double>/sampling_freq:48000/frames_per_window:2048             66.6 ms         66.6 ms           11       660.069M/s           901.214/s        43.2583M/s          32k    42.6667
BM_ebur128<double>/sampling_freq:48000/frames_per_window:4096             66.6 ms         66.6 ms           11       660.031M/s           901.162/s        43.2558M/s          64k    85.3333
BM_ebur128<double>/sampling_freq:48000/frames_per_window:8192             66.6 ms         66.6 ms           11       660.075M/s           901.223/s        43.2587M/s         128k    170.667
BM_ebur128<double>/sampling_freq:48000/frames_per_window:16384            66.6 ms         66.6 ms           11       659.977M/s           901.089/s        43.2523M/s         256k    341.333
BM_ebur128<double>/sampling_freq:48000/frames_per_window:32768            66.6 ms         66.6 ms           11       659.963M/s            901.07/s        43.2513M/s         512k    682.667
BM_ebur128<double>/sampling_freq:48000/frames_per_window:65536            66.6 ms         66.6 ms           11       659.968M/s           901.077/s        43.2517M/s        1024k   1.36533k
BM_ebur128<double>/sampling_freq:48000/frames_per_window:131072           66.6 ms         66.6 ms           11       659.994M/s           901.112/s        43.2534M/s           2M   2.73067k
BM_ebur128<double>/sampling_freq:48000/frames_per_window:262144           66.6 ms         66.6 ms           11       660.007M/s           901.129/s        43.2542M/s           4M   5.46133k
BM_ebur128<double>/sampling_freq:48000/frames_per_window:524288           66.6 ms         66.6 ms           11           660M/s            901.12/s        43.2537M/s           8M   10.9227k
BM_ebur128<double>/sampling_freq:48000/frames_per_window:1048576          66.6 ms         66.6 ms           11       659.967M/s           901.075/s        43.2516M/s          16M   21.8453k
BM_ebur128<double>/sampling_freq:48000/frames_per_window:2097152          66.6 ms         66.6 ms           11       659.986M/s             901.1/s        43.2528M/s          32M   43.6907k
BM_ebur128<double>/sampling_freq:48000/frames_per_window:2880000          66.6 ms         66.6 ms           11       660.009M/s           901.133/s        43.2544M/s     43.9453M        60k
BM_ebur128<double>/sampling_freq:192000/frames_per_window:1                328 ms          328 ms            2       536.174M/s           183.014/s        35.1387M/s           16   5.20833m
BM_ebur128<double>/sampling_freq:192000/frames_per_window:2                264 ms          264 ms            3       666.017M/s           227.334/s        43.6481M/s           32  0.0104167
BM_ebur128<double>/sampling_freq:192000/frames_per_window:4                245 ms          245 ms            3       718.048M/s           245.094/s         47.058M/s           64  0.0208333
BM_ebur128<double>/sampling_freq:192000/frames_per_window:8                242 ms          242 ms            3       726.125M/s           247.851/s        47.5873M/s          128  0.0416667
BM_ebur128<double>/sampling_freq:192000/frames_per_window:16               254 ms          254 ms            3       691.992M/s             236.2/s        45.3504M/s          256  0.0833333
BM_ebur128<double>/sampling_freq:192000/frames_per_window:32               260 ms          260 ms            3       676.105M/s           230.777/s        44.3092M/s          512   0.166667
BM_ebur128<double>/sampling_freq:192000/frames_per_window:64               263 ms          263 ms            3       668.225M/s           228.088/s        43.7928M/s         1024   0.333333
BM_ebur128<double>/sampling_freq:192000/frames_per_window:128              265 ms          265 ms            3       664.007M/s           226.648/s        43.5163M/s           2k   0.666667
BM_ebur128<double>/sampling_freq:192000/frames_per_window:256              265 ms          265 ms            3       662.251M/s           226.048/s        43.4013M/s           4k    1.33333
BM_ebur128<double>/sampling_freq:192000/frames_per_window:512              266 ms          266 ms            3       661.407M/s            225.76/s         43.346M/s           8k    2.66667
BM_ebur128<double>/sampling_freq:192000/frames_per_window:1024             266 ms          266 ms            3       660.927M/s           225.596/s        43.3145M/s          16k    5.33333
BM_ebur128<double>/sampling_freq:192000/frames_per_window:2048             266 ms          266 ms            3       660.825M/s           225.562/s        43.3078M/s          32k    10.6667
BM_ebur128<double>/sampling_freq:192000/frames_per_window:4096             266 ms          266 ms            3       660.761M/s            225.54/s        43.3036M/s          64k    21.3333
BM_ebur128<double>/sampling_freq:192000/frames_per_window:8192             266 ms          266 ms            3       660.729M/s           225.529/s        43.3015M/s         128k    42.6667
BM_ebur128<double>/sampling_freq:192000/frames_per_window:16384            266 ms          266 ms            3       660.575M/s           225.476/s        43.2914M/s         256k    85.3333
BM_ebur128<double>/sampling_freq:192000/frames_per_window:32768            266 ms          266 ms            3       660.463M/s           225.438/s        43.2841M/s         512k    170.667
BM_ebur128<double>/sampling_freq:192000/frames_per_window:65536            266 ms          266 ms            3       660.434M/s           225.428/s        43.2822M/s        1024k    341.333
BM_ebur128<double>/sampling_freq:192000/frames_per_window:131072           266 ms          266 ms            3       660.405M/s           225.418/s        43.2803M/s           2M    682.667
BM_ebur128<double>/sampling_freq:192000/frames_per_window:262144           266 ms          266 ms            3       660.425M/s           225.425/s        43.2816M/s           4M   1.36533k
BM_ebur128<double>/sampling_freq:192000/frames_per_window:524288           266 ms          266 ms            3       660.401M/s           225.417/s        43.2801M/s           8M   2.73067k
BM_ebur128<double>/sampling_freq:192000/frames_per_window:1048576          266 ms          266 ms            3       660.386M/s           225.412/s         43.279M/s          16M   5.46133k
BM_ebur128<double>/sampling_freq:192000/frames_per_window:2097152          266 ms          266 ms            3       660.417M/s           225.422/s        43.2811M/s          32M   10.9227k
BM_ebur128<double>/sampling_freq:192000/frames_per_window:4194304          266 ms          266 ms            3       660.351M/s             225.4/s        43.2768M/s          64M   21.8453k
BM_ebur128<double>/sampling_freq:192000/frames_per_window:8388608          266 ms          266 ms            3       660.436M/s           225.429/s        43.2824M/s         128M   43.6907k
BM_ebur128<double>/sampling_freq:192000/frames_per_window:11520000         266 ms          266 ms            3       660.457M/s           225.436/s        43.2837M/s     175.781M        60k

LebedevRI added a commit to LebedevRI/strawberry that referenced this pull request Jun 27, 2023
The most juicy bit!

This is based on Song Fingerprint Analysis,
but here we must know the actual song, and not just the file.

The library supports only interleaved S16/S32/F32/F64,
so we must be sure we insert `audioconvert` into pipeline.

One point of contention here for me, is whether we should
feed the frames to the library the moment we get them
in `NewBufferCallback`, or collect them in a buffer
and pass them all at once. I've gone with the former,
because it seems like that is not the worst choice:
strawberrymusicplayer#1216 (comment)

In principle, the analysis *could* fail,
so we want to handle that gracefully.
@LebedevRI LebedevRI requested a review from jonaski June 27, 2023 23:08
@LebedevRI
Copy link
Contributor Author

@jonaski thank you for nits! Hopefully addressed.
I've gone ahead and completely removed that buffering in analysis.
Oh, i also didn't look into performing said analysis in parallel, that really should be done.

LebedevRI added a commit to LebedevRI/strawberry that referenced this pull request Jun 27, 2023
The most juicy bit!

This is based on Song Fingerprint Analysis,
but here we must know the actual song, and not just the file.

The library supports only interleaved S16/S32/F32/F64,
so we must be sure we insert `audioconvert` into pipeline.

One point of contention here for me, is whether we should
feed the frames to the library the moment we get them
in `NewBufferCallback`, or collect them in a buffer
and pass them all at once. I've gone with the former,
because it seems like that is not the worst choice:
strawberrymusicplayer#1216 (comment)

In principle, the analysis *could* fail,
so we want to handle that gracefully.
LebedevRI added a commit to LebedevRI/strawberry that referenced this pull request Jun 27, 2023
The most juicy bit!

This is based on Song Fingerprint Analysis,
but here we must know the actual song, and not just the file.

The library supports only interleaved S16/S32/F32/F64,
so we must be sure we insert `audioconvert` into pipeline.

One point of contention here for me, is whether we should
feed the frames to the library the moment we get them
in `NewBufferCallback`, or collect them in a buffer
and pass them all at once. I've gone with the former,
because it seems like that is not the worst choice:
strawberrymusicplayer#1216 (comment)

In principle, the analysis *could* fail,
so we want to handle that gracefully.
Copy link
Member

@jonaski jonaski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good except for some minor pointer alignment style issues. Thanks for addressing these minor issues.
Pointer alignments should be right, except where there is no variable name and in casts. I'll check with clang-format community if it's possible to create an option for this.
Other than the pointer alignments, clang format is also removing newlines at the end of the function, which I didn't find an option to leave as is.

src/engine/ebur128analysis.cpp Outdated Show resolved Hide resolved
src/playlist/playlistdelegates.cpp Outdated Show resolved Hide resolved
src/playlist/playlistdelegates.cpp Outdated Show resolved Hide resolved
src/engine/ebur128analysis.cpp Outdated Show resolved Hide resolved
src/engine/ebur128analysis.cpp Outdated Show resolved Hide resolved
src/engine/ebur128analysis.cpp Outdated Show resolved Hide resolved
LebedevRI added a commit to LebedevRI/strawberry that referenced this pull request Jun 28, 2023
The most juicy bit!

This is based on Song Fingerprint Analysis,
but here we must know the actual song, and not just the file.

The library supports only interleaved S16/S32/F32/F64,
so we must be sure we insert `audioconvert` into pipeline.

One point of contention here for me, is whether we should
feed the frames to the library the moment we get them
in `NewBufferCallback`, or collect them in a buffer
and pass them all at once. I've gone with the former,
because it seems like that is not the worst choice:
strawberrymusicplayer#1216 (comment)

In principle, the analysis *could* fail,
so we want to handle that gracefully.
LebedevRI added a commit to LebedevRI/strawberry that referenced this pull request Jun 28, 2023
The most juicy bit!

This is based on Song Fingerprint Analysis,
but here we must know the actual song, and not just the file.

The library supports only interleaved S16/S32/F32/F64,
so we must be sure we insert `audioconvert` into pipeline.

One point of contention here for me, is whether we should
feed the frames to the library the moment we get them
in `NewBufferCallback`, or collect them in a buffer
and pass them all at once. I've gone with the former,
because it seems like that is not the worst choice:
strawberrymusicplayer#1216 (comment)

In principle, the analysis *could* fail,
so we want to handle that gracefully.
@LebedevRI
Copy link
Contributor Author

Looks good except for some minor pointer alignment style issues.

Thank you!

Thanks for addressing these minor issues. Pointer alignments should be right, except where there is no variable name and in casts. I'll check with clang-format community if it's possible to create an option for this. Other than the pointer alignments, clang format is also removing newlines at the end of the function, which I didn't find an option to leave as is.

My main points is that doing so manually is ..., very much not 202x-like,
AND having a .clang-format that isn't DisableFormat: true but requires sneaky manual fixups
is confusing.

@LebedevRI LebedevRI requested a review from jonaski July 10, 2023 21:18
src/collection/collectionwatcher.cpp Outdated Show resolved Hide resolved
src/collection/collectionwatcher.cpp Outdated Show resolved Hide resolved
Again, somewhat pretty similar to the existing fingerprint analysis,
we must support performing it both for the new files,
and re-performing it on (some of) already-existing songs,
because it might have been disabled before.

Admittedly, i quite don't like some of this code,
maybe this can be done in a more concise way.

NOTE: this only supports scanning each separate songs.
Should we ever want to support per-album loudness normalization,
this will need massive changes...
This improves the performance of the analysis (by 2x!),
by offloading non-`libebur128`-computations (i.e. decode-convert)
to a separate thread, thus reducing walltime.
The idea is that Integrated Loudness is an integral part
of the song, much like knowing it's beginning / ending
in the file, and we must handle it the exact same way,
and pipe it through all the way.

At the same time, `EngineBase` knows Target Level (from settings),
and these two combined tell us the Gain needed to normalize the
Loudness of the particular Song (`EngineBase::Load()` does that).
So the actual backend only needs to handle the Volume.

We don't currently support changing Target Level on the fly.
We don't currently support changing Loudness-normalizing Gain on the fly.

This does not handle the case when the song is loaded from URL
and thus the EBU R 128 measures, that exist, are not nessesairly correct.
…peline

This is a bit of a gotcha, there should be a point (where we seek?)
where we'd be able to change said gain, but for now this is a simple[r]
stop-gap fix.
The magic: if EBU R 128 loudness normalization is enabled,
just insert `volume` GST element into the pipeline
(where ReplayGain would be inserted) and configure it.

We currently don't support changing said gain after the pipeline
was created. We might need to, though, for a number of reasons.
Loudness measurement is channel-dependent.
This perhaps matters most for mono audio.
…rmalizing gain

Ok, it does appear that it is that simple.

In principle this (even the non-update case) results in volume jumps,
so maybe we'll want gradual gain change...

Notably, i thought we'd always seek if the pipeline
was already operating on the same URL as the new one,
but apparently only for adjacent songs?
@LebedevRI
Copy link
Contributor Author

@jonaski thank you for taking a look!

Does 71f54c7 more closely resemble how you believe it should work?

@jonaski jonaski merged commit 4bd993b into strawberrymusicplayer:master Jul 12, 2023
32 of 34 checks passed
jonaski pushed a commit that referenced this pull request Jul 12, 2023
The most juicy bit!

This is based on Song Fingerprint Analysis,
but here we must know the actual song, and not just the file.

The library supports only interleaved S16/S32/F32/F64,
so we must be sure we insert `audioconvert` into pipeline.

One point of contention here for me, is whether we should
feed the frames to the library the moment we get them
in `NewBufferCallback`, or collect them in a buffer
and pass them all at once. I've gone with the former,
because it seems like that is not the worst choice:
#1216 (comment)

In principle, the analysis *could* fail,
so we want to handle that gracefully.
@LebedevRI LebedevRI deleted the ebu-r-128 branch July 12, 2023 15:26
@LebedevRI
Copy link
Contributor Author

@jonaski thank you!

@LebedevRI
Copy link
Contributor Author

Ok, some observations after some use:

  • It would be really good to have an option to force all processing to be done on floating-point data.
  • We can't really use gst's volume, it allows only up to +20dB gain. (???!)
  • Compression might be somewhat interesting. But i guess not Expanding.

@LebedevRI
Copy link
Contributor Author

Ok, some observations after some use:

  • It would be really good to have an option to force all processing to be done on floating-point data.

#1238 as a half-measure.

  • We can't really use gst's volume, it allows only up to +20dB gain. (???!)

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5063

  • Compression might be somewhat interesting. But i guess not Expanding.

LebedevRI added a commit to LebedevRI/gstreamer that referenced this pull request Jul 19, 2023
The current limit is `x10`, which allows just `+20 dB` of gain.

While it may seem sufficient, this came up as a problem
in a real-world, non-specially-engineered situation,
in strawberry's EBU R 128 loudness normalization.
(strawberrymusicplayer/strawberry#1216)

There is an audio track (that was not intentionally engineered that way),
that has integrated loudness of `-38 LUFS`,
and if we want to normalize it's loudness to e.g. `-16 LUFS`,
which is a very reasonable thing to do,
we need to apply gain of `+22 dB`,
which is larger than `+20 dB`, and we fail...

I think it should allow at least `+96 dB` of gain,
and therefore should be at `10^(96/20) ~= 63096`.

But, i don't see why we need to put any specific restriction
on that parameter in the first place, so let's just remove it?
LebedevRI added a commit to LebedevRI/gstreamer that referenced this pull request Jul 20, 2023
The current limit is `x10`, which allows just `+20 dB` of gain.

While it may seem sufficient, this came up as a problem
in a real-world, non-specially-engineered situation,
in strawberry's EBU R 128 loudness normalization.
(strawberrymusicplayer/strawberry#1216)

There is an audio track (that was not intentionally engineered that way),
that has integrated loudness of `-38 LUFS`,
and if we want to normalize it's loudness to e.g. `-16 LUFS`,
which is a very reasonable thing to do,
we need to apply gain of `+22 dB`,
which is larger than `+20 dB`, and we fail...

I think it should allow at least `+96 dB` of gain,
and therefore should be at `10^(96/20) ~= 63096`.

But, i don't see why we need to put any specific restriction
on that parameter in the first place, other than the fact
that the fixed-point multiplication scheme does not support volume
larger than 15x-ish.

So let's just implement a floating-point fall-back path
that does not involve fixed-point multiplication
and lift the restriction altogether?
LebedevRI added a commit to LebedevRI/gstreamer that referenced this pull request Jul 20, 2023
The current limit is `x10`, which allows just `+20 dB` of gain.

While it may seem sufficient, this came up as a problem
in a real-world, non-specially-engineered situation,
in strawberry's EBU R 128 loudness normalization.
(strawberrymusicplayer/strawberry#1216)

There is an audio track (that was not intentionally engineered that way),
that has integrated loudness of `-38 LUFS`,
and if we want to normalize it's loudness to e.g. `-16 LUFS`,
which is a very reasonable thing to do,
we need to apply gain of `+22 dB`,
which is larger than `+20 dB`, and we fail...

I think it should allow at least `+96 dB` of gain,
and therefore should be at `10^(96/20) ~= 63096`.

But, i don't see why we need to put any specific restriction
on that parameter in the first place, other than the fact
that the fixed-point multiplication scheme does not support volume
larger than 15x-ish.

So let's just implement a floating-point fall-back path
that does not involve fixed-point multiplication
and lift the restriction altogether?
LebedevRI added a commit to LebedevRI/gstreamer that referenced this pull request Jul 21, 2023
The current limit is `x10`, which allows just `+20 dB` of gain.

While it may seem sufficient, this came up as a problem
in a real-world, non-specially-engineered situation,
in strawberry's EBU R 128 loudness normalization.
(strawberrymusicplayer/strawberry#1216)

There is an audio track (that was not intentionally engineered that way),
that has integrated loudness of `-38 LUFS`,
and if we want to normalize it's loudness to e.g. `-16 LUFS`,
which is a very reasonable thing to do,
we need to apply gain of `+22 dB`,
which is larger than `+20 dB`, and we fail...

I think it should allow at least `+96 dB` of gain,
and therefore should be at `10^(96/20) ~= 63096`.

But, i don't see why we need to put any specific restriction
on that parameter in the first place, other than the fact
that the fixed-point multiplication scheme does not support volume
larger than 15x-ish.

So let's just implement a floating-point fall-back path
that does not involve fixed-point multiplication
and lift the restriction altogether?
intel-media-ci pushed a commit to intel-media-ci/gstreamer that referenced this pull request Aug 7, 2023
The current limit is `x10`, which allows just `+20 dB` of gain.

While it may seem sufficient, this came up as a problem
in a real-world, non-specially-engineered situation,
in strawberry's EBU R 128 loudness normalization.
(strawberrymusicplayer/strawberry#1216)

There is an audio track (that was not intentionally engineered that way),
that has integrated loudness of `-38 LUFS`,
and if we want to normalize it's loudness to e.g. `-16 LUFS`,
which is a very reasonable thing to do,
we need to apply gain of `+22 dB`,
which is larger than `+20 dB`, and we fail...

I think it should allow at least `+96 dB` of gain,
and therefore should be at `10^(96/20) ~= 63096`.

But, i don't see why we need to put any specific restriction
on that parameter in the first place, other than the fact
that the fixed-point multiplication scheme does not support volume
larger than 15x-ish.

So let's just implement a floating-point fall-back path
that does not involve fixed-point multiplication
and lift the restriction altogether?

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5063>
@LebedevRI
Copy link
Contributor Author

LebedevRI commented Aug 8, 2023

Ok, some observations after some use:

  • It would be really good to have an option to force all processing to be done on floating-point data.

#1238 as a half-measure.

  • We can't really use gst's volume, it allows only up to +20dB gain. (???!)

https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5063

Hurray, GStreamer/gstreamer@8b1500d!

  • Compression might be somewhat interesting. But i guess not Expanding.

mengker33 pushed a commit to mengker33/gstreamer that referenced this pull request Aug 31, 2023
The current limit is `x10`, which allows just `+20 dB` of gain.

While it may seem sufficient, this came up as a problem
in a real-world, non-specially-engineered situation,
in strawberry's EBU R 128 loudness normalization.
(strawberrymusicplayer/strawberry#1216)

There is an audio track (that was not intentionally engineered that way),
that has integrated loudness of `-38 LUFS`,
and if we want to normalize it's loudness to e.g. `-16 LUFS`,
which is a very reasonable thing to do,
we need to apply gain of `+22 dB`,
which is larger than `+20 dB`, and we fail...

I think it should allow at least `+96 dB` of gain,
and therefore should be at `10^(96/20) ~= 63096`.

But, i don't see why we need to put any specific restriction
on that parameter in the first place, other than the fact
that the fixed-point multiplication scheme does not support volume
larger than 15x-ish.

So let's just implement a floating-point fall-back path
that does not involve fixed-point multiplication
and lift the restriction altogether?

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5063>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants