Skip to content

MASA metadata decoding to rendering may produce negative diffuseness

Basic info

  • Commit SHA: main
  • Platform: all

Bug description

In the path from 2dir MASA metadata decoding to DirAC rendering, there is a rare possibility to encounter a situation where two direct-to-total ratios sum to 1.0f but when they are separately subtracted from 1.0f (to obtain diffuseness for the DirAC renderer), the result is slightly below zero. This is due to numerical inaccuracies of single precision floating point. A simple fix is to clamp the negative values to zero when computing the diffuseness value.

At the same time, it was also discovered that in the high bitrate MASA metadata decoding path, no direct-to-total ratio normalisation was done when the dequantized values for 2dir case sum to over 1.0f. This should also be fixed to ensure that correct direct-to-total values are used.