## 4 Multimedia-Based Cross-Layer Optimization in VSNs
### Video-Based Cross-Layer Optimization
#### 4.2.1 Predictive Video Coding
In the first one, the priority levels for packet dropping are calculated regarding the normalized energy levels of the intermediate nodes, and each node has a particular priority level. In such an approach, all received packets with priority level equal or lower than the current node priority are discarded. For this approach, the energy consumption over the network is considered, avoiding dropping packets that are close to the sink (since they have already consumed energy of previous intermediate nodes). In the second dropping scheme, less relevant packets have a probability to be early dropped (before transmission), avoiding undesired energy consumption with low prejudice to the end-to-end quality of the application. Such a dropping strategy resembles the proposed scheduler algorithm of [38], but with slight different objectives. Considering the whole proposed architecture in [43], it is expected that the user can adjust the energy consumption thresholds and the desired video quality and bandwidth usage directly in the proposed compression sub-layer. Video resolution varies according to the application requirements and it is also adjustable, but the received video is always in gray-scale. Cross-layer optimization based on predictive encoding is also exploited in [PERSON] _et al._[44]. Multipath routing is used to transmit encoded video using H.26L coding technique, where a path priority scheduling algorithm is employed. The paths computation is based on Directed Geographical Routing (DGR) protocol [45], which creates multiples node-disjoint paths. In order to maintain high application quality, the paths with lower delay should be used more often to transmit packets containing encoded video. The idea is to exploit information about the available bandwidth, the expected end-to-end delay and the residual energy of the paths, assigning video substreams to the \"better\" paths. The schedule algorithm aims to protect critical paths and balance traffic load among the available paths, where only paths which meet the delay requirement of the application may be selected. For the algorithm, higher energy, higher bandwidth and higher delay paths will be scheduled more frequently, protecting the lower delay paths and still assuring that the maximum delay tolerated by the application is respected. Moreover, packets containing more relevant data are assigned to paths with lower delay, higher bandwidth and larger energy, since a path with less capacity and energy will more likely fail during the transmission. Other key service of the proposed solution is early selective packet dropping, similarly to [38]. If the required bandwidth is larger than the aggregate bandwidth of the available paths, packets with the least importance will be discarded, resulting in a potential small degradation of the perceived quality of the decoded video. Predictive encoded video can also be processed while transmitted through the sensor network. As video encoding is computing-intensive and requires low delay and jitter, when compared with images, most works regard in-network processing for energy preservation and error recovery. The work presented in [44] exploits in-network processing to achieve multimedia-based cross-layer optimization. When an intermediate sensor node receives a packet to be relayed, it estimates the packet delay to the sink. If the estimated delay is larger than the required delay by a certain threshold, it assumes the packet is highly likely to miss the frame deadline, and so it discards the packet. Additionally, the intermediate node sends an ISLER (Inform Source to Lower Encoding Rate) message to the source node. Upon reception of this message, the source node updates information about the path and the video coding (based on H.26L) is adjusted. The work presented in [46] proposes multimedia-based cross-layer error recovery, where predictive encoding is performed at source nodes.