12
CHAPTER 5 In this chapta, the motivation behind the entropy d i n g in a Video CODEC has been discussed. The proposed entropy encoding and decoding algorithms are presented. Thc experimental results conducted on various SIF and non-standard sequences are illustrated In h!hnd MCP DCT DPCM based monon compensated \ ~dw cod~ng MPEG and IT[ -T \tandud\ cncodlng can he achle\cd h\ uslng uansfonnat~on. quanrlratlcrn. motlon compcn\ated predlctlon and en~rop\ encoding methods [ ruall\ predlcr~\e wding 1s \OFF! and elim~nates the rele\anc! or ~nterdependenctes In the wlurce \!mholr Drccirrclat~on In the u u r c e s!mbols 1s fenmall! ananed In the source ccdlng mcdul El~mlnatlon of the redundant\ elictr In the source s>mbols are actuall! carncd out tn entmp) cncodlng model. ubch 1s lossless Entrop! ncrdinp 15 not follor~ng an! semanuc In the transformed coeffinenrs. uhlch olioca~eh~tstrcam hascd on the mount of ~nfonnarlon content present In the \\mhols In rhc earlla chaptm. mollon estlmatlc~n and trmsfonnat~on modules are minlminng the rulundmcier that ETISI In t~mporaland spatial dtmensions are d~.scussed This chapta dcsk u~th thc cl~m~natinn of the s~aust~cal rdundanc~es p ~ t In the outujrnu of the rrnnsk~nned ctwfic~ents In the mat imagc and \lda) ctdlng standards such u JPEG [?'I. MPEG [?&I] and In-T [29] are making uw of RLE. Huffman and Anthmeuc rrdlng as lhur atropy coding teshn~ques Out of these algonhs. RLE 1s a simple 100

CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

Embed Size (px)

Citation preview

Page 1: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

CHAPTER 5

In this chapta, the motivation behind the entropy d i n g in a Video CODEC

has been discussed. The proposed entropy encoding and decoding algorithms are

presented. Thc experimental results conducted on various SIF and non-standard

sequences are illustrated

In h!hnd MCP DCT DPCM based monon compensated \ ~ d w cod~ng MPEG

and IT[ -T \tandud\ cncodlng can he achle\cd h\ uslng uansfonnat~on.

quanrlratlcrn. motlon compcn\ated predlctlon and en~rop\ encoding methods

[ ruall\ predlcr~\e wding 1s \OFF! and elim~nates the rele\anc! or ~nterdependenctes

In the wlurce \!mholr Drccirrclat~on In the uurce s!mbols 1s fenmall! ananed In

the source ccdlng mcdul El~mlnatlon of the redundant\ elictr In the source s>mbols

are actuall! carncd out tn entmp) cncodlng model. u b c h 1s lossless Entrop!

ncrdinp 15 not fo l lor~ng an! semanuc In the transformed coeffinenrs. uhlch

olioca~e h~tstrcam hascd on the mount of ~nfonnarlon content present In the

\\mhols

In rhc earlla chaptm. mollon estlmatlc~n and trmsfonnat~on modules are

minlminng the rulundmcier that ETISI In t~mporal and spatial dtmensions are

d~.scussed This chapta dcsk u ~ t h thc cl~m~natinn of the s~aust~cal rdundanc~es

p ~ t In the outujrnu of the rrnnsk~nned ctwfic~ents

In the mat imagc and \ l da ) ctdlng standards such u JPEG [?'I. MPEG [?&I] and I n - T [29] are making uw of RLE. Huffman and Anthmeuc

rrdlng as lhur atropy coding teshn~ques Out of these algonhs. RLE 1s a simple

100

Page 2: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

coding method on wmputation and ease for hardware implementation. It works very

well for the source symbols with long identical sequence. However, RLE is not

efficient in t m of compression ratio for non-repetitive occurrence of source

symbols. Hu&an coding algorithm is also found to be a simple encoding method

and ease for implementation. This coding anticipates some symbols should occur

mom often than others, so that it can assign shorta bitstream for more frequent

source symbols. However, by the tree generation nature in encoding, it has to send

the H u f i a n table as additional information along with the compressed bitstream

[89]. For source encoding, sorting is repetitively applied n-1 t ime for n source

symbols.

Among the three cntrop! d ~ n g methods. anfhmet~c codrng 1s an effioent

and s~mple encod~ng method [9?] Anthmettc cod~ng has actue! ed b? 5-loo0 bener

comprmslon than H u h a n coding for man! of the Images uhlch JPEG members

hate IL-ted 12-1 Hence. 11 has bem popularl> used m modem Image and \ ~ d e o

udrng standads Houeter due ro hrgh prectslon floatmg-p~nt operations m\ol\ed

In mcodlng and daod~ng moduls 11 15 computat~onall! expensl\e or more complex

than othn mtmp) mcnd~ng methods 1911 Thus rhe comh~nat~on of these three

untmp! codrng methods 1s appllcd In JPEG. UPEG and ITL-T standards This

molltalc In pmpore a neu entmp! udlng method In this rsearch uork to mtnlmize

the compuratlon erhead and codlng efficlenc\ Inferred In anthmet~c cod~ng

5.2 Proposed Entropy Coding

The proposd entrap! ~.oding aigonthm ~n\ol \es malnl: three stages narnel!.

1 1 , sconnlnp I I I ~ runking and I I I I ! ~ d ~ n g

Scanring

1%. symbols thar are read hrm the transfo

calmatton module arc m a d md tbc numbn of ou:

Page 3: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

Ranking

The scanned symbols are arranged in descending order once and rank has

been assigned with respect to their number of occurrences.

Coding

As per the information theory [IS], the number of bits assigned to a symbol

in a source set is determined by its information content. A symbol that has more

occurrences will be allocated with higher rank. which in turn protides only less

information. Thus the symbols occurred more is to be assigned with less number of

bits. Al!emati\,ely, a symbol uhlch has the least occurrence will be assigned with

lowest rank and prcl\ides w ~ t h more number of bits.

Tahle 5 1 speofia the coding format of the pmposed coding algorithm. In

the coding fonna! spcclfied helou, each s)mbol is asslped with a conrml flag <CF>

