## 4 Joint Decoding-Complexity and Rate Control
### Dynamic Model Parameter Adaptation  
In order to derive content-dependent model parameters, the generic parameter set in (20) and (21) can be adapted using a least mean square (LMS)-based approach [3; 53]. To that end, the error between the assigned and achieved bit rate and decoding-complexity must be minimized. To do so in this case, a joint error function for the two quantities is first defined. Note that the following derivations will omit the \(k\), \(j\), and \(q_{0}\) subscripts for notational simplicity, but the adaptation process must be applied independently to each CTU to compute their unique model parameters. Now, let the difference between the assigned and achieved bit rate and decoding-complexity per pixel be \(\Delta R\) and \(\Delta C\), respectively. Similarly, let the difference between the predicted distortion and actual distortion in terms of MSE be \(\Delta D\). The total derivative of distortion in terms of MSE can be expressed as the sum of partial derivatives of the dependent variables in the model in (6) and the definitions in (16) and (17) as  
\[\mathrm{d}(\mathrm{MSE}) = \frac{\partial\mathrm{MSE}}{\partial\mathrm{bpp}}\mathrm{d}( \mathrm{bpp})+\frac{\partial\mathrm{MSE}}{\partial\mathrm{cpp}}\mathrm{d}( \mathrm{cpp}) \tag{22}\] \[\Delta D = -\lambda_{r}\,\Delta R-\lambda_{c}\,\Delta C. \tag{23}\]Obtaining the squared term of (23) and rearranging the terms  
\[\Delta D^{2}-2\,\Delta R\,\Delta C\,\lambda_{r}\,\lambda_{c}=\lambda_{r}^{2}\, \Delta R^{2}+\lambda_{c}^{2}\,\Delta C^{2}>0 \tag{24}\]  
and dividing both sides by \((\lambda_{r}\,\lambda_{c})^{2}\)  
\[\left(\frac{\Delta D}{\lambda_{r}\,\lambda_{c}}\right)^{2}-2\left(\frac{\Delta R \,\Delta C}{\lambda_{r}\,\lambda_{c}}\right)=\left(\frac{\Delta R}{\lambda_{c }}\right)^{2}+\left(\frac{\Delta C}{\lambda_{r}}\right)^{2}. \tag{25}\]  
The right hand side of (25) can be simplified further as  
\[\Delta R^{2}\left(\frac{\partial\mathrm{cpp}}{\partial\mathrm{MSE}}\right)^{2 }+\Delta C^{2}\left(\frac{\partial\mathrm{bpp}}{\partial\mathrm{MSE}}\right)^ {2}\approx 2\left(\frac{\Delta R\,\Delta C}{\Delta D}\right)^{2}. \tag{26}\]  
The objective of minimizing \(\Delta C\) and \(\Delta R\) simultaneously is now made possible by multiplying (26) and therefore (25) by \(\Delta D^{2}\). Hence, by combining (25) and (26), the joint error function to be minimized can be defined as  
\[\mathcal{F}:=\left(\frac{\Delta D^{2}}{\lambda_{r}\,\lambda_{c}}\right)^{2}-2 \,\Delta D^{2}\left(\frac{\Delta R\,\Delta C}{\lambda_{r}\,\lambda_{c}}\right). \tag{27}\]  
Thus, using (27) and a LMS adaptive filter, the updated model parameters can be expressed as  
\[ \begin{bmatrix}\alpha_{n}(q)\\ \beta_{n}(q)\\ \rho_{n}(q)\\ \tau_{n}(q)\end{bmatrix} = \begin{bmatrix}\alpha_{n-1}(q)-\theta_{\alpha}\frac{ \partial\mathcal{F}}{\partial\alpha}\\ \beta_{n-1}(q)-\theta_{\beta}\frac{\partial\mathcal{F}}{\partial\rho}\\ \rho_{n-1}(q)-\theta_{\rho}\frac{\partial\mathcal{F}}{\partial\rho}\\ \tau_{n-1}(q)-\theta_{\tau}\frac{\partial\mathcal{F}}{\partial\tau}\end{bmatrix} , \tag{28}\]  
where \(\alpha_{n}\), \(\beta_{n}\), \(\rho_{n}\), \(\tau_{n}\), \(\alpha_{n-1}\), \(\beta_{n-1}\), \(\rho_{n-1}\), and \(\tau_{n-1}\) are the newly computed and previous model parameters for the QP \(q_{0}\) being considered. Further, \(\theta_{\alpha}\), \(\theta_{\beta}\), \(\theta_{\rho}\), and \(\vartheta_{\tau}\) are the LMS filter's step size controlling the adaption speed and are empirically determined as \(10^{-4}\), \(10^{-5}\), \(10^{-5}\), and \(10^{-6}\) respectively.