[non-BE] Resolve "MASA metadata decoding to rendering may produce negative diffuseness"
- Related issues: #850 (closed)
- Requested reviewers: @weckbecker, @bayers, or @vaclav
Reason why this change is needed
- 2dir MASA metadata decoding may result in negative diffuseness in DirAC rendering which causes NaN in output. This fix is needed to address the issue.
- 2dir MASA metadata decoding may produce energy ratios (due to quantisation) that sum to over one. This has been addressed by normalisation in such cases for the normal MASA metadata decoding path but the high-bitrate MASA metadata decoding path is missing this.
Description of the change
- This implements diffuseness sanitation for the step when copying metadata from qmetadata to spatial rendering structures.
- Missing energy ratio normalisation is added to the high bitrate metadata decoding path.
Affected operating points
- This is in decoding only so bitstream is not affected.
- Diffuseness sanitation affects modes using DirAC rendering (LS, FOA/HOA, mono for 2TC MASA) and can be non-BE at all bitrates for those outputs. Naturally, OMASA is also affected.
- Energy ratio normalisation can affect high bitrate MASA metadata decoding, i.e., MASA bitrates 384-512 kbps. All outputs are then affected when this happens and results in non-BE. OMASA is also affected if MASA part gets enough bitrate to use high bitrate coding.
Related to #850 (closed)