and a d e word <CODE'..

Thc coding formal of the encoded hitsrrcam 1s as follous

CF . CODE . CF * CODE- . CF-..CODE - -Ens>

uhme . CODk . 13 the codc ucird hltstream a s s p e d lo a s )mhl .

CF . IS a Control Flag, u hlch IS elthcr I o r 4 hits long and

E.oS . IS End of S>rnhd

b c h cjrnkd uould he ca~egc~nrrd in an! one of the code poups as

rnenuond In rable 5 1 The bmup \ d u e fiir the s>rnbols 1s asslgned according to

thnr froquenc> of occunmcc In the sclurce set

Page 4: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

Table 5.1 Proposed coding f o m t

I t IS observed from the tahle that each s!mbol of the poup is associated with

a wdc uord of a spec~fic lcngh The first goup (1.e.. poup numher 000) has a code

wcrd of 1 hlt and i t means that two s)mk)ls can be assigned to that poup. The two

most fiqumtl! nccumnp s!mhols are assigned to this firs1 group. The second poup

has a ctde word length of two b ~ t s allowing for the next four most frequent symbols

to he ass~pcd to this goup. 'Ills pa t tm continues for each successi\.e p u p having

a code word whlch is I b ~ t longer than the code word for the pre\Ious group. The

lact group has a code len-& of 8 hlts allowing for 256 differen1 s?mbols. It takes the

advantage of u d e up to 510 s!mbols. Proposed cod~ng Pgonthm 1s hixed on the

ding clf input source s!mhols acumllng to their frequent!. of occurrence and

cncndlng them h a . d on thr s!mhal w~th their ranks

1 Read the sequence of s~mhnl s fnrm the input souroc and caiculate the

frequency of occurrence of each r!mhl.

2. Amnge all the symbols in descend~np order b a d on their frequent!

of occurrcnccs.

Page 5: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

3. With reference to the encoding format as shown in Table 5.1, assign

the symbols with 1 bit code for the symbols with first two ranks, 2 bit

code for next four ranks and so on.

4. Read the symbols from input source and assign sequence of bitstream

for all symbols as shown in coding format.

5 . If <CF> =0, then it indicates that the cunent code word length is the

same as the previous symbol.

6. If <CF> = I , then it indicates that the current code word length is not

similar to previous symbol and then it should be suffixed with any

one of the code groups <XXX> which has been arrived based on their

rank group.

7 Repat from step 5 to step 6 until /EoS> IS encountered.

I Rcad \he h l n e sequence from the cornpre~sed hlt stream

2 The fin! h ~ t IS alua!s I and 3 dig11 goup code folloued h! the code

u ord

I+ ~th retc~ence to the e n d i n g formal Table 5 I cSlnce the enmes In

the table an: \tatlc. it can he easil! generared at decoder). each

~!mhol 1s ~ d e n ~ ~ f i e d In the table enmes b! 11s _mup and the code

