<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1762073471671290548</id><updated>2012-02-16T08:22:05.307-08:00</updated><title type='text'>Video &amp; Image Compression Techniques</title><subtitle type='html'>Blog deals with an introduction to commonly used tools to compress images and videos. It also contains general C code used in DSP programming</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://videocodecs.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://videocodecs.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Madhavan</name><uri>http://www.blogger.com/profile/13746594802761053360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>6</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1762073471671290548.post-985280169892594698</id><published>2010-02-22T02:02:00.001-08:00</published><updated>2010-02-26T05:20:16.732-08:00</updated><title type='text'>Learn image and video processing further</title><content type='html'>&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;b&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;span class="Apple-style-span" style="font-size: large;"&gt;Tools:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;i&gt;&lt;a href="http://ict.ewi.tudelft.nl/index.php?option=com_sections&amp;amp;id=60&amp;amp;Itemid=124"&gt;VcDemo&lt;/a&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;b&gt;&lt;i&gt;&lt;a href="http://rsbweb.nih.gov/ij/"&gt;ImageJ&lt;/a&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;i&gt;&lt;a href="http://ict.ewi.tudelft.nl/index.php?option=com_sections&amp;amp;id=60&amp;amp;Itemid=124"&gt;&lt;/a&gt;&lt;/i&gt;&lt;/b&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;b&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="font-style: normal; font-weight: normal; "&gt;&lt;b&gt;&lt;div&gt;&lt;b&gt;&lt;span class="Apple-style-span"  style="color:#000000;"&gt;&lt;span class="Apple-style-span" style="font-size: large; "&gt;Tutorials:&lt;/span&gt;&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;&lt;/b&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;div&gt;&lt;span class="Apple-style-span"  style="color:#000066;"&gt;&lt;b&gt;&lt;a href="http://www-ec.njit.edu/~shi/courses/ECE789/"&gt;http://www-ec.njit.edu/~shi/courses/ECE789/&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1762073471671290548-985280169892594698?l=videocodecs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/985280169892594698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/985280169892594698'/><link rel='alternate' type='text/html' href='http://videocodecs.blogspot.com/2010/02/learn-image-and-video-processing.html' title='Learn image and video processing further'/><author><name>Madhavan</name><uri>http://www.blogger.com/profile/13746594802761053360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry><entry><id>tag:blogger.com,1999:blog-1762073471671290548.post-5839081867899949536</id><published>2009-02-07T14:25:00.001-08:00</published><updated>2009-02-07T14:52:43.898-08:00</updated><title type='text'>Tips</title><content type='html'>&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;span style="font-size:130%;"&gt;&lt;strong&gt;Using Graphedit to get elementary streams&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Open Graphedit&lt;br /&gt;-File-&gt;Render Media File, Select the container format or ‘ctrl + R’&lt;br /&gt;Select the file which is to be rendered &lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5300186880172234898" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 476px; CURSOR: hand; HEIGHT: 129px; TEXT-ALIGN: center" alt="" src="http://1.bp.blogspot.com/_6kpJik-Ua70/SY4L4svaGJI/AAAAAAAAAfE/tdRXOI9h2R4/s320/graph-edit-1.JPG" border="0" /&gt; &lt;div&gt;&lt;br /&gt; &lt;/div&gt;&lt;div&gt;Remove all except the file for example here spin4.mpa by selecting each and press delete button&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div align="left"&gt;&lt;img id="BLOGGER_PHOTO_ID_5300187436245804434" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 320px; CURSOR: hand; HEIGHT: 151px; TEXT-ALIGN: center" alt="" src="http://4.bp.blogspot.com/_6kpJik-Ua70/SY4MZERrZZI/AAAAAAAAAfU/YryXZCDbcMA/s320/graph-edit-2.JPG" border="0" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;div&gt;-graph-&gt;Insert Filters or ctrl + F&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;a href="http://3.bp.blogspot.com/_6kpJik-Ua70/SY4NMQG9usI/AAAAAAAAAfc/I6eEItGiAdw/s1600-h/graph-edit-7JPG.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5300188315595422402" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 320px; CURSOR: hand; HEIGHT: 226px" alt="" src="http://3.bp.blogspot.com/_6kpJik-Ua70/SY4NMQG9usI/AAAAAAAAAfc/I6eEItGiAdw/s320/graph-edit-7JPG.JPG" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;Select DirectShow Filters as shown in figure, expand it&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://3.bp.blogspot.com/_6kpJik-Ua70/SY4NpzYzeNI/AAAAAAAAAfk/RLXhYppm5z4/s1600-h/graph-edit-3.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5300188823281694930" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 320px; CURSOR: hand; HEIGHT: 139px" alt="" src="http://3.bp.blogspot.com/_6kpJik-Ua70/SY4NpzYzeNI/AAAAAAAAAfk/RLXhYppm5z4/s320/graph-edit-3.JPG" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;Select Dump in DirectShow Filters, click on Insert Filter &lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;a href="http://4.bp.blogspot.com/_6kpJik-Ua70/SY4N9gfRM0I/AAAAAAAAAfs/lOkh0aTrf4A/s1600-h/graph-edit-4.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5300189161805919042" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 320px; CURSOR: hand; HEIGHT: 290px" alt="" src="http://4.bp.blogspot.com/_6kpJik-Ua70/SY4N9gfRM0I/AAAAAAAAAfs/lOkh0aTrf4A/s320/graph-edit-4.JPG" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;Select the files to which audio and video should be du&lt;a href="http://3.bp.blogspot.com/_6kpJik-Ua70/SY4OTAUiruI/AAAAAAAAAf0/0NHmFK3LWWs/s1600-h/graph-edit-5.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5300189531128114914" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 320px; CURSOR: hand; HEIGHT: 264px" alt="" src="http://3.bp.blogspot.com/_6kpJik-Ua70/SY4OTAUiruI/AAAAAAAAAf0/0NHmFK3LWWs/s320/graph-edit-5.JPG" border="0" /&gt;&lt;/a&gt;mped&lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt; &lt;/div&gt;&lt;div&gt;&lt;br /&gt; &lt;/div&gt;&lt;p&gt;Connect the output pin of video of spin4.mpa to VID_f15.m2v by left clicking a dragging the pointer to input of VID_f15.m2v&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;p&gt;&lt;a href="http://4.bp.blogspot.com/_6kpJik-Ua70/SY4Oyms1q8I/AAAAAAAAAf8/jhDzARA8fz8/s1600-h/graph-edit-6.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5300190074006514626" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 320px; CURSOR: hand; HEIGHT: 266px" alt="" src="http://4.bp.blogspot.com/_6kpJik-Ua70/SY4Oyms1q8I/AAAAAAAAAf8/jhDzARA8fz8/s320/graph-edit-6.JPG" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt; &lt;/p&gt;&lt;p&gt;Click on the play button, you might have got the required files&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1762073471671290548-5839081867899949536?l=videocodecs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://videocodecs.blogspot.com/feeds/5839081867899949536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://videocodecs.blogspot.com/2009/02/tips.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/5839081867899949536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/5839081867899949536'/><link rel='alternate' type='text/html' href='http://videocodecs.blogspot.com/2009/02/tips.html' title='Tips'/><author><name>Madhavan</name><uri>http://www.blogger.com/profile/13746594802761053360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_6kpJik-Ua70/SY4L4svaGJI/AAAAAAAAAfE/tdRXOI9h2R4/s72-c/graph-edit-1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1762073471671290548.post-5001297967741786008</id><published>2009-02-07T14:25:00.000-08:00</published><updated>2010-02-18T01:52:52.598-08:00</updated><title type='text'>Commonly used C code DSP applications</title><content type='html'>&lt;span style="font-weight: bold;"&gt;&lt;div&gt;&lt;span style="font-weight: bold;"&gt;Finding Endianess:&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="font-weight: bold;"&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;enum byte_order { unknown, bigEndian, littleEndian };&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;static enum byte_order determine_endianess (void)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;{&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;char s[sizeof (long) + 1];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;union {&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;long longval;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;char charval[sizeof (long)];&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;} probe;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;probe.longval = 0x41424344L;&lt;/span&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;/* ABCD in ASCII */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;strncpy (s, probe.charval, sizeof (long));&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;s[sizeof (long)] = '\0';&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;/* fprintf( stderr, "byte order is %s\n", s ); */&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;if (strcmp (s, "ABCD") == 0)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;return bigEndian;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;else if (strcmp (s, "DCBA") == 0)&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;return littleEndian;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt; &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;else&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-tab-span" style="white-space:pre"&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;  &lt;/span&gt;&lt;/span&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;return unknown;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;}&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="font-weight: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;/span&gt;&lt;/div&gt;Endianess conversion&lt;/span&gt;: Big Endian to Little Endian&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;C code:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#define BE2LE_32(_x)   \       &lt;br /&gt;((_x) &lt;&lt;&gt;&gt; 8 &amp;amp; 0x0000FF00     \&lt;br /&gt;| (_x) &gt;&gt; 24 &amp;amp; 0x000000FF)&lt;br /&gt;                             &lt;br /&gt;#define BE2LE_16(_x)            ((_x) &lt;&lt;&gt;&gt; 8 &amp;amp; 0x00FF)&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Saturation&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#define SATURATE(x, max, min) \&lt;br /&gt;                  ( ((x) &gt; (max)) ? (max) : ((x) &lt; (min)) ? (min) : (x) )  #define TRUNCATE(x, Y, Z, DATA_SIZE) \   (((((x) &gt;&gt; ((Y##_##F) - (Z##_##F)))) &lt;&lt; ((DATA_SIZE) - (Z##_##W) - (Z##_##F))) &gt;&gt; ((DATA_SIZE) - (Z##_##W) - (Z##_##F)))&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;/*    &lt;--Frac part trunc---&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;/*  &lt;---------------------Truncating the MSB----------------------------------&gt;*/&lt;/span&gt;&lt;br /&gt;&lt;span style="color: rgb(0, 153, 0);"&gt;/* &lt;----------------------------------Sign Extending to do the arithmetic operations in C------------------------------&gt; */&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#define RND_OFF(x, Y, Z)  \&lt;br /&gt;          ( ((x) + (1 &lt;&lt; (((Y##_##F) - (Z##_##F)) - 1))) &gt;&gt; ((Y##_##F) - (Z##_##F)) )&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;USAGE:&lt;/span&gt;&lt;br /&gt;definition Q1:&lt;br /&gt;#define Q_FMT1_W   3         // whole part&lt;br /&gt;#define Q_FMT1_F   14        // fractional part&lt;br /&gt;&lt;br /&gt;definition Q2:&lt;br /&gt;#define Q_FMT2_W    3        // whole part&lt;br /&gt;#define Q_FMT2_F     7       // fractional part&lt;br /&gt;&lt;br /&gt;Rounding off:&lt;br /&gt;RND_OFF(val, Q_FMT1, Q_FMT2);&lt;br /&gt;&lt;br /&gt;Saturate:&lt;br /&gt;SATURATE(val, 255, -256);&lt;br /&gt;&lt;br /&gt;Truncate:&lt;br /&gt;TRUNCATE(val, Q_FMT1, Q_FMT2, 31);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1762073471671290548-5001297967741786008?l=videocodecs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://videocodecs.blogspot.com/feeds/5001297967741786008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://videocodecs.blogspot.com/2009/02/commonly-used-c-code-dsp-applications.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/5001297967741786008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/5001297967741786008'/><link rel='alternate' type='text/html' href='http://videocodecs.blogspot.com/2009/02/commonly-used-c-code-dsp-applications.html' title='Commonly used C code DSP applications'/><author><name>Madhavan</name><uri>http://www.blogger.com/profile/13746594802761053360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1762073471671290548.post-1637393403551004976</id><published>2008-09-02T13:58:00.001-07:00</published><updated>2008-09-02T15:05:12.426-07:00</updated><title type='text'>TI Davinci, the video platform</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;One of the latest platforms provided by TI (Texas Instruments) for video phone applications. Its a dual core platform, with C64x+ CPU for the DSP applications and ARM 9 as general purpose processor. The C64x+ is clocked around 600MHz and the ARM 9 around 300Mhz. Davinci 6467  is the latest of the series. You can choose the OS to be run on ARM and that on DSP is DSP BIOS, TI's proprietry.&lt;br /&gt;&lt;br /&gt;The most attractive features of the platform are a resizer module for image enhancements (mainly for rescaling). It supports 1/4x to 4x scaling, the frame buffer- On Screen Display, Video buffer &amp;amp; the transparency window. Transparency window is used set the transparency b/w OSD and Video buffer. Corresponding to each pixel there is a 3 bit value associated. The osd support the 565 format and Video Buffer supports UYVY format, in effect 16 bits / pixel.&lt;br /&gt;&lt;br /&gt;It supports the various Video standards like NTSC, PAL, S-video. Also the drivers are complined with V4L2 format.&lt;br /&gt;&lt;br /&gt;Also Ti have  most of of latest codecs, video as well speech optimized for the same. So its is very easy to start with the development of the video phone application&lt;br /&gt;&lt;br /&gt;A &lt;a href="http://docs.google.com/Present?revision=_latest&amp;amp;fs=true&amp;amp;docID=ddb92nxm_15fwkqq7dm"&gt;link&lt;/a&gt; to Cache and DMA architecture of C64x+.&lt;br /&gt;Here is &lt;a href="http://docs.google.com/Present?revision=_latest&amp;amp;fs=true&amp;amp;docID=ddb92nxm_38p6hc58cm"&gt;another link&lt;/a&gt; to an introduction to optimization if C64x+.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1762073471671290548-1637393403551004976?l=videocodecs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://videocodecs.blogspot.com/feeds/1637393403551004976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://videocodecs.blogspot.com/2008/09/ti-davinci-video-platform.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/1637393403551004976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/1637393403551004976'/><link rel='alternate' type='text/html' href='http://videocodecs.blogspot.com/2008/09/ti-davinci-video-platform.html' title='TI Davinci, the video platform'/><author><name>Madhavan</name><uri>http://www.blogger.com/profile/13746594802761053360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1762073471671290548.post-9159889214122633711</id><published>2007-05-09T11:49:00.000-07:00</published><updated>2008-12-09T19:23:30.538-08:00</updated><title type='text'>Video Fundamentals</title><content type='html'>&lt;a name="_Toc166295031"&gt;&lt;/a&gt;&lt;a name="_Toc165459091"&gt;&lt;/a&gt;&lt;a name="_Toc165459024"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;br /&gt;1.1&lt;span style=""&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;   &lt;v:stroke joinstyle="miter"&gt;   &lt;v:formulas&gt;    &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;    &lt;v:f eqn="sum @0 1 0"&gt;    &lt;v:f eqn="sum 0 0 @1"&gt;    &lt;v:f eqn="prod @2 1 2"&gt;    &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;    &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;    &lt;v:f eqn="sum @0 0 1"&gt;    &lt;v:f eqn="prod @6 1 2"&gt;    &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;    &lt;v:f eqn="sum @8 21600 0"&gt;    &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;    &lt;v:f eqn="sum @10 21600 0"&gt;   &lt;/v:formulas&gt;   &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;   &lt;o:lock ext="edit" aspectratio="t"&gt;  &lt;/v:shapetype&gt;&lt;v:shape id="_x0000_s1037" type="#_x0000_t75" style="'position:absolute;"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image001.png" title=""&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=""&gt;  &lt;table align="left" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;&lt;tr&gt;    &lt;td height="0" width="96"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;br /&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Video is an illusion that makes use of the properties of eye. Our eye has a peculiar property that image sensed by eye persists for &lt;span style="position: relative; top: 5pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1025" type="#_x0000_t75" style="'width:15pt;height:15.75pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image003.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/chinnu/LOCALS%7E1/Temp/msohtml1/01/clip_image004.gif" shapes="_x0000_i1025" height="21" width="20" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1025" drawaspect="Content" objectid="_1240261619"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;sup&gt;th &lt;/sup&gt;of a second:&lt;span style=""&gt;  &lt;/span&gt;ie our eye cannot notice the change of scene in this period. It’s called persistence of vision. &lt;span style=""&gt; &lt;/span&gt;We can make the illusion of continuity of a scene by capturing just more than 16 pictures of the visual in a second and displaying the same on a screen in the same time period. It’s the basic principle behind video rendering. Each picture captured is called frames. Therefore a frame rate more than 16 is convenient. Usually we go for 25 fps or more. In the earlier television system we get the image by projecting an electron beam over a phosphor screen. The phosphor screen is divided into 525 lines in case PAL TV system or 625 lines in the case of NTSC system. The electron beam sequentially scans the 525/625 lines from left to right.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNfmtZCMCI/AAAAAAAAADc/2DkxsWLka4w/s1600-h/fig1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNfmtZCMCI/AAAAAAAAADc/2DkxsWLka4w/s320/fig1.JPG" alt="" id="BLOGGER_PHOTO_ID_5062995524718833698" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                                    &lt;/span&gt;&lt;b style=""&gt;Figure 2.1&lt;/b&gt; Progressive scan&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;When the electron beams, intensity modulated with the video signal, incidents on the phosphor screen, it starts glowing. The intensity of glow depends on the strength of video signal. The way of scanning in the sequential mode is called Progressive scan (Figure 2.1).&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;In the case of Progressive scanning, there is a finite delay, 0.04s, between successive frames.The point on the phosphor screen corresponding to an image should glow for that much time. But usually the screen has a poor response and results in flicker: ie the image fades and screen tends to become black. An ideal solution to remove the flickering problem is to increase the frame rate. But it will result in the increased bandwidth usage as the amount of data corresponding to those frames increases. Another solution for this problem is the interlaced scanning. A frame is divided into two fields, odd and even. Odd field is obtained by grouping the odd lines in the frame together and even field are obtained by grouping the even lines in the frame. Scanning the fields at different instant avoids the problem of flickering to an extent and doesn’t introduce burden of bandwidth hike. The screen refresh gets doubled. This type of scanning is called interlaced scanning, illustrated in Figure 2.2.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1038" type="#_x0000_t75" style="'position:absolute;margin-left:18pt;margin-top:12.6pt;"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image005.png" title="fig1"&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=""&gt;  &lt;table cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;&lt;tr&gt;    &lt;td height="0" width="24"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;&lt;br /&gt;&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNf7tZCMDI/AAAAAAAAADk/ujUC6IzyqEM/s1600-h/fig2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNf7tZCMDI/AAAAAAAAADk/ujUC6IzyqEM/s320/fig2.JPG" alt="" id="BLOGGER_PHOTO_ID_5062995885496086578" border="0" /&gt;&lt;/a&gt;&lt;/td&gt;&lt;td style="vertical-align: top;"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;br /&gt;&lt;b style=""&gt;&lt;span style=""&gt;                                                &lt;/span&gt;Figure 2.2&lt;/b&gt; Interlaced scan&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h2 style="text-align: justify;"&gt;&lt;a name="_Toc166295032"&gt;&lt;/a&gt;&lt;a name="_Toc165459092"&gt;&lt;/a&gt;&lt;a name="_Toc165459025"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.2&lt;span style=""&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Video Coding Concepts&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Data compression is achieved by removing &lt;i&gt;redundancy&lt;/i&gt;, i.e. components that are not necessary for faithful reproduction of the data. Many types of data contain &lt;i&gt;statistical &lt;/i&gt;redundancy and can be effectively compressed using &lt;i&gt;lossless &lt;/i&gt;compression, so that the reconstructed data at the output of the decoder is a perfect copy of the original data. Unfortunately, lossless compression of image and video information gives only a moderate amount of compression. The best that can be achieved with current lossless image compression standards is a compression ratio of around 3–4 times. &lt;i&gt;Lossy &lt;/i&gt;compression is necessary to achieve higher compression. In a lossy compression system, the decompressed data is not identical to the source data and much higher compression ratios can be achieved at the expense of a loss of visual quality. Lossy video compression systems are based on the principle of removing &lt;i&gt;subjective &lt;/i&gt;redundancy, elements of the image or video sequence that can be removed without significantly affecting the viewer’s perception of visual quality. Compression results in higher computational complexities.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;                            &lt;/span&gt;&lt;span style=""&gt;Most video coding methods exploit both &lt;/span&gt;&lt;i&gt;&lt;span style=""&gt;temporal &lt;/span&gt;&lt;/i&gt;&lt;span style=""&gt;and &lt;/span&gt;&lt;i&gt;&lt;span style=""&gt;spatial &lt;/span&gt;&lt;/i&gt;&lt;span style=""&gt;redundancy to achieve compression. In the temporal domain, there is usually a high correlation (similarity) between frames of video that are captured at around the same time, especially if the temporal sampling rate (the frame rate) is high. In the spatial domain, &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1026" type="#_x0000_t75" style="'position:absolute;margin-left:18pt;" wrapcoords="-41 0 -41 21542 21600 21542 21600 0 -41 0"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image007.gif" title="fig1"&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=""&gt;  &lt;table cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;&lt;tr&gt;    &lt;td height="0" width="24"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;/tbody&gt;&lt;/table&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;br /&gt;&lt;span style=""&gt;there is usually a high correlation between pixels (samples) that are close to each other, i.e. the values of neighboring samples are often very similar. Sp&lt;/span&gt;&lt;span style=""&gt;atial and temporal redundancy are illustrated in the Figu&lt;/span&gt;&lt;span style=""&gt;re 2.3&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNgM9ZCMEI/AAAAAAAAADs/fB8UUOPSRzs/s1600-h/fig3.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNgM9ZCMEI/AAAAAAAAADs/fB8UUOPSRzs/s320/fig3.JPG" alt="" id="BLOGGER_PHOTO_ID_5062996181848830018" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;b style=""&gt;Figure 2.3&lt;/b&gt; Spatial &amp; temporal correlation in a video sequence&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h2&gt;&lt;a name="_Toc166295033"&gt;&lt;/a&gt;&lt;a name="_Toc165459093"&gt;&lt;/a&gt;&lt;a name="_Toc165459026"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.3&lt;span style=""&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Spatial Mode&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style="font-style: normal;font-size:12;" &gt;l&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-style: normal;font-size:12;" &gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;Due to the temporal correlation of frames, successive frames can be predicted from the previous one. For this we need reference frames. Reference frames are encoded in a very similar fashion as explained in section 1.5. &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h2 style="margin-left: 0in; text-indent: 0in;"&gt;&lt;a name="_Toc166295034"&gt;&lt;/a&gt;&lt;a name="_Toc165459094"&gt;&lt;/a&gt;&lt;a name="_Toc165459027"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.4&lt;span style=""&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Temporal Model&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1027" type="#_x0000_t75" style="'position:absolute;left:0;" wrapcoords="-38 0 -38 21559 21600 21559 21600 0 -38 0"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image008.png" title="fig1"&gt;  &lt;w:wrap type="square"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;           &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;The goal of the temporal model is to reduce redundancy between transmitted frames by forming a predicted frame and subtracting this from the current frame. The output of this process is a residual (difference) frame. The more accurate the prediction process, the &lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;                                    &lt;/span&gt;&lt;b style=""&gt;Figure 2.4 &lt;/b&gt;Difference of frame-1 and frame-2&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;less energy is contained in the residual frame. The residual frame is encoded &lt;b style=""&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;and sent to the decoder which re-creates the predicted frame, adds the decoded residual and reconstructs the current frame. The predicted frame is created from one or more past or future frames (‘reference frames’). The accuracy of the prediction can usually be improved by compensating for motion between the reference frame(s) and the current frame.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;The simplest method of temporal prediction is to use the previous frame as the predictor for the current frame. Two successive frames from a video sequence are shown in Frame 1 and Frame 2 in Figure 2.4.. Frame 1 is used as a predictor for frame 2 and the residual formed by subtracting the predictor (frame 1) from the current frame (frame 2) is shown in Figure 2.4.&lt;span style=";font-family:Times-Roman;font-size:10;"  &gt; &lt;/span&gt;The obvious problem with this simple prediction is that a lot of energy remains in the residual frame (indicated by the light and dark areas) and this means that there is still a significant amount of information to compress after temporal prediction. Much of the residual energy is due to object movements between the two frames and a better prediction may be formed by &lt;i&gt;compensating &lt;/i&gt;for motion between the two frames.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h2 style="margin-left: 0in; text-align: justify; text-indent: 0in;"&gt;&lt;a name="_Toc166295035"&gt;&lt;/a&gt;&lt;a name="_Toc165459095"&gt;&lt;/a&gt;&lt;a name="_Toc165459028"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.5&lt;span style=""&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1028" type="#_x0000_t75" style="'position:absolute;left:0;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image010.png" title="fig1"&gt;  &lt;w:wrap type="square"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;Optic Flow&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;&lt;h2 style="margin-left: 0in; text-align: justify; text-indent: 0in;"&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Changes between video frames may be caused by o&lt;/p&gt; &lt;p class="MsoNormal" style=""&gt;bject motion (rigid object motion, for&lt;/p&gt;&lt;h2 style="margin-left: 0in; text-align: justify; text-indent: 0in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_6kpJik-Ua70/RkNgddZCMFI/AAAAAAAAAD0/ChAjU_FreNA/s1600-h/fig4.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_6kpJik-Ua70/RkNgddZCMFI/AAAAAAAAAD0/ChAjU_FreNA/s320/fig4.JPG" alt="" id="BLOGGER_PHOTO_ID_5062996465316671570" border="0" /&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style=""&gt; &lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style=""&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal" style=""&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNgxtZCMGI/AAAAAAAAAD8/RFuIdAfQc-o/s1600-h/fig5.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNgxtZCMGI/AAAAAAAAAD8/RFuIdAfQc-o/s320/fig5.JPG" alt="" id="BLOGGER_PHOTO_ID_5062996813209022562" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;                                                &lt;/span&gt;&lt;b style=""&gt;Figure 2.5&lt;/b&gt; Optical Flow&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;example a moving car, and deformable object motion, for example a moving arm), camera motion (panning, tilt, zoom, rotation), uncovered regions (for example, a portion of the scene background uncovered by a moving object) and lighting changes. With the exception of uncovered regions and lighting changes, these differences correspond to pixel movements between frames. It is possible to estimate the trajectory of each pixel between successive video frames, producing a field of pixel trajectories known as the &lt;i&gt;optical flow &lt;/i&gt;(optic flow). Figure 2.5 shows the optical flowfield for the frames 1 and 2 of Figure 2.4. The complete field contains a flow vector for every pixel position but for clarity, the field is sub-sampled so that only the vector for every 2nd pixel is shown. &lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;If the optical flow field is accurately known, it should be possible to form an accurate prediction of most of the pixels of the current frame by moving each pixel from the reference frame along its optical flow vector. However, this is not a practical method of motion compensation for several reasons. An accurate calculation of optical flow is very computationally intensive (the more accurate methods use an iterative procedure for every pixel) and it would be necessary to send the optical flow vector for every pixel to the decoder.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h2 style="text-align: justify;"&gt;&lt;a name="_Toc166295036"&gt;&lt;/a&gt;&lt;a name="_Toc165459096"&gt;&lt;/a&gt;&lt;a name="_Toc165459029"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.6&lt;span style=""&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Block&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;-based Motion Estimation and Compensation&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;/span&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;A practical and widely-used method of motion compensation is to compensate for movement of rectangular sections or ‘blocks’ of the current frame. The following procedure is carried out for each block of &lt;span style=""&gt;M &lt;/span&gt;× &lt;span style=""&gt;N&lt;i&gt; &lt;/i&gt;&lt;/span&gt;samples in the current frame:&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;1. Search an area in the reference frame (past or future frame, previously coded and transmitted) to find a ‘matching’ &lt;span style=""&gt;M &lt;/span&gt;× &lt;span style=""&gt;N&lt;/span&gt;-sample region. This is carried out by comparing the &lt;i&gt;M &lt;/i&gt;× &lt;i&gt;N &lt;/i&gt;block in the current frame with some or all of the possible &lt;span style=""&gt;M &lt;/span&gt;× &lt;span style=""&gt;N&lt;i&gt; &lt;/i&gt;&lt;/span&gt;regions in the search area (usually a region centered on the current block position) and finding the region that gives the ‘best’ match. A popular matching criterion is the energy in the residual formed by subtracting the candidate region from the current &lt;span style=""&gt;M &lt;/span&gt;× &lt;span style=""&gt;N&lt;i&gt; &lt;/i&gt;&lt;/span&gt;block, so that the candidate region that minimizes the residual energy is chosen as the best match. This process of finding the best match is known as &lt;i&gt;motion estimation&lt;/i&gt;.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;2. The chosen candidate region becomes the predictor for the current &lt;i&gt;M &lt;/i&gt;× &lt;i&gt;N &lt;/i&gt;block and is subtracted from the current block to form a residual &lt;i&gt;M &lt;/i&gt;× &lt;i&gt;N &lt;/i&gt;block (&lt;i&gt;motion compensation, MC&lt;/i&gt;).&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;3. The residual block is encoded and transmitted and the offset between the current block and the position of the candidate region (&lt;i&gt;motion vector, MV&lt;/i&gt;) is also transmitted. The decoder uses the received motion vector to re-create the predictor region and decodes the residual block, adds it to the predictor and reconstructs a version of the original block.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;Block-based motion compensation is popular for a number of reasons. It is relatively straight forward and computationally tractable, it fits well with rectangular video frames and with block-based image transforms (e.g. the Discrete Cosine Transform, see later) and it provides a reasonably effective temporal model for many video sequences. There are however a number of disadvantages, for example ‘real’ objects rarely have neat edges that match rectangular boundaries, objects often move by a fractional number of pixel positions between frames and many types of object motion are hard to compensate for using block-based methods (e.g. deformable objects, rotation and warping, complex motion such as a cloud of smoke). Despite these disadvantages, block-based motion compensation is the basis of the temporal model used by all current video coding standards. &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h4&gt;&lt;a name="_Toc165459097"&gt;&lt;/a&gt;&lt;a name="_Toc165459030"&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;1.6.1.1&lt;span style=""&gt;       &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Motion Compensated Prediction of Macroblock&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Image is divided into macroblocks (MB) of size N × N. By default, &lt;span style=""&gt;N&lt;i&gt; &lt;/i&gt;&lt;/span&gt;= 16 for luminance images. For chrominance images &lt;span style=""&gt;N&lt;i&gt; &lt;/i&gt;&lt;/span&gt;= 8 if 4:2:0 chroma subsampling (explained in section 1.6.2) is adopted&lt;span style=";font-family:LCMSS8;font-size:16;"  &gt;. &lt;/span&gt;H.264 uses a variant of this. Motion compensation is performed at the macroblock level. Macroblock partitioning is shown in Figure 2.6. The general rule of prediction is as follows:&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;- The current image frame is referred to as &lt;i style=""&gt;t&lt;span style=""&gt;arget frame&lt;/span&gt;&lt;/i&gt;.&lt;span style=""&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;&lt;span style=""&gt;- &lt;/span&gt;A match (only for Y macroblock) is sought between the macroblock in the Target Frame and the most similar macroblock in previous and/or future frame(s) (referred to as r&lt;i&gt;eference frame(s)&lt;/i&gt;).&lt;span style=""&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style=""&gt;- &lt;/span&gt;The displacement of the reference macroblock to the target macroblock is called a &lt;i&gt;motion vector, &lt;/i&gt;&lt;span style=""&gt;MV&lt;/span&gt;.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;- Residual is found in case of Y macroblock as well as Cb &amp; Cr macroblocks.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;- &lt;span style=""&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;Figure 2.7 shows the case of &lt;i&gt;forward prediction &lt;/i&gt;in which the reference&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;frame is taken to be a previous frame.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;- MV search is usually limited to a small immediate neighborhood - both&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;horizontal and vertical displacements in the range [&lt;i&gt;−p, p&lt;/i&gt;]. This makes a search window of size (2&lt;i&gt;p &lt;/i&gt;+ 1) × (2&lt;i&gt;p &lt;/i&gt;+ 1).&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1029" type="#_x0000_t75" style="'position:absolute;left:0;" wrapcoords="-37 0 -37 21465 21600 21465 21600 0 -37 0"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image012.emz" title=""&gt;  &lt;w:wrap type="tight"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNg99ZCMHI/AAAAAAAAAEE/N8mX4cIdbaE/s1600-h/fig6.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNg99ZCMHI/AAAAAAAAAEE/N8mX4cIdbaE/s320/fig6.JPG" alt="" id="BLOGGER_PHOTO_ID_5062997023662420082" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;Figure 2.6&lt;/b&gt; Size of macroblock for prediction&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1030" type="#_x0000_t75" style="'position:absolute;margin-left:0;margin-top:8.05pt;width:431.25pt;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image014.emz" title=""&gt;  &lt;w:wrap type="square"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNiJtZCMII/AAAAAAAAAEM/-t2Zs4WjaeA/s1600-h/fig7.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNiJtZCMII/AAAAAAAAAEM/-t2Zs4WjaeA/s320/fig7.JPG" alt="" id="BLOGGER_PHOTO_ID_5062998325037510786" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;b style=""&gt;Figure 2.7&lt;/b&gt; Motion Compensated prediction of Macroblock&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;General Rule for searching motion vectors&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;Parameter MAD (Mean Absolute Differnce) is defined as&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;MAD (&lt;i style=""&gt;i, j&lt;/i&gt;) = &lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt;&lt;span style="'mso-spacerun:yes'"&gt; &lt;/span&gt;eq \f(1,N&lt;sup&gt;2&lt;/sup&gt;) &lt;![endif]--&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt;&lt;span style="position: relative; top: 14pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1026" type="#_x0000_t75" style="'width:38.25pt;height:33.75pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image016.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/chinnu/LOCALS%7E1/Temp/msohtml1/01/clip_image017.gif" shapes="_x0000_i1026" height="45" width="51" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1026" drawaspect="Content" objectid="_1240261621"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;| C(&lt;i style=""&gt;x + k, y + l&lt;/i&gt;) – &lt;i&gt;R&lt;/i&gt; (&lt;i&gt;x &lt;/i&gt;+ &lt;i style=""&gt;i&lt;span style=""&gt; &lt;/span&gt;&lt;/i&gt;+ &lt;i&gt;k,&lt;span style=""&gt;  &lt;/span&gt;y&lt;span style=""&gt;  &lt;/span&gt;&lt;/i&gt;+ &lt;i&gt;j&lt;span style=""&gt;  &lt;/span&gt;&lt;/i&gt;+ &lt;i&gt;l&lt;/i&gt;)|&lt;span style=""&gt;      &lt;/span&gt;&lt;b style=""&gt;&lt;span style=""&gt; &lt;/span&gt;eqn 2.1&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;where&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style=""&gt;N&lt;i&gt; -&lt;/i&gt;&lt;/span&gt; size of the macroblock,&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;i&gt;k &lt;/i&gt;and &lt;i&gt;l - &lt;/i&gt;&lt;span style=""&gt; &lt;/span&gt;indices for pixels in the macroblock,&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;i&gt;i &lt;/i&gt;and &lt;i&gt;j -&lt;/i&gt; horizontal and vertical displacements,&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;i&gt;C&lt;/i&gt;(&lt;i&gt;x &lt;/i&gt;+ &lt;i&gt;k, y &lt;/i&gt;+ &lt;i&gt;l&lt;/i&gt;) - pixels in macroblock in Target frame,&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;i&gt;R&lt;/i&gt;(&lt;i&gt;x &lt;/i&gt;+ &lt;i&gt;i &lt;/i&gt;+ &lt;i&gt;k, y &lt;/i&gt;+ &lt;i&gt;j &lt;/i&gt;+ &lt;i&gt;l&lt;/i&gt;) - pixels in macroblock in Reference frame&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;The search is to find a vector (&lt;i&gt;i, j&lt;/i&gt;) as the motion vector &lt;b&gt;MV &lt;/b&gt;= (&lt;b&gt;u, v&lt;/b&gt;), such that &lt;i&gt;MAD&lt;/i&gt;(&lt;i style=""&gt;i&lt;span style=""&gt;, &lt;span style=""&gt; &lt;/span&gt;j&lt;/span&gt;&lt;/i&gt;) is minimum:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;(&lt;i&gt;u, v&lt;/i&gt;) = { (&lt;i&gt;i, &lt;span style=""&gt; &lt;/span&gt;j&lt;/i&gt;) |&lt;i&gt; MAD&lt;/i&gt;(&lt;i&gt;i, &lt;span style=""&gt; &lt;/span&gt;j&lt;/i&gt;) is minimum, &lt;i style=""&gt;i&lt;span style=""&gt; &lt;/span&gt;&lt;/i&gt;&lt;a name="OLE_LINK4"&gt;&lt;/a&gt;&lt;a name="OLE_LINK3"&gt;&lt;span style=""&gt;&lt;span style=""&gt;ε&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;i&gt; &lt;/i&gt;[&lt;i&gt;−p, p&lt;/i&gt;]&lt;i&gt;; j &lt;/i&gt;&lt;span style=""&gt;ε&lt;i&gt; &lt;/i&gt;[&lt;i&gt;−p; p&lt;/i&gt;&lt;/span&gt;] }&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3 style="margin-left: 0in; text-align: justify; text-indent: 0in;"&gt;&lt;a name="_Toc166295037"&gt;&lt;/a&gt;&lt;a name="_Toc165459098"&gt;&lt;/a&gt;&lt;a name="_Toc165459031"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.6.2&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Frame Coding&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;RAW video can be viewed as a sequence of frames in the display rate of 25 frames per second or above. Encoder converts these frames as Intra-frames (&lt;b&gt;I-frames),&lt;/b&gt;&lt;span style=""&gt;  &lt;/span&gt;Inter-frames (&lt;b&gt;P-frames) &lt;/b&gt;or Bidirectional frames&lt;b style=""&gt; (B-frames)&lt;/b&gt;. Transform coding method similar to JPEG is applied within each I-frame, hence the name “Intra”. P-frames are not independent, coded by a forward predictive coding method (prediction from a previous P-frame is allowed - not just from a previous I-frame). B frame is predicted from more than one frame usually from a previous and a future frame.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1027" type="#_x0000_t75" style="'width:431.25pt;height:176.25pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image018.png" title="fig1"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_6kpJik-Ua70/RkNipNZCMJI/AAAAAAAAAEU/MZqowyIDo8c/s1600-h/fig8.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_6kpJik-Ua70/RkNipNZCMJI/AAAAAAAAAEU/MZqowyIDo8c/s320/fig8.JPG" alt="" id="BLOGGER_PHOTO_ID_5062998866203390098" border="0" /&gt;&lt;/a&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;                                                &lt;/span&gt;Figure 2.8 &lt;/b&gt;&lt;span style=""&gt; &lt;/span&gt;I-frame Coding&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;&lt;span style=""&gt;I-frame coding is depicted in figure 2.8. Here Macroblocks&lt;b&gt; &lt;/b&gt;&lt;/span&gt;are of size 16 ×&lt;i&gt; &lt;/i&gt;16 pixels for the Y frame, and 8 ×&lt;i&gt; &lt;/i&gt;8 for Cb and Cr frames, since 4:2:0 chroma subsampling is apllied. A macroblock consists of four Y, one Cb, and one Cr 8 × 8 blocks.&lt;i&gt; &lt;/i&gt;For each 8 ×&lt;i&gt; &lt;/i&gt;8 block a DCT transform is applied, the DCT coefficients then go through quantization zigzag scan and entropy coding.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;P-frame coding is based on Motion Compensation. For each macroblock in the Target frame, a motion vector is allocated. &lt;span style=""&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;After the prediction, a &lt;i&gt;difference macroblock &lt;/i&gt;is derived to measure the &lt;i&gt;prediction error&lt;/i&gt;. Each of these 8 × 8 blocks go through DCT, quantization, zigzag scan and entropy coding procedures. The P-frame coding encodes the difference macroblock (not the Target macroblock itself). Sometimes, a good match cannot be found, i.e., the prediction error exceeds a certain acceptable level. The MB itself is then encoded (treated as an Intra MB) and in this case it is termed a &lt;i&gt;non-motion compensated MB&lt;/i&gt;. For motion vector, the difference &lt;span style=""&gt;MVD &lt;/span&gt;is sent for entropy coding. Figure 2.9 gives an overview on P-frame coding.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1031" type="#_x0000_t75" style="'position:absolute;left:0;text-align:left;margin-left:0;margin-top:22.8pt;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image020.gif" title="fig1"&gt;  &lt;w:wrap type="square"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNi7tZCMKI/AAAAAAAAAEc/tudLMGnG3bQ/s1600-h/fig9.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNi7tZCMKI/AAAAAAAAAEc/tudLMGnG3bQ/s320/fig9.JPG" alt="" id="BLOGGER_PHOTO_ID_5062999184030970018" border="0" /&gt;&lt;/a&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;b style=""&gt;Figure 2.9&lt;/b&gt; P-frame coding&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;Motion Compensation based B-frame coding method is illustrated in Figure. 2.10.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Each Macroblock from a B-frame will have up to &lt;i&gt;two &lt;/i&gt;motion vectors (MV’s) (one from the forward and one from the backward prediction). If its matching in both directions, then two MVs will be sent and the two corresponding matching MBs are averaged (indicated by `%' in the figure 2.10) before comparing to the Target MB for generating the prediction error. If an acceptable match can be found in only one of the reference frames, then only one MV and its corresponding MB will be used from either the forward or backward prediction.&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1043" type="#_x0000_t75" style="'position:absolute;margin-left:0;margin-top:0;"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image021.png" title="fig1"&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_6kpJik-Ua70/RkNjSdZCMLI/AAAAAAAAAEk/onEJK4RTD60/s1600-h/fig10.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_6kpJik-Ua70/RkNjSdZCMLI/AAAAAAAAAEk/onEJK4RTD60/s320/fig10.JPG" alt="" id="BLOGGER_PHOTO_ID_5062999574872993970" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1039" type="#_x0000_t75" style="'position:absolute;margin-left:36pt;margin-top:25.95pt;"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image023.emz" title=""&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=""&gt;  &lt;table cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;&lt;tr&gt;    &lt;td height="0" width="48"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;br /&gt;&lt;b style=""&gt;&lt;span style=""&gt;                                                &lt;/span&gt;Figure 2.10 &lt;/b&gt;B-frame Coding&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_6kpJik-Ua70/RkNjyNZCMMI/AAAAAAAAAEs/HeaEHqjggOQ/s1600-h/fig11.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_6kpJik-Ua70/RkNjyNZCMMI/AAAAAAAAAEs/HeaEHqjggOQ/s320/fig11.JPG" alt="" id="BLOGGER_PHOTO_ID_5063000120333840578" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;Figure&lt;/b&gt; &lt;b style=""&gt;2.11&lt;/b&gt; 4:2:0 Subsampling in the case of interlaced video&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3 style="text-align: justify;"&gt;&lt;a name="_Toc166295038"&gt;&lt;/a&gt;&lt;a name="_Toc165459099"&gt;&lt;/a&gt;&lt;a name="_Toc165459032"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.6.3&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Field Prediction&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Field prediction comes in the case of codecs having an extended support to interlaced video. Chroma subsampling in the case of interlaced video is illustrated in the figure 2.11.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1040" type="#_x0000_t75" style="'position:absolute;left:0;text-align:left;"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image025.gif" title="fig1"&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=""&gt;  &lt;table cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;&lt;tr&gt;    &lt;td height="0" width="36"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNkHtZCMNI/AAAAAAAAAE0/vNxn3yUO3a8/s1600-h/fig12.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNkHtZCMNI/AAAAAAAAAE0/vNxn3yUO3a8/s320/fig12.JPG" alt="" id="BLOGGER_PHOTO_ID_5063000489701028050" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/b&gt;In interlaced video each frame consists of two fields, referred to as the &lt;i&gt;top-field &lt;/i&gt;and the &lt;i&gt;bottom-field&lt;/i&gt;. &lt;b&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/b&gt;In a &lt;i style=""&gt;f&lt;span style=""&gt;rame-picture&lt;/span&gt;&lt;/i&gt;, all scanlines from both fields are interleaved to form a single frame, then divided into 16 x 16 macroblocks and coded using motion compensation.&lt;b&gt; &lt;/b&gt;If each field is treated as a separate picture, then it is called &lt;i style=""&gt;f&lt;span style=""&gt;ield picture&lt;/span&gt;&lt;/i&gt;&lt;span style=";font-family:LCMSS8;font-size:20;"  &gt;.&lt;/span&gt; &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;b style=""&gt;Figure 2.12&lt;/b&gt; Frame picture Vs Field picture&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The common modes of prediction in case of interlaced video:&lt;br /&gt;&lt;b style=""&gt;1)&lt;span style=""&gt;   &lt;/span&gt;&lt;span style=""&gt;Frame Prediction for Frame-pictures&lt;/span&gt;&lt;span style=""&gt;     &lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;span style=""&gt;      &lt;/span&gt;Fields are combined to form frames and prediction is performed for macro blocks of size 16 × 16, in a similar fashion explained as in 2.4.3.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;2&lt;b style=""&gt;)&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt;Field Prediction for Field-pictures&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1041" type="#_x0000_t75" style="'position:absolute;margin-left:18pt;"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image026.gif" title="fig1"&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=""&gt;  &lt;table cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;&lt;tr&gt;    &lt;td height="0" width="24"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;br /&gt;&lt;b&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/b&gt;&lt;span style=""&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;A macroblock size of 16 × 16 from field pictures is used, as in figure 2.13&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNkl9ZCMOI/AAAAAAAAAE8/ey9a7dW9Erc/s1600-h/fig13.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNkl9ZCMOI/AAAAAAAAAE8/ey9a7dW9Erc/s320/fig13.JPG" alt="" id="BLOGGER_PHOTO_ID_5063001009392070882" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Figure 2.13&lt;/b&gt; Field Prediction for field pictures&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;b style=""&gt;3) &lt;span style=""&gt;Field Prediction for Frame-pictures&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;The top field and bottom field of a frame picture are treated separately. Each &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify;"&gt;16 x&lt;i&gt; &lt;/i&gt;16 macroblock (MB) from the target frame picture is split into two 16 x&lt;i&gt; &lt;/i&gt;8 parts, each coming from one field. Field prediction is carried out for these 16 x&lt;i&gt; &lt;/i&gt;8 parts in a manner shown in Figure 2.14&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1042" type="#_x0000_t75" style="'position:absolute;margin-left:0;margin-top:13.85pt;"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image027.png" title="fig1"&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNlb9ZCMPI/AAAAAAAAAFE/lfIQqim5ZTg/s1600-h/fig14.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNlb9ZCMPI/AAAAAAAAAFE/lfIQqim5ZTg/s320/fig14.JPG" alt="" id="BLOGGER_PHOTO_ID_5063001937105006834" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style=""&gt;   &lt;/span&gt;Figure 2.14&lt;span style=""&gt;  &lt;/span&gt;&lt;/b&gt;&lt;span style=""&gt;Field Prediction for frame-pictures&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;&lt;a name="OLE_LINK6"&gt;&lt;/a&gt;&lt;a name="OLE_LINK5"&gt;&lt;span style=""&gt;&lt;b style=""&gt;4) 16 x 8 &lt;span style=""&gt;MC for Field-pictures&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify;"&gt;&lt;span style=""&gt;      &lt;/span&gt;Each 16 x16 macroblock (MB) from the target field picture is split into top and&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in; text-align: justify;"&gt;bottom 16 x&lt;i&gt; &lt;/i&gt;8 halves. Field prediction is performed on each half. This generates two motion vectors for each 16 x16 MB in the P-field picture, and up to four motion vectors for each MB in the B-field picture. This mode is good for a finer MC when motion is rapid and irregular. Figure 2.15 gives an illustration.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;br /&gt;&lt;b style=""&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1028" type="#_x0000_t75" style="'width:6in;height:444.75pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image029.png" title="fig1"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style=""&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNmI9ZCMQI/AAAAAAAAAFM/JlTEKCiYnn4/s1600-h/fig15.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNmI9ZCMQI/AAAAAAAAAFM/JlTEKCiYnn4/s320/fig15.JPG" alt="" id="BLOGGER_PHOTO_ID_5063002710199120130" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;                        &lt;/span&gt;Figur&lt;/b&gt;e&lt;b style=""&gt; 2.15&lt;/b&gt; 16 x 8 &lt;span style=""&gt;motion compensation for field-pictures.&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;5) Dual-Prime for P-pictures&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;Field prediction from each previous field with the same parity (top or bottom) is made. Each motion vector MV&lt;span style=""&gt; &lt;/span&gt;is then used to derive a calculated motion vector CV&lt;span style=""&gt; &lt;/span&gt;in the field with the opposite parity taking into account the temporal scaling and vertical shift between lines in the top and bottom fields. For each MB the pair MV&lt;span style=""&gt; &lt;/span&gt;and CV&lt;span style=""&gt; &lt;/span&gt;yields two preliminary predictions. Their prediction errors are averaged and used as the final prediction error. This mode mimics B-picture prediction for P-pictures without adopting backward prediction (and hence with less encoding delay). This is the only mode that can be used for both frame pictures and field-pictures.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3 style="text-align: justify;"&gt;&lt;a name="_Toc166295039"&gt;&lt;/a&gt;&lt;a name="_Toc165459100"&gt;&lt;/a&gt;&lt;a name="_Toc165459033"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.6.4&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Transform Coding&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;In case of I-frames, the 8 × 8 blocks of Y, Cb and Cr are transform coded. And in case of B-frames and P-frames the residual value obtained from block based motion estimation is transform coded. Figure 2.16 shows the 8 × 8 block division of a residual macroblock for the luma signal in the case of interlaced video. These 8 × 8 blocks are transform coded in a similar manner as in section 1.5.4. Similar is the case for chroma signal.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1044" type="#_x0000_t75" style="'position:absolute;margin-left:.4pt;margin-top:55.75pt;"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image031.png" title="fig2"&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=""&gt;  &lt;table align="left" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;&lt;tr&gt;    &lt;td height="0" width="1"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_6kpJik-Ua70/RkNmfNZCMRI/AAAAAAAAAFU/Rx_MrXUV7yE/s1600-h/fig16.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_6kpJik-Ua70/RkNmfNZCMRI/AAAAAAAAAFU/Rx_MrXUV7yE/s320/fig16.JPG" alt="" id="BLOGGER_PHOTO_ID_5063003092451209490" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;Figure 2.16&lt;/b&gt; Frame and field DCT for a Y macroblock in interlaced video&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3 style="text-align: justify;"&gt;&lt;a name="_Toc166295040"&gt;&lt;/a&gt;&lt;a name="_Toc165459101"&gt;&lt;/a&gt;&lt;a name="_Toc165459034"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.6.5&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Quantization&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;br /&gt;&lt;/b&gt;In the case video coding two quantization tables are used, one for intra-coding and the other for inter-coding in the case of MPEG-1 &amp; MPEG-2. Also another parameter scale called quantization parameter (QP) is defined to use the variants of quantization matrix.&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;Z&lt;i style=""&gt;&lt;sub&gt;ij&lt;/sub&gt;&lt;/i&gt;&lt;sub&gt; &lt;/sub&gt;= Round (&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt; eq \f(Y&lt;i style="'mso-bidi-font-style:"&gt;&lt;sub&gt;ij&lt;/sub&gt;&lt;/i&gt;, Q&lt;sub&gt;1&lt;i style="'mso-bidi-font-style:normal'"&gt;ij&lt;/i&gt; &lt;/sub&gt;× QP) &lt;![endif]--&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt;)&lt;span style=""&gt;                      &lt;/span&gt;&lt;b style=""&gt;eqn 2.2&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;Z&lt;i style=""&gt;&lt;sub&gt;ij&lt;/sub&gt;&lt;/i&gt;&lt;sub&gt; &lt;/sub&gt;= Round (&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt; eq \f(Y&lt;sub&gt;ij &lt;/sub&gt;, Q&lt;sub&gt;2&lt;i style="'mso-bidi-font-style:normal'"&gt;ij &lt;/i&gt;&lt;/sub&gt;× QP) &lt;![endif]--&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt;)&lt;span style=""&gt;                      &lt;/span&gt;&lt;b style=""&gt;eqn 2.3&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-align: justify; text-indent: -0.5in;"&gt;Where Z is the quantized matrix and QP, quantization parameter and Q&lt;sub&gt;1&lt;/sub&gt;, Q&lt;sub&gt;2 &lt;/sub&gt;represents the quantization matix for intra and inter coding respectively.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;The value of QP varies from 1 – 31 and in effect we have more no number of quantization table. The wide range of quantizer step sizes makes it possible for an encoder to control the tradeoff accurately and flexibly between bit rate and quality. &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1033" type="#_x0000_t75" style="'position:absolute;margin-left:99pt;margin-top:8.2pt;width:301.5pt;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image033.gif" title="fig1"&gt;  &lt;w:wrap type="square"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;b style=""&gt;Q&lt;sub&gt;1&lt;/sub&gt;&lt;span style=""&gt;       &lt;/span&gt;=    &lt;/b&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNni9ZCMTI/AAAAAAAAAFk/tBTmRQk_zKk/s1600-h/fig20.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNni9ZCMTI/AAAAAAAAAFk/tBTmRQk_zKk/s320/fig20.JPG" alt="" id="BLOGGER_PHOTO_ID_5063004256387346738" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;                                    &lt;/span&gt;Table 2.1 &lt;/b&gt;The matrix used for intra coding for eqn 1.1&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1034" type="#_x0000_t75" style="'position:absolute;margin-left:99pt;margin-top:4.05pt;width:301.5pt;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image034.gif" title="fig1"&gt;  &lt;w:wrap type="square"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;Q&lt;/b&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNm_tZCMSI/AAAAAAAAAFc/SiuVjaFnq_Y/s1600-h/fig17.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNm_tZCMSI/AAAAAAAAAFc/SiuVjaFnq_Y/s320/fig17.JPG" alt="" id="BLOGGER_PHOTO_ID_5063003650796957986" border="0" /&gt;&lt;/a&gt;&lt;b style=""&gt;&lt;sub&gt;2&lt;span style=""&gt;          &lt;/span&gt;=&lt;/sub&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;                                    &lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Table 2.2 &lt;/b&gt;The matrix used for inter coding for eqn 1.2&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc166295041"&gt;&lt;/a&gt;&lt;a name="_Toc165459102"&gt;&lt;/a&gt;&lt;a name="_Toc165459035"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.6.6&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Zig-Zag Scan&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1032" type="#_x0000_t75" style="'position:absolute;margin-left:0;margin-top:18.65pt;"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image035.png" title="fig1"&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNoI9ZCMUI/AAAAAAAAAFs/Zvivq0vKtD0/s1600-h/fig18.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNoI9ZCMUI/AAAAAAAAAFs/Zvivq0vKtD0/s320/fig18.JPG" alt="" id="BLOGGER_PHOTO_ID_5063004909222375746" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Two different types of reordering for the Transform coded values are found, zig-zag&lt;span style=""&gt;                   &lt;/span&gt;Figure &lt;b style=""&gt;&lt;span style=""&gt;  &lt;/span&gt;2.17&lt;/b&gt; Reordering of quantized transform coefficients.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;found, zig-zag scan for progressive video and another alternate scan for interlaced &lt;span style=""&gt;         &lt;/span&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;video shown in figure 2.17. Refer section 1.5.6.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3 style="text-align: justify;"&gt;&lt;a name="_Toc166295042"&gt;&lt;/a&gt;&lt;a name="_Toc165459103"&gt;&lt;/a&gt;&lt;a name="_Toc165459036"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.6.7&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Run Level Coding&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;The output of the reordering process is an array that typically contains one or more clusters of nonzero coefficients near the start, followed by strings of zero coefficients. The large numbers of zero values are encoded to represent them more compactly, for example by representing the array as a series of (run, level) pairs where &lt;i&gt;run &lt;/i&gt;indicates the number of zeros preceding a nonzero coefficient and &lt;i&gt;level &lt;/i&gt;indicates the signed magnitude of the nonzero coefficient. Higher-frequency DCT coefficients are very often quantized to zero and so a reordered block will usually end in a run of zeros. A special case is required to indicate the final nonzero coefficient in a block, EOB (End of Block). This is called ‘Two-dimensional’ run-level encoding. If ‘Three-dimensional’ run-level encoding is used, each symbol encodes three quantities, &lt;i&gt;run&lt;/i&gt;, &lt;i&gt;level &lt;/i&gt;and &lt;i&gt;last&lt;/i&gt;. Last indicates whether the level is the last non zero value in the linear array.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;u&gt;Example&lt;/u&gt;:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Input array (Zig Zag ordered value)&lt;span style=""&gt;       &lt;/span&gt;: 16,0,0,−3,5,6,0,0,0,0,−7,0,0 . . .&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;2D Coding:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Output values &lt;span style=""&gt;                                      &lt;/span&gt;: (0, 16), (2, −3), (0, 5), (0, 6), (4, −7), (EOB)&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Each of these output values (a run-level pair) is encoded as a separate symbol by the entropy encoder.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;3D coded values are: &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Output values&lt;span style=""&gt;                                       &lt;/span&gt;:(0&lt;i&gt;, &lt;/i&gt;16&lt;i&gt;, &lt;/i&gt;0)&lt;i&gt;, &lt;/i&gt;(2&lt;i&gt;,&lt;/i&gt;−3&lt;i&gt;, &lt;/i&gt;0)&lt;i&gt;, &lt;/i&gt;(0&lt;i&gt;, &lt;/i&gt;5&lt;i&gt;, &lt;/i&gt;0)&lt;i&gt;, &lt;/i&gt;(0&lt;i&gt;, &lt;/i&gt;6&lt;i&gt;, &lt;/i&gt;0)&lt;i&gt;, &lt;/i&gt;(4&lt;i&gt;,&lt;/i&gt;−7&lt;i&gt;, &lt;/i&gt;1)&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The 1 in the final code indicates that this is the last nonzero coefficient in the block&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc166295043"&gt;&lt;/a&gt;&lt;a name="_Toc165459104"&gt;&lt;/a&gt;&lt;a name="_Toc165459037"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.6.8&lt;span style=""&gt;       &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Entropy Encoding&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;br /&gt;The entropy encoder converts a series of symbols representing elements of the video sequence into a compressed bitstream suitable for transmission and storage. In this section we discuss the widely-used entropy coding techniques.&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h4&gt;&lt;a name="_Toc165459105"&gt;&lt;/a&gt;&lt;a name="_Toc165459038"&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;1.6.8.1&lt;span style=""&gt;       &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Variable-length Coding&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;A variable-length encoder maps input symbols to a series of codewords (variable length codes or VLCs). Each codeword may have varying length but each must contain an integral number of bits. Frequently occurring symbols are represented with short VLCs while less common symbols are represented with long VLCs. Over a sufficiently large number of encoded symbols this leads to compression of the data.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h4&gt;&lt;a name="_Toc165459106"&gt;&lt;/a&gt;&lt;a name="_Toc165459039"&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;1.6.8.2&lt;span style=""&gt;       &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Huffman Coding&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Huffman coding assigns a VLC to each symbol based on its probability of occurrence. According to the original scheme proposed by Huffman, it is necessary to calculate the probability of occurrence of each symbol and to construct a set of variable length codewords. Based on this key word we can encode and decode symbols. Since the VLC formed by Huffman algorithm is a prefix code we can easily decode the same to corresponding symbol.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;Consider the probability distribution of MVD (Motion Vector Differences) given in table 2.3.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;table class="Default" style="margin-left: 46.85pt; border-collapse: collapse;" border="0" cellpadding="0" cellspacing="0"&gt;  &lt;tbody&gt;&lt;tr style="height: 12.8pt;"&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;b style=""&gt;&lt;span style="color:black;"&gt;&lt;span style=""&gt; &lt;/span&gt;Vector&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;b style=""&gt;&lt;span style="color:black;"&gt;Probability&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span style="color:black;"&gt;Code&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.8pt;"&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="color:black;"&gt;0&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="color:black;"&gt;0.8&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="color:black;"&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.8pt;"&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="color:black;"&gt;1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="color:black;"&gt;0.08&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="color:black;"&gt;01&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.8pt;"&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="color:black;"&gt;-1&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="color:black;"&gt;0.07&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="color:black;"&gt;001&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 12.8pt;"&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="color:black;"&gt;2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="color:black;"&gt;0.03&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 12.8pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="color:black;"&gt;0001&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt;  &lt;tr style="height: 13.5pt;"&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 13.5pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="color:black;"&gt;-2&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 13.5pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style="text-align: center;" align="center"&gt;&lt;span style="color:black;"&gt;0.02&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;   &lt;td style="padding: 0in 5.4pt; width: 113pt; height: 13.5pt;" valign="top" width="151"&gt;   &lt;p class="MsoNormal" style=""&gt;&lt;span style="color:black;"&gt;0000&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;   &lt;/td&gt;  &lt;/tr&gt; &lt;/tbody&gt;&lt;/table&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;                        &lt;/span&gt;Table 2.3 Code word for vector, based on Huffman Algorithm&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;If vector sequence is (1, -2, 0, 0, 2), then its binary sequence is 010000110001.&lt;span style=""&gt;  &lt;/span&gt;In order to decode the data, the decoder alsomust have a copy of the Huffman code tree (or look-up table). This may be achieved by transmitting the look-up table itself or by sending the list of data and probabilities prior to sending the coded data. Each uniquely-decodeable code is converted back to the original data, for example:&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;01 is decoded as (1)&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;0000 is decoded as (-2)&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;1 is decoded as (0). &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;1 is decoded as (0).&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;0001 is decoded as (2).&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h4&gt;&lt;a name="_Toc165459107"&gt;&lt;/a&gt;&lt;a name="_Toc165459040"&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;1.6.8.3&lt;span style=""&gt;       &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Pre-calculated Huffman-based Coding&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/b&gt;&lt;!--[if gte vml 1]&gt;&lt;v:line id="_x0000_s1035" style="'position:absolute;flip:x" from="-27pt,132pt" to="0,141pt" allowoverlap="f" stroked="f"&gt;  &lt;w:wrap type="square"&gt; &lt;/v:line&gt;&lt;![endif]--&gt;The Huffman coding process has two disadvantages for a practical video CODEC. First, the decoder must use the same codeword set as the encoder. Transmitting the information &lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1036" type="#_x0000_t75" style="'position:absolute;left:0;text-align:left;"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\01\clip_image037.png" title="fig1" cropbottom="379f"&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=""&gt;  &lt;table align="left" cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;&lt;tr&gt;    &lt;td height="0" width="48"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_6kpJik-Ua70/RkNpPdZCMVI/AAAAAAAAAF0/heXYPN5bDoc/s1600-h/fig19.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_6kpJik-Ua70/RkNpPdZCMVI/AAAAAAAAAF0/heXYPN5bDoc/s320/fig19.JPG" alt="" id="BLOGGER_PHOTO_ID_5063006120403153234" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;Table 2.4 Pre-calculated Huffman table used for MPEG-4 Coding&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;contained in the probability table to the decoder would add extra overhead and reduce compression efficiency, particularly for shorter video sequences. Second, the probability table for a large video sequence (required to generate the Huffman tree) cannot be calculated until after the video data is encoded which may introduce an unacceptable delay into the encoding process. For these reasons, recent image and video coding standards define sets of codewords based on the probability distributions of ‘generic’ video material. Such a pre-calculated VLC table used by MPEG-4 Visual (Simple Profile) is shown in table 2.4.&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1762073471671290548-9159889214122633711?l=videocodecs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://videocodecs.blogspot.com/feeds/9159889214122633711/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://videocodecs.blogspot.com/2007/05/video-fundamentals.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/9159889214122633711'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/9159889214122633711'/><link rel='alternate' type='text/html' href='http://videocodecs.blogspot.com/2007/05/video-fundamentals.html' title='Video Fundamentals'/><author><name>Madhavan</name><uri>http://www.blogger.com/profile/13746594802761053360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_6kpJik-Ua70/RkNfmtZCMCI/AAAAAAAAADc/2DkxsWLka4w/s72-c/fig1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1762073471671290548.post-7188659191805576752</id><published>2007-05-08T12:39:00.000-07:00</published><updated>2008-12-09T19:23:37.615-08:00</updated><title type='text'>Image Coding Fundamentals</title><content type='html'>&lt;h2&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.1&lt;span style=""&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;a name="_Toc166295014"&gt;&lt;/a&gt;&lt;a name="_Toc165459073"&gt;&lt;/a&gt;&lt;a name="_Toc165459006"&gt;&lt;span style=""&gt;&lt;span style=""&gt;Introduction&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/span&gt;&lt;a name="_Toc165459006"&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;a name="_Toc165459006"&gt;&lt;/a&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Since video can be viewed as a sequence of pictures, video coding can be seen as an extension to image compression. Compression is the process of compacting data, reducing the number of bits.&lt;b style=""&gt; &lt;/b&gt;With eye specific features and removal of redundant data we can achieve compression. Compression involves a complementary pair of systems, a compressor (enCOder) and a decompressor (DECoder) and hence the name &lt;a href="http://en.wikipedia.org/wiki/Codec"&gt;CODEC&lt;/a&gt;, the system performs that performs encoding &amp;amp; decoding.&lt;/p&gt;&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h2&gt;&lt;a name="_Toc166295015"&gt;&lt;/a&gt;&lt;a name="_Toc165459074"&gt;&lt;/a&gt;&lt;a name="_Toc165459007"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.2&lt;span style=""&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Human Visual system&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/b&gt;Rods and cones senses the light focused by the lens on retina. Rods provide sensation on the intensity of light and cone the sensation on color. There are three types of cones each corresponds to red, green and blue. Figure 1.1 shows the sensitivity of eye towards various wavelengths.&lt;/p&gt;&lt;br /&gt;&lt;h2&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkDTztZCLoI/AAAAAAAAAAM/y8OQFiFCnuI/s1600-h/fig1.1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkDTztZCLoI/AAAAAAAAAAM/y8OQFiFCnuI/s320/fig1.1.JPG" alt="" id="BLOGGER_PHOTO_ID_5062278866475822722" border="0" /&gt;&lt;/a&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="text-align: center;"&gt;&lt;span style=""&gt;                                                                &lt;/span&gt;&lt;b style=""&gt;Figure 1.1&lt;/b&gt; Response of eye towards different wavelength&lt;/p&gt;&lt;p class="MsoNormal" style="text-align: justify;"&gt;  &lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Curve R, G &amp;amp; B shows the sensitivity of cones towards wave length. The curve V shows the response of eye intensity variation. The value of V can be represented as V (λ) α 2R + G + B/20, where R, G and B is the intensity of Red, Green and Blue wavelengths. From the Figure 1.1 it’s clear that Eye is more sensitive towards light intensity variation than color variation. This is the principle behind color sub-sampling.&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 3.5in; text-indent: -195pt;"&gt;`&lt;/p&gt;  &lt;h2 style="margin-left: 0in; text-indent: 0in;"&gt;&lt;a name="_Toc166295016"&gt;&lt;/a&gt;&lt;a name="_Toc165459075"&gt;&lt;/a&gt;&lt;/h2&gt;  &lt;h2 style="margin-left: 0in; text-indent: 0in;"&gt;&lt;a name="_Toc165459008"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.1&lt;span style=""&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Picture Representation in Digital Domain&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;p class="MsoNormal"&gt;This section describes how an image is represented, provides an idea about pixels, resolution and RAW format.&lt;a name="_Toc166295017"&gt;&lt;/a&gt;&lt;a name="_Toc165459076"&gt;&lt;/a&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;h3&gt;&lt;a name="_Toc165459009"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.1.1&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Pixel&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h3&gt; &lt;h3&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;    &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;As you all know we can derive any color by properly combining the primary colors, Red, Green and Blue. Figure 1.2 shows the formation of secondary colors from the primary colors. In the case of analog picture representation we have the values of Red, Green and Blue intensities or a combination of these intensities ie: the effective color, at each and every point on the space. But in Digital domain we divide the space (the image focused by the lens) into a finite number of square patterns. This finest square area is called pixel, derived from the word picture element. A Pixel gives the value of Red, Green and Blue intensities in that area.&lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;The intensity values of Red, Green and Blue components are separated by some filter arrangement called Baye’s Filter. This finite division of space is performed by image sensors: CCD (Charge coupled devices), CID (Charge injection Devices), Active pixel CMOS.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:formulas&gt;  &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;  &lt;o:lock ext="edit" aspectratio="t"&gt; &lt;/v:shapetype&gt;&lt;v:shape id="_x0000_s1026" type="#_x0000_t75" style="'position:absolute;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image001.png" title="fig1"&gt;  &lt;w:wrap type="square"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;br /&gt;&lt;/p&gt;       &lt;p class="MsoNormal"&gt;Figure 1.3 illustrates the Spatial sampling of a grey scale image into digital domain. The value at each position is approximated to any of 256 levels. Then we need 8 bits/pixel for representing the intensity value.&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkIIh9ZCLtI/AAAAAAAAAA0/y4U0W44fxM4/s1600-h/fig1.2.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 262px; height: 253px;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkIIh9ZCLtI/AAAAAAAAAA0/y4U0W44fxM4/s320/fig1.2.JPG" alt="" id="BLOGGER_PHOTO_ID_5062618310626127570" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="text-align: justify;"&gt;In the case of color image we need 8 bits for representing each of the primary color, which results in 24 bits/pixel. And we have 2&lt;sup&gt;24 &lt;/sup&gt;= 16,777,216 color levels&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt; &lt;/p&gt;   &lt;p class="MsoNormal" style="text-align: justify;"&gt; for each pixel. Number of bits/pixel is called color depth.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt; &lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Figure 1.2&lt;/b&gt; Formation of 2&lt;sup&gt;0&lt;/sup&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Colors from the 1&lt;sup&gt;0 &lt;/sup&gt;colors&lt;sup&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/sup&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="page-break-after: avoid;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1025" type="#_x0000_t75" style="'width:6in;height:135pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image003.png" title="fig1" grayscale="t"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;/p&gt; &lt;h2&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_6kpJik-Ua70/RkDVbNZCLqI/AAAAAAAAAAc/mHOxK52IHck/s1600-h/fig1.3.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_6kpJik-Ua70/RkDVbNZCLqI/AAAAAAAAAAc/mHOxK52IHck/s320/fig1.3.JPG" alt="" id="BLOGGER_PHOTO_ID_5062280644592283298" border="0" /&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p class="MsoNormal" style="page-break-after: avoid;"&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoCaption"&gt;&lt;span style="font-weight: normal;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoCaption" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;span style="font-size:12;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;    &lt;p class="MsoCaption" style="margin-left: 1in; text-indent: 0.5in; text-align: left;"&gt;&lt;span style="font-size:12;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoCaption" style="margin-left: 1in; text-indent: 0.5in; text-align: left;"&gt;&lt;span style="font-size:12;"&gt;Figure 1.3&lt;/span&gt;&lt;span style="font-weight: normal;font-size:12;" &gt; Spatial sampling of analog scene&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc166295018"&gt;&lt;/a&gt;&lt;a name="_Toc165459077"&gt;&lt;/a&gt;&lt;a name="_Toc165459010"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.1.2&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Resolution&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="text-align: justify;"&gt;The numbers of pixels used to represent an image can be said in terms of resolution. Higher the number of pixels higher will be the clarity. Resolution determines the maximum enlargement possible for an image. For getting good quality pictures there should be a minimum of 300pixels/inch. Figure 1.4 shows an image sampled at different resolution.&lt;/p&gt;  &lt;h3 style="margin-left: 0in; text-align: justify; text-indent: 0in;"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;    &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                                                            &lt;/span&gt;&lt;/p&gt; &lt;p style="text-align: left;" class="MsoNormal"&gt;&lt;span style=""&gt;     &lt;/span&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1036" type="#_x0000_t75" style="'position:absolute;margin-left:33pt;"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image005.gif" title="fig1"&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=""&gt;  &lt;table cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;&lt;tr&gt;    &lt;td width="44" height="0"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td&gt;&lt;h2&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkDWUdZCLrI/AAAAAAAAAAk/IJBun53kUDQ/s1600-h/fig1.4.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkDWUdZCLrI/AAAAAAAAAAk/IJBun53kUDQ/s320/fig1.4.JPG" alt="" id="BLOGGER_PHOTO_ID_5062281628139794098" border="0" /&gt;&lt;/a&gt;&lt;/h2&gt; &lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;b style=""&gt;                                    Figure 1.4&lt;/b&gt;&lt;/p&gt;   &lt;h3&gt;&lt;a name="_Toc166295019"&gt;&lt;/a&gt;&lt;a name="_Toc165459078"&gt;&lt;/a&gt;&lt;a name="_Toc165459011"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.1.3&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;RAW Formats&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;RAW Format implies that there is no compression done on the image. The major types of RAW format are RGB, YUV, YIQ. As explained in section 1.2, our eye is more sensitive towards light intensity variation than color variation. So loss on color information will not affect the over all quality of the image. RGB is an end stream format. Information from the image sensor is in RGB format and we need the same format for displaying the image on an end &lt;/p&gt; &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;device. YUV &amp;amp; YIQ formats are developed for Analog TV transmission (NTSC &amp;amp; PAL respectively) and the digital version of YUV, YCbCr is the most common format used for image and video compressions.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;br /&gt;Conversion from one format to another is described below: &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="" lang="FR"&gt;RGB to YCbCr Conversion&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="" lang="FR"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="" lang="FR"&gt;Y = 0.299 R + 0.587 G + 0.11B&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="" lang="FR"&gt;Cb = 0.564 (B - Y)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="" lang="FR"&gt;Cr = 0.713 (R - Y)&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="" lang="FR"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;YCbCr to RGB&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;R = Y + 1.402 Cr&lt;/p&gt;   &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="" lang="FR"&gt;G = Y – 0.344 Cb – 0.714 C r&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="" lang="FR"&gt;B = Y + 1.722 Cb&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="" lang="FR"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style="" lang="FR"&gt;Y – Luminance Signal&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;Cb, Cr – Chrominance Signal, Color difference signal&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;R – Red&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;G – Green&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;B – Blue&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;   &lt;h2&gt;&lt;a name="_Toc166295020"&gt;&lt;/a&gt;&lt;a name="_Toc165459079"&gt;&lt;/a&gt;&lt;a name="_Toc165459012"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.2&lt;span style=""&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Need for Compression&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Consider an image of resolution 640 × 480. Let us calculate the size of the picture in RAW format. Each of the 1&lt;sup&gt;0&lt;/sup&gt;&lt;sub&gt; &lt;/sub&gt;Color is represented by 8 bits. Then for each pixel it needs 24 bits. Total no of pixels in the image is 640 × 480 = 307200 pixels. Therefore the size of the image turns to 307200 × 3 bytes = 921600 bytes. But an image in compressed format with the same resolution takes only 100 KB. &lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;In the case of RAW video stream of length 1 sec its needs 640 × 480 × 3 × 25 = 23040000 bytes (23 MB) of storage if the frame rate is 25 frames/sec. But it’s known that the VCD format video having a size 700 MB plays for around 80 minutes. In the former case we need 110400 MBs (23 MB × 60 × 80) as storage space for 80 minutes video. Therefore we can achieve a high compression 150: 1 at the cost of computational complexities.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h2&gt;&lt;a name="_Toc166295021"&gt;&lt;/a&gt;&lt;a name="_Toc165459080"&gt;&lt;/a&gt;&lt;a name="_Toc165459013"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span class="Heading2Char"&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.3&lt;span style=""&gt;         &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Generic Method of Image Compression&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;/h2&gt; &lt;h2&gt;&lt;span class="Heading2Char"&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h2&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;The various steps involved in image compression using JPEG encoder is explained using the block diagram in Figure 1.5.&lt;/p&gt;&lt;h2&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkDXSdZCLsI/AAAAAAAAAAs/fZSOilq4vgs/s1600-h/fig1.5.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkDXSdZCLsI/AAAAAAAAAAs/fZSOilq4vgs/s320/fig1.5.JPG" alt="" id="BLOGGER_PHOTO_ID_5062282693291683522" border="0" /&gt;&lt;/a&gt;&lt;/h2&gt; &lt;p class="MsoNormal"&gt; &lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1026" type="#_x0000_t75" style="'width:6in;height:265.5pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image006.png" title="JPEGencoder"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Figure 1.5&lt;/b&gt; Block Diagram of JPEG Encoder&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h3 style="margin-left: 0in; text-align: justify; text-indent: 0in;"&gt;&lt;a name="_Toc166295022"&gt;&lt;/a&gt;&lt;a name="_Toc165459081"&gt;&lt;/a&gt;&lt;/h3&gt;     &lt;h3 style="margin-left: 0in; text-align: justify; text-indent: 0in;"&gt;&lt;a name="_Toc165459014"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.3.1&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Color Space Conversion&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;&lt;br /&gt;The image obtained as the output of image sensor will be in RAW format, RGB. Suppose RAW image has a resolution 640 × 480. First step is to change it into another color space YCbCr. Y corresponds to the intensity variation and Cb, Cr are called color difference signals.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc166295023"&gt;&lt;/a&gt;&lt;a name="_Toc165459082"&gt;&lt;/a&gt;&lt;a name="_Toc165459015"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.3.2&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Chroma Subsampling&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;Color space conversion utilizes the sensitivity of eye in luminous part of image. Retaining the luma (Y signal) and sub-sampling the Chroma ( Cb &amp;amp; Cr ) we represent the image in a reasonably good manner. The commonly used subsampling formats are 4:4:4, 4:2:2 and 4:2:0. The numbers indicate the relative sampling rate of each component in the horizontal direction. In 4:4:4 (Figure 1.8) sampling for every four luminance samples there are four Cb and four Cr samples. In 4:2:2 (Figure 1.7) sampling, the chrominance components have the same vertical resolution as the luma but half the horizontal resolution (the numbers 4:2:2 mean that for every four luminance samples in the horizontal direction there are two Cb and two Cr samples). 4:2:2 video is used for high-quality color reproduction. In the popular 4:2:0 (Figure 1.6) sampling format, each Cb&lt;i&gt; &lt;/i&gt;and Cr&lt;i&gt; &lt;/i&gt;have half the horizontal and vertical resolution of Y. JPEG image compression is based on 4:2:0 subsampling.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1027" type="#_x0000_t75" style="'width:423pt;height:297pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image008.png" title="fig1"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                                    &lt;/span&gt;&lt;span style=""&gt;       &lt;/span&gt;  &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_6kpJik-Ua70/RkIJvtZCLuI/AAAAAAAAAA8/SQiO2zCfcUA/s1600-h/fig1.6.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_6kpJik-Ua70/RkIJvtZCLuI/AAAAAAAAAA8/SQiO2zCfcUA/s320/fig1.6.JPG" alt="" id="BLOGGER_PHOTO_ID_5062619646360956642" border="0" /&gt;&lt;/a&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Figure 1.6 &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkIKh9ZCLvI/AAAAAAAAABE/ebd2l6TsKQc/s1600-h/fig1.7.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkIKh9ZCLvI/AAAAAAAAABE/ebd2l6TsKQc/s320/fig1.7.JPG" alt="" id="BLOGGER_PHOTO_ID_5062620509649383154" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;Figure 1.7&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1029" type="#_x0000_t75" style="'width:225pt;height:183.75pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image011.gif" title="fig1"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkIKy9ZCLwI/AAAAAAAAABM/R80h3vfLJFc/s320/fig1.8.JPG" alt="" id="BLOGGER_PHOTO_ID_5062620801707159298" border="0" /&gt;&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkIKy9ZCLwI/AAAAAAAAABM/R80h3vfLJFc/s1600-h/fig1.8.JPG"&gt;&lt;/a&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p style="text-align: center;" class="MsoNormal"&gt;&lt;span style=""&gt;                                    &lt;/span&gt;&lt;span style=""&gt;                            &lt;/span&gt;&lt;b style=""&gt;Figure 1.8&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Chroma Subsampling results in the reduced number of bits to represent the image.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;u&gt;Example&lt;/u&gt;:&lt;u&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/u&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Image resolution: 640 × 480 pixels&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Y resolution: 640 × 480 samples, each represented with eight bits&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;u&gt;4:4:4&lt;/u&gt; &lt;span style=""&gt; &lt;/span&gt;:- Cb, Cr resolution: 640 × 480 samples, each eight bits&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Total number of bits: 640 × 480 × 8 × 3 = 7372800 bits&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;u&gt;4:2:0&lt;/u&gt; :- Cb, Cr resolution: 320 × 240 samples, each eight bits&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Total number of bits: (640 × 480× 8) + (320 × 240 × 8 × 2) = 3686400 bits&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The 4:2:0 version requires half as many bits as the 4:4:4 version&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;u&gt;4:2:2&lt;/u&gt; :- Cb, Cr resolution: 320 × 480 samples, each eight bits&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;Total number of bits: (640 × 480× 8) + (320 × 480 × 8 × 2) = 4915200 bits.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The 4:2:2 version requires &lt;span style="position: relative; top: 9pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1030" type="#_x0000_t75" style="'width:18pt;height:24pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image012.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1030" drawaspect="Content" objectid="_1240178386"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt;&lt;span style="'mso-spacerun:yes'"&gt; &lt;/span&gt;eq\f(2,3) &lt;![endif]--&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt;&lt;span style="'mso-spacerun:yes'"&gt; &lt;/span&gt;eq\f(2/3) &lt;![endif]--&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;2/3 as many bits as the 4:4:4 version. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc166295024"&gt;&lt;/a&gt;&lt;a name="_Toc165459083"&gt;&lt;/a&gt;&lt;a name="_Toc165459016"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.3.3&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;MacroBlock&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt; &lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Statistical analysis reveals that images are spatially redundant (ie the pixels are found highly correlated to the neighboring ones) and removing the spatial redundancy itself results in high compression. Consider the block specified in Figure 1.9 which represents a homogenous region where the pixel values of block (Table 1.1) are found closely related. Studies revealed that the optimal size of a block is &lt;a name="OLE_LINK7"&gt;&lt;/a&gt;&lt;a name="OLE_LINK2"&gt;&lt;/a&gt;&lt;a name="OLE_LINK1"&gt;&lt;span style=""&gt;&lt;span style=""&gt;8 × 8&lt;/span&gt;&lt;/span&gt;&lt;/a&gt; for utilizing the spatial redundancy of an image and the 8 × 8 block is called a macroblock. Another advantage in using the macroblock size of 8 x 8 is low memory requirement. Macroblock can be viewed as square matrix of dimension 8.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/b&gt;Followed by chroma subsampling we divide the entire image into macro blocks. An image of resolution 640 × 480 can be divided into 4800 Y macroBlocks, 1200 Cb &amp;amp; 1200 Cr macroblocks in case of 4:2:0 subsampling. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1028" type="#_x0000_t75" style="'position:absolute;margin-left:27pt;margin-top:8.4pt;width:100.5pt;" wrapcoords="-161 0 -161 21477 21600 21477 21600 0 -161 0"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image014.gif" title="fig1"&gt;  &lt;w:wrap type="tight"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkIL3NZCLyI/AAAAAAAAABc/N6KA3fhgv20/s1600-h/fig1.9.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkIL3NZCLyI/AAAAAAAAABc/N6KA3fhgv20/s320/fig1.9.JPG" alt="" id="BLOGGER_PHOTO_ID_5062621974233231138" border="0" /&gt;&lt;/a&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;span style=""&gt;                 &lt;/span&gt;&lt;span style=""&gt;   &lt;/span&gt;&lt;span style=""&gt;    &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1027" type="#_x0000_t75" style="'position:absolute;left:0;" wrapcoords="-96 0 -96 21411 21600 21411 21600 0 -96 0"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image015.png" title="fig1"&gt;  &lt;w:wrap type="tight"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;/p&gt;   &lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_6kpJik-Ua70/RkIMhtZCLzI/AAAAAAAAABk/DaOwmSDmI-E/s1600-h/fig1.13.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_6kpJik-Ua70/RkIMhtZCLzI/AAAAAAAAABk/DaOwmSDmI-E/s320/fig1.13.JPG" alt="" id="BLOGGER_PHOTO_ID_5062622704377671474" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 2in; text-indent: -123pt;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 3in; text-indent: -159pt;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 3in; text-indent: -159pt;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 3in; text-indent: -159pt;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 3in; text-indent: -159pt;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 3in; text-indent: -159pt;"&gt;Figure 1.9&lt;span style=""&gt;                                            &lt;/span&gt;Table 1.1 Pixel Values corresponding to&lt;span style=""&gt;               &lt;/span&gt;MacroBlock shown in Figure 1.9&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/b&gt;Next step is to take Discrete Cosine Transform for each of these macroblocks.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc166295025"&gt;&lt;/a&gt;&lt;a name="_Toc165459084"&gt;&lt;/a&gt;&lt;a name="_Toc165459017"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.3.4&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Transform Coding (Discrete Cosine Transform)&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Discrete Cosine transform is a technique to represent the data spread over the macroblock into a lesser number of significant values. DCT (Discrete Cosine Transform)&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;represents any pattern (image) as the weighted sum of the basis patterns. On taking DCT, we will get a matrix of the same dimension as that of macroblock, which shows how much of each pattern is present in the image. Figure 1.10 shows the basis patterns for 8 x 8 block Each of these pattern is called frequency and the value obtained on DCT is the amplitude of that frequency in the macroblock.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: 0.5in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkIO19ZCL0I/AAAAAAAAABs/Lce3WKIDTqI/s1600-h/fig1.10.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkIO19ZCL0I/AAAAAAAAABs/Lce3WKIDTqI/s320/fig1.10.JPG" alt="" id="BLOGGER_PHOTO_ID_5062625251293278018" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: 0.5in;"&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;                                                &lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p style="text-align: center;" class="MsoNormal"&gt;&lt;b style=""&gt;Fig 1.10 &lt;/b&gt;8 × 8 DCT basis patterns&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;b style=""&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1032" type="#_x0000_t75" style="'width:6in;height:304.5pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image019.png" title="FIG"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkIPK9ZCL1I/AAAAAAAAAB0/FdXlAqYZbW8/s1600-h/fig1.11.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkIPK9ZCL1I/AAAAAAAAAB0/FdXlAqYZbW8/s320/fig1.11.JPG" alt="" id="BLOGGER_PHOTO_ID_5062625612070530898" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;                                    &lt;/span&gt;Figure 1.11&lt;/b&gt; Illustration of DCT&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;Figure 1.11 illustrates the concept of DCT. On taking DCT for the original pattern shown in Figure 1.11 we will get weights corresponding to positions (0,0), (0,2), (2,0) in the basis pattern. The patterns present in original macroblock are &lt;st1:place st="on"&gt;&lt;st1:city st="on"&gt;Average&lt;/st1:city&gt; &lt;st1:state st="on"&gt;DC&lt;/st1:state&gt;&lt;/st1:place&gt; value, Vertical frequency &amp;amp; Horizontal frequency respectively. Similar is the case for any image.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h4 style="margin-left: 0in; text-align: justify; text-indent: 0in;"&gt;&lt;a name="_Toc165459085"&gt;&lt;/a&gt;&lt;a name="_Toc165459018"&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;1.3.4.1&lt;span style=""&gt;       &lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;Mathematical Formulation of DCT&lt;/span&gt;&lt;/a&gt;&lt;/h4&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;The Discrete Cosine Transform (DCT) operates on X, a block of N × N samples (typically image samples) and creates Y, an N × N block of coefficients. The action of the DCT (and its inverse, the IDCT) can be described in terms of a transform matrix A. The forward DCT (FDCT) of an N × N sample block is given by:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.5in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;Y = AXA&lt;/b&gt;&lt;sup&gt;T&lt;span style=""&gt;                          &lt;/span&gt;&lt;/sup&gt;&lt;b style=""&gt;eqn 1.1&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;And inverse DCT (IDCT) &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                                                &lt;/span&gt;&lt;b&gt;X &lt;/b&gt;= &lt;b&gt;A&lt;/b&gt;&lt;sup&gt;T&lt;/sup&gt;&lt;b&gt;YA&lt;span style=""&gt;                   &lt;/span&gt;eqn 1.2&lt;/b&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;where &lt;b&gt;X &lt;/b&gt;is a matrix of samples(macroblock), &lt;b&gt;Y &lt;/b&gt;is a matrix of DCT coefficients and &lt;b&gt;A &lt;/b&gt;is an &lt;i&gt;N &lt;/i&gt;× &lt;i&gt;N &lt;/i&gt;transform matrix. The elements of &lt;b&gt;A &lt;/b&gt;are&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style=""&gt;A&lt;i&gt;&lt;sub&gt;i j&lt;/sub&gt; &lt;/i&gt;&lt;/span&gt;= &lt;i&gt;C&lt;sub&gt;i&lt;/sub&gt; &lt;/i&gt;cos &lt;span style=""&gt; &lt;/span&gt;&lt;span style="" lang="FR"&gt;&lt;span style="position: relative; top: 12pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1033" type="#_x0000_t75" style="'width:53.25pt;height:30.75pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image021.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/chinnu/LOCALS%7E1/Temp/msohtml1/04/clip_image022.gif" shapes="_x0000_i1033" width="71" height="41" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1033" drawaspect="Content" objectid="_1240178387"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;Where&lt;span style=""&gt;    &lt;/span&gt;C&lt;i style=""&gt;&lt;sub&gt;i&lt;/sub&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=";font-family:Times-Italic;font-size:7;"  &gt; &lt;span style=""&gt;    &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=";font-family:MTSY;font-size:10;"  &gt;= &lt;/span&gt;&lt;span style=";font-family:MTSY;font-size:10;"   lang="FR"&gt;&lt;span style="position: relative; top: 13pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1034" type="#_x0000_t75" style="'width:24.75pt;height:35.25pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image023.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/chinnu/LOCALS%7E1/Temp/msohtml1/04/clip_image024.gif" shapes="_x0000_i1034" width="33" height="47" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1034" drawaspect="Content" objectid="_1240178388"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;/span&gt;&lt;span style=";font-family:MTSY;font-size:10;"  &gt;&lt;span style=""&gt; &lt;/span&gt;(&lt;i style=""&gt;i&lt;/i&gt; =0),&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;C&lt;i style=""&gt;&lt;sub&gt;i&lt;/sub&gt;&lt;/i&gt;&lt;i&gt;&lt;span style=";font-family:Times-Italic;font-size:7;"  &gt;&lt;span style=""&gt;     &lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;span style=";font-family:MTSY;font-size:10;"  &gt;= &lt;/span&gt;&lt;span style=";font-family:MTSY;font-size:10;"   lang="FR"&gt;&lt;span style="position: relative; top: 13pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1035" type="#_x0000_t75" style="'width:24.75pt;height:35.25pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image025.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/chinnu/LOCALS%7E1/Temp/msohtml1/04/clip_image026.gif" shapes="_x0000_i1035" width="33" height="47" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1035" drawaspect="Content" objectid="_1240178389"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;/span&gt;&lt;span style=";font-family:MTSY;font-size:10;"   lang="FR"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;&lt;span style=";font-family:MTSY;font-size:10;"  &gt;(&lt;i style=""&gt;i&lt;/i&gt;&lt;span style=""&gt;  &lt;/span&gt;&gt; 0) &lt;span style=""&gt;     &lt;/span&gt;&lt;b style=""&gt;eqn 1.3&lt;/b&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style=";font-family:MTSY;font-size:10;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style=";font-family:MTSY;font-size:10;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;span style=""&gt;Y&lt;i&gt;&lt;sub&gt;xy&lt;/sub&gt; &lt;/i&gt;&lt;/span&gt;= &lt;span style=""&gt;   &lt;/span&gt;&lt;i&gt;C&lt;sub&gt;x &lt;/sub&gt;C&lt;sub&gt;y&lt;/sub&gt;&lt;/i&gt; &lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style="" lang="FR"&gt;&lt;span style="position: relative; top: 15pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1036" type="#_x0000_t75" style="'width:44.25pt;height:35.25pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image027.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/chinnu/LOCALS%7E1/Temp/msohtml1/04/clip_image028.gif" shapes="_x0000_i1036" width="59" height="47" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1036" drawaspect="Content" objectid="_1240178390"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;/span&gt;X&lt;sub&gt;ij&lt;/sub&gt;&lt;span style="position: relative; top: 12pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1037" type="#_x0000_t75" style="'width:78pt;height:30.75pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image029.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/chinnu/LOCALS%7E1/Temp/msohtml1/04/clip_image030.gif" shapes="_x0000_i1037" width="104" height="41" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1037" drawaspect="Content" objectid="_1240178391"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;span style=""&gt; &lt;/span&gt;cos &lt;span style="position: relative; top: 12pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1038" type="#_x0000_t75" style="'width:53.25pt;height:30.75pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image031.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/chinnu/LOCALS%7E1/Temp/msohtml1/04/clip_image032.gif" shapes="_x0000_i1038" width="71" height="41" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1038" drawaspect="Content" objectid="_1240178392"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:MTSY;font-size:10;"  &gt;eqn 1.4&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;i&gt;&lt;sub&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/sub&gt;&lt;/i&gt;&lt;span style=""&gt;X&lt;i&gt;&lt;sub&gt;ij&lt;/sub&gt; &lt;/i&gt;&lt;/span&gt;=&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style="" lang="FR"&gt;&lt;span style="position: relative; top: 16pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1039" type="#_x0000_t75" style="'width:42pt;height:36pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image033.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/chinnu/LOCALS%7E1/Temp/msohtml1/04/clip_image034.gif" shapes="_x0000_i1039" width="56" height="48" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1039" drawaspect="Content" objectid="_1240178393"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;/span&gt;&lt;span lang="FR"&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;/span&gt;C&lt;sub&gt;x&lt;/sub&gt; C&lt;sub&gt;y &lt;/sub&gt;Y&lt;sub&gt;xy&lt;/sub&gt;&lt;span style="position: relative; top: 12pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1040" type="#_x0000_t75" style="'width:78pt;height:30.75pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image035.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/chinnu/LOCALS%7E1/Temp/msohtml1/04/clip_image030.gif" shapes="_x0000_i1040" width="104" height="41" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1040" drawaspect="Content" objectid="_1240178394"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;span style=""&gt; &lt;/span&gt;cos &lt;span style="position: relative; top: 12pt;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1041" type="#_x0000_t75" style="'width:53.25pt;height:30.75pt'" ole=""&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image036.wmz" title=""&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/chinnu/LOCALS%7E1/Temp/msohtml1/04/clip_image032.gif" shapes="_x0000_i1041" width="71" height="41" /&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:oleobject type="Embed" progid="Equation.3" shapeid="_x0000_i1041" drawaspect="Content" objectid="_1240178395"&gt;  &lt;/o:OLEObject&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;b style=""&gt;&lt;span style=";font-family:MTSY;font-size:10;"  &gt;eqn 1.5&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;The transform matrix A for 8 × 8 DCT is&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a name="OLE_LINK9"&gt;&lt;/a&gt;&lt;a name="OLE_LINK8"&gt;&lt;span style=""&gt;&lt;b style=""&gt;&lt;span style="" lang="FR"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1042" type="#_x0000_t75" style="'width:468pt;height:141pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image037.png" title="Table1"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/a&gt;&lt;b style=""&gt;&lt;span style="" lang="FR"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style="" lang="FR"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_6kpJik-Ua70/RkIP9tZCL2I/AAAAAAAAAB8/EyFNDZBFnbw/s1600-h/fig1.12.JPG"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer;" src="http://1.bp.blogspot.com/_6kpJik-Ua70/RkIP9tZCL2I/AAAAAAAAAB8/EyFNDZBFnbw/s320/fig1.12.JPG" alt="" id="BLOGGER_PHOTO_ID_5062626483948892002" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Example :&lt;/b&gt;Calculating DCT for the macroblock defined in Figure 1.9 &lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:line id="_x0000_s1029" style="'position:absolute;z-index:4'" from="63pt,-.15pt" to="63pt,143.85pt" allowoverlap="f" stroked="f"&gt;  &lt;w:wrap type="square"&gt; &lt;/v:line&gt;&lt;![endif]--&gt;&lt;b style=""&gt;&lt;span style=""&gt;             &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_6kpJik-Ua70/RkIW6tZCMBI/AAAAAAAAADU/fZ-JRFbRJHk/s1600-h/fig1.14.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://1.bp.blogspot.com/_6kpJik-Ua70/RkIW6tZCMBI/AAAAAAAAADU/fZ-JRFbRJHk/s320/fig1.14.JPG" alt="" id="BLOGGER_PHOTO_ID_5062634128990679058" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="text-align: right;" class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkIQ0NZCL3I/AAAAAAAAACE/kmFCQEfw3aw/s1600-h/fig1.14.JPG"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="text-align: right;"&gt;  &lt;/div&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;                                                        X&lt;/b&gt;&lt;span style=""&gt;      &lt;/span&gt;    =        &lt;span style=""&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span style=""&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Table 1.2&lt;/b&gt; Pixel values corresponding to macroblock shown in &lt;span style=""&gt;                                                             &lt;/span&gt;Figure 1.9&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1030" type="#_x0000_t75" style="'position:absolute;margin-left:117pt;margin-top:1.85pt;width:230.25pt;" wrapcoords="-70 0 -70 21496 21600 21496 21600 0 -70 0"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image040.gif" title="fig1"&gt;  &lt;w:wrap type="tight"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_6kpJik-Ua70/RkIROdZCL4I/AAAAAAAAACM/EPZ-Tj-vjY4/s1600-h/fig1.15.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://4.bp.blogspot.com/_6kpJik-Ua70/RkIROdZCL4I/AAAAAAAAACM/EPZ-Tj-vjY4/s320/fig1.15.JPG" alt="" id="BLOGGER_PHOTO_ID_5062627871223328642" border="0" /&gt;&lt;/a&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_6kpJik-Ua70/RkIROdZCL4I/AAAAAAAAACM/EPZ-Tj-vjY4/s1600-h/fig1.15.JPG"&gt;&lt;/a&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;                                        Y                         &lt;/b&gt;&lt;span style=""&gt;         &lt;/span&gt;= &lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;span style=""&gt;          &lt;/span&gt; &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Table 1.3&lt;/b&gt; The transform matrix Y is obtained using the eqn 1.1&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Value of Y (Table 1.3), shows that most of the energy gets crowded to low coefficients. Even approximating the amplitude of higher coefficient values to zero will not make much effect on the image. That is what we observed from the experiments. It’s achieved by the process called Quantization.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc166295026"&gt;&lt;/a&gt;&lt;a name="_Toc165459086"&gt;&lt;/a&gt;&lt;a name="_Toc165459019"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.3.5&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Quantization&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Experiments had already proved that our eye has a very poor response towards high intensity variation. ie our eye will not&lt;span style=""&gt;  &lt;/span&gt;notify the absence of patterns in the high frequency side (those patterns comes in the lower right side of Figure 1.10). Thus we can achieve better compression with loss of data. So it’s called lossy compression. Quantizer helps to attain this.&lt;span style=""&gt;  &lt;/span&gt;A quantiser maps a signal with a range of values &lt;i&gt;X &lt;/i&gt;to a quantised signal with a reduced range of values &lt;i&gt;Y&lt;/i&gt;. It should be possible to represent the quantised signal with fewer bits than the original since the range of possible values is smaller. A &lt;i&gt;scalar quantiser &lt;/i&gt;maps one sample of the input signal to one quantised output value and a &lt;i&gt;vector quantiser &lt;/i&gt;maps a group of input samples (a ‘vector’) to a group of quantised values. Here we are explaining the scalar quantiser, one commonly used in image and video compression.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;span style=""&gt;                                    &lt;/span&gt;Z&lt;sub&gt;ij &lt;/sub&gt;= Round ( &lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-begin'"&gt;&lt;/span&gt;&lt;span style="'mso-spacerun:yes'"&gt; &lt;/span&gt;eq \f(Y&lt;sub&gt;ij &lt;/sub&gt;,Q&lt;sub&gt;ij&lt;/sub&gt;) &lt;![endif]--&gt;&lt;!--[if supportFields]&gt;&lt;span style="'mso-element:field-end'"&gt;&lt;/span&gt;&lt;![endif]--&gt;)&lt;span style=""&gt;                    &lt;/span&gt;eqn 1.6&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;Where Z is output of quantiser, Y is the transform matrix, Q is the Quantization matrix. The rescaled value on inverse quantization is &lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;                                                &lt;/span&gt;Y’&lt;sub&gt;ij&lt;span style=""&gt;  &lt;/span&gt;&lt;/sub&gt;= Z&lt;sub&gt;ij &lt;/sub&gt;×&lt;sub&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;/sub&gt;Q&lt;sub&gt;ij&lt;span style=""&gt;                                 &lt;/span&gt;&lt;/sub&gt;eqn&lt;sub&gt; &lt;/sub&gt;1.7&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;Where Y’&lt;sub&gt;ij &lt;/sub&gt;is the value in the matrix obtained on inverse quantization. i &amp;amp; j are the indices of matrix.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Two different quantization matrices are used in the case of color image, One for the luma and the other for chroma.&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1043" type="#_x0000_t75" style="'width:395.25pt;height:153.75pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image041.gif" title="fig1"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_6kpJik-Ua70/RkIRpdZCL5I/AAAAAAAAACU/ZypPeg-qnMc/s1600-h/fig1.16.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_6kpJik-Ua70/RkIRpdZCL5I/AAAAAAAAACU/ZypPeg-qnMc/s320/fig1.16.JPG" alt="" id="BLOGGER_PHOTO_ID_5062628335079796626" border="0" /&gt;&lt;/a&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;Table 1.4&lt;/b&gt; Quantization matrix used for luminance signal&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_i1044" type="#_x0000_t75" style="'width:370.5pt;height:156pt'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image042.gif" title="fig1"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_6kpJik-Ua70/RkIR4tZCL6I/AAAAAAAAACc/tyApaj9xn14/s1600-h/fig1.17.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_6kpJik-Ua70/RkIR4tZCL6I/AAAAAAAAACc/tyApaj9xn14/s320/fig1.17.JPG" alt="" id="BLOGGER_PHOTO_ID_5062628597072801698" border="0" /&gt;&lt;/a&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;b style=""&gt;Table 1.5&lt;/b&gt; Quantization matrix used for chrominanace signal&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;b style=""&gt;Example&lt;/b&gt;:&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;Consider the macroblock defined in Figure 1.9. The output of quantizer for the macro block using eqn 1.6 comes as&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1032" type="#_x0000_t75" style="'position:absolute;margin-left:162pt;margin-top:-9pt;width:198.75pt;" wrapcoords="-82 0 -82 21491 21600 21491 21600 0 -82 0"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image043.gif" title="fig1"&gt;  &lt;w:wrap type="tight"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNq_9ZCMWI/AAAAAAAAAF8/hKo5AP_wpwE/s1600-h/fig1.18.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNq_9ZCMWI/AAAAAAAAAF8/hKo5AP_wpwE/s320/fig1.18.JPG" alt="" id="BLOGGER_PHOTO_ID_5063008053138436450" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;        &lt;/b&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkIS7NZCL7I/AAAAAAAAACk/ixWGLcGdPCc/s1600-h/fig1.18.JPG"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;     &lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;                                                            Z&lt;span style=""&gt;   &lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;            =&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 2in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 2in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 2in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 2in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 2in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 2in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 2in;"&gt;&lt;b style=""&gt;Table 1.6&lt;/b&gt; Quantized value corresponding to transform matrix, Y shown in Table 1.3&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The rescaled matrix Y’ as per the eqn 1.7 is shown as&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1033" type="#_x0000_t75" style="'position:absolute;margin-left:135pt;margin-top:12.6pt;width:205.5pt;" wrapcoords="-79 0 -79 21492 21600 21492 21600 0 -79 0"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image044.gif" title="fig1"&gt;  &lt;w:wrap type="tight"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNrU9ZCMXI/AAAAAAAAAGE/dxs35RObvfM/s1600-h/fig1.19.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkNrU9ZCMXI/AAAAAAAAAGE/dxs35RObvfM/s320/fig1.19.JPG" alt="" id="BLOGGER_PHOTO_ID_5063008413915689330" border="0" /&gt;&lt;/a&gt;&lt;!--[endif]--&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;                &lt;/span&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;    &lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;                                                  Y’&lt;span style=""&gt;   &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt;  &lt;/span&gt;        = &lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;b style=""&gt;     &lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;Table 1.7 &lt;/b&gt;The rescaled Transform matrix from Z using eqn 1.7&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1034" type="#_x0000_t75" style="'position:absolute;margin-left:135pt;margin-top:21.65pt;width:280.5pt;" wrapcoords="-58 0 -58 21494 21600 21494 21600 0 -58 0"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image045.gif" title="fig1"&gt;  &lt;w:wrap type="tight"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;!--[endif]--&gt;Taking inverse transform, IDCT on &lt;b style=""&gt;Y’&lt;/b&gt; we will get the reconstructed pixel value matrix &lt;b style=""&gt;X’&lt;/b&gt; as &lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;           &lt;/span&gt;&lt;span style=""&gt; &lt;/span&gt;&lt;span style=""&gt;      &lt;/span&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_6kpJik-Ua70/RkNrrdZCMYI/AAAAAAAAAGM/riVIYYWDjbk/s1600-h/fig1.20.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://1.bp.blogspot.com/_6kpJik-Ua70/RkNrrdZCMYI/AAAAAAAAAGM/riVIYYWDjbk/s320/fig1.20.JPG" alt="" id="BLOGGER_PHOTO_ID_5063008800462745986" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b style=""&gt;                                        X’            &lt;span style=""&gt;      &lt;/span&gt;= &lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;span style="text-decoration: underline;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;b style=""&gt;Table 1.8 &lt;/b&gt;Reconstructed pixel value matrix of the macroblock shown in figure 1.9&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;The difference between the original and reconstructed macroblock pixel values is shown as &lt;b style=""&gt;Δ &lt;/b&gt;matrix. Its very clear there is only a slight difference between the original macroblock pixel values and the reconstructed macroblock.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;                        &lt;/span&gt;&lt;b style=""&gt;Δ = X – X’&lt;span style=""&gt;       &lt;/span&gt;&lt;span style=""&gt;            &lt;/span&gt;eqn 1.8&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="_x0000_s1035" type="#_x0000_t75" style="'position:absolute;margin-left:2in;margin-top:1.25pt;width:219.75pt;" wrapcoords="-74 0 -74 21500 21600 21500 21600 0 -74 0"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image046.gif" title="fig1"&gt;  &lt;w:wrap type="tight"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;br /&gt;&lt;!--[endif]--&gt;&lt;b style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNsItZCMZI/AAAAAAAAAGU/dgNcfl0ro24/s1600-h/fig1.21.JPG"&gt;&lt;img style="margin: 0pt 0pt 10px 10px; float: right; cursor: pointer;" src="http://2.bp.blogspot.com/_6kpJik-Ua70/RkNsItZCMZI/AAAAAAAAAGU/dgNcfl0ro24/s320/fig1.21.JPG" alt="" id="BLOGGER_PHOTO_ID_5063009302973919634" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;b style=""&gt;         &lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;b style=""&gt;                                Δ            &lt;span style=""&gt;          &lt;/span&gt;= &lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="margin-left: 1in; text-indent: 0.5in;"&gt;&lt;b style=""&gt;Table 1.9 &lt;/b&gt;The error value from original pixel value&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc166295027"&gt;&lt;/a&gt;&lt;a name="_Toc165459087"&gt;&lt;/a&gt;&lt;a name="_Toc165459020"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.3.6&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Zig Zag Scan&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;!--[if gte vml 1]&gt;&lt;o:wrapblock&gt;&lt;v:shape id="_x0000_s1037" type="#_x0000_t75" style="'position:absolute;left:0;" wrapcoords="-76 0 -76 21519 21600 21519 21600 0 -76 0" allowoverlap="f"&gt;   &lt;v:imagedata src="file:///C:\DOCUME~1\chinnu\LOCALS~1\Temp\msohtml1\04\clip_image047.emz" title=""&gt;   &lt;w:wrap type="topAndBottom"&gt;  &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;span style=""&gt;  &lt;table cellpadding="0" cellspacing="0"&gt;   &lt;tbody&gt;&lt;tr&gt;    &lt;td width="132" height="0"&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;   &lt;tr&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;    &lt;td&gt;&lt;br /&gt;&lt;/td&gt;   &lt;/tr&gt;  &lt;/tbody&gt;&lt;/table&gt;  &lt;/span&gt;&lt;!--[endif]--&gt;&lt;!--[if gte vml 1]&gt;&lt;/o:wrapblock&gt;&lt;![endif]--&gt;&lt;br /&gt;The quantizer ignores all the insignificant high frequency values as shown in Table1.6. The 8 x 8 matrix gives 64 values. Most of the high frequency values are approximated to zero. By efficiently representing the zeros we can achieve high compression. For this purpose Zig Zag scan and Run length encoding are introduced.&lt;/p&gt;&lt;br /&gt;&lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal" style="text-align: justify;"&gt;       &lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_6kpJik-Ua70/RkIT7NZCL_I/AAAAAAAAADE/acWC3QN2L24/s1600-h/fig1.22.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://3.bp.blogspot.com/_6kpJik-Ua70/RkIT7NZCL_I/AAAAAAAAADE/acWC3QN2L24/s320/fig1.22.JPG" alt="" id="BLOGGER_PHOTO_ID_5062630839045730290" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.5in;"&gt;&lt;span style=""&gt;         &lt;/span&gt;&lt;b style=""&gt;&lt;span style=""&gt; &lt;/span&gt;Figure 1.12&lt;/b&gt; Zig Zag Scanning&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 1.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;&lt;span style=""&gt;            &lt;/span&gt;Zig-zag scanning technique groups the non-zero and runs of zero and represent the data in a linear array . Run length encoding represents the runs zero in an efficient manner. The quantized values are reordered in a zig-zag manner to produce a linear array by taking values in the order of position&lt;span style=""&gt;  &lt;/span&gt;(0,0), (0,1), (1,0), (2,0), (1,1), (1,2), (0,3)….&lt;span style=""&gt;  &lt;/span&gt;It’s explained in the Figure 1.12&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-indent: 0.5in;"&gt;By scanning in the Zig-Zag pattern, the values of Z matrix (Table 1.6) can be represented in a linear array as 32, 6, -1, -1, 0, -1, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0… &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc166295028"&gt;&lt;/a&gt;&lt;a name="_Toc165459088"&gt;&lt;/a&gt;&lt;a name="_Toc165459021"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.3.7&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Run Level Coding.&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;It’s a method to represent the runs of zeros efficiently. The linear array obtained by zig-zag scanning is processed to produce a series of (zero-run, level) pairs. Zero-run will give the number of zeros preceding a non zero value. Level represents the signed magnitude of non-zero value.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;General rule for run level coding:&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify; text-indent: 0.5in;"&gt;First identify the non zero values. Count the number of zeros preceeding the non-zero as zero-runs, and the non-zero value as level. For example the Run level coding of the above linear array results in an array of pairs like (0, 32), (0, 6), (0, -1), (0, -1), (1,-1), (3, -1), (2, 1), (EOB).&lt;span style=""&gt;  &lt;/span&gt;‘EOB’ (End of Block) indicates that the remaining coefficients are zero.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;h3&gt;&lt;a name="_Toc166295029"&gt;&lt;/a&gt;&lt;a name="_Toc165459089"&gt;&lt;/a&gt;&lt;a name="_Toc165459022"&gt;&lt;span style=""&gt;&lt;span style=""&gt;&lt;!--[if !supportLists]--&gt;&lt;span style=""&gt;&lt;span style=""&gt;1.3.8&lt;span style=""&gt;        &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;!--[endif]--&gt;&lt;span style=""&gt;Entropy encoding&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=""&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/h3&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt;Our aim is to represent the image with a less number of bits. So far we represent the values, like DCT coefficients or Run Length coded sequences with fixed number of bits. But statistical studies of image compression reveal that some values come frequently. Encoding those values, which contribute a major share of image, with less number of bits can leads to an efficient compression ratio Variable length coding (VLC) is used here. The various algorithms used for VLC are :&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="Default"&gt;&lt;span style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;Shannon-FanoAlgorithm&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Default"&gt;&lt;span style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;Huffman coding&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="Default"&gt;&lt;span style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;Adaptive Huffman coding&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style=""&gt;            &lt;/span&gt;Arithmetic coding&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;&lt;span style=""&gt;            &lt;/span&gt;&lt;/b&gt;Based on these algorithms some tables are prepared and indications to these tables are signaled in the header of JPEG bit stream format.&lt;/p&gt;  &lt;p class="MsoNormal" style="text-align: justify;"&gt; &lt;/p&gt;&lt;center&gt;&lt;a href="http://www.submitexpress.com/"&gt;&lt;img src="http://www.submitexpress.com/submitexpress.gif" width="88" border="0" height="31" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.submitexpress.com/"&gt;Search Engine Optimization and SEO Tools&lt;/a&gt;&lt;/center&gt;&lt;br /&gt;&lt;p&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1762073471671290548-7188659191805576752?l=videocodecs.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://videocodecs.blogspot.com/feeds/7188659191805576752/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://videocodecs.blogspot.com/2007/05/image-coding-fundamentals_08.html#comment-form' title='14 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/7188659191805576752'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1762073471671290548/posts/default/7188659191805576752'/><link rel='alternate' type='text/html' href='http://videocodecs.blogspot.com/2007/05/image-coding-fundamentals_08.html' title='Image Coding Fundamentals'/><author><name>Madhavan</name><uri>http://www.blogger.com/profile/13746594802761053360</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_6kpJik-Ua70/RkDTztZCLoI/AAAAAAAAAAM/y8OQFiFCnuI/s72-c/fig1.1.JPG' height='72' width='72'/><thr:total>14</thr:total></entry></feed>
