## 4 A Hybrid Algorithm for Power Allocation in Macrocell/Femtocell Architecture
\) endfor for all\(F_{l}\in L\)do sort\(AVG_{(RP_{PT_{\bar{F}_{l}}},T_{MUE})}\) in a descending order create Master and Slave clusters according to \(PT_{F_{l}}\) calculate the maximum interference allowed by the victims \(MUE_{i}\) \(MI^{k}_{MUE_{i}}=\frac{RSS^{k}_{M,MUE_{i}}}{SINR^{Threshold}}-N_{0}\) for all\(F_{l}\in\) Master-Fs do calculate power adjustment \(P^{\prime}_{\bar{F}_{l}}=\underbrace{MI^{k}_{MUE_{i}}\cdot\frac{RSS^{k}_{F_{l}, MUE_{i}}}{\sum^{L}_{l=1}RSS^{k}_{F_{l},MUE_{i}}}}_{\bar{F}_{l},MUE_{i}}\cdot \underbrace{P^{k}_{\bar{F}_{l}}}_{|G^{k}_{F_{l},MUE_{i}}|^{2}}\) endfor for all\(F_{l}\in\) Slave-Fs do calculate power adjustment \(P^{\prime}_{\bar{F}_{l},MUE_{i}}=\frac{\frac{P^{k}_{\bar{F}_{l}}\cdot|G^{k}_{F_{ l},MUE_{i}}|^{2}}{|G^{k}_{F_{l},MUE_{i}}|^{2}}}{|G^{k}_{F_{l},MUE_{i}}|^{2}}\) endfor endfor
```

**Algorithm 2** Hybrid Power Allocation

## 5 Adaptive Resource Allocation for Video Streaming

According to our architecture, a centralized MBS has all the updates of the quality of channel through maintaining a database that is updated every 1 ms or the duration of the LTE frame. The database contains the last update of RSS and SINR and the last instruction of power modified value. The MBS is connected to the cloud computing through the Internet where servers offering streaming service is residing there. Each user regardless its type, either MUE or FUE, has an agent in the cloud. The agent adaptively adjusts its streaming flow with a scalable video coding technique based on the feedback of link quality provided by the MBS for each user after mitigating interference if it occurs. We assume that the average bit rates of video quality levels are known, and this would avoid another calculation for the predicted bandwidth for the video streaming. Generally, service providers are often responsible for encoding video clips. They can therefore easily obtain the video quality level information from the encoding profiles. In this work, we are only interested in the change in quality levels for adapting to the network conditions, especially the channel quality. Each time the interference mitigation is achieved through the hybrid algorithm, the data rate of each user will be matched to the video streaming rate. Such information is sent from MBS to the multimedia servers that have an agent for each user. As it is obvious, in SVC, a combination of the three lowest scalability is called the Base Layer (BL), while the enhanced combinations are called Enhancement Layers (ELs). Regarding this, if BL is guaranteed to be delivered, while more ELs can be also obtained when the link can afford it, a better video quality can be expected. By using SVC encoding techniques, the server doesn't need to concern the client side or the link quality. Even some packets are lost, the client still can decode the video and display. However, this is still not bandwidth-efficient due to the unnecessary packet loss. Thus, it is necessary to control the SVC-based video streaming at the server side with the rate adaptation method to efficiently utilize the bandwidth. The adaptation is done through the agent that receives the channel quality and estimate the number of RB corresponding to that user, and then makes its decision of matching between the number of RBs and the rate of video. Let \(Q\triangleq Q_{1},...,Q_{a}\) be the operational mode set of the video encoder. The video bit rate corresponding to the operational mode \(Q_{b}(b=1,...,A)\) is denoted by \(p_{b}\). Let us assume that \(b_{1}<b_{2}<...<b_{A}\), which implies that a higher operational mode results in a higher video rate and hence achieves better video quality. The operational mode is controlled by the encoder parameters. For an SVC scenario, a scalable video stream consists of a base layer \(a_{1}\) and \((A-1)\) enhancement

Figure 2: Flow diagram of the work. layers, i.e., \(a_{2},a_{3},...,a_{A}\). The operational mode \(Q_{b}(b=a,..,A)\) is defined as the scenario when the first \(b\) layers are selected for transmission [25].