jiixyj / libebur128

A library implementing the EBU R128 loudness standard.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Current head version has broken true peak values

aerobaticant opened this issue · comments

I have cloned the git repository (head) this morning and built libebur128. (Ubuntu)
Unfortunately running r128-test-library fails on the true peak tests, appearing to return an unchanging value.

Interestingly putting a usleep(10000) before each call to test_true_peak() in tests.c improves things.

Any suggestions?

Steps to reproduce:

git clone https://github.com/jiixyj/libebur128.git
Cloning into 'libebur128'...
remote: Counting objects: 3683, done.
remote: Total 3683 (delta 0), reused 0 (delta 0), pack-reused 3683
Receiving objects: 100% (3683/3683), 1.03 MiB | 0 bytes/s, done.
Resolving deltas: 100% (2034/2034), done.
Checking connectivity... done.
cd libebur128
mkdir build
cd build
cmake -D ENABLE_TESTS=ON ..
-- The C compiler identification is GNU 4.8.4
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.26")
-- checking for module 'sndfile'
-- found sndfile, version 1.0.27
-- sndfile library dirs: /usr/local/lib
-- sndfile cflags:
-- sndfile include dirs: /usr/local/include
-- sndfile libraries: sndfile
-- sndfile ldflags:
-- Status found / disabled --
-- queue.h: yes using system copy of queue.h
-- build static library and shared library!
-- building tests!
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ant/libebur128/build
make
Scanning dependencies of target ebur128
[ 25%] Building C object ebur128/CMakeFiles/ebur128.dir/ebur128.c.o
/home/ant/avnatek/loudness/libebur128/ebur128/ebur128.c:498:2: warning: #warning "manual FTZ is being used, please enable SSE2 (-msse2 -mfpmath=sse)" [-Wcpp]
#warning "manual FTZ is being used, please enable SSE2 (-msse2 -mfpmath=sse)"
^
Linking C shared library ../libebur128.so
[ 25%] Built target ebur128
Scanning dependencies of target ebur128_static
[ 50%] Building C object ebur128/CMakeFiles/ebur128_static.dir/ebur128.c.o
/home/ant/avnatek/loudness/libebur128/ebur128/ebur128.c:498:2: warning: #warning "manual FTZ is being used, please enable SSE2 (-msse2 -mfpmath=sse)" [-Wcpp]
#warning "manual FTZ is being used, please enable SSE2 (-msse2 -mfpmath=sse)"
^
Linking C static library ../libebur128.a
[ 50%] Built target ebur128_static
Scanning dependencies of target minimal-example
[ 75%] Building C object test/CMakeFiles/minimal-example.dir/minimal-example.c.o
Linking C executable ../minimal-example
[ 75%] Built target minimal-example
Scanning dependencies of target r128-test-library
[100%] Building C object test/CMakeFiles/r128-test-library.dir/tests.c.o
Linking C executable ../r128-test-library
[100%] Built target r128-test-library
cd ~/ebu-loudness-test-setv05
../libebur128/build/r128-test-library
Note: the tests do not have to pass with EXACT_PASSED.
Passing these tests does not mean that the library is 100% EBU R 128 compliant!

PASSED, EXACT_FAILED - seq-3341-1-16bit.wav: -2.2953554851425000e+01
PASSED, EXACT_FAILED - seq-3341-2-16bit.wav: -3.2959858907728382e+01
PASSED, EXACT_FAILED - seq-3341-3-16bit-v02.wav: -2.3014141652732853e+01
PASSED, EXACT_FAILED - seq-3341-4-16bit-v02.wav: -2.3014141652732764e+01
PASSED, EXACT_FAILED - seq-3341-5-16bit-v02.wav: -2.2979029141010766e+01
PASSED, EXACT_FAILED - seq-3341-6-5channels-16bit.wav: -2.3017156275010684e+01
PASSED, EXACT_FAILED - seq-3341-6-6channels-WAVEEX-16bit.wav: -2.3017156275010684e+01
PASSED, EXACT_FAILED - seq-3341-7_seq-3342-5-24bit.wav: -2.2986158805040809e+01
PASSED, EXACT_FAILED - seq-3341-2011-8_seq-3342-6-24bit-v02.wav: -2.2997820241224584e+01
PASSED, EXACT_FAILED - seq-3342-1-16bit.wav: 1.0001105488327648e+01
PASSED, EXACT_FAILED - seq-3342-2-16bit.wav: 4.9993734051514487e+00
PASSED, EXACT_FAILED - seq-3342-3-16bit.wav: 1.9995064067783257e+01
PASSED, EXACT_FAILED - seq-3342-4-16bit.wav: 1.4999273937724611e+01
PASSED, EXACT_FAILED - seq-3341-7_seq-3342-5-24bit.wav: 4.9747585877600446e+00
PASSED, EXACT_FAILED - seq-3341-2011-8_seq-3342-6-24bit-v02.wav: 1.4993218571631635e+01
FAILED - seq-3341-15-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-16-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-17-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-18-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-19-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-20-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-21-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-22-24bit.wav.wav: 2.3517897443964703e+01
FAILED - seq-3341-23-24bit.wav.wav: 2.3517897443964703e+01

A variable in the true peak test case was not initialized correctly. It should work properly now.

Excellent - many thanks Jan!
It's obvious now looking at the code - funny how when you're juggling lots of different things it's easy to overlook something that straightforward!