word

4 Rcad the next h ~ t lo the bit stream If <CF- 1s 0. then current s!mhol

IS the m e ils the pre\lour c ~ d e _group and decode he same h ~ t

sacam

5 If CF Is I , then read the next .I h ~ t s for its p u p and then d d r

the s)mk~l w ~ t h the code word for that group

6 Repcat step 4 and step 5 until cEoSs IS mcounmed

Page 6: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

Determination of frequency of occurrence of any symbols in a set of source

set is offered in both Huffman coding and Arithmetic coding methods. Prediction or

making use of the possibility of occurrence of the previously coded symbols is

incorporated as like in RLE in the current symbols. These two features are basis for

any entropy ooding methods and also incorporated in the proposed coding algorithm.

The code word assignment in the proposed coding is to be efficient if the successive

occurrence of the source symbols is identical.

As per the proposed coding, the next code to be encoded is in the same group

as the previous code or coded from the new p u p code word is based the value of

control flag. It the control flag is 0. then the next code would be in the m e goup

only. It additionally requires only one bit (i.e.. CF value) and replicate the same

group code word as like prevlous one. If the control flag is 1. then only additional i-

hit group code word IS required to code the next source symbol. It is also observed

from the d i n g algorithm is that proposed coding leads to expansion instead

cclmpresslon tf the sct of source synbnls are dtstinct. This would be the worst case

In the prclpnsed entropy coding algorithm The same problem might be applicable

f'or even Huffman and .Arithmetic coding algorithms too.

53 Experimental Results and Discussion

In add~tion to the standard SIF sequences such as "Bike". "Table Tennis" and

"Floun Garden" uith source file size of 3:.261.!12 bytes mentioned in Table 3.1.

xlme of the non-standard t i dw sequences such as "CSB" and "Ftshtank" with

source filc size of 516hOX and 2212300R h!ws respecn\,el> as mentioned in

Table 4 . I are also in\.estigated for simulations

The "1'SB" s q u m c e cnntains linear and slow \aping object motion in the

same direction. The main feature of "F~sh t a d " \?den sequence is that there will he

an abrupt change in the motion of the fish ohject with fixed backpund objects. .4s

like "Football" sequence. "Baskethall" sequence (IhOxl20. 10 fps. 44 frames.

2537984 bytes. 24 bpp) 81x1 has objects in large d i sp l amen t wtth fast local object

Page 7: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

motion. There is an effect of camera zoom and panning movements in video

sequence. First frame of these non-standard video sequences are illustrated in

Figure 5.1.

Figure 5.1 A frame of (a) 'Fisbtank", (b) *8.tketbrUU and (c) 'USE" video sequences

The output of the transf(~imed coefficients is given to the entropy encoding

module for statistical rcdundanc! elimination The merp content present in the

t m s f c ~ m e d uc~effic~ents rtnc:i! depends tm the mot~on estimation and motion

ccrrnpcnsated pred~crlon module. The t)pe of motion estima!lon alponthm used in

the tempcoral redundant! rrductron module IS playing a ven impnnant role in

tnduc~ng the performance c~f the trmsfomat~on mcdule. Hence. different motion

estrmarlcm algonrhrns have heen tested along \vrth the propnsed entropy codlng

module In contrast urth con\entlonal anthrnetlc ccdlng. Computar~on time is

different for \.anous optimal and suh-clpt~mal fast hlock matching motion estimation

algcorithms Hence. entrc~p) rncodrng time alnne has been taken as the evaluatron

parameters In the performance cornpanson fables presented.

Hlgha cndrng efficlenc! I \ nnmall\ achle\ed In an! cntrnp\ encodlnp for

mrnlmw rcdundan~ u>mhnlr due to ~nterdrpndence In the s\mbols Thus the

motton cstlmatlon algc~nduns ulth mtnlmum drstonlon uould help the enunp!

c n d l n g module to achlc\e hrgha unnpiwsron ratlo 4n addrtlonal parameter

namcl). Compmslon Ratio (CR) 1s also cnnsrdned for enhnp! encrdtng e\aluatron

a$ mcnt~ond tn cqwtron 2 l

Page 8: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

Table 5.2 compares the compressed file size and entropy ending time for

"Bike" SIF sequence. The proposed coding applied through exhaustive Full Search

motion estimation algorithm gives 15.78 ps speed up and 0.1% more compression

than arithmetic coding.

