summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Trisciani <luca.trisciani@gmail.com>2018-11-05 11:13:27 +0100
committerLuca Trisciani <luca.trisciani@gmail.com>2018-11-05 11:13:27 +0100
commit4eacce11313a850228cd7f14ef67c27c7de78428 (patch)
treeeb7475e74c945893d8666abb805b01b2136df49c
parentd1dbc96f0f54a0e21637aeb1e02795fe9e4a8355 (diff)
parent2582250dda353064a66fadd1863ecc0dd8e48c63 (diff)
Merge branch 'master' of https://github.com/lucat/leqm-nrt
After correcting scaling due to wrong Test Signal
-rw-r--r--src/leqm-nrt.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/src/leqm-nrt.c b/src/leqm-nrt.c
index 45272a0..9cd8a53 100644
--- a/src/leqm-nrt.c
+++ b/src/leqm-nrt.c
@@ -4,7 +4,7 @@
"Cinematography -- Method of measurement of perceived
loudness of motion-picture audio material"
- Copyright (C) 2011-2013, 2017 Luca Trisciani
+ Copyright (C) 2011-2013, 2017-2018 Luca Trisciani
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -42,7 +42,7 @@
#endif
-// Version 0.0.17 (C) Luca Trisciani 2011-2013, 2017
+// Version 0.0.18 (C) Luca Trisciani 2011-2013, 2017-2018
// Tool from the DCP-Werkstatt Software Bundle
@@ -121,7 +121,7 @@ int main(int argc, const char ** argv)
double * channelconfcalvector;
channelconfcalvector = NULL;
- printf("leqm-nrt Copyright (C) 2011-2013, 2017 Luca Trisciani\nThis program comes with ABSOLUTELY NO WARRANTY; for details on command line parameters -help\nThis is free software, and you are welcome to redistribute it\nunder the GPL v3 licence.\nProgram will use 1 + %d slave threads.\n", numCPU);
+ printf("leqm-nrt Copyright (C) 2011-2013, 2017-2018 Luca Trisciani\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it\nunder the GPL v3 licence.\nProgram will use 1 + %d slave threads.\n", numCPU);
//SndfileHandle file;
SNDFILE *file;
file=NULL;
@@ -211,6 +211,14 @@ int main(int argc, const char ** argv)
continue;
}
+
+
+ if (strcmp(argv[in], "-version") == 0) {
+ in++;
+ printf("leqm-nrt version 0.18\n", npoints);
+ continue;
+
+ }
if (strcmp(argv[in], "-numcpus") == 0) {
numCPU= atoi(argv[in + 1]);
in+=2;
@@ -903,11 +911,9 @@ int meanoverduration(struct Sum * oldsum) {
oldsum->mean = pow(oldsum->sum / ((double) oldsum->nsamples), 0.500);
oldsum->cmean = pow(oldsum->csum / ((double) oldsum->nsamples), 0.500);
oldsum->rms = 20*log10(oldsum->mean);
- oldsum->leqm = 20*log10(oldsum->cmean) + 110.600;//
- // and this must be right because M filter is -5.6 @ 1k Hz that is -25.6 dBFS and to have 85.0 as reference level we must add 25.56 + 85.00 that is 110.6 dB.
- //this value is obtained calibrating with a -20 dBFS Dolby Tone (RMS) I think this is correct
- //But ISO 21727:2004(E) ask for a reference level "measured using an average responding meter". So reference level is not 0.707, but 0.637 = 2/pi
- //This is only approximate as you should use a separate calibration according to the Dolby Format. Also for SW the tone should be 100Hz (?)
+ oldsum->leqm = 20*log10(oldsum->cmean) + 108.0851;//
+ //This must be right because M filter is -5.6 @ 1k Hz that is -25.6 dBFS and to have 85.0 as reference level we must add 25.56 + 85.00 that is 110.6 dB.
+ //this value is obtained calibrating with a -20 dBFS.
return 0;
}
@@ -931,7 +937,7 @@ void logleqm(FILE * filehandle, double featuretimesec, struct Sum * oldsum) {
}
void logleqm10(FILE * filehandle, double featuretimesec, double longaverage) {
- double leqm10 = 20*log10(pow(longaverage, 0.500)) + 110.600;
+ double leqm10 = 20*log10(pow(longaverage, 0.500)) + 108.0851;
fprintf(filehandle, "%.4f", featuretimesec);
fprintf(filehandle, "\t");
fprintf(filehandle, "%.4f\n", leqm10);