VoidXH / Cavern

Object-based audio engine and codec pack with Dolby Atmos rendering, room correction, HRTF, one-click Unity audio takeover, and much more.
http://cavern.sbence.hu
Other
323 stars 14 forks source link

Fix 90* phase shift for certain configurations #92

Closed junh1024 closed 1 year ago

junh1024 commented 1 year ago

In the ETSI specification for object E-AC3, section 6.3.2.2 joc_dmx_config_idx, configurations 3-4 aka 5.1 90 & 5.1.2 90, have a 90 degrees phase shift pre-applied to the surround channels on the 5.1/512 core. A proper atmos decode apparently reverses this phase shift before Atmos reconstruction. Configurations with no phase shift should remain unchanged. Your software should mimic this behaviour. I'm not sure in which direction the phase reversal should occur but you can match this with the original. The reference file is in the SMPTE-Dolby order

test reference

VoidXH commented 1 year ago

This was experimented with before, around 3adb5b3042218fb0e6314765a596d56a01e6ff47. The Hilbert-transform is implemented in this exact commit, but all results were distorted. Transforming the phases to any direction made it worse.