I believe drc_scale is not being applied in the way that the a52 spec
suggests it should be.  The spec says this about "partial compression":

<quote>
The dynrng value may be operated on in order to make it represent a gain
change which is a fraction of the original value. In order to alter the
amount of compression which will be applied, consider the dynrng to represent
a signed fractional number, or

    X0 . X1 X2 Y3 Y4 Y5 Y6 Y7

where X0 is the sign bit and X1 X2 Y3 Y4 Y5 Y6 Y7 are a 7-bit fraction.
This 8 bit signed fractional number may be multiplied by a fraction
indicating the fraction of the original compression to apply. If this value
is multiplied by 1/2, then the compression range of 24 dB will be reduced
to 12 dB. After the multiplicative scaling, the 8-bit result is once again
considered to be of the original form X0 X1 X2 . Y3 Y4 Y5 Y6 Y7 and used
normally.
</quote>

This means the scaling is applied *before* the dynrng value is transformed
into the actual value that will be multiplied with the gain.  I.e. you would
do this scaling *before* looking up the value in dynamic_range_tab.

In the current implementation, a drc_scale factor of 1/2 will convert 24db to
18db and not the 12db that is intended in the spec.

In order to apply scaling *after* the lookup in dynamic_range_tab, you need
to apply drc_scale exponentially.

_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to