# Resource Optimization for 3D Video SoftCast with Joint Texture/Depth Power Allocation
## 3 Minimum Distortion Optimization
### Problem Solution  
We propose using a greedy search algorithm to find the optimal bandwidth \(K^{*}\), given that the transmitter has complete knowledge of the chunk variance \(\lambda_{i}\) and the available transmission power \(P\). The transmitter exhaustively searches all the possible discrete bandwidth resources to reach the number of chunks that leads to distortion minimization. With the optimal chunk selection, the amount of traffic is reduced without critical performance degradation, and users' experience improves as the latency is greatly shortened. Meanwhile, other users in the network may utilize the saved bandwidth resources.  
In Algorithm 1, after computing the average power of the chunks in each GOP, we calculate all the possible power and bandwidth allocations throughout the GOP in an exhaustive manner. Then, at line 11, the maximum PSNR is chosen to determine the optimal bandwidth usage \(K^{*}\), the corresponding optimal chunk selection \(k_{i}^{*}\), and the optimal power allocation \(\rho_{i}^{*}\). In some cases, the performance curve tends to flatten after a certain range, as shown in Figure 2, indicating that an excessive number of channels are used to accomplish a marginal improvement in PSNR, which is apparently ineffective. Therefore, a control parameter \(\tau\) in the range \([0,1]\) is introduced in line 14 to find a suboptimal solution. The bandwidth resource usage can be significantly decreased by slightly sacrificing the PSNR performance. Note that, as 3D-DCT decorrelation transformation is implemented in this scheme, the greedy search in each GOP must be conducted on each reference viewpoint's texture and depth map separately. When conducting minimum distortion optimization under the optimal PAR, the power allocation \(SNR_{\textit{chk}}\) in (17) changes, depending on whether it is assigned to a texture or a depth map. Hence, a different optimal bandwidth usage \(K^{*}\)is chosen, leading to selection of another set of optimal chunks \(k_{i}^{*}\) and optimal power allocations \(\rho_{i}^{*}\).  
```
Input:\(N\), \(\tau\), \(c=\)[texture,depth] Output:\(k_{i}^{c^{\prime}}\), \(\rho_{i}^{c^{\prime}}\), \(K^{c}\) initialization:\(\lambda_{i}=0\), \(SNR_{\textit{chk}}^{t}=SNR_{\textit{chk}}\cdot(\frac{1}{(1+\textit{PAR})\cdot \textit{PR}})\), \(SNR_{\textit{chk}}^{d}=SNR_{\textit{chk}}-SNR_{\textit{chk}}^{t}\);
1:for\(i=1\) to \(N\)
2: Compute chunk variance \(\lambda_{i}^{t}\) and \(\lambda_{i}^{d}\)
3:end
4:for\(c=1\) to \(2\)
5:for\(n=1\) to \(N\)
6:\(K\gets n\);
7: Calculate optimal power allocation \(\rho_{i,\textit{n}}^{c}\approx\frac{N\sqrt{\lambda_{i}^{c}}}{\sum_{i=1}^{n} \sqrt{\lambda_{i}^{c}}}SNR_{\textit{chk}}^{c}\)
8: Calculate \(\text{MSE}_{\textit{n}}^{c}\) via (12).
9: Obtain \(\text{PSNR}_{\textit{n}}^{c}=\text{10 log}_{10}\big{(}\frac{(256-1)^{2}}{ \text{MSE}_{\textit{n}}^{c}}\big{)}\)
10:end
11:\(\text{PSNR}_{\textit{max}}^{c}=\text{max}_{n\in\{1,2,\ldots,N\}}\)\(\text{PSNR}_{\textit{n}}^{c}\).
12:\(K_{\textit{max}}^{c^{\prime}}\gets n_{i}^{c}\)
13:for\(n=1\) to \(N\)
14: If \(\text{PSNR}_{\textit{n}}^{c}>\tau\cdot\text{PSNR}_{\textit{max}}^{c}\)
15:\(K_{\textit{max}}^{c}\gets n\);
16:\(\text{break}\);
17:end
18:end
19: Calculate \(k_{i}^{c^{\prime}}\), \(\rho_{i}^{c^{\prime}}\) using \(K^{c^{\prime}}\) as in (11) and (17);
20:end
```  
**Algorithm 1**Minimum Distortion Optimization