# Latitude-Adaptive Integer Bit Allocation for Quantization of Omnidirectional Images
## 4 Theoretical Analysis  
The optimization problem (5) is NP-hard with integer constraints, making it challenging to solve directly. In this section, we present the ORBA theorem when NNI constraintsare relaxed under the WMSE measure. To start with, we focus on the bit allocation for \(L^{2}\) scalar quantizers in a block at latitude \(k\) with bit quota \(b_{k}\), where the coefficients to be quantized are denoted by \(\mathbf{c}_{k,l}\), where \(l=1,\ldots,L^{2}\). When the high-resolution assumptions are retained and \(\mathbf{c}_{k,l}\) are non-identically distributed, the MSE distortion of the \(l\)-th scalar quantizer is given by the following formula [32],  
\[d_{k,l}=h_{k,l}\sigma_{k,l}^{2}2^{-2b_{k,l}}, \tag{6}\]  
where \(\sigma_{k,l}^{2}\) is the variance of random variable \(\mathbf{c}_{k,l}\), \(h_{k,l}=\frac{1}{12}\left\{\int_{-\infty}^{\infty}[f_{k,l}(\mathbf{c}_{k,l})]^ {1/3}d\mathbf{c}_{k,l}\right\}^{3}\), and \(f_{k,l}(\mathbf{c}_{k,l})\) is the normalized probability density function (pdf) of \(\mathbf{c}_{k,l}\) with unit variance. In other words, the optimization problem can be formulated as  
\[ \begin{split}\min_{b_{k,l}}\mathbb{E}\left\{\sum_{l=1}^{L^{2}}h_ {k,l}\sigma_{k,l}^{2}2^{-2b_{k,l}}\right\}\\ \text{s.t.}&\sum_{l=1}^{L^{2}}b_{k,l}\leq b_{k}, \end{split}  \tag{7}\]  
and we can derive a formal expression for bit allocation without NNI constraints, as stated in Lemma 1. Lemma 1: _When \(\{b_{k,l}\}\) are not constrained to be NNI and the high-resolution assumption holds, the bit allocation to minimize MSE per block given quota \(b_{k}\) can be formulated as_  
\[b_{k,l}=\bar{b}_{k}+\frac{1}{2}\log_{2}\frac{\sigma_{k,l}^{2}}{\rho_{k}^{2}}+ \frac{1}{2}\log_{2}\frac{h_{k,l}}{H_{k}}, \tag{8}\]  
_where \(\rho_{k}^{2}=\left(\prod_{l=1}^{L^{2}}\sigma_{k,l}^{2}\right)^{\frac{1}{L^{2}}}\), \(H_{k}=\left(\prod_{l=1}^{L^{2}}h_{k,l}\right)^{\frac{1}{L^{2}}}\), and \(\bar{b}_{k}=\frac{b_{k}}{L^{2}}\)._  
_The MSE distortion per block is_  
\[H_{k}L^{2}\rho_{k}^{2}2^{-2\bar{b}_{k}}. \tag{9}\]  
Remark 1: _When the minimum expected MSE distortion in Lemma 1 is achieved, \(L^{2}\) quantizers produce identical distortion, which is \(H_{k}\rho_{k}^{2}2^{-2\bar{b}_{k}}\)._  
Lemma 1 presents the minimum overall distortion (9) under MSE distortion. To derive the overall WMSE distortion, we assume to use the \(\omega_{k}\) to represent the average weight of the block at latitude \(k\). Thus, the overall WMSE distortion in the block with ERP weight \(\omega_{k}\) is  
\[D_{k}=\omega_{k}H_{k}L^{2}\rho_{k}^{2}2^{-2\bar{b}_{k}}=g_{k}2^{-2\bar{b}_{k}}, \tag{10}\]  
where we let \(g_{k}=\omega_{k}H_{k}L^{2}\rho_{k}^{2}\). From Lemma 1, we know that when the bits allocated to one block \(b_{k}\) are given, the optimal bit allocation among \(L^{2}\) scalar quantizers is decided by the \(\rho_{k}^{2}\) and \(h_{k,l}\), which is related to the distributions of the transform coefficients. Meanwhile, the overall WMSE distortion in a block is related to the weight \(\omega_{k}\), \(L^{2}\) distributions, and \(b_{k}\). As emphasized in Remark 1, each scalar quantizer produces equivalent distortion when the minimum distortion is achieved. Subsequently, we need to consider how we allocate \(\frac{B}{2\bar{K}}\) bits to \(K\) tiles. Utilizing Lemma 1 in conjunction with (10), we proceed to readless our relaxed optimization problem, which now can be formulated as  
\[ \begin{split}\min_{b_{k}}\mathbb{E}\left\{\sum_{k=1}^{K}g_{k}2^{- 2\frac{b_{k}}{L^{2}}}\right\}\\ \text{s.t.}&\sum_{k=1}^{K}b_{k}\leq\frac{B}{2K}, \end{split}  \tag{11}\]  
Subsequently, we present the solution along with the minimum WMSE distortion to the optimization problem (11) in Theorem 1.