jiixyj / libebur128

A library implementing the EBU R128 loudness standard.
MIT License
395 stars 76 forks source link

Relative gate threshold: -20 instead of -10(?) #92

Closed nofishonfriday closed 5 years ago

nofishonfriday commented 5 years ago

Hi, in https://github.com/jiixyj/libebur128/blob/master/ebur128/ebur128.c#L99 I see relative_gate set to -10.0 while in EBU Tech 3342 is specified (page 6)

The relative threshold is set to a level of −20 LU relative to the absolute-gated loudness level.

So shouldn't relative_gate be set to -20.0 also or do I misunderstand this? Thanks.

audionuma commented 5 years ago

Hello, as mentioned in the linked document :

The computation of Loudness Range is based on a measurement of loudness level as specified in ITU-R BS.1770 [2], albeit with a different relative gating threshold

See https://github.com/jiixyj/libebur128/blob/c13deee58f47427c9506f1b0b259c16f909edab9/ebur128/ebur128.c#L1302 where the -20 LU LRA relative gating is applied, and https://github.com/jiixyj/libebur128/blob/c13deee58f47427c9506f1b0b259c16f909edab9/ebur128/ebur128.c#L505 where it is initialized.

The integrated loudness relative gate is appropriately set to -10 LU.

nofishonfriday commented 5 years ago

Thanks for the clarification.