Help needed for Gain calculation for audio signal for target loudness, Moved from Movie/Multichannel Audio |
![]() ![]() |
Help needed for Gain calculation for audio signal for target loudness, Moved from Movie/Multichannel Audio |
Jan 18 2012, 09:43
Post
#1
|
|
|
Group: Members Posts: 3 Joined: 18-October 11 Member No.: 94494 |
ITU standard talks about loudness calculation of audio signal. EBU mainly talks about programme loudness, LRA and true peak calculation and also gives standard acceptable value for programme loudness (-23LUFS).
It also says if the programme loudness varies from this value, the signal must be amplified/attenuated to achieve target value. My question is how that gain is calculated to be applied to audio signal? Ex. If programme loudness comes out to be -18LUFS, this means I should give 5LU attenuation to my audio signal. So, what this "5LU" transforms to in time domain so that I can multiply this to my audio signal? How this is calculated and if there is any document/spec etc explaining this would be helpful. |
|
|
|
Jan 18 2012, 20:03
Post
#2
|
|
|
Group: Members Posts: 1559 Joined: 24-June 02 From: Catalunya(Spain) Member No.: 2383 |
The simple answer is that LU is like dB. I.e. it is a logarithmic scale.
There are people here more knowledgeable in this area, which I hope they will give the correct values, but this is how to calculate it based on dBs: This is C code for conversion of dBs: /// linear -> deciBell /// amplitude normalized to 1.0f. float inline dB(float amplitude) { return 20.0f * std::log10(amplitude); } /// deciBell -> linear float inline dB2Amp(float db) { return std::pow(10.0f, db / 20.0f); } |
|
|
|
Jan 18 2012, 20:35
Post
#3
|
|
|
Group: Members Posts: 42 Joined: 27-November 11 Member No.: 95439 |
For a more formal specification, see EBU Tech 3343 (Practical guidelines for production and implementation in accordance with EBU R 128), especially section 6.2 scenario b. It also says in section 2: “For relative measurements, Loudness Units (LU) are used, where 1 LU is equivalent to 1 dB”, which is essentially what [JAZ] wrote above.
|
|
|
|
Jan 19 2012, 06:23
Post
#4
|
|
|
Group: Members Posts: 3 Joined: 18-October 11 Member No.: 94494 |
Thanks for the reply. I have gone through EBU tech 3343 and was thinking of the same but the loudness calculation is quite different than simple logarithmic calculation.
According to ITU BS.1770-2, the loudness calculation uses K-filtering, mean square, then weighted gain to each channel and then its summation. My doubt is, its conversion back to time domain could not be simple anti-logarithmic scale. Ex. if my signal needs +5LU gain then i doubt that simply multiplying each channel with "pow(10.0, 5 / 20.0)" will be enough. |
|
|
|
Jan 19 2012, 07:48
Post
#5
|
|
![]() Group: Members Posts: 395 Joined: 13-June 10 Member No.: 81467 |
How this is calculated and if there is any document/spec etc explaining this would be helpful. Cf. e.g. this thread: http://www.hydrogenaudio.org/forums/index....showtopic=85978 |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 19th May 2013 - 23:32 |