dcadec: implement request_channel_layout.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
dcadec: store the stereo downmix coefficients as float in the DCAContext.

The 7-bit codes previously used are absent from the ETSI 102 114 V1.4.1 spec.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
dca: convert dca_default_coeffs to float.

Easier to read, modify, and avoids relying on an outdated table.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
dca: remove embedded downmix coefficient extraction.

It was based on an old, seemingly incorrect specification, so default
coefficients were always used anyway.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
dca: extract core substream's embedded downmix coeffcient codes, if present.

As per ETSI TS 102 114 V1.4.1 specification.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
dca: improve default stereo downmix coefficients.

Previous coefficients were producing a non-normalized, incorrect Lt/Rt downmix.

The new coefficients produce a standard Lo/Ro downmix with 3dB attenuation.

This should match the typical default coefficients used by DTS encoders.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
dca: support mixing LFE in dca_downmix.

Embedded downmix coefficients can use this.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
dcadec: treat all 2-channel modes as Stereo in dca_downmix.

The check for (prim_channels > 2) before calling dca_downmix made these
cases unreachable, but now 2.1 layouts will go through the downmix code.
Having dual mono, Lt/Rt and sum-difference layouts print errors when
regular Stereo doesn't seems pointless.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
dcadec: add disable_xch private option.

This supplements the deprecated request_channels-based control of XCh decoding.

Signed-off-by: Anton Khirnov <anton@khirnov.net>