## 4 Multimedia-Based Cross-Layer Optimization in VSNs
### Video-Based Cross-Layer Optimization
#### 4.2.1 Predictive Video Coding
In the proposed scheme, the most relevant frames for the decoding process are transmitted through paths with lower loss probability, where the loss probability is measured from the network. If such packets are lost, the receiver end may request retransmission. But as end-to-end retransmission is performed, it can incur in excessive delay and should not be considered for real-world VSNS applications [47, 48]. Multimedia-based cross-layer optimization can also consider MAC protocols. [PERSON] and [PERSON] [49] propose differentiated treating of multimedia packets by MAC layer according to the relevance of the encoded data in wireless multimedia sensor networks. The predictive video codec MPEG-4 is exploited as well as the IEEE 802.11s MAC protocol. MPEG-4 codec defines three types of video frames: I-frame, P-frame and B-frame. The most relevant data for the decoding processing are I-frames, followed by P-frames and B-frames. The 802.11s MAC protocol defines four classes of traffic (AC3 for voice, AC2 for video, AC1 for best effort and AC0 for background traffic), each one directly related to the priority to access the communication medium. As already expected, video streaming is transmitted through the AC2 traffic class. Because intermediate nodes that compose an active path from one source to the sink may be equipped with a CMOS camera or a scalar sensing unit, these intermediate nodes may be relaying packets from other sources and transmitting packets produced by themselves. An important issue addressed by [49] is the differentiation of forward and local packets: As forward packets have already traversed several hops, they should be prioritized against local packets (produced by the intermediate node itself). The communication scenario where intermediate nodes may forward and produce packets is also investigated in [50]. In that work energy saving is achieved reducing the traffic load on paths that are comprised of intermediate nodes which are able to produce relevant visual information for the monitoring application. There are two major contributions in [49]. In first place, the AC2 queue may overflow if many video packets are being received, resulting in packet dropping. Such congestion is addressed by a selective algorithm that drops packets based on the relevance of the encoded data according to the MPEG-4 coding technique, reducing the impact on the perceptual quality of the received video. The second proposed solution tries to avoid congestion by performing queue management in advance. If the current size of AC2 queue is higher than a threshold, incoming (forward) packets are allocated to AC1 queue, while locally produced packets are assigned to AC0 queue. Such scheme assures that forward packets have higher transmission priority than local packets. The work in [49] proposes a multimedia-based cross-layer regarding the IEEE 802.11s MAC protocol. In fact, this MAC protocol is mainly intended for mesh networks, where energy is not a major concern as in WMSNs. Although authors indicate the proposed solution for wireless multimedia sensor networks, further investigation should be performed to assess the feasibility of IEEE 802.11s in energy-constrained low-cost wireless sensor networks. Other works in the literature investigate multimedia-based cross-layer optimization focusing MAC protocol IEEE 802.11e, as [51] for H.264 and [52] for MPEG-4. However, neither of these works considers energy as a key design issue. Algorithms to prioritize packets according to their relevance for the decoding process [38,43,44,46,49] are very promising for VSN applications, achieving relevant results in end-to-end delay, perceived visual quality and energy consumption. This is significantly different from control of the source transmission rate not regarding the inner relevance of the coded data, as in [53]. In fact, it is expected higher overall efficiency in selective multimedia-based packet dropping, error recovery and congestion control mechanisms when compared with traditional multimedia-unaware solutions.