Table 5.2 Comprnsed (ile size and encoding time comprriwm for 'Bin SIF sequence

The proposed ~ t d l n g method Ir alw applied on d~fferenl schemes of DBM

algcrn~hm The encoding speedup time for the proposed cod~ng ach~e\ed thmugh

DBM l DRW2 DBM?. DBM1 and DBMS are 21 56 9 69 1 l 55 8 47 and I 0 ps

respeclliel) o icr anthmer~c cod~ng It Ir also denied from the table that 0 OSoo.

0 37'0. 0 75'0. 0 20 and 0 Z o o more ccimpresslon has heen ach~eted for the

p n ~ p o d coding crier anlhmalc ud lng uhen 11 IS applied through the pmposed

DBM algorithms

1 able 5 3 compare the compressed file s u e and enuop! e n d n g tlme for

"Table Tmn~s" SIF sequence The pn)pscd ding appl~ed through eduus tne Full

S d motton csumatlon algorithm p a 15.89 ps s p e d up and O 8 S 0 0 more

c o r n p i o n than mlhma~c coding

Page 9: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

Table SJ Cornprated file size and encoding time cornpariron8 for "Table Tennis" SIT sequence

i FS / 1,185.51 / 1.169.62 1 3504861(10.63:1) : 3188676(11.68:1) 1 : DBMI 914.07 1 887.90 3837626 (9.7:1) 3424039 (10.88:l)

I

DBMZ 1 914.32 ; 889.54 3881734 (9.59:l) 1 3487707 (10.68:l)

The proposed coding method IS also applied on different schemes of DBM

alponthm The enwdrng spadup time for the proposed coding achieved through

DBMI. DBW. DBM3. DBM-1 and DBM5 are 26.17. 24.78, 22.08.29.83 and 11.21

ps respectivcl! over anthmetic coding. I! IS also denved from the Table 5.3 that

1.1 lo0 , l . ( E i O O . I,O!O~, l . I a ~ and l . (WOo more compression has heen achleved for the

proposed ctdlng o t n anthmetrc coding when 11 is applied thmugh the proposed

DBSl algorithms.

Tablc 5 4 c~~mplues the compressed file slze and entrap) encoding tlme for

**FInna Garden" SIF scqurnce The proposed coding appl~ed thmugh exhaustne

Full Scarch motion estimation dgonthm gncs 68 85 pr speed up and - 9:Oo more

urmprnsion than anthmerlc ctdlng

She pmposed uding method 1s also applled on drfferent schemes of DBM

algorithm Shc c n d l n g spxtup trme for the pmposed wdlng achleted thmugh

DBM I . DBM2, DBM3. DBM4 and DBhfS are 81 31. 68 75. 77 18. 6?.!! and

77.17 ps respectively o v a anthmetic cod~ng. It is also derived fmrn the tahle that

1 1.42'~. 1 1 .h!O%. 8,03°~D. R.~O.D and 8.95% more compression has been achic\.ed for

the pmpoacd adrng o\ n anthmaic coding when LI 1s applied thn~ugh the pmposed

DBM dgonthrns

Page 10: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

Table 5.4 Compressed Rlc ake and encoding time comparisons for "Flower Garden" SIF sequence

DBM2 ' 968 71 899 96 15466320 (2.4:l) 1 11 136726 (3.34 1) / DBM3 978 32 1 901.14 11597292 (3.21:l) 8608185 (4.32.1)

I

I

DBMJ 964 85 , 901 54 I 1843085 (3 14 1 ) 8755155 (4 25 I )

DBMS 980 53 903 36 1221 1972 (3 05 1) 8881522 (4 19 1)

Table 5.5 presents the compressed file slze (bytes) and entropy encoding

rtme (psi for "L'SB sequence. The proposed coding applied thmugh e.xhaustive Full

Scarch rnotlon estlrnation algondun gnes 0 . 7 ps speed up and 1 1 .M0,~ more

cornpreslon lhan arithmettc coding.

The proposed ctding method IS also applied on differen! schemes of DBM

alpridun. The enuding speedup time for the proposed coding achieved b o u g h

DBbll. DBM2. DBM.;. DBM4 and DBM5 are 0.267. 0 . 3 4 . 0.30. 0.31 and 0.33 ps

respecuvel! over arithmetic codtng. I t is also dcri\,ed fmm the Table 5.5 that 9.8J0n.

10 43'0, 10.!O~~. 10.23°~ and 10.740 more compression has been achieved for the

p m p d cod~ng C ~ L T unthmeuc c i d ~ n g when I! is applted rhrnugh the proposed

DBM dyonthms

Table 5 6 compares the compressed file site and envop) enadlng tlme for

"Basketball" sequence The prnposed ding applied through exhausa\e Full Search

motlon artmarlon algorithm p e s 2 44 ps sped up and 0 VOo more cnmpresslon

than anthmcttc codtng

Page 11: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

Table 5.5 C o m p m v d file slze and encoding time wmparhns for ''USBW sequence

TabkS.6 Comprersed flle i u c and encoding time comparison$ for *B.rrketbaU" sequence

Execathttmc(hpr) C o ~ f B e ~ ( I n b y t a ) n H h C R

91493 (5.641) / 34504 (14.97:l)

, DBMl / 39.28 , 39.013 , 100900(5.12:1) ' 50102(10.31:1) ;

1 DBM2 1 39.36 1 39.016 11352 4 5 4 : ' 59707 (8.65:1) 1

DBMl 66.0; 62.57 595305 (4.26: I ) 528837 (4.79:l) - DBM? 65.65 62.54 566915 (1.47:l) 532535 (4.:6:1)

I DBM3 / 39.70 / 39.40 103081 (5.01:l) 1

DBM? bb.01 62.96 543 I 13 (4.6?: I ) 504947 (5.02:l)

49871 (10.35:l) 1

DBMJ 65.79 62.79 548592 (4.62:ll 510650 (4.9t:l - ----- DBMS 66.15 62.95 5'0?79 (4 U:l) SIRlh? (4.Y9:I)

, DBM4 : 39.48 ; 39.17 I02905 (5.02:l) 5OOl9(lO.32:l) 1

DBMS 39.68 39.35 102933 (5.01:l) 47643 (10.84:l) ;

Thc proposed ~odlng methtd IS alu) applied on d~ffment scheme of DBM

algorithm The encodrng speedup ame for the proposed d ~ n g ache\ed through

DBUI. DBM?, DBU3. DBMJ and DBMS are 3 44. 3 11. 3 07. 3 0 and 3 :. ps

mpechveiy o v a anthmmc coding It 1s also dcnved from the table that 2 62@0.

1 35%. l 1 4 9 O 0 and 2 0-0 more compmlon has hcen achioed for the

proposed ding over anthmaic codrng when ir is applied through the propsed

DBM algonlhms

Page 12: CHAPTER 5shodhganga.inflibnet.ac.in/bitstream/10603/1264/13/13... ·  · 2015-12-04CHAPTER 5 In this chapta, the motivation behind the entropy ding in a Video CODEC has been discussed

Table 5.7 compares the compressed file size and entropy encoding time for

"Fishtank" sequence. The proposed coding applied through exhaustive Full Search

motion estimation algorithm gives 9.52 ps speed up and 0.24% more compression

than arithmetic coding.

Table 5.7 Compressed file size and encoding time comprriwns for "Fisbtank" sequence

Execution time (in ps) Compressed file s k (in byta) wtU~ CR

codinp codine FS 2.12664 2.117 12 1282298 (17 25.1) 1229641 (1799 1)

~ -

DBMl 554.98 544.93 1306728 (16.93:l) 1240830 (17.82:l) P

DBMZ ! 519.35 540.09 1381273 ( 1 5.98:l) 1357883 (16.29: I )

DBMf 55Y.39 540.12 I382937 (15.99:l) 1360047 (16.26:l) -- ---- DBMJ 54 .90 529.48 13840R' ( I 5.98:ll 1361421 ( I 6.24: 1 ) -------- DB\lf' 579 6s Z.iO.S? 1 1 6 I 6 : l 136292'(16.2?:1) ---

The proposed codlnp method is also applied on different schemes of DBM

algorithm. The encoding spccdup rime for the proposed coding achieved thmugh

DBMI. DBM2. DBM3. DBU? and DBMS are 10.05.9.26. 19.27. 15.42 and 8.84 ,us

respectlvel! over arithmaic coding. I t is also derived from the table that O.?O.~.

O.l?O,~. 0.1 1%. O.lOOo and 0.02'0 more compression has heen achieved for the

pn>p,.sd u d ~ n g crier anthmetic coding when it IS applied through the proposed

DBM algonlhms.

I t has becn derived hrn the experimental results that the proposed enmp!

cnudtnp algorithm outperforms the conventional anthrnetic coding In terms of

enctd~ng time and w~mpras~on ratto. Simulations have been conducted on dlffrrent

standard SIF sequences and nun-standard sequences with vanable hit rates and i ~deo

sample rates. The prc~poxd algorithm g i v e considerable i rnp ro~~mmts than the

existing entropy coding algorithms.