**1. Introduction**

A video signal represented as a sequence of frames of pixels contains vast amount of redundant information that can be eliminated with video compression technology enhancing the total transmission and hence storage becomes more efficient. To facilitate interoperability between compression at the video producing source and decompression at the consumption end, several generations of video coding standards have been defined and adapted by the ITU-G and VCEG etc... Demand for high quality video is growing exponentially and with the advent of the new standards like H.264/AVC it has placed a significant increase in programming and computational power of the processors. In H.264/AVC, the motion estimation part holds the key in capturing the vital motion vectors for the incoming video frames and hence takes very high processing at both encoder and the decoder. This chapter gives an overview of Motion estimation and the various search algorithms and also the scalability of parallelism in their operations to enhance the performance and improve the overall video quality. For low-end applications, software solutions are adequate. For high-end applications, dedicated hardware solutions are needed.

This chapter gives an overview of H.264/AVC video coding in general and its applications in four main sections. Section 1 deals with motion estimation and the types of algorithms one of the key modules of H.264 and the most time-consuming. Section 2 deals with the estimation criterion and their role in determining the complexiety of the estimation algorithms. Section 3 briefly discusses about the scalability of parallelism in H.264 and the final section deals with the applications of H.264 focussing on Aerial video surveillance and its advantages.

#### **1.1 Motion estimation**

Motion estimation techniques form the core of H.264/AVC (Iain Richardson, 2010) video compression and video processing applications. It extracts motion information from the video sequence where the motion is typically represented using a motion vector (x, y). The motion vector indicates the displacement of a pixel or a pixel block from the current location due to motion. This information is used in video compression to find best matching block in reference frame to calculate low energy residue to generate temporally interpolated frames. It is also used in applications such motion compensated de-interlacing, video stabilization, motion tracking etc. Varieties of motion estimation techniques are available. There are pelrecursive techniques, which derive motion vector (T.Wiegand et.al, 2003) for each pixel and

H.264 Motion Estimation and Applications 59

Full search block matching algorithm (Alois, 2009) evaluates every possible pixel block in the search region. Hence, it can generate the best block matching motion vector. This type of BMA can give least possible residue for video compression. But, the required computations are prohibitively high due to the large amount of candidates to evaluate in a defined search region. The number of candidates to evaluate are ((2\*Sx) +1)\*((2\*Sy) +1) which is predominantly high compared to any of the search algorithms. There are several other fast block-matching algorithms, which reduce the number of evaluated candidates yet try to keep good block matching (Yu-Wen, 2006) accuracy. Note that since these algorithms test only limited candidates, they might result in selecting a candidate corresponding to local minima, unlike full search, which always results in global minima. Some of the algorithms

There are many other block matching algorithms (Nuno, 2002) and their variants available, but differs in the manner how they select the candidate for comparison and what is the motion vector resolution. Although, the full search algorithm is the best one in terms of the quality of the predicted image and its resolution of the motion vector it is very computationally intensive. With the realization that motion estimation is the most computationally intensive operation in the coding and transmitting of video streams, people started looking for more efficient algorithms. However, there is a trade-off between the efficiency of the algorithm and the quality of the prediction image. Keeping this trade-off in mind a lot of algorithms have been developed. These algorithms are called Sub-Optimal (Alois, 2009) because although they are computationally more efficient than the Full search,

In a three-step search (TSS) algorithm (Alan Bovik, 2009), the first iteration evaluates nine candidates as shown in figure 2. The candidates are centered on the current block's position. The step size for the first iteration is typically set to half the search range. These algorithms operate by calculating the energy measure (e.g. SAD) at a subset of locations within the search window as illustrated (TSS, sometimes described as N-Step Search) in Figure.2. SAD is calculated at position (0, 0) (the centre of the Figure) and at eight locations ±2*N*−1 (for a search window of ± (2*N* −1) samples). The first nine search locations are numbered '1'. The search location that gives the smallest SAE is chosen as the new search centre and a further eight locations are searched, this time at half the previous distance from the search centre (numbered '2' in the figure). Once again, the 'best' location is chosen as the new search origin and the algorithm is repeated until the search distance cannot be subdivided further. This is the last iteration of the three-step search algorithm. The best matching candidate from this iteration is selected as the final candidate. The motion vector corresponding to this candidate is selected for the current block. The number of candidates evaluated during three-step search is very less compared to the full search algorithm. The TSS is considerably simpler than Full Search (8*N* + 1 search compared with (2*N*+1 −1)2 searches for Full Search) but the TSS (and other fast search algorithms) do not usually perform as

**1.1.2 Full search block matching** 

are listed below.

**1.1.3 Fast search algorithms** 

**1.1.4 Three step search** 

well as Full Search.

they do not give as good a quality as in the full search.

there is also the phase plane correlation technique, which generates motion vectors via correlation between current frame and reference frame. However, the most popular technique is Block Matching methodology which is the prime topic of discussion here.
