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
304 stars 14 forks source link

Issues with 9.1.6 #83

Closed junh1024 closed 1 year ago

junh1024 commented 1 year ago

Intro

Hi. Thank you for adding Dolby Atmos support to Cavern. Some issues:

1. Layout inconsistency with 9.1.6 btw Cavern & Cavern lite ? :

Cavern uses a 916 Dolby layout with Top side & back, but Cavern lite uses/mentions Top center& Top back center. Cavern lite should use the same layout as Cavern. 716 & 516 should also use Top side speakers in Cavern lite.

2. Channel order

The channel order for 916 should be L,R,C,LFE,Lss,Rss(side),Lrs,Rrs(back),Lw,Rw,Ltf,Rtf,TpSiL,TpSiR,Ltb,Rtb according to the Dolby document "Additional Audio Channels and Soundfields for Immersive Audio" . Note that This is SMPTE-Dolby order, not SMPTE-Microsoft. All Dolby/Atmos 916 files have this order. Other layouts should also follow this order.

3. Rendering

GVR-151-lab-90d-916.zip

I have attached a channel test for 7.1.6 . When rendered to 916, 1 channel should render to 1 speaker only. But there's bleed to multiple others, which is wrong. This happens to 7.1.6 and 5.1.6 too. Please fix. Maybe related to Issue 1 ?

VoidXH commented 1 year ago

There is no Cavernize Lite anymore, that was completely discontinued for months, and its references were removed everywhere. The Cavern Driver and Cavernize have different channel positions, so setting 9.1.6 from the Driver and rendering that way will cause crosstalk. This is intentional, Driver layouts are for content made for Cavern (games) and auto-repanning.

The X.X.6 layouts in Cavernize are for channel-based AC-3. This is not the standard, you're correct, but they're needed for channel-based encoding (both WAVE and E-AC-3 supports these 6 height channels only). I'll add standard 9.1.6 support as different render targets and rename the old ones.

VoidXH commented 1 year ago

Done in 172a452a957c1d918ba0bf4e800301f6e385908a, release in a few hours after other issues are done.

junh1024 commented 1 year ago

Some issues:

1. The channel order is still incorrect in the decoded file of 9.1.6

You have: L,R,C,LFE,Lss,Rss,Lw,Rw, (wide), Lrs,Rrs (back), Ltf,Rtf,TpSiL,TpSiR,Ltb,Rtb The specification is: L,R,C,LFE,Lss,Rss,Lrs,Rrs (back),Lw,Rw, (wide) Ltf,Rtf,TpSiL,TpSiR,Ltb,Rtb

516 & 716 look ok.

2. 7.1.4 order

Would you like to change the existing 7.1.4 name to 7.1.4 SMPTE-Microsoft, and add a new one called 7.1.4 SMPTE-Dolby which reverses the back & sides as per issue #56 ?

3. Naming in GUI

I would suggest you name the variants 9.1.6 Dolby & 9.1.6 Microsoft which refers to layout, rather than SMPTE & WAVE.

9.1.6 is a Dolby-ism (no other company has this layout).

SMPTE just refers to the channel order, SMPTE has nothing to say about the layout AFAIK. SMPTE especially has nothing to say about 9.1.6, only 5.1. Hence the SMPTE-Dolby & SMPTE-Microsoft etc in my initial post to hint that Dolby & Microsoft extended the SMPTE 5.1 order in different ways, and to differentiate it from the Film order.

4. Display wiring

Please update display wiring to reflect the order in #1, as currently, Display wiring shows 4 top side wirings for 516,716,916, which is nonsensical.

5. render WAV should be allowed for all layouts

Currently it's disallowed for some layouts. Should I continue here, or file an issue?

Thanks for updating Cavern.

VoidXH commented 1 year ago

The L R C LFE RL RR SL SR channel order (calling the surrounds rears originally) is an SMPTE standard from 1990. Microsoft (and IBM) created RIFF WAVE in 1991 according to this standard. Anything that follows it is called standard, and there is Dolby with late Atmos. The only X.X.6 layout DD+ supports fully PCM-coded is actually the standard, that's why those layouts are needed (for easy encoding). Dolby added rears after surrounds because in cinema, the PCM channels are directly wired into the amplifiers. For 7.1 systems, having to choose between using sides or rears for 5.1, it's better to keep the sides, and make rears optional. The actual 7.1 standard evolved differently, adding sides, having called the surrounds rears before, suggesting a rear corner placement (everyone followed this, except Dolby). That said:

Done in 90a2d954887ddd6b3e669da4abdc032a04988b31, released.

junh1024 commented 1 year ago

Thanks for the latest update. Wiring GUI looks better, order seems right for 9.1.6

5. render WAV should be allowed for all layouts

Maybe you can make a Rendering menu option "allow WAV with arbitrary layout" or just allow it regardless? Currently: input > temp wav > mkv > demuxed wav is very inefficient, I need wav anyway since most of my editing apps don't support mkv.

VoidXH commented 1 year ago

Done in 2a236e713e721ab6d48670e3964377b071eaf815 and released.

junh1024 commented 1 year ago

Thanks for adding WAV bypass. However, when I try raw EC3 files, like the above, the length shows as 0.0, and thus the decoded WAV are empty. Please look into this.

Dang, this is turning into a small saga.

VoidXH commented 1 year ago

Sorry, that was the result of a minor API change. It's fixed in 20be21c9e81f999cc8258d611702a283e784789b and the latest release. It'll be introduced in the driver too with #76.