**3. Observations of simulated annealing and simulated quenching algorithm**

#### **3.1. Simulated annealing algorithm**

180 Simulated Annealing – Single and Multiple Objective Problems

be coarsely searched or even be totally skipped.

**Figure 5.** The 10th frame of CIF video sequence "coastguard".

*g1* [2,4] *g2* [4,8] *g3* [8,12] *g4*[12,16] *g5*[16,20] *g6*[20,24] *g7*[24,28] *g8*[28,32] 50.85% 40.09% 2.26% 0.10% 0.00% 1.65% 4.94% 0.10%

*d1* 8.03% 4.08 3.22 0.18 0.01 0.00 0.13 0.40 0.01 *d2* 35.72% 18.16 14.32 0.81 0.04 0.00 0.59 1.76 0.04 *d3* 6.79% 3.45 2.72 0.15 0.01 0.00 0.11 0.34 0.01 *d4* 0.41% 0.21 0.16 0.01 0.00 0.00 0.01 0.02 0.00 *d5* 17.81% 9.06 7.14 0.40 0.02 0.00 0.29 0.88 0.02 *d6* 23.93% 12.17 9.59 0.54 0.02 0.00 0.39 1.18 0.02 *d7* 6.28% 3.19 2.52 0.14 0.01 0.00 0.10 0.31 0.01 *d8* 1.03% 0.52 0.41 0.02 0.00 0.00 0.02 0.05 0.00

One example is given in Table 1, which shows the MV correlation characteristic in the 10th frame of "coastguard" CIF video sequence. For better understanding, the 10th frame of the "coastguard" is given in Figure 5. It can be observed that the fast moving boats bring some fast and irregular motion, while camera panning generates smooth movement on background. According to Table 1, more than 35% of optimal MVs are detected in the directional class <sup>2</sup> *d* . In class <sup>5</sup> *d* and class <sup>6</sup> *d* , there are also big percentage of optimal MVs appears, which implies the motion of this frame is directional irregular. While the distance correlation suggests that 90% of optimal MVs locate within the radius of 8 pels, which is quite stable when considering distance correlation. Considering both directional and distance correlation, there are only 3 partition regions, i.e.( ) 2 1 *d g*, , ( ) 2 2 *d g*, and ( ) 6 1 *d g*, with more than 10% probabilities to contain the optimal position. In the meanwhile, 21 of 64 regions' MV correlation probabilities are more than 0.1%. This suggests that intensive search is only needed to be performed in these regions. While the rest of regions, it is sufficient to

**Table 1.** MV correlation probabilities of video sequence coastguard, the 10th frame

( )*<sup>j</sup> <sup>g</sup> p MVC*

Simulated annealing (SA) [13] is a probabilistic method for finding the global minimum of an optimization problem. It works by emulating the physical process where liquids are slowly cooled so that the atoms are often able to line themselves up and form a pure crystal.

The crystal can be seemed as the minimum energy state for this system. SA is especially suitable for the large scale problems with the global minimum hidden among several local minimum. The motion estimation is such kind of optimization problem that search for the optimal motion vector with minimum RD cost. However, most fast motion estimation search algorithms look for steepest descent for minimization and go downhill as far as they can go, as shown in Figure 7. Hence, these algorithms are easily trapped into a local minimum.

**Figure 7.** Uphill and downhill searching on rate-distortion surface

Avoiding the disadvantage stated above, SA algorithm can be viewed as a good solution to motion estimation search algorithm, in which occasional uphill moves will help the process escape from local minima. The so-called Boltzmann probability distribution as defined in equation (5),

$$Prob(E) \sim \exp\left(-E / kT\right) \tag{3}$$

Simulated Annealing for Fast Motion Estimation Algorithm in H.264/AVC 183

Given the above elements, the process of SA searches for the minimum energy state 0 *s* is

SA solution usually requires a large number of function evaluations to find the global minimum, which cause the speed of process is quite slow. That is the main disadvantage when using in fast motion estimation algorithm. To speed up the algorithm, a Simulated Quenching (SQ) methodology was proposed. Like SA, SQ algorithm also resembles the cooling process of molten metals through annealing. The analogy of the technique remains the same as that of SA except for quick temperature reduction annealing schedule. Thus the cooling rate becomes one of important parameters, which governs the successful working of

As in fast motion estimation algorithm, video contents and motion character are changing all the time, it's quite difficult to find a unique cooling scheme for such complicated application. In our proposed SAAS algorithm, we adaptive choose annealing schedule according to MV correlation probabilities information. For the frame with steady motion and high MV correlation, larger values of MV correlation probabilities are more easily to distribute in fewer divided regions. In this case, the faster anneal schedule will safely lead to global optimum. While a slower annealing schedule will be choosing when the frame with more irregular motion and MV correlation distribution is flat. The proposed SAAS

The PIDS algorithm adaptive selects the intensive and coarse search regions in directional partition. However, with fixed number of search points in each direction area, it cannot adjust the search range for different motion scenes. To tackle this drawback, search pattern

algorithm with adaptive cooling scheme is specified in next section.

described as follows:

**3.2. Simulated Quenching algorithm** 

**4. Proposed SAAS algorithm** 

SQ.

expresses that a system at temperature T has its energy probabilistically distributed among all different energy states. Even at low temperature, there is a chance for the system to get out of a local energy minimum. Therefore, the system sometimes goes uphill as well as downhill. But lower the temperature, less chances for any significant uphill to take place. The basic elements of simulated annealing are as follows:


Given the above elements, the process of SA searches for the minimum energy state 0 *s* is described as follows:
