Support Ambisonics
- Feb 28, 2022
-
-
Timothy B. Terriberry authored
Also mark other allocation failures with our unlikely macro.
-
Timothy B. Terriberry authored
Previously, the surround mappings only supported up to 8 channels. With ambisonics, this has been increased to 227. This has made a number of arrays that were sized based on the maximum channel count less reasonably sized. In particular, the (static) stereo downmixing table grew from 512 bytes to over 400kB (of almost entirely zeros), and the (laziy-allocated) decoder scratch buffer grew from 45kB to almost 1.25MB. Introduce a new OP_NSURROUND_CHANNELS_MAX constant with the old value (8), and use it in the places that deal only with surround channel mapping families (this restores the stereo downmixing tables to their previous size). For the decoder scratch buffer, grow it dynamically instead of reserving the maximum size in advance, since the 1.25MB number is theoretically achievable. The impact on, e.g., the fixed-point conversion dither and clipping state and the current link's channel mapping was less dramatic, so these are left as-is.
-
Andrew Allen authored
Additional review comments addressed and stereo downmixing support by Timothy B. Terriberry. Minor revisions by Felicia Lim: - Bump OP_NCHANNELS_MAX to 227. - Fail if trying to decode mapping family 3 but providing a null pointer for storing the demixing matrix and/or length.
-
- Feb 05, 2022
-
-
Timothy B. Terriberry authored
This function is a no-op in fixed point.
-