Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Help needed for Gain calculation for audio signal for target loudness (Read 3522 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Help needed for Gain calculation for audio signal for target loudness

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.

Help needed for Gain calculation for audio signal for target loudness

Reply #1
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);
   }

Help needed for Gain calculation for audio signal for target loudness

Reply #2
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.

Help needed for Gain calculation for audio signal for target loudness

Reply #3
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.