fix incorrect LS conversion matrices
The matrices are stored in a compressed format, while testing it was discovered that the matrix for downmixing 5_1_4 to 5_1_2 is incorrect:
In [1]: old = np.zeros(10*8)
In [2]: old[[0, 11, 22, 33, 44, 55, 66, 77]] = 1.0
In [3]: old[[48, 59]] = 0.89
In [4]: new = np.zeros(10*8)
In [5]: new[[0, 9, 18, 27, 36, 45, 54, 63]] = 1.0
In [6]: new[[68, 77]] = 0.89
In [7]: old.reshape((10,8))
Out[7]:
array([[1. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 1. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. , 1. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ],
[0. , 1. , 0. , 0. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 1. , 0. , 0. , 0. ],
[0.89, 0. , 0. , 0. , 0. , 0. , 0. , 1. ],
[0. , 0. , 0. , 0.89, 0. , 0. , 0. , 0. ],
[0. , 0. , 1. , 0. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 1. , 0. , 0. ]])
In [8]: new.reshape((10,8))
Out[8]:
array([[1. , 0. , 0. , 0. , 0. , 0. , 0. , 0. ],
[0. , 1. , 0. , 0. , 0. , 0. , 0. , 0. ],
[0. , 0. , 1. , 0. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 1. , 0. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 1. , 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 1. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. , 1. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0. , 0. , 1. ],
[0. , 0. , 0. , 0. , 0.89, 0. , 0. , 0. ],
[0. , 0. , 0. , 0. , 0. , 0.89, 0. , 0. ]])
The fix is a simple patch with the updated indices in the table for the decoder + similar patch for pyaudio3dtools (already done).
Update 2022.07.18:
I also found that the 7_1 to 7_1_4 conversion was performing a 1:1 upmix, however due to slightly different speaker ordering this was also incorrect and needed an update.
Edited by Archit Tamarapu