# Quality Enhancement of MPEG-H 3 DA Binaural Rendering Using a Spectral Compensation Technique
## 3 Proposed Spectral Compensation for the MPEG-H 3 DA BR
### Panning Gain Compensation (PGC)  
Ideally, the transfer function between sound objects and the listener's ear is considered distortionless if it is equal to the true HRTF corresponding to the virtual loudspeaker position. However, it is practical to assume that the BR system has HRTFs only at sparse locations according to the pre-defined loudspeaker layout. In such cases, it is still possible to approximate the true HRTFs using geometric interpolation. A previous study [15] showed that the HRTF magnitude of a target location could be estimated via interpolation of the magnitudes of neighboring HRTFs surrounding that location, and the interpolation weights could be approximated by the 3D VBAP when the virtual source was in the far-field. Inspired by this, we approximate the magnitude of the ideal HRTF:  
\[|H^{j}_{Target}(k)|\approx\sqrt[p]{\sum_{i=1}^{N_{ch}}\Bigl{|}\delta_{i}H^{j}_ {i}(k)\Bigr{|}^{p}}=\|\mathbf{\tilde{g}}\odot\mathbf{H}^{j}(k)\|_{p},\;\;j=L,R, \tag{4}\]  
Figure 3: \(|H^{L}_{BR}(k)|\) (dotted line) for a virtual source at \(+10^{\circ}\) to the right from the frontal direction, rendered using a pair of loudspeakers at \(30^{\circ}\) and \(0^{\circ}\) (\(p=2\)). Left ear is located at the azimuth of \(90^{\circ}\). where \(\odot\) denotes element-wise multiplication. It is important to note that the norm order \(p\) in Equations (1) and (4) should be identical to obtain a smooth interpolation. To validate the magnitude approximation of Equation (4), we measure the HRTF magnitude of the 5 th subband of the 64-band QMF in MPEG-H 3 DA operating on a 22.2-channel loudspeaker layout [16]. The results obtained along the azimuth angle 0\({}^{\circ}\)\(\sim\)180\({}^{\circ}\) for a fixed elevation angle at 0\({}^{\circ}\) are plotted in Figure 4. Since the 22.2-channel system has more loudspeakers on the frontal hemisphere than on the back hemisphere, the approximation accuracy is expected to be higher in the frontal region, i.e., 0\({}^{\circ}\)\(\sim\)90\({}^{\circ}\). On the norm order, in our experiments, we choose \(p=2\) since it provides a smoother approximation of the target HRTF than any other values as shown in Figure 4.  
We also design real-numbered compensation coefficients to prevent the comb filter effect. These coefficients are applied to the panning gains. Our goal is to define the real-number coefficient \(\alpha^{j}(k)\) that satisfies the following condition:  
\[\alpha^{j}(k)|H^{j}_{BR}(k)|=|\hat{H}^{j}_{Target}(k)|, \tag{5}\]  
It simply means the panning gains are determined by computing \(\alpha^{j}(k)=|\hat{H}^{j}_{Target}(k)|/|H^{j}_{BR}(k)|\). However, with further consideration toward the practical implementation of PGC on MPEG-H 3 DA BR working in QMF domain, we calculate the compensation coefficient per QMF subband. Using Equations (3) and (4), we calculate the compensation coefficients of the subband \(b\) as  
\[\hat{\alpha}^{j}(b)=\frac{\sum\limits_{k=k_{b}}^{k_{b+1}-1}\|\hat{\mathbf{g}} \odot\mathbf{H}^{j}(k)\|_{p}}{\sum\limits_{k=k_{b}}^{k_{b+1}-1}\|\hat{\mathbf{g }}^{T}\mathbf{H}^{j}(k)\|},\ j\in\{L,R\}, \tag{6}\]  
where \(k_{b}\) is the lowest fast Fourier transform (FFT) bin belongs to the frequency range of \(b\)-th QMF subband. Equivalently, based on Equation (3), we apply the compensation gains directly to the panning gains as  
\[\hat{g}^{j}_{i}(k)=\hat{\alpha}^{j}(b)\,\hat{g}_{i},\,k\in\{k_{b},...,k_{b+1} -1\},\,j\in\{L,R\}. \tag{7}\]  
Finally, channel signals for each left and right ear are calculated as  
\[\hat{X}^{j}_{i}(k)=\hat{g}^{j}_{i}(k)S(k),\,j\in\{L,R\}. \tag{8}\]  
The compensation of \(|H^{j}_{BR}(b)|\) using \(\alpha^{j}(b)\) Equation (5) means the loudness of each subband in the downmixed signal is restored to that of the target signal. In other words, the comb filter effect is prevented by the proposed compensation of \(|H^{j}_{BR}(b)|\). Figure 4: Approximation results of the HRTF magnitude in Equation (4) calculated at the 5 th subband of the 64-band QMF operating on a 22.2-channel virtual loudspeaker layout.