Está en la página 1de 71

I HC QUC GIA H NI TRNG I HC CNG NGH

Mai Th Lan Oanh

CC CHUN NN V NG DNG TRUYN VIDEO TRN MNG INTERNET

KHO LUN TT NGHIP I HC H CHNH QUY Ngnh : in T - Vin Thng.

H NI - 2005

Mai Th Lan Oanh


- K46 DB -

Trang i

I HC CNG NGH

I HC QUC GIA H NI TRNG I HC CNG NGH

Mai Th Lan Oanh

CC CHUN NN V NG DNG TRUYN VIDEO TRN MNG INTERNET

KHO LUN TT NGHIP I HC H CHNH QUY Ngnh : in T - Vin Thng. Cn b hng dn: TS. Ng Thi Tr Cn b ng hng dn: TS. inh Quc Tun

H NI - 2005

Mai Th Lan Oanh


- K46 DB -

Trang ii

I HC CNG NGH

LI CM N

Em xin by t lng knh trng v bit n su sc ti thy gio, TS.Ng Thi Tr, ngi thy trc tip dy v hng dn em rt tn tnh, cho em nhng nh hng v kin qu bu v cng ngh truyn hnh. Em cng xin by t lng bit n su sc ti TS. inh Quc Tun, ngi thy gip em rt nhiu, cho em rt nhiu kin thc b ch trong thi gian em thc tp ti Phng Cng Ngh Thng Tin THVN cng nh trong thi gian em lm lun vn. ng thi, em xin gi li cm n chn thnh ti tt c cc Anh, cc Ch ti Trung Tm Tin Hc v o lng THVN to iu kin v gip em rt tn tnh trong thi gian em thc tp ti trung tm. Em xin chn thnh cm n tt c cc thy c trong Trng i Hc Cng Ngh- i Hc Quc Gia H Ni nhit tnh ging dy v gip em trong thi gian em hc tp ti trng. Con xin gi n B M v gia nh tnh thng yu v lng bit n. B M v gia nh lun l ngun ng vin ca con v l ch da vng chc cho cuc i con. Ti xin cm n cc bn cng lp ng vin v gip ti trong thi gian thc hin lun vn ny. V thi gian c hn , bi lun vn ca em khng trnh khi khim khuyt. Rt mong nhn c s gp ca thy c v cc bn.

H Ni 30/5/ 2005 Sinh vin


Mai Th Lan Oanh.

Mai Th Lan Oanh


- K46 DB -

Trang iii

I HC CNG NGH

TM TT NI DUNG
Trong k thut truyn hnh, vic nn Video l mt vn qua trng cho vic truyn ti cc chng trnh truyn hnh. V n tr thnh vn nng hi khi truyn hnh s ra i, vi tn hiu Video sau khi s ho (8 bt) c tc bt bng 216 Mbt/s, khng th truyn trn mt knh truyn hnh thng thng nu khng c nn. Khi , chun nn MPEG-2 vi tc m ho t 4Mbt/s n 30Mbt/s c a ra thc hin nhim v trn. Ngy nay, khi truyn hnh trn mng Internet c pht trin, chun nn Video H.264/MPEG -4 Part 10 c a ra, vi tc m ho 1.5Mbt/s v c kh nng tng tc ti tng i tng , ph hp vi mi trng truyn ti trn mng Internet hin nay. Nghin cu cc chun nn MPEG (MPEG -1, MPEG -2, MPEG -4, MPEG -7) - c gii thiu trong chng 1 v chng 2 v c bit l chun nn H.264/MPEG -4 Part 10 cho ng dng nn Video truyn trn mng Internet- c gii thiu trong chng 3. Chng 3 s ni chi tit cch m ho, gii m video v cc u vit ca MPEG -4 Part 10 so vi cc chun nn trc .

Mai Th Lan Oanh


- K46 DB -

Trang iv

I HC CNG NGH

DANH SCH CC CH VIT TT


ADSL : Asymmetric Digital Subcriber Line. CABAC: Context-based Apdaptive Binary Arithmetic Coding. CAVLC: Context-based Apdaptive Variable Length Codinh. DCT : Discrete Cosine Transform . DVB : DVB Terrestrial DVB-C : DVB Cable DVB-S : DVB Satellite DVB-T : Digital Video Broadcasting ES : Elementary Stream. FMO : Flexible Macro-Block Ordery. GOP : Group of Picture. IEC : International Electrotechnical Commission (Part of the ISO) ISO : International Standard Organization ITU : Inernational Telecommunication Union MB : Macro-Block . MPEG : Moving Picture Expert Group NTSC : National Television System Committee. PAL : Phase Alternative Line RLC : Run Length Coding RVLC : Reversible Variable Length Codes. SAD : Summation of Absolute Difference SI : Switching Intra Picture SIF : Source Intermediate Format SP : Switching Prediction Picture VLC : Variable Length Coding VO : Video Object

Mai Th Lan Oanh


- K46 DB -

Trang v

I HC CNG NGH

1. DANH SCH CC HNH


Hnh 1: Cu trc dng Bt MPEG Video . 5 Hnh 2: Cu trc nh MPEG 7 Hnh 3: Nn MPEG . 8 Hnh 4: Gii nn MPEG . 9 Hnh 5: Qu trnh bin i sang nh dng SIF v kch thc mng cc im nh. ..12 Hnh 6: Tnh ton gi tr cho cc im nh trong b lc thp phn 12 Hnh 7: Chun nn MPEG -2 . 16 Hnh 8: Gii m phn cp theo SNR 17 Hnh 9: Gii m phn cp theo khng gian 18 Hnh 10: S t hp khung hnh trong MPEG -4 .. . 22 Hnh 11: Cu trc ca b m ho v gii m Video MPEG -4.. 23 Hnh 12: Profile v Level trong MPEG -4 . 25 Hnh 13: Phm vi ca MPEG -7 28 Hnh 14: Truyn hnh trc tuyn trn mng32 Hnh 15: Cu trc ca b m ho Video H264 36 Hnh 16: Cc phn m ho ring ca Profile trong H264.. 37 Hnh 17: S m ho Video ca H264/MPEG Part 10 39 Hnh 18: Cc mode trong MPEG-4.. 42 Hnh 19: Phn chia Macro-Block cho b chuyn ng . 43 Hnh 20: B chuyn ng nhiu Frame ngoi Vector chuyn ng, cc tham s tham chiu nh () cng c truyn i.. 45 Hnh 21: nh ni suy B (d on hai chiu) 46 Hnh 22: chuyn i s dng nh SP 49 Hnh 13: S khi ca CABAC 55 Hnh 24: Tc dng ca b lc tch khi i vi nh c nn nhiu .. 56 Hnh 25: S gii m Video H264/MPEG -4 Part 10 57 Hnh 26: V d v M ho chiu di bin i ngc . 59

2. DANH SCH CC BNG BIU


Bng 1: Tnh cht cc nh dng nh SIF c bn: ....................................................13 Bng 2: Tham s theo tiu chun MPEG -1: .............................................................15 Bng 3 :Bng thng s chnh Profiles v Levels ca tn hiu chun MPEG -2.......20

Mai Th Lan Oanh


- K46 DB -

Trang vi

I HC CNG NGH

MC LC

LI CM N...........................................................................................................................iii TM TT NI DUNG.............................................................................................................iv DANH SCH CC CH VIT TT ....................................................................................... v 1. DANH SCH CC HNH................................................................................................vi 2. DANH SCH CC BNG BIU ........................................................................................vi LI M U ............................................................................................................................ 1 Chng I: KHI QUT V NN TN HIU VIDEO ........................................... 3 V CHUN NN MPEG.......................................................................................................... 3 1.1. Mc ch nn Video ........................................................................................................ 3 1.2. Chun nn MPEG............................................................................................................ 4 1.2.1. Khi qut v nn MPEG........................................................................................... 4 1.2.2. Cu trc dng bit MPEG video ............................................................................... 5 1.2.3. Cc loi nh trong chun MPEG :........................................................................... 7 1.2.4. Nguyn l nn MPEG ............................................................................................... 8 1.2.5. Nguyn l gii nn MPEG ........................................................................................ 9 ChngII: CC CHUN NN MPEG....................................................... 11 2.1 Chun nn MPEG-1 ....................................................................................................... 11 2.1.1 Gii thiu khi qut................................................................................................. 11 2.1.2 nh dng trung gian SIF (Source Intermediate Format). .................................... 11 2.1.3 Cu trc dng bt v cc tham s ca MPEG-1..................................................... 14 2.2 Chun nn MPEG-2 ....................................................................................................... 16 2.2.1 Gii thiu v MPEG-2 ............................................................................................. 16 2.2.2 M ho v gii m video ........................................................................................ 16 2.2.3 Profiles v Levels .................................................................................................... 18 2.2.4 MPEG -2 vi pht sng v sn xut chng trnh .................................................. 21 2.3 Chun nn MPEG-4 ...................................................................................................... 21 2.3.1 Khi qut v MPEG-4 ............................................................................................ 21 2.3.2 Cng ngh m ho v gii m video trong MPEG-4 .............................................. 22 2.3.3 Cc Profiles v Levels trong chun MPEG-4 ......................................................... 24 2.4 Tiu chun MPEG-7....................................................................................................... 26 2.4.1 Gii thiu v chun MPEG-7 .................................................................................. 26 2.4.2 i tng (Objectives) v cch miu t d liu ca MPEG -7............................... 27 2.4.3 Phm vi ng dng ca tiu chun MPEG-7............................................................ 28 ChngIII: CHUN NN VIDEO MPEG-4 V NG DNG TRONG TRUYN HNH TRN MNG INTERNET. ..................................................................................................... 29 3.1 Gii thiu tng quan v truyn hnh trn Internet .................................................... 29 3.2. La chn H.264/ MPEG -4 part 10 cho truyn hnh trn mng Internet....................... 33 3.2.1 Gii thiu chung v H.264 /MPEG-4 part 10 ......................................................... 33 3.2.2 Tnh k tha ca chun nn H.264/MPEG- 4 part 10............................................. 35 3.3. Tiu chun H.264/MPEG - 4 Part 10 ............................................................................ 35 3.3.1. Lp tru tng mng NAL (Network Abstaction Layer)........................................ 35 3.3.2. Cc Profile v cc Level......................................................................................... 36 3.3.3. K thut m ho video............................................................................................ 39

Mai Th Lan Oanh


- K46 DB -

Trang vii

I HC CNG NGH

3.3.3.2. Cc nh v b chuyn ng dng trong H264/MPEG Part 10....................... 40 3.3.3.3. Xc nh Vector chuyn ng (Motion Estimation) ....................................... 49 3.3.3.4. Nn video......................................................................................................... 51 3.3.3.5. B lc tch khi............................................................................................... 55 3.3.4. K thut gii m video............................................................................................ 57 3.3.4.1. B chuyn ng .............................................................................................. 57 3.3.4.2. Khi phc li (Error Resiliency) .................................................................... 57 3.3.5 So snh hiu qu m ho ca H264/MPEG Part 10 vi cc tiu chun trc ...................................................................................................................................... 59 KT LUN .............................................................................................................................. 61 TI LIU THAM KHO ........................................................................................................ 63

Mai Th Lan Oanh


- K46 DB -

Trangviii

I HC CNG NGH

LI M U
Truyn hnh Vit Nam tri qua nhiu giai on pht trin, t truyn hnh en trng, truyn hnh mu v hin nay truyn hnh s ang pht trin mnh m trn tt c mi lnh vc: truyn hnh cp, truyn hnh s mt t DVB-T, truyn hnh s qua v tinh. Khi Internet pht trin mnh v tr thnh h thng c quy m ton cu, tr nn ph cp rt nhanh trong mi lnh vc, bng vic kt ni cc chng trnh hnh vi h thng vin thng Internet, mt cng ngh truyn hnh mi ra i l truyn hnh Internet. Thc t hin nay, c rt nhiu hng Vit Nam v trn th gii ang cung cp dch v truyn hnh trc tuyn (Online Television), khn gi ch cn truy cp vo a ch Web- Site ca nh cung cp dch v l c th xem trc tip cc chng trnh truyn hnh theo thi thc real-time(cn gi l phng thc Dowload and Play)hay c th ti File cc chng trnh truyn hnh v my tnh c nhn (gi l phng thc Dowload Stream-File). Ni v k thut truyn hnh th c rt nhiu k thut nh: k thut ghi hnh, k thut dng hnh, cc k thut nn Video, k thut truyn ti... trong khun kh bi lun vn ny, em xin c tm hiu k thut nn Video. Vn nn Video trong truyn hnh khng phi l mt vn mi m. Vi mi cng ngh truyn hnh mi ra i, s c mt cng ngh nn Video ph hp. Nn Video t nhng nm 1950 c thc hin bng cng ngh tng t vi t s nn thp. Ngy nay cng ngh nn t c hiu qu cao hn nh chuyn i tn hiu Video t tng t sang s. Vi ti Cc chun nn v ng dng truyn Video trn mng Internet, mc ch ca bi kho lun ca em l tm hiu mt s cc chun nn MPEG ng dng nn video c s dng, c bit l chun nn H264/MPEG Part 10 . Ni dung ca bi gm 3 chng: Chng 1: L do phi nn tn hiu Video v nn MPEG (Moving Picture Expert Group) l nhm chuyn gia v hnh nh, vi nhim v xy dng tiu chun cho tn hiu Audio v Video s. Trong vic nn video, MPEG t c mt t s nn tt hn so vi cc chun nn trc nh JPEG, M-JPEG, DV Chng 2: Gii thiu khi qut v cc chun nn m nhm MPEG xy dng nn video v lu tr. Trong , MPEG -1 vi mc ch l m ho Video v m thanh km theo trong cc mi trng lu tr nh a CD-ROM, a quang... vi tc bt l 1.5 Mbit/s; MPEG -2 c k tha cc tiu chun ca MPEG -1 v mc ch nhm h tr vic truyn Video s tc bt trong khong 4 30 Mbt/s; sau khi truyn hnh Internet ra i th chun nn tng ng l MPEG -4 vi nhim v nhm Mai Th Lan Oanh
- K46 DB Trang 1 I HC CNG NGH

pht trin cc chun x l, m ho v hin th nh ng, audio v cc t hp ca chng. Cn MPEG -7 l mt chun dng m t ni dung Multimedia, ch khng phi l mt chun dng nn v m ho audio hay nh ng nh cc chun trc . Chng 3: l ni dung chnh ca bi kho lun. Em nghin cu v tm hiu k thut m ho Video/ nh ng s dng chun nn H.264/MPEG -4 Part 10 ng dng cho truyn hnh trn mng Internet . H264/MPEG Part 10 c nhiu u vit trong vic nn Video so vi chun MPEG-2 rt thnh cng trong vic nn video trong truyn hnh k thut s ra i trc . Phn cui l phn kt lun, l phn tng kt li nhng g m em lm c trong bi kho lun ny. ng thi, Em cng nu ln mt vi nhn nh ca mnh v hng pht trin tip theo ca ti.

Mai Th Lan Oanh


- K46 DB -

Trang 2

I HC CNG NGH

Chng 1: Khi qut v nn tn hiu Video v chun nn MPEG

Chng I:

KHI QUT V NN TN HIU VIDEO V CHUN NN MPEG

1.1. Mc ch nn Video
Tn hiu video sau khi c s ho 8 bit c tc 216 Mb/s. c th truyn trong mt knh truyn hnh thng thng, tn hiu video s cn phi c nn trong khi vn phi m bo cht lng hnh nh. Nn video trong nhng nm 1950 c thc hin bng cng ngh tng t vi t s nn thp. Ngy nay cng ngh nn t c nhng thnh tu cao hn bng vic chuyn i tn hiu video t tng t sang s. Cng ngh nn s (Digital Compressed) i hi nng lc tnh ton nhanh. Song ngy nay vi s pht trin ca cng ngh thng tin, iu ny khng cn tr ngi. Nh chng ta bit tn hiu video c di ph t 0 6 MHz, tuy nhin trong nhiu trng hp nng lng ph ch yu tp trung min tn s thp v ch c rt t thng tin cha ng min tn s cao. i vi tn hiu video s, s lng bit c s dng truyn ti thng tin i vi mi min tn s khc nhau, c ngha l: min tn s thp, ni cha ng nhiu thng tin, c s dng s lng bt ln hn v min tn s cao, ni cha ng t thng tin, c s dng s lng bt t hn. Tng s bt cn thit truyn ti thng tin v hnh nh s gim mt cch ng k v dng d liu c nn m cht lng hnh nh vn m bo. Thc cht ca k thut nn video s l loi b i cc thng tin d tha. Cc thng tin d tha trong nn video s thng l: + d tha khng gian gia cc pixel; + d tha thi gian do cc nh lin tip nhau; + d tha do cc thnh phn mu biu din tng pixel c tng quan cao; + d tha thng k do cc k hiu xut hin trong dng bt vi xc sut xut hin khng u nhau; + d tha tm l th gic (cc thng tin nm ngoi kh nng cm nhn ca mt).vv Nh vy, mc ch ca nn tn hiu video l : - Gim tc dng bt ca tn hiu gc xung mt gi tr nht nh c th ti to nh khi gii nn; - Gim dung lng d liu trong lu tr cng nh gim bng thng cn thit; Mai Th Lan Oanh
- K46 DB Trang 3 I HC CNG NGH

Chng 1: Khi qut v nn tn hiu Video v chun nn MPEG Tit kim chi ph trong lu tr v truyn dn d liu trong khi vn duy tr cht lng nh mc chp nhn c. Vi nguyn nhn v mc ch ca vic nn tn hiu c trnh by nh trn, ngy nay c nhiu cc chun nn ra i nh: JPEG, M-JPEG, MPEG, DV Trong chun nn MPEG c s dng nhiu trong nn video trong truyn hnh vi thnh cng ca chun nn video MPEG-2 trong truyn hnh s v chun nn MPEG-4 trong truyn hnh trn mng Internet. -

1.2. Chun nn MPEG 1.2.1. Khi qut v nn MPEG


MPEG (Moving Picture Expert Group) l nhm chuyn gia v hnh nh, c thnh lp t thng 2 nm 1988 vi nhim v xy dng tiu chun cho tn hiu Audio v Video s. Ngy nay, MPEG tr thnh mt k thut nn Audio v Video ph bin nht v n khng ch l mt tiu chun ring bit m tu thuc vo yu cu c th ca tng thit b s c mt tiu chun thch hp nhng vn trn cng mt nguyn l thng nht. Tiu chun u tin c nhm MPEG a ra l MPEG-1, mc tiu ca MPEG-1 l m ho tn hiu Audio-Video vi tc khong 1.5Mb/s v lu tr trong a CD vi cht lng tng ng VHS. Tiu chun th 2 : MPEG-2 c ra i vo nm 1990, khng nh MPEG-1 ch nhm lu tr hnh nh ng vo a vi dung lng bit thp. MPEG-2 vi cng c m ho khc nhau c pht trin. Cc cng c gi l Profiles c tiu chun ho v c th s dng phc v nhiu mc ch khc nhau. Tiu chun tip theo m MPEG a ra l MPEG-4, c a ra vo thng 10 nm 1998, to ra mt phng thc thit lp v tng tc mi vi truyn thng nghe nhn trn mng Internet, to ra mt phng thc sn xut, cung cp v tiu th mi cc ni dung video trn c s ni dung v hng i tng (content/object-based). MPEG-7: l mt chun dng m t cc ni dung Multimedia, ch khng phi l mt chun cho nn v m ho audio/nh ng nh MPEG-1, MPEG-2 hay MPEG-4. MPEG-7 s dng ngn ng nh du m rng XML(Extansible Markup Language) lu tr cc siu d liu Metadata, nh km timecode gn th cho cc s kin, hay ng b cc d liu. MPEG-7 bao gm 3 b chun sau:
Trang 4 I HC CNG NGH

Mai Th Lan Oanh


- K46 DB -

Chng 1: Khi qut v nn tn hiu Video v chun nn MPEG + B cc s c t (Description Schemes) v cc c t (Description). + Ngn ng xc nh DDL (Description Definition Language) nh ngha cc s c t. + S m ho qu trnh c t. Vic kt hp MPEG-4 v MPEG-7 s to ra cc gii php l tng cho cc dch v Streaming Media, cc h thng lu tr v sn xut Streaming Media trong thi gian ti.

1.2.2. Cu trc dng bit MPEG video


Seq Seq

Seq

Seq SC

Video Params

Bitstream Params

QTs, Misc

GOP

GOP

GOP SC

Time GOP Code Params

Pict

Pict

PSC Type

Buffer Params

Encode Params

Slice

Slice

SSC

Vert Qscale Pos

MB

MB

Addr Iner

Type

Motion Qscale CBP Vector

b0

b5

Hnh 1:Cu trc dng Bt MPEG Video Trong : Sequence: Thng tin v chui bit Video Params: cha thng tin v chiu cao, b rng, t l khun hnh cc phn t nh. Bitstream Params: Thng tin v tc bit v cc thng s khc. QTs: c 2 loi QTs : o Nn trong nh (nh I I Frame) o Nn lin nh (nh P P Frame) Mai Th Lan Oanh
- K46 DB Trang 5 I HC CNG NGH

Chng 1: Khi qut v nn tn hiu Video v chun nn MPEG on video v thng tin u on to thnh mt dng bt c m ho gi l dng c s (Elementary Stream). GOP (Group Of Picture): Thng tin v nhm nh L t hp ca nhiu cc khung I, P, B. Cu trc nhm nh gm 2 tham s l: m v n (tham s m xc nh s khung hnh B v P xut hin gia 2 khung hnh I gn nhau nht, tham s n xc nh s khung B xut hin gia 2 khung P). Mi mt nhm nh bt u bng mt khung I v xc nh im bt u tm kim v bin tp. Cc tham s ca on mo u ca GOP: Time code: m nh thi, xc nh gi, pht, giy, nh. GOP Params: miu t cu trc GOP. Pict : thng tin v nh, cc tham s trong phn mo u ca Pict: Type: Cho php b gii m xc nh nh c m ho l nh I, P hay B. Buffer Params: thng tin v Buffer(ch th t truyn khung b gii m c th sp xp cc loi nh theo mt th t ng). Encode Params: cha thng tin v ng b, phn gii v phm vi ca vector chuyn ng. Slice: Mng bao gm mt vi cu trc khi k nhau. Kch thc ln nht ca mng c th bao gm ton b bc nh v kch thc nh nht ca mng l mt cu trc khi. Cc thng s ca on mo u ca Slice gm: Vert PoS: Slice bt u t dng no. Qscale: Thng tin v bng lng t. Kch thc thng tin u ca mng c xc nh bng s li cho php xut hin trong mng i vi mt ng dng nht nh, do b gii m c th b qua cc mng c nhiu li v xc nh bng tnh hiu qu ca phng php nn nh. Do h s cn bng lng t c th c iu chnh thng xuyn vi vic s dng cc mng c kch thc nh hn. H s DCT tham chiu dng trong m ha DPCM s c so chun ti mi mng. MB (Macroblock) Mt cu trc khi l mt nhm cc khi tng ng vi lng thng tin cha ng trong kch thc 16x16 im trn bc nh. Cc tham s ca on mo u ca nhm MB: Addr Iner: S lng MB c b qua. Type : Loi vector chuyn ng dung cho Macroblock. Mai Th Lan Oanh
- K46 DB Trang 6 I HC CNG NGH

Chng 1: Khi qut v nn tn hiu Video v chun nn MPEG Qscale : Bng lng t dng cho Macroblock. Coded Block Pattern (CBP): ch r Block no c m ho.

1.2.3. Cc loi nh trong chun MPEG :


Trong nn MPEG ngi ta s dng 3 loi nh sau: nh I (Intra Pictures): c m ha m khng c s so snh tham kho cc nh khc, dng trong nn trong nh. Chng cha tt c cc thng tin cn thit ti to li nh sau gii m, nn t l nn cc nh I tng i thp. V vy, nh I l im nt quan trng phc v vic truy cp vo mt on Video. nh P (Predicted Pictures): c m ho t nh I, nh P trc , nh s dng cc thut ton d on b chuyn ng. Cc nh P c th c s dng nh l c s d liu cho vic d on nh tip theo. Tuy nhin do hn ch ca k thut b chuyn ng, s nh P gia hai nh I khng th qu ln. T l nn ca cc nh P tng i ln so vi t l nn cc nh I. nh B (Bidirectionally Predicted Pictures): c m ho bi php ni suy gia cc nh I v P trc v sau . V khng c s dng m ho cc nh tip theo, nh B khng phi l ngun gc sinh ra cc li nh trong qu trnh m ho. Cc nh B cho t l nn cao nht.

M = Khong cch gia hai nh so snh

1 I

2 B

3 B

4 P B

0 B

I
NH CHUN

D ON HAI CHIU NHM NH (GOP)

N= KHONG CCH GIA HAI NH I

Hnh 2: Cu trc nh MPEG

Mai Th Lan Oanh


- K46 DB -

Trang 7

I HC CNG NGH

Chng 1: Khi qut v nn tn hiu Video v chun nn MPEG

1.2.4. Nguyn l nn MPEG

Bng lng t

Video

4: 2: 2 4:2:0

DCT

Lng t ho

M hoEntropy

Trn

B m

Rec 601

Gii lng t ho Bin i DCT ngc nh d on


Vc t chuyn ng

nh so snh Xc nh vector chuyn ng


iu khin nhm nh (Group of Picture - GOP)

Hnh 3: Nn MPEG * C s ca cng ngh nn video MPEG l s kt hp gia nn trong nh (Intra -Frame Compression) v cng ngh nn lin nh ( Inter-Frame Compression). Trong : Nn trong nh (Intra -Frame Compression): l loi nn nhm gim bt thng tin d tha trong min khng gian. Nn trong nh s dng c hai qu trnh c tn hao v khng c tn hao gim bt d liu trong nh. Qu trnh ny khng s dng thng tin ca cc nh trc v sau nh ang xt. Nn lin nh (Intra -Frame Compression): Trong tn hiu video c cha thng tin d tha trong min thi gian. Ngha l vi mt chui lin tc cc nh, lng thng tin cha ng trong mi nh thay i rt t t nh ny sang nh khc. Tnh ton s dch chuyn v tr ca ni dung nh l mt phn rt quan trng trong k thut nn lin nh. Trong thut nn MPEG, qu trnh xc nh Vector chuyn ng c thc hin bng cch chia hnh nh thnh Mai Th Lan Oanh
- K46 DB Trang 8 I HC CNG NGH

Chng 1: Khi qut v nn tn hiu Video v chun nn MPEG cc Macro-Block, mi Macro-Block c 16 x 16 phn t nh (tng ng vi 4 Block, mi Block c 8 x 8 phn t nh). xc nh chiu chuyn ng, ngi ta tm kim v tr ca Macro-Block trong nh tip theo, kt qu ca s tm kim s cho ta Vector chuyn ng ca Macro-Block . * Nguyn l nn MPEG : Dng thc u vo l Rec- 601 4:2:2 hoc 4:2:0. nh hin ti c so snh vi nh trc to ra nh khc bit. nh ny sau li c nn trong nh qua cc bc : bin i DCT, lng t ha, m ho. D liu ca nh khc bit v vector chuyn ng (c xc nh nh trn ) mang thng tin v nh sau nn lin nh c a n b m u ra. Tc bt ca tn hiu video c nn khng c nh, ph thuc vo ni dung nh ang xt (v d mt phn nn t hn hoc nhiu hn), nhng ti u ra b m ho dng bt phi c nh xc nh tc cho dung lng knh truyn.

1.2.5. Nguyn l gii nn MPEG

Video compressed
Nh m

Gii m Entropy

Gii lng t ho

Bin i DCT ngc

Video

Nh nh

S liu iu khin

D bo nh

Hnh 4: Gii nn MPEG

* Nguyn l gii nn MPEG : - u tin l gii m Entropy, sau tch d liu nh (h s bin i DCT) ra khi cc vector chuyn ng. D liu nh s c gii lng t ho v bin i DCT ngc. Mai Th Lan Oanh
- K46 DB Trang 9 I HC CNG NGH

Chng 1: Khi qut v nn tn hiu Video v chun nn MPEG Nu nh l nh loi I bt u mi nhm nh trong chui, u ra s nhn c nh hon chnh bng cch trn ( v nh loi I ch l nn trong nh, khng c b chuyn ng, khng dng d liu ca nh khc). N c lu tr trong b nh nh v c v c dng gii m cc nh tip theo. Nu nh l nh loi P th cng thc hin gii lng t ha v bin i DCT ngc kt hp vi vic s dng vector chuyn ng v lu vo b nh nh sm hn. Trn c s xc nh c d on nh ang xt. Ta nhn c nh ra sau khi cng d on nh (nh d on) v kt qu bin i DCT ngc. nh ny cng c lu vo b nh c th s dng nh l chun khi gii m cc nh tip theo.

Mai Th Lan Oanh


- K46 DB -

Trang 10

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

ChngII:

CC CHUN NN MPEG.

2.1 Chun nn MPEG-1 2.1.1 Gii thiu khi qut


MPEG -1 c hnh thnh vo nm 1988, l tiu chun ca nhm chuyn gia v hnh nh MPEG trong giai on u tin (tng ng vi tiu chun ISO/IEC 11172 ca ITU). Mc ch ca MPEG -1 l nghin cu mt tiu chun m ho video v m thanh km theo trong cc mi trng lu tr nh: CD-ROM, a quang Tc m ho trong khong 1.5 Mb/s. Chun nn MPEG -1 bao gm 4 phn : - Cc h thng - Video - Audio : ISO/IEC 11172 -1 : ISO/IEC 11172 -2 : ISO/IEC 11172 -3

- H thng kim tra: ISO/IEC 11172 -4 Trong cc phn trn ta nghin cu mt vi thng s trong phn Video (ISO/IEC 11172 -2).

2.1.2 nh dng trung gian SIF (Source Intermediate Format).


Khi truyn hnh mu pht trin, xut hin nhiu h truyn hnh khc nhau nh: NTSC ( M), PAL (chu u) vi cc h thng qut truyn hnh khc nhau nh h 525/60 v 625/50. Do cn c mt nh dng chung cho ngun tn hiu dng cho b m ho nn s liu v cc xc nh ring khc nhau ph hp mi h thng. nh dng trung gian cho ngun tn hiu c gi l SIF (Source Intermediate Format). Trong nh dng chung ny, tn s ly mu c ly theo xc nh ca chun CCIR-601. Do s mu trn mt dng tch cc ca c hai tiu chun 525/60 v 625/50 l bng nhau. Qu trnh chuyn i t nh dng theo tiu chun CCIR-601 sang nh dng SIF c thc hin bng cch s dng mt b lc thp phn theo chiu ngang cho cc mnh l ca tn hiu Y, mt b lc theo chiu ngang v mt b lc theo chiu thng ng cho cc mnh s l cho cc tn hiu Cr v Cb nh sau:

Mai Th Lan Oanh


- K46 DB-

Trang 11

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

CCIR-601
720x480 (720x576)
Y

CSIF
720x240 (720x288) Ch mnh l
Y

360x240 (360x288) Lc thp phn theo hng ngang


Y

360x480 (360x576)
Cr

360x240 (360x288) Ch mnh l


Cr

180x120 180x240 (180x144) (180x288) Lc thp phn Lc thp phn Theo hng theo hng Cr Cr ngang thng ng

360x480 (360x576)
Cb

360x240 (360x288) Ch mnh l


Cb

180x120 180x240 (180x288) Lc thp phn (180x144) Lc thp phn Theo hng theo hng Cb Cb ngang thng ng

Hnh 5:Qu trnh bin i sang nh dng SIF v kch thc mng cc im nh Qu trnh tnh ton gi tr cho cc im nh trong lc thp phn nh sau:
v tr cc im nh c tnh

n-3 x (-29)

n-2 x0

n-1 x 88

n x 133

n+1 x 88

n+2 x0

n+3 x (-29)

/ 256 Hnh 6: Tnh ton gi tr cho cc im nh trong b lc thp phn Gi tr im nh ti v tr n c tnh bng: tch s ca cc gi tr im nh t (n-3) n (n+3) vi cc h s ca b lc tng ng ti v tr ny trn hnh v trn.

Mai Th Lan Oanh


- K46 DB-

Trang 12

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

Tng cc kt qu ny c chia cho 256 v thu c gi tr im nh v tr n. Php tnh tip theo c thc hin cho im nh v tr n+2 . Mt qu trnh lc tng t p dng theo chiu thng ng to ra gi tr thp phn tn hiu Cr v Cb theo chiu ny. + S cc im nh trn mt dng tch cc c gim t 360 xung 352 thu c mt bi s ca 16 nhm t chc thun li cc cu trc khi im nh 16x16 vi cu trc 4:2:0. nh tch cc c lm gim xung (352 x 240) c gi l vng im nh xc nh (c ngha ) cho SIF. nh dng SIF phi hp vi cu trc ly mu 4:2:0 lm gim thm s liu tn hiu mu. Cc thng s cho nh dng SIF i vi cc tiu chun truyn hnh c cho trong bng sau: Bng 1: Tnh cht cc nh dng nh SIF c bn:
CCIR-601 525 S im nh trn dng tch cc im chi Y im mu Cr, Cb Tn s ly mu (MHz) im chi Y im mu Cr, Cb S dng tch cc im chi Y im mu Cr, Cb Tn s trung bnh C nh 480 480 30 4:3 240 120 30 4:3 576 576 25 4:3 288 144 25 4:3 13.5 6.75 6.75 3.38 13.5 6.75 6.75 3.38 720 360 352 176 720 360 352 176 SIF-525 4:2:0 CCIR-601 625 SIF-625 4:2:0

Mai Th Lan Oanh


- K46 DB-

Trang 13

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

Trc khi m ho MPEG -1, tc s liu ban u cn c gim nh b bin i 4:2:2 sang nh dng SIF, t dng s c tc 166 Mb/s (98 bit biu din mu) xung dng s c tc 31.5 Mb/s. Do qu trnh gii m s cn mt b chuyn i ngc li qu trnh ny.

2.1.3 Cu trc dng bt v cc tham s ca MPEG-1.


Cu trc dng bt ca MPEG -1 cng tng t nh cu trc dng bt ca MPEG, n c phn thnh cc lp nh: Sequence (chui nh) : gm nhiu nhm nh GOP, c chc nng l dng bt video. GOP (Group of Picture ): gm t 1- n nh bt u bng nh I, c chc nng l n v truy xut. Picture I, P, B: gm nhiu Slice, chc nng l n v m ho c bn. Slice : gm nhiu cc Macro Block, l n v ti ng b phc hi li. Macro-Block : gm 16 x 16 pixel, l n v b chuyn ng. Block : gm 8 x 8 pixel, l n v tnh DCT.

Mai Th Lan Oanh


- K46 DB-

Trang 14

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

V mt vi thng s ca chun nn MPEG -1 l:


Bng 2: Tham s theo tiu chun MPEG -1:

Tham s Tn hiu m ho Cu trc ly mu Kch thc nh ti a(im nh x im nh) Biu din mu chnh xc ca qu trnh lng t ho v bin i DCT Phng php lng t ho h s DCT Cu trc khi trong qu trnh lng t ho thch nghi chnh xc cc i ca h s DC Bin i RLC Bng VLC H s cn bng cc khi B chuyn ng

c im Y v Cr,Cb 4:2:0 4095 x 4095 8 bt 9 bt

DPCM tuyn tnh 16 x 16 bt

8 bt M Huffman Khng th truyn ti C th bin i Trong khung hnh v gia cc khung hnh Tun t im nh 1.85 Mb/s cho nn tham s 100 Mb/s cho dng y tham s

Qut chnh xc d on chuyn ng Tc khi nn

Mai Th Lan Oanh


- K46 DB-

Trang 15

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

2.2 Chun nn MPEG-2 2.2.1 Gii thiu v MPEG-2


Chun nn MPEG -2 l chun nn pht trin tip sau MPEG -1, c k tha tt c cc tiu chun ca MPEG -1 v mc ch l nhm h tr vic truyn video s, tc bt ln hn 4 Mb/s, bao gm cc ng dng DSM (phng tin lu tr s), Cc h thng truyn hnh hin ti (NTSC, PAL, SECAM), cp, thu lm tin tc in t, truyn hnh trc tip t v tinh, truyn hnh m rng (EDTV), truyn hnh phn gii cao (HDTV) Chun MPEG -2 bao gm 4 phn chnh: Cc h thng Video Audio : ISO/IEC 13818 -1. : ISO/IEC 13818 -2 : ISO/IEC 13818 -3

Cc h thng kim tra: ISO/IEC 13818 -4.

2.2.2 M ho v gii m video


M ho MPEG -2:
Dng Video c s

M ho Video

Gii m Video

Dng Audio c s

M ho Audio

(ES)

Gii m Audio

TRUYN TI
Dng d liu

D liu khc

Gii m d liu

Hnh 7:Chun nn MPEG-2

Mai Th Lan Oanh


- K46 DB-

Trang 16

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

Tn hiu Video v Audio c nn (theo nh nguyn l nn MPEG ) v to thnh cc dng d liu c s ES (Elementary Stream). Dng ES c s dng to nn dng d liu c s c ng gi PES (Packetized Elementary Stream). Dng PES li c tip tc ng gi to thnh dng truyn ti TS (Transport Stream). Gii m MPEG -2: MPEG -2 Coder v Decoder khng nht thit phi c cng cp cht lng. Tnh phn cp cho php cc b gii m MPEG n gin, r tin, c kh nng gii m mt phn ca ton b dng bt v nh vy c kh nng to c hnh nh tuy cht lng c thp hn cc b gii m ton b dng bt.
D liu Video c nn
Tch knh

Gii m entropy

Q-1

DCT

-1

Video chun REC.601 (mc thp)

mc thp

B chuyn ng

nh d on

nh so snh

Gii m entropy

D liu Video c nn mc cao

Tch knh

Q-1

DCT

-1

Video chun REC.601 (mc cao)

nh d on

B chuyn ng

nh d on

nh so snh

Hnh 8:Gii m phn cp theo SNR Tiu chun MPEG cho php phn cp theo t s tn hiu trn tp m (SNR) v theo phn gii. Trong :

Mai Th Lan Oanh


- K46 DB-

Trang 17

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

- Tnh phn cp theo t s tn hiu trn tp m ( SNR Scalability) c ngha l cht lng hnh nh v t s tn hiu trn tp m c tnh tho hip. Mt b gii m c tc bt thp, c th c y phn gii nhng t s tn hiu trn tp m (SNR) thp hn so vi b gii m c tc bt cao. - Tnh phn cp theo khng gian (Spatial Scalablity) c ngha l c s tho hip i phn gii. Mt my thu c tc bt thp cho hnh nh c phn gii thp hn so vi my thu c kh nng gii m ton b dng bt.
D liu Video c nn
Video chun REC.601

Tch knh

Gii m entropy

Q-1

DCT

-1

+
(mc thp)

B chuyn ng D liu Video c mc cao

nh d on

nh so snh

Gii m entropy

Ly mu cao hn

Tch knh

Q-1

DCT

-1

W
Vc t chuyn ng

B chuyn ng

nh d on

nh so snh

Hnh 9:Gii m phn cp theo khng gian

2.2.3 Profiles v Levels


Chun MPEG -2 c 4 Levels (mc) v 5 Profiles (b cng c). Trong : Profiles: L khi nim cho ta bit cp cht lng b cng c nn c s dng chun nn ny. y c s tho hip gia t s nn v gi thnh b gii nn. C 5 nh ngha Profiles :

Mai Th Lan Oanh


- K46 DB-

Trang 18

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

Simple Profiles (Profiles n gin): S bc nn thp nht, ch cho php m ho cc nh loi I v P. Do c tn tht cao v tc bt, n khng c s dng trong nn vi k thut chun on nh hai chiu (cc nh B). Main Profiles (Profiles chnh): L s tho hip tt nht gia tn hao tc bt v chi ph, do n s dng tt c cc nh I, P v B trong nn. Cht lng tt hn Profiles n gin nhng n i hi phi s dng cc thit b m ho v gii m phc tp hn. SNR Profiles Scalable (Profiles phn cp theo SNR): Tiu chun MPEG2 cho php phn cp t s tn hiu trn tp m, c ngha l cht lng hnh nh v t s tn hiu trn tp m c tnh tho hip. Chui nh chia thnh hai lp phn bit nhau v cht lng. Cc lp thp bao gm nh c cht lng c s, v d nh cha tn hiu theo chun 4:2:0. Cc lp cao bao gm lp hon thin hn so vi lp thp hn, nh vi tn hiu video trong chun 4:2:2. C th m ho knh khc nhau cho cc lp ring. Spatially Scalable Profiles (phn cp theo khng gian): Tnh phn cp theo khng gian c ngha l c s tho hip vi phn gii. Chui nh c chia ra thnh hai lp tng ng vi cc phn gii khc nhau ca nh. Lp thp hn bao gm nh c phn gii thp nh truyn hnh tiu chun. Cn lp cao hn bao gm nh c phn gii cao hn nh truyn hnh phn gii cao (HDTV). High Profiles (Profiles cao): Cho php c hai loi thang mc c ng dng trong truyn hnh HDTV vi cc nh dng 4:2:0 hay 4:2:2. N bao gm ton b cc cng c ca Profiles trc cng thm kh nng m ho cc tn hiu mu khc nhau cng mt lc.

Nh vy, gia cc Profiles ni trn c s tng thch cao dn, ngha l cc b gii m ca mt Profiles cao cp hn c kh nng gii m tt c cc Profiles cp v cp thp hn. Levels : Khi nim Levels trong chun MPEG-2 cho ta bit mc phn gii ca nh, bao gm t nh dng trung gian cho ngun tn hiu SIF ( Source Intermediate Format), nh dng c s MPEG -1 (360 x 288 @ 25Hz hay 360 x 240 @ 30Hz), n truyn hnh s phn gii cao HDTV (h thng truyn hnh vi trn 1000 dng qut).Theo quan im ng dng c 4 mc Levels trong MPEG -2 c m t nh sau:

Mai Th Lan Oanh


- K46 DB-

Trang 19

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

o Low Levels (mc thp): ph hp vi phn gii SIF c s dng trong MPEG -1 (cho n 360 x 288 pixel). o Main Levels (mc chnh): ph hp vi phn gii chun 4:2:2 (ti 720 x 576 pixel). o High Levels 1440 (mc cao 1440): nhm vo truyn hnh phn gii cao HDTV ( phn gii ti 1440 x 1152 pixel ). o High Levels (mc cao): c ti u ho i vi HDTV mn nh rng ( phn gii ti 1920 x 1152 pixel). Trong thc t ng dng, cc nh ch to chn sn mt s tho hip gia cc mc Levels v cc Profiles cho ngi s dng. Kt hp 4 Levels v 5 Profiles ta c 20 t hp kh nng v hin nay c 11 kh nng c ng dng nh trong Bng 3. Trong cc trong bng 3 ln lt t trn xung l: t l ly mu, im nh theo chiu ngang x im nh theo chiu dc, vn tc cao nht ca dng d liu sau khi nn, dng cui l cc loi nh s dng nn.
Bng 3 :Bng thng s chnh Profiles v Levels ca tn hiu chun MPEG -2
Profiles Levels 4:2:0 Low (thp ) 352 x 288 4 Mb/s Simple (n gin) Main (Chnh) SNR (Phn cp theo SNR) 4:2:0 352 x 288 4 Mb/s I, P, B 4:2:0 Main (chnh) 720 x 576 15 Mb/s I, P 4:2:0 720 x 576 15 Mb/s I, P, Block 4:2:0 High 1440 (Cao 1440) 1440x1152 60 Mb/s I, P, B 4:2:0 1920x1152 High (cao) 80 Mb/s I, P, B 4:2:0 720 x 576 15 Mb/s I, P, B 4:2:0 1440x1152 60 Mb/s I, P, B 4:2:0 720 x 576 20 Mb/s I, P, B 4:2:2 ;4:2:0 1440x1152 80 Mb/s I, P, B 4:2:0;4:2:2 1920x1152 100Mb/s I, P, B Spatially Theo khng gian High (Cao)

Mai Th Lan Oanh


- K46 DB-

Trang 20

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

2.2.4 MPEG -2 vi pht sng v sn xut chng trnh


Trong lnh vc pht sng v sn xut hu k, chun nn MPEG -2 cuicng gii quyt c bi kch a dng thc xa nay. t c kh nng ny, cn nm vng yu cu v c tnh ca tng ng dng khc nhau. Sn xut tin thi s:

Cht lng nh i hi cao khi i quay ngoi cnh, nhng tn hiu khng phi in i in li nhiu ln. Thit b nh, gn, xch tay v dng c quy. Do vy cc thit b ny c th s dng tc bt thp 18Mb/s ( tn nng lng, gim gi thnh). Cu trc GOP n gin, thun tin cho cng on dng hnh. Lu tr:

Cn cht lng cao hoc t nht bng nh gc. Cng ngh lu tr cn cn s dng tc bt ln v cu trc IB-GOP. Tc lu tr l 30 Mb/s. Sn xut hu k:

Sn xut hu k i hi c cht lng v mc cao v tnh nng dng hnh. Tc 50 Mb/sn xut v cu trc I-GOP l s la chn thch hp. Phn phi chng trnh:

Phn phi chng trnh i hi kh nng lu tr v cht lng pht sng qung b. Tc 20 Mb/s (hoc 15 Mb/s cung cp cho my pht NTSC/PAL thm ch thp hn cho dch v pht trc tip t v tinh DBS).

2.3 Chun nn MPEG-4 2.3.1 Khi qut v MPEG-4


Ngy nay, khi nhu cu truyn pht cc ng dng video v a phng tin mi trn h tng k thut Internet lm ny sinh cc yu cu chc nng mi khng c trong cc chun nn MPEG -1 v MPEG -2 hay cc chun nn trc . Thng 10 nm 1998 vi s xut hin ca chun nn MPEG -4 to ra mt phng thc thit lp v tng tc mi vi truyn thng nghe nhn trn mng Internet, to ra mt phng thc sn xut, cung cp v tiu th mi cc ni dung video trn c s ni dung v hng i tng (content/object-based). y chnh l mt cng ngh trnh din truyn Mai Th Lan Oanh
- K46 DBTrang 21 I HC CNG NGH

Chng 2 : Cc chun nn MPEG

thng a phng tin phc hp, c kh nng truyn thng ti cc mi trng truyn thng a phng tin phc hp, c kh nng truyn thng ti cc mi trng : truyn hnh s, ho tng tc, World Wide Web. V vy, nhim v ca MPEG -4 l nhm pht trin cc chun x l, m ho v hin th nh ng, audio v cc t hp ca chng.MPEG -4 ang c trin khai bi nhiu nh vn hnh mng v dch v trn th gii vi cc dch v mi ang c b xung chim cc li th cu trc h tng bng rng ang pht trin.

2.3.2 Cng ngh m ho v gii m video trong MPEG-4


Chun MPEG -4 l mt chun ng, d thay i: vi MPEG -4 cc i tng khc nhau trong mt khung hnh c th c m t, m ho v truyn i mt cch ring bit n b gii m trong cc dng c bn ES (Elementary Stream) khc nhau.

Hnh 10: S t hp khung hnh trong MPEG -4 Mai Th Lan Oanh


- K46 DBTrang 22 I HC CNG NGH

Chng 2 : Cc chun nn MPEG

Cng nh xc nh, tch v x l ring cc i tng (nh nhc nn, m thanh xa gn, vt, i tng nh video nh con ngi hay ng vt, nn khung hnh) nn ngi s dng c th loi b ring tng i tng khi khun hnh. S t hp li thnh khung hnh ch c thc hin sau khi gii m cc i tng . Trn hnh 10 l v d v s t hp khun hnh MPEG -4. Trong hnh c nhiu i tng nh: bn, qu cu, bng en, ngi hng dn v audio c t vo mt h thng to khng gian 3 chiu (3-D) i vi v tr ngi xem gi nh.

B m ho VO-1

B gii m VO-1

Video u vo

Phn chiacc Videoobject(VO)

B m ho VO-2

Dng B B Bt phn dn knh knh

B gii m VO-2

Tng hp Video u ra cc VO

B m ho VO-n

B gii m VO-n

Hnh 11:Cu trc ca b m ho v gii m Video MPEG - 4

Trn hnh 11 l cu trc ca b m ho v gii m Video MPEG - 4, cc thit b m ho v gii m video u p dng s m ho nh nhau cho mi i tng video (video-object) ring bit.V d khi ta m ho v tng hp mt khung hnh, nhiu i tng u vo nh: t, nh, ngi c tch ra khi video u vo. Mi i tng video sau c m ho ring r bi b m ho i tng video VO (video object) v c truyn i trn mng. Ti v tr thu, nhng i tng ny c gii m ring r nh b gii m VO decoder v gi n b tng hp Compositor .V vy ngi s dng c th thc hin cc hot ng tng tc ring vi tng i tng (thay i t l, di chuyn, kt ni, loi b, b xung cc i tng) ngay ti v tr gii m hay m ho. Ngoi ra, ngi dng c th download cc i tng khc t th vin c s d liu (c

Mai Th Lan Oanh


- K46 DB-

Trang 23

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

sn trn thit b hay t xa thng qua mng LAN, WAN hay Internet) chn thm vo hay thay th cc i tng c trong khun hnh gc. Cc b phn chc nng chnh trong cc thit b MPEG -4 bao gm: B m ho hnh dng ngoi Shape coder dng nn on thng tin, gip xc nh khu vc v ng vin bao quanh i tng trong khung hnh scene. B d on v tng hp ng gim thng tin d tha theo thi gian. B kt cu mt ngoi Texture coder dng x l d liu bn trong v cc d liu cn li sau khi b chuyn ng.

Trong MPEG -4, tt c cc i tng c th c th c m ho vi s m ho ti u ring ca n: videoc m ho theo kiu video, text c m ho theo kiu text, cc ho c m ho theo kiu ho thay v vic x l tt c cc phn t nh pixels nh l m ho nh ng. Do cc qu trnh m ho c ti u ho cho tng loi d liu thch hp, nn chun MPEG -4 s cho php m ho vi hiu qu cao tn hiu nh video, audio v c cc ni dung tng hp nh cc b mt v c th hot hnh.

2.3.3 Cc Profiles v Levels trong chun MPEG-4


Chun nn MPEG -4 bao gm nhiu tnh nng khc nhau v khng phi bt k ng dng no cng i hi tt c cc tnh nng ca MPEG -4. s dng cng c MPEG -4 mt cch hiu qu nht, mi thit b chun MPEG -4 ch c trang b mt s tnh nng ph hp vi mt phm vi ng dng nht nh v to iu kin cho ngi s dng la chn cng c MPEG -4, cc thit b MPEG -4 chia thnh cc nhm cng c gi l cc Profiles, mi nhm Profiles ch cha mt vi tnh nng cn thit ca chun m ho thch hp cho mt phm vi ng dng no . Mi Profiles li ch c mt s cc mc Levels khc nhau, th hin mc phc tp x l tnh ton d liu ca cng c (thng qua vic xc nh r tc bt, con s ti a ca cc i tng trong khung hnh, phc tp ca qu trnh gii m audio) Hnh sau ni v mt s b cng c ca thit b MPEG -4. C nhiu Profiles nh: Media Profiles , Scene Graph Profiles, MPEG-J Profiles

Mai Th Lan Oanh


- K46 DB-

Trang 24

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

Hnh 12:Profiles v Levels trong MPEG -4 Ta xt Media Profiles c: Audio Profiles, Visual Profiles, Graphics Profiles. Trong Visual Profiles gm cc Profiles nh sau: Simple Profiles (Profiles n gin ): ch cho php cc loi vt n gin (t l chiu cao/chiu rng l tu v t l bt thp) v c to ra vi cc ng dng c phc tp khng cao trong vic nhn ra vt. ng dng Simple Profiles cho di ng, truyn cc hnh nh Video c phc tp khng cao trn Internet hay cc thit b camera ghi cc hnh nh ng nh: a hay chip nh. C 3 mc (Levels ) c s dng cho Simple Profiles vi tc bt vo khong 64 - 384 kb/s. Simple Scalable Profile (Profiles phn mc n gin) : c th phn chia vic m ho trong cng mt mi trng hot ng nh vic d on trc cho Simple v c 2 mc c nh ngha Profiles ny. Core Profiles (Profiles li ) : dng cho cc dch v tng tc cht lng cao, phi hp cht lng tt vi vic hn ch phc tp v h tr tu hnh dng ca vt. V vy cc dch v Broadcast di ng c h tr cho Profiles ny. Tc bt ti a l 384kb/s cho mc 1 (Levels 1) v 2Mb/s cho mc 2 (Level 2). Mai Th Lan Oanh
- K46 DBTrang 25 I HC CNG NGH

Chng 2 : Cc chun nn MPEG

Main Profile (Profiles chnh ) : c to ra vi cc dch v qung b broadcast, a ch ho tin tin. N phi hp cht lng cao nht vi tnh linh hot ca cc vt c hnh dng t do m s dng n thang mu nu m ho. Mc cao nht cho php 32 vt (c nhiu mc) v tc bt ln nht l 38 Mb/s. N-bt Profiles : hu ch cho nhng vng m s dng nhng ngi m t nhit (thermal imagers), nh cc ng dng kim sot. V vy cc ng dng trong y hc mun s dng lm tng su ca im nh a ra mt min nh ng ln trong tn hiu mu v tn hiu chi. Scalable Texture Profiles (Profiles phn mc kt cu ): l gi tr trung bnh cho cc ng dng m thanh ho. N c yu cu bi cc cng ty mun xy dng cc thit b di ng, m c kt ni ng thi m thanh v hnh nh hin th, ho c dng thc BIFS c s trong cc thit b u cui rt n gin. Simple Face Profiles (Profiles b mt n gin) : ch cho cc vt c b mt n gin (cc hot nh). Ph thuc vo tng mc, song trong mt khun hnh ti a c 4 b mt c th xut hin. Tc bt cn thp, 32 kb/s l cho vic truyn ti a 4 b mt. Hybird Profiles (Profiles lai ghp) : cho php lin kt c cc vt t nhin v nhn to trong cng mt khun hnh m vn gi phc tp hp l. Vi cc vt t nhin, n so snh vi Core Profiles , cn vi cc vt nhn to, n cng gp cc hot nh li, kt cu phn lp v cc b mt hot nh - thit lp nn b cng c m to ra s lai ghp th v ni dung ca cc vt t nhin v nhn to. Profiles ny c s dng cho nhng ni c vt tht trong th gii nhn to hay ngc li kt hp cc vt tht vo trong mi trng t nhin. Basic Animated Texture Profiles (Profiles kt cu hot nh c bn): cho php hot nh ca cc hnh nh tnh v cc mt hot nh. Dng cho cc ni dung m c to ra vi tc bt rt thp.

2.4 Tiu chun MPEG-7 2.4.1 Gii thiu v chun MPEG-7


MPEG (ISO/IEC SC29/WG11) cho ra i mt tiu chun mi l MPEG-7 vi mc ch m t cc ni dung Multimedia, ch n khng phi l chun nn v m ho audio, video, nh ng nh cc chun nn ra i trc .

Mai Th Lan Oanh


- K46 DB-

Trang 26

I HC CNG NGH

Chng 2 : Cc chun nn MPEG

2.4.2 i tng (Objectives) v cch miu t d liu ca MPEG -7


Hin nay trn th gii thng tin nghe nhn c s ho tr nn ph bin v c nhiu ngi a chung. Trc khi s dng mt thng tin no th cn phi thit lp chng. ng thi vic tm d liu cn thit ngy cng kh khn hn. Ngy nay xut hin mt gii php cho vic tm kim cc thng tin nguyn bn trn trang Web m rng ton cu (World Wide Web ), nhiu cc nghin cu ra i v c nhiu ngi quan tm. Tuy nhin, trong lnh vc nghe nhn, vic nhn dng cc thng tin l cc kh. Cc knh truyn s pht trin mnh m gy kh khn cho vic la chn ra mt knh (TV, radio) hon ho. Khi MPEG -7 ra i a ra mt gii php cho vn trn, vi tn gi Giao din m t truyn thng a phng tin Multimedia Content Description Interface- v c gi tt l MPEG -7. Mt mc ch khc ca MPEG -7 l a ra mt tiu chun cho b m t c th c dng m t nhiu loi thng tin truyn thng khc nhau. S m t ny c kt hp vi chnh ni ca n, cho php tm kim d liu cho quyn li ca ngi dng mt cch nhanh chng v hiu qu. MPEG -7 khng da vo cch m ho ca d liu c xy dng trong MPEG-4, tiu chun cung cp cch m ho d liu nghe nhn ca vt th c mi quan h no trong thi gian v khng gian (trn mn hnh tn hiu video v trong phng vi tn hiu audio). Khi dng kiu m ho MPEG -4, n c th gn s m t cc yu t bn trong cnh vt, cho php truy cp ring r cc yu t ny.Nhng vi MPEG -7, n s tha nhn s khc nhau chnh trong cch miu t chnh n v a ra cc mc khc nhau i vi mi s phn bit . V cc c trng miu t phi mang y ngha trong phm vi ca cc ng dng, chng s khc vi mi lnh vc ngi dng khc nhau v ng dng khc nhau. Trong cch miu t ca d liu th nhng d liu ging nhau c dng nhng kiu khc nhau ca cc c trng, ph hp vi mi phm vi ng dng. V d v d liu th gic: mt mc di ca khi nim tru tng s c m t bi hnh dng, kch thc, mu sc, s c ng v v tr (ni trn mn hnh c th tm thy vt). Cn i vi d liu audio: ging ni, tm trng, nhp , thay i nhp , v tr trong khng gian m thanh. mc cao s gi ngha ca thng tin nh : y l cnh ca mt con ch nu ang sa bn tri v mt qu bng xanh ang ri xung bn phi, cng vi ting ng ang pht ra t nhng chic t bn di. Tt c nhng s m t ny l tin trnh m ho theo cch c hiu qu (hiu qu cho vic tm kim ). Mc trung gian ca khi nim tru tng cng c th tn ti. Mai Th Lan Oanh
- K46 DBTrang 27 I HC CNG NGH

Chng 2 : Cc chun nn MPEG

Cc mc trn c lin h vi cc c trng: mt vi c trng mc thp c sao chp t ng y , c trng mc cao li cn thit hn nhiu cho hot ng ca con ngi.

2.4.3 Phm vi ng dng ca tiu chun MPEG-7


MPEG-7 s gi ng dng c th c lu tr (trc tuyn on line hay ngoi tuyn off line) v khai thc trong hai mi trng thi gian thc (real time) v khng thc (non real time). Mt mi trng thi gian thc c ngha l thng tin c kt hp vi ni dung tr khi n b lu gi li.

Hnh II.4.1 l s khi ca mt h thng x l MPEG -7 v cng gii thch c phm vi ca tiu chun MPEG -7. H thng ny bao Hnh 13: Phm vi ca MPEG-7 gm cc c tnh miu t chng v dng c tm kim (search engine).

Feature Extraction : trch mt c trng MPEG -7 Description: miu t MPEG -7 Search Engine: Dng c tm kim

Trong , phn trch dn mt c trng (Feature Extraction) th bao gm cc cng vic nh: phn tch ni dung, trch dn c trng, cng c ch gii, cng c tc ch; phn miu t MPEG -7 bao gm: lc miu t, b miu t, ngn ng, khi nim MPEG-7 cn phn cng c tm kim gm: vic tm kim v lc la, vic phn loi, cc thao tc, vic tm tt, vic ch th.Vic khai thc y kh nng s m t d liu ca MPEG -7 v vic t ng khai thc nh vy th rt hu ch, tuy nhin khng phi lc no cng lm c. Do chun ho ny c quy nh cho php s dng chng mt cch hiu qu trong phm vi cho php.

Mai Th Lan Oanh


- K46 DB-

Trang 28

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet

ChngIII: CHUN NN VIDEO MPEG-4 V NG DNG TRONG TRUYN HNH TRN MNG INTERNET. 3.1 Gii thiu tng quan v truyn hnh trn Internet
Truyn hnh Vit Nam tri qua nhiu giai on pht trin, bt u t truyn hnh en trng, truyn hnh mu, sau n cng ngh truyn hnh s vic chuyn i t cng ngh truyn hnh tng t sang cng ngh truyn hnh s l mt bc tin b vt bc ca truyn hnh Vit Nam. Hin nay truyn hnh s ang c pht trin mnh m trn tt c cc lnh vc: truyn hnh cp, truyn hnh s mt t DVB-T, truyn hnh s qua v tinh DTH ... Khi Internet c pht trin thnh h thng c qui m ton cu, n tr nn ph cp rt nhanh trong mi lnh vc. Ngoi vn cung cp d liu di dng vn bn, nh ho ... Internet cng h tr truyn dn audio v video, c s ca cc dch v Multimedia trn qui m ton cu. Vi s ra i ca truyn hnh k thut s, cc thnh tu mi trong lnh vc truyn dn Internet tc cao - c bit l cng ngh ng thu bao s khng i xng ADSL (AAssymmetric Digital Subscriber Line) s dng k thut truyn dn bng rng Broadband cho php nng tc ti ca cc kt ni Internet ln 500 Kbit/s, 2Mbit/s, 5Mbit/s v cao hn na v chun nn MPEG -4 cho php gim bt tc truyn ti cn thit ca truyn hnh s t 4 6 Mbit/s hin nay xung 1.5 2 Mbit/Slice l nhng tin k thut to iu kin cho s hi t gia truyn hnh v Internet. Truyn hnh Internet Internet TV l cm t dng ch dch v cung cp cc chng trnh truyn hnh nh thi s, vn ngh, th thao, phim truyn ... qua mng Internet, v vy cn c l truyn hnh trc tuyn (Online Television). Hin c hai phng thc xem cc chng trnh truyn hnh qua mng Internet l: Xem trc tip theo thi gian thc Real-time (cn gi l phng thc Download and Play). Vic xem trc tip cho php khch hng khng cn ti file chng trnh v my tnh ca mnh, nhng cho cht lng hnh nh thp hn, v vy ch ph hp vi nhng kt ni Internet tc cao hoc yu cu khng cao v cht lng hnh nh. Ti file chng trnh v my tnh c nhn (Download stream-file). Phng thc ny s m bo c cht lng hnh nh chng trnh,

Mai Th Lan Oanh


- K46 DB-

Trang 29

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet nhng li mt thi gian ch i v khng p dng c cho cc chng trnh truyn hnh trc tip. s dng dch v truyn hnh trc tuyn, ngi dng s phi truy cp vo Website ca nh cung cp dch v trn Internet. Ti y s c cc ng dn cho khch hng la chn chng trnh cn xem. H thng truyn hnh trc tuyn s dng cng ngh Video Streaming, Webstreaming hay ni cch khc chnh l s kt gia cng ngh Web thng thng vi cng ngh Streaming. Hin nay, hu ht cc hng truyn hnh, thng tn ln trn th gii u s dng cng ngh truyn hnh trc tuyn nh mt phng thc ng ti thng tin hu hiu nht n vi mi ngi. Chng trnh truyn hnh trc tuyn u tin chnh thc xut hin ngy 13/5/2000 ti Stockhom (Thy in ), truyn i chng trnh ca nhc EUROVISION SONG CONTEST do EBU t chc hng nm. Vit Nam, i truyn hnh H Ni (HTV) v cng ty VDC phi hp v a vo s dng dch v truyn hnh trc tuyn ln u tin ngy 15/10/2002, chng trnh truyn hnh trc tip m chung kt cuc thi Ting ht trn sng truyn hnh H ni ln th 5, pht th nghim trn Internet ti a ch Website http://www.hanoitv.org.vn/ hay ti a ch http://www.vdconline.com/ . Ngoi ra cn nhiu nh cung cp dch v khc nh Cng ty u t v pht trin cng ngh truyn hnh Vit Nam - thuc B Bu Chnh Vin Thng c a ch Website l: http://www.vtc.com.vn c giao din nh sau:

Mai Th Lan Oanh


- K46 DB-

Trang 30

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet

Mai Th Lan Oanh


- K46 DB-

Trang 31

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet

Hnh 14: Truyn hnh trc tuyn trn mng.

Mai Th Lan Oanh


- K46 DB-

Trang 32

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet i truyn hnh Vit Nam cng ang tin hnh a vo trin khai cng ngh truyn hnh qua mng Internet cho chng trnh VTV4 (chng trnh truyn hnh cho kiu bo Vit Nam ang nh c nc ngoi ). a c cc chng trnh truyn hnh ln mng Internet phi c rt nhiu cng ngh v k thut mi, phc tp h tr. Trong khun kh cho php ca bi kho lun, em xin c cp n cng ngh c dng nn video cho vic truyn trn mng Internet.

3.2. La chn H.264/ MPEG -4 part 10 cho truyn hnh trn mng Internet 3.2.1 Gii thiu chung v H.264 /MPEG-4 part 10
T chc tiu chun quc t/ U ban k thut in t quc t (ISO/IEC) pht trin cc tiu chun m ho Video c gi l MPEG-x (nh l MPEG 1, MPEG 2 v MPEG - 4). Trong , MPEG -1 tc m ha 1.5 Mbit/s vi mc ch m ho video v m thanh km theo, c ng dng lu tr trong CD-ROM, a quangCn MPEG2 rt thnh cng trong vic m ho video v audio trong truyn hnh k thut s, vi tc m ho t 3 40 Mbit/s. Chng c ng dng qung b video s trn mng cp, ng truyn s xDSL, truyn hnh qua v tinh Tuy nhin, cc ng dng trn mng Internet hin nay vn gp vn kh khn l s hn ch v bng thng, nghn mng v s a dng cc thit b hin th ca ngi dng. Nhu cu truyn pht cc ng dng video v a phng tin (multimedia) mi trn h tng k thut Internet l ny sinh cc yu cu chc nng mi m cc chun nn video trc khng th p ng ni. Vo thng 10 /1998, MPEG -4 ra i v gii quyt c cc yu cu mi t ra. Vi tc m ho d liu khong 1.5 Mbit/s chun nn MPEG -4 gii quyt phn no v vic tc nghn mng v s hn ch ca bng thng. ng thi s a dng ca cc thit b ca ngi dng cng c gii quyt v trn thc t a s cc hng cung cp dch v truyn thng theo dng Multimedia u h tr chun MPEG -4 trong cc cu trc h tng v sn phm ang trin khai ca mnh nh: Quick Time 6 (ca Apple), Real Networks, DivX5 (ca DivXNetwork) hay sn phm ni ting ca Microsoft l Windows Media Player u cho php ngi dng xem ni dung MPEG4 trong cc thit b hin th ny. MPEG -4 bao gm cc b phn ring r, c quan h cht ch vi nhau v c th c trin khai ng dng ring hay t hp vi cc phn khc. Cc phn c bn y l: Phn 1 : System.
Trang 33 I HC CNG NGH

Mai Th Lan Oanh


- K46 DB-

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet Phn 2: MPEG -4 ASP (Avanced Simple Profile ). Phn 3: Audio. Phn 4: Conformance xc nh vic th nghim trin khai mt MPEG 4 s nh th no. Phn 5: Cc phn mm tham chiu, a ra mt nhm cc phn mm tham chiu quan trng, c s dng trin khai MPEG -4 v phc v nh mt v d demo v cc bc phi thc hin khi trin khai. Phn 6: Khung chun cung cp truyn thng a phng tin tch hp DMIF (Delivery Multimedia Integration Framework), xc nh mt giao din gia cc ng dng v mng/ lu tr. Phn 7: Cc c tnh ca mt b m ha video ti u (b sung phn mm tham chiu, nhng khng phi l cc trin khai ti thiu cn thit ). Phn 8: Giao vn, cn nh x nh th no cc dng MPEG -4 vo giao vn IP. Phn 9: m t phn cng tham chiu ( Reference Hardware Description). Phn 10: MPEG -4 Advanced Video Coding /H.264 (m ho Video tin tin tng ng vi tiu chun H.264 ca ITU). Phn 11: m t khung hnh Phn 12: nh dng file truyn thng ISO (ISO Media File Format ). Phn 13: Qun l bn quyn ni dung IPMP (Intellectual Property Managenment and Protection Extensions). Phn 14: nh dng File MP4(trn c s phn 12). Phn 15: nh dng file AVC(trn c s phn 12). Phn 16: AFX (Animation Framwork Extensions)v MuW(Multi-uer Worlds).

ng thi, Hip hi vin thng quc t (ITU) cho ra i cc khuyn ngh gi tt l chun H.26x (H.261, H.262, H.263 v H.264). Nhng khuyn ngh ny c thit k cho cc ng dng truyn thng Video thi gian thc nh Video Conferencing(truyn hnh tng tc) hay in thoi truyn hnh.

Mai Th Lan Oanh


- K46 DB-

Trang 34

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet Vi i tng truyn dn video l mng Internet th ng c vin hng u l chun nn MPEG-4AVC hay cn gi l H.264/MPEG-4 Part 10.

3.2.2 Tnh k tha ca chun nn H.264/MPEG- 4 part 10


Mc tiu chnh ca chun nn H.264 ang pht trin nhm cung cp Video c cht lng tt hn nhiu so vi nhng chun nn Video trc y. iu ny c th t c nh s k tha cc u im ca cc chun nn video trc v mt s u im nh sau: - Phn chia mi hnh nh thnh cc Block bao gm nhiu im nh, do vy qu trnh x l tng nh c th c tip cn ti mc Block. - Khai thc trit s d tha v mt khng tn ti gia cc hnh nh lin tip bi mt vi m ca nhng Block gc thng qua d on v khng gian, php bin i, qu trnh lng t v m ho Entropy. - Khai thc s ph thuc tm thi ca cc Block ca hnh nh lin tip, do ch cn m ho nhng chi tit thay i gia cc nh lin tip. Vic ny c thc hin thng qua d on v b chuyn ng. Vi bt k Block no cng c th c thc hin t mt hoc vi nh m ho trc hay nh c m ho sau quyt nh Vector chuyn ng, cc Vector c s dng trong b m ho v gii m d on cc loi Block. - Khai thc tt c s d tha v khng gian cn li trong nh bng vic gii m cc Block d tha. V d nh s khc bit gia cc Block gc v Block d on s c m ho thng qua qu trnh bin i, lng t ho v m ho Entropy.

3.3. Tiu chun H.264/MPEG - 4 Part 10


Nh ta bit, c im ni bt ca MPEG-4 trong vic m ho hnh nh l m t cc i tng trong nh thnh cc i tng ring bit m ho. Sau cc i tng c m ho (tng t nh trong k thut m ho MPEG-2), to dng v truyn i trn mng.

3.3.1. Lp tru tng mng NAL (Network Abstaction Layer)


Lp tru tng mng NAL (Network Abstaction Layer) c xc nh nh dng d liu v cung cp thng tin Header trong cch thch hp cho vic chuyn tr bi cc lp mi trng lu tr. Tt c d liu c cha trong cc khi NAL, mi khi cha mt s nguyn byte. Mt khi NAL xc nh nh dng chung cho vic s dng trong c h thng nh hng gi (Packet-oriented) v h thng nh hng dng bt. nh dng Mai Th Lan Oanh
- K46 DBTrang 35 I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet ca cc khi NAL l ng nht cho c vic phn phi dng truyn ti nh hng gi v nh hng dng bt, ngoi tr rng mi khi NAL trong lp truyn ti nh hng dng bt c th c mt tin t m ho bt u (start code prefix).

Hnh 15: Cu trc ca b m ho Video H264

3.3.2. Cc Profile v cc Level


Cc Profile v cc Level xc nh cc im bt buc. Cc im bt buc ny c thit k to thun tin cho s linh hot gia cc ng dng khc nhau ca tiu chun H264/MPEG Part 10. Profile xc nh tp cc cng c m ho hoc cc thut ton m ho c th c s dng to ra cc dng bt tng thch. Level t ra nhng gii hn cho nhng thng s ch yu nht nh ca dng bt. C 3 Profile trong phin bn th nht: Baseline, Main, Extended. Baseline Profile th c ng dng cho thi gian thc nh cc dch v m thoi nh truyn hnh tng tc v in thoi hnh. Main Profile c thit k cho cc thit b lu tr s v truyn hnh qung b. Extended Profile vi mc ch l ng dng cho cc dch v a phng tin trn mng Internet. Ngoi ra cn c 4 High Profile c nh ngha trong trung thc ca vng m rng cho cc ng dng nh: s ng gp ni dung, s phn phi ni dung, vic dn dng studio v x l qu trnh gi thng tin. Cc High Profile l : High, High 10, High 4:2:2, High 4:4:4. Trong : High Profile: h tr cho vic ly mu 8- bt video vi chun 4:2:0. High 10 Profile: h tr cho vic ly mu 10-bt video vi chun 4:2:0.
Trang 36

Mai Th Lan Oanh


- K46 DB-

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet High 4:2:2 Profile: h tr cho vic ly mu 10 bt cho thnh phn mu vi chun 4:2:2. High 4:4:4 Profile c h tr cho vic ly mu 12-bt cho thnh phn mu vi chun 4:4:4.

Cc Profile u c cc phn m ho chung v cc phn m ho ring c ch trong hnh sau.

Hnh 16: Cc phn m ho ring ca Profile trong H264. Cc phn chung cho tt c cc Profile : Slice I (Slice m ho trong nh): Slice m ho bng vic s dng d on ch t cc mu m ho bn trong cng mt Slice . Slice P (Predictive-coded Slice ): cc Slice c m ho bng vic s dng d on lin nh t cc nh tham chiu c m ho trc s dng hu ht cho Vector chuyn ng v h s tham chiu d on cc gi tr mu cho mi Block . CAVLC (Context-based Adaptive Variable Lengh Coding):m ho di bin i tng thch vi tnh hung, cho m ho Entropy.

Baseline Profile (Profile mc c bn): Th t Macro-Block linh hot (Flexible Macro-Block order): cc MacroBlock c th khng cn thit trong th t qut mnh. Bn nh v cc Macro-Block cho mt nhm Slice .

Mai Th Lan Oanh


- K46 DB-

Trang 37

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet Th t Slice bt k (Arbitrary Slice order): a ch Macro-Block ca Macro-Block u tin ca mt Slice ca mt nh c th nh hn a ch Macro-Block ca u tin ca mt vi Slice khc c trc ca cng nh m ho. Slice d tha (Redundant Slice ): Slice ny thuc v d liu m ho d tha thu c t cng hay khc mt t l m ho, so vi d liu m ho trc ca cng mt Slice .

Main Profile(Profile chnh): B Slice (Bi-directionally predictive-coded Slice ): Slice m ho bng vic s dng d on lin nh t cc nh tham chiu m ho trc , s dng ti hu ht hai Vector chuyn v cc h s tham chiu d on cc gi tr mu ca tng Block . D on c trng s (weighted prediction): phn chia cc hot ng bng vic p dng mt tha s trng s ly mu d liu d on b chuyn ng ca mi Block . CABAC (Context-based Adaptive Binary Arithmetic Coding): m ha thut ton nh phn tng thch vi tnh hung, cho m ho Entropy.

Extended Profile (Profile m rng): Bao gm tt c cc phn ca Baseline Profile: th t Macro-Block linh hot, th t Slice bt k, Slice d tha. Slice SP: Slice m ho c bit c kh nng chuyn i gia cc dng video, tng t nh vic m ho mt Slice P. Slice SI: Slice chuyn i tng t nh vic m ho mt Slice I. S phn chia d liu: d liu m ho c t trong s phn chia d liu tch ri, mi s phn chia c th c t trong n v lp khc nhau. Slice B. D on c trng s.

Mai Th Lan Oanh


- K46 DB-

Trang 38

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet

High Profile (Profile cao): Bao gm tt c cc phn ca Main Profile: Slice B, d on c trng s, CABAC. Kch c khi bin i tng thch: bin i nguyn khi 4 x 4, 8 x 8 cho vic ly mu thnh phn chi. Cc ma trn phn chia lng t ho: s phn chia khc nhau tu theo cc tn s ring c kt hp vi cc h s bin i trong qu trnh lng t ho lm ti u cht lng ch th.

3.3.3. K thut m ho video


Video u vo + _ Bin i & Lng t ho M ho Entropy Dng Bt u ra

Gii lng t ho & Bin i ngc + Quyt nh Inter/Intra Mode +

B chuyn ng

nh d on

B m nh Xc nh Vector chuyn ng

B lc tch khi

Hnh 17: S m ho Video ca H264/MPEG Part 10 Lp m ho video ca H264/MPEG Part 10 l s kt hp ca m ho khng gian, m ho thi gian v m chuyn v. nh c tch thnh cc khi, nh u tin ca dy hoc im truy cp ngu nhin th c m ho Intra- m ho trong nh, c ngha l khng dng thng tin ca cc nh khc m ch dng thng tin cha trong nh . Mi mu ca mt khi trong mt Frame Intra c d on nh dng cc mu khng gian bn cnh ca cc khi m ho trc . i vi tt c cc nh cn li ca dy hoc gia cc im truy cp ngu nhin, m ho Inter c s dng, dng d on b Mai Th Lan Oanh
- K46 DBTrang 39 I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet chuyn ng t cc nh c m ho trc .Qu trnh m ho cho d on lin nh (b chuyn ng) gm vic la chn d liu chuyn ng, cc nh tham chiu v s dch chuyn khng gian c ng dng cho tt c vic ly mu ca khi. B m ho c th la chn gia m ho Intra v Inter cho min hnh dng khi ca mi nh. M ho Intra c th ch ra im truy cp ca chui c m ho, ti vic gii m c th bt u v tip tc mt cch chnh xc. M ho Intra s dng cc mode d on khng gian ring r lm gim d tha khng gian trong tn hiu gc ca mi nh n. M ho Inter (d on mt chiu hay nhiu chiu) th vic s dng d on lin nh hiu qu hn cho mi block ca gi tr ly mu t mt vi nh c gii m trc . M ho Inter s dng cc Vector chuyn ng cho cc block c s d on lin nh (Inter prediction) lm gim s d tha thi gian gia cc nh (picture) khc nhau. Vic d on c thu c t tn hiu lc tch khi ca cc nh c thit lp li trc . B lc tch khi lm gim s nhiu khi ti cc ng bin ca block. Cc vector chuyn ng v cc mode d on trong nh (intra prediction) c th (theo l thuyt) lm bin i kch thc block trong nh. S d on thng d c nn tt hn bng vic s dng mt php bin i loi b s tng quan theo khng gian trong mt block trc khi c lng t ho. Cui cng, Vector chuyn ng hay cc mode d on lin nh c lin kt vi thng tin ca h s bin i lng t ha v c m ho s dng m Entropy nh m ho chiu di bin i thch ng theo tnh hung CAVLC (context-adaptive variable length code) hay m ho theo s hc nh phn thch ng theo tnh hung CABAC (context-adaptive binary arithmetic coding). 3.3.3.2. Cc nh v b chuyn ng dng trong H264/MPEG Part 10 1. Chia nh thnh cc Macro-Block . Mi nh video, Frame hoc Field c chia thnh cc Macro-Block c kch thc c nh bao trm mt din tch nh hnh ch nht gm 16 x 16 mu cho thnh phn chi(luma) v 8 x 8 mu cho mt trong hai thnh phn mu(chroma). Tt c cc mu Macro-Block ca thnh phn chi hoc ca thnh phn mu c d on theo khng gian hoc thi gian v kt qu sai s d on c truyn i bng vic s dng m ho bin i. Do , mi thnh phn mu ca sai s d on(prediction residual) c chia

Mai Th Lan Oanh


- K46 DB-

Trang 40

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet nh thnh cc khi. Mi khi c bin i nh dng mt php bin i nguyn, v cc h s bin i c lng t ho v c bin i s dng phng php m ho Entropy. Cc Macro-Block c t chc thnh cc Slice, biu din cc tp con ca nh cho v c th c gii m c lp. Th t truyn ca cc Macro-Block trong dng bt ph thuc vo Bn nh v Macro-Block - Macro-Block Allocation Map- v khng nht thit phi theo th t qut. H264/MPEG Part 10 h tr 5 dng m ha Slice khc nhau. n gin nht l Slice I, trong tt c Macro-Block c m ho khng c s tham chiu ti cc nh khc trong dy video. Tip theo l hai dng Slice P v Slice B c s tham chiu ti cc nh khc; vi Slice P th ch tham chiu ti cc nh trc ; cn Slice B th tham chiu ti c nh trc v nh sau n. Hai dng khc m mi xut hin H264/MPEG Part 10 l SI (Switching I) v SP (Switching P) c dng cho chuyn mch hiu qu gia cc dng bt c m ho cc tc bt khc nhau. cung cp cc phng php che giu hiu qu trong cc knh c xu hng b li vi cc ng dng tr thp, H264/MPEG Part 10 h tr mt c im gi l th t Macro-Block linh hot FMO (Flexible Macro-Block Ordering). FMO nh r mt gin n nh cc Macro-Block trong nh vo mt hoc vi nhm Slice. Mi nhm Slice c truyn ring bit. Nu mt nhm Slice no b mt, cc mu trong cc Macro-Block bn cnh v mt khng gian, thuc v cc nhm Slice c thu ng, c th c s dng cho che giu hiu qu li. Cc gin c php tri rng t cc gin hnh ch nht ti cc gin phn tn theo cc quy tc khc nhau. 2. D on trong nh Intra- Frame. Cc tiu chun trc chp nhn Macro-Block m ho trong nh, m ho bng chnh n m khng c d on thi gian. Macro-Block m ho trong nh xy ra trong cc mng (slice) hay cc Macro-Block khng chp nhn s hiu chnh thi gian ca vic d on b chuyn ng. V bn cht, Macro-Block m ho trong nh a ra mt s lng ln cc bt c m ho. H.264 s dng phng php d on cc MacroBlock m ho trong nh gim mt lng ln cc bt c m ho bng chnh bn thn tn hiu gc a vo. m ho mt block hay mt Macro-Block trong mode m ho trong nh, mt block c nh dng c s trn cc block c khi phc trc (nhng khng qua b lc). Tn hiu d tha gia cc block hin ti v d on cui cng c m ho. ly mu tn hiu chi, Block d on c th c nh dng l: cho mi Mai Th Lan Oanh
- K46 DBTrang 41 I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet Block nh (Subblock) l 4 x 4, mi Block l 8 x 8, hay mi Macro-Block l 16 x 16. Trong trng hp c la chn t 9 mode, cho cc Block luma (khi tn hiu chi) l 4 x 4 v 8 x 8; 4 mode cho mt Block luma 16 x 16; v 4 mode cho mi Block chroma (khi tn hiu mu).

Hnh 18: Cc mode trong MPEG-4 Hnh 18 ch ra mt Block luma 4 x 4 c d on. d on cc mu [a,b, , p] cho Block hin ti, cc mu khi phc li pha trn v bn tri trc [A,B, ,M] c dng theo nh hng cc mode. Cc mi tn trong hnh 18 ch nh hng d on ca mi mode. Vi mode 0 (vertical-theo chiu dc) v mode 1 (horizontal-theo chiu dc), cc mu d on c nh dng bng php ngoi suy t cc mu cao [A,B,C,D] v t cc mu bn tri [I, J, K, L], tch bit nhau. Vi mode 2 (DC- mt chiu), tt c cc mu d on c nh dng bng cch ly trung bnh ca cc mu pha trn v bn tri [A, B, C, D, I, J, K, L].Vi mode 3 (ng cho xung pha tri), mode 4 (ng cho xung pha phi), mode 5 (theo chiu dc pha phi), mode 6 (theo chiu ngang xung), mode 7 (theo chiu dc pha tri) v mode 8 (theo chiu ngang ln), cc mu d on c nh dng t trng s trung bnh ca cc mu d on t A-M. V d,cc mu a v d c d on ln lt bng cch tnh lm trn (I/4 + M/2 + A/4) v (B/4 + C/2 + D/4) trong mode 4, v bng (I/2 + J/2) v (J/4 + K/2 + L/4) trong mode 8. B m ho c th la chn mode d on cho mi Block s d gia cc Block c m ho v d on l nh nht. d on cho mi Block luma 8 x 8, mt mode c la chn t 9 mode, tng t nh vic d on khi trong nh 4 x 4. d on cho tt c thnh phn chi luma 16 x 16 ca mt Macro-Block, th ta phi dng 4 mode. Vi mode 0 (theo chiu dc), mode 1 (theo chiu ngang), mode 2 (DC), vic d on th tng t nh trong cc trng hp ca Block luma 4 x 4. Vi mode 4 (mt phng-Plane), mt hm mt phng tuyn tnh c lm khp vi cc mu pha trn v bn tri. Mi thnh phn mu ca mt Mai Th Lan Oanh
- K46 DBTrang 42 I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet Macro-Block c d on t cc mu thnh phn mu pha trn v/hay n bn tri m va c m ho hay khi phc li trc . Vic d on thnh phn mu c nh ngha cho 3 kch c Block c th l: thnh phn mu 8 x 8 nh dng 4:2:0, thnh phn mu 8 x 16 trong nh dng 4:2:2 v thnh phn mu 16 x 16 trong nh dng 4:4:4. Vi 4 mode d on cho tt c cc trng hp th rt ging vi mode d on thnh phn chi 16 x 16, ngoi tr cc mode c th t sau l khc: mode 0, mode 1, mode 2 v mode 3. 3. B chuyn ng trong cc Slice P (Prediction Inter Frame) Ngoi cc dng m ho Macro-Block Intra, cc dng m ho b chuyn ng hoc d on khc c xc nh cho cc Macro-Block Slice P. D on lin nh c lm gim vi s tng quan theo thi gian vi s tr gip ca vic xc nh Vector chuyn ng (Motion Estimation) v b chuyn ng (compensation). * Chia Macro-Block thnh cc Block : Trong H.264, nh hin ti c th c phn chia thnh cc Macro-Block hay cc Block nh hn. Mt Macro-Block ca cc mu thnh phn mu 16 x 16 c th chia nh hn thnh cc Block kch c t 4 x 4. Vi Macro-Block mode 16 x 16, c 4 trng hp l: 16 x 16, 16 x 8, 8 x 16, hay 8 x 8, ngoi ra cng c 4 trng hp cho mode 8 x 8 l : 8 x 8, 8 x 4, 4 x 8, hay 4 x 4 . Mt Block kch c nh hn yu cu mt s lng bt ln truyn Vector chuyn ng v d liu thm vo ca vic phn chia, tuy nhin d liu d b chuyn ng c th c gim. Do , vic la chn kch c phn chia ph thuc vo cc c im video u vo. S phn chia Macro-Block thnh cc Block c minh ho trong hnh sau:

Hnh 19: Phn chia Macro-Block cho b chuyn ng Trn: Phn chia cc Macro-Block . Di: Phn chia cc phn 8 x 8. Mai Th Lan Oanh
- K46 DBTrang 43 I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet * Cc gi tr d on cho thnh phn chi (Luma) v thnh phn mu (Chroma): Tn hiu d on cho mi khi luma m x n m ho d on thu c bng vic i ch din tch ca nh tham chiu tng ng, n c xc nh bi Vector chuyn ng bin i v ch s nh tham chiu. Nh vy, nu Macro-Block c m ho khi dng dng Sub-Macro-Block (Macro-Block ph) Inter 4 x 4, nhiu nht 16 Vector chuyn ng c th c truyn i cho mt Macro-Block P Slice. chnh xc b chuyn ng bng khong cch mu. Trong trng hp Vector chuyn ng nhm trng v tr ca mt mu nguyn vn (Integer- Sample), cc tn hiu d on l cc mu tng ng ca nh tham chiu; nu khc i, chng c ni suy cc v tr ca mu con (Sub-Sample). Trong thnh phn tn hiu chi, cc mu phn t nh ph ti v tr mt phn hai phn t nh c pht u tin v c ni suy t cc mu phn t nh nguyn bn cnh s dng mt b lc FIR 6 u ra vi cc trng s (1, -5, 20, 20, -5, 1)/32. i khi tt c cc mu mt phn hai phn t nh l sn c, vi mi mu mt phn t phn t nh c sinh ra khi s dng php ni suy tuyn tnh hai chiu gia cc mu mt phn hai hay c phn t nh bn cnh (ly trung bnh cc v tr nguyn mu v na mu). Vi thnh phn tn hiu mu (Chroma): Vic ly mu ngun Video nh dng 4:2:0, 1/8 cc mu phn t nh c dng trong cc thnh phn mu (tng ng vi cc mu phn t nh trong thnh phn mu). Cc mu ny c ni suy hai chiu(ni suy tuyn tnh) gia cc mu nguyn phn t nh mu. * B chuyn ng: H264/MPEG Part 10 cho php cc Vector chuyn ng khng hn ch, tc l chng c th nhm ra ngoi min nh. Trong trng hp ny cc Frame tham chiu c m rng ra ngoi bin nh bng vic lp li cc Pixel bin trc khi ni suy. Cc thnh phn Vector chuyn ng c m ho vi sai khi dng hoc l gi tr trung bnh (median) hoc l d on nh hng t cc khi xung quanh. Khng c d on thnh phn Vector chuyn ng cc bin ca Slice. H264/MPEG Part 10 h tr d on b chuyn ng a nh (Multi-Picture). iu ny c ngha l c nhiu hn mt nh c m ho trc c th c s dng tham chiu cho d on b chuyn ng. Hnh sau minh ho khi nim ny

Mai Th Lan Oanh


- K46 DB-

Trang 44

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet

Hnh 20: B chuyn ng nhiu Frame ngoi Vector chuyn ng, cc tham s tham chiu nh () cng c truyn i. C b m ho v b gii m phi lu tr cc nh tham chiu c s dng cho d on nh Inter trong b nh m a nh (Multi-Picture). B gii m sao lu li b nh m a nh ca b m ho, theo dng nh m nh tham chiu v cc hot ng iu khin qun l b nh bt k c xc nh trong dng bt. Tr khi kch thc b nh m a nh c t cho mi nh, ch s m nh tham chiu c nh v bn trong b nh m a nh th phi c k hiu. Tham s ch s tham chiu cho mi khi luma b chuyn ng 16 x 16, 16 x 8, 8 x 16 hoc 8 x 8. Ngoi cc mode b chuyn ng c m t trn, Macro-Block P- Slice cng c th c m ho trong mode gi l SKIP. i vi mode ny, c tn hiu li d on lng t ha ln Vector chuyn ng hoc tham s ch s tham chiu u khng c truyn i. Cc tn hiu thit lp li th thu c tng t nh cch vi tn hiu d on ca Macro-Block Inter 16 x 16, tc l tham chiu ti nh t v tr c ch s 0 trong b nh m a nh. Nhn chung Vector chuyn ng c s dng cho vic thit lp li Macro-Block SKIP l ng nht vi b d on Vector chuyn ng cho khi 16 x 16. Nu cc iu kin c bit c duy tr, Vector chuyn ng Zero c s dng thay cho n. 4. B chuyn ng trong cc Slice B (Bi-Direction Prediction Inter Frame) D on hai chiu rt c hiu qu gim s tng quan theo thi gian bng vic s dng cc nh tham chiu. Cc chun nn hin nay vi cc nh B s dng mode d Mai Th Lan Oanh
- K46 DBTrang 45 I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet on hai chiu, tc l ch cho php kt hp cc tn hiu d on trc vi cc tn hiu d on sau. Mt tn hiu d on c nhn t mt nh trong nh (Inter Picture) tip sau, hay t mt nh d on trc, hoc t tn hiu trung bnh tuyn tnh ca hai tn hiu d on b chuyn ng.

Hnh 21: nh ni suy B (d on hai chiu) So vi cc tiu chun trc , H264/MPEG Part 10 tng qut khi nim Slice B v khng nhng ch h tr mt cp d on theo hng forward/backward (tin/li) m cn c hai cp theo hng forward/forward (tin/tin) v backward/backward (li/li). Tham chiu tin hai bc (two forward) c th c li cho d on b chuyn ng ca mt vng va thay i cnh trc , v tham chiu li hai bc m cnh va thay i sau . Cc Slice m ho d on hai chiu c th cng c s dng tham chiu cho vic m ho trong nh ca cc nh khc. Nh vy, cc nh khc c th tham chiu cc nh B cho d on chuyn ng, ph thuc vo hot ng iu khin qun l b nh ca vic nh m a nh. Do , s khc nhau c bn gia Slice B v Slice P l: cc Slice B c m ho theo cch trong mt s Macro-Block hoc Block c th dng trung bnh trng s ca hai gi tr d on b chuyn ng ring bit cho vic hnh thnh cc tn hiu d on. Nhn chung cc Slice B dng hai b nh m nh tham chiu khc nhau gi l b nh m nh tham chiu th nht v th hai tng ng. Cc nh no c xp t ng v tr thc t trong mi b nh m nh tham chiu th c a ra iu khin b nh m nh.

Mai Th Lan Oanh


- K46 DB-

Trang 46

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet * Cc mode d on trong Slice Block: Trong cc Slice B, c 4 dng d on nh Inter khc nhau c h tr: d on List 0, List 1, hai hng (bi-predictive)v trc tip (direct). Trong , d on List 0 hin th rng tn hiu d on c to thnh nh dng b chuyn ng t nh ca b nh m tham chiu u tin, th nh ca b nh m nh tham chiu th hai c s dng cho vic xy dng tn hiu d on nu d on List 1 c s dng. H264/MPEG Part 10 gii thiu mode trc tip (direct-mode), n khng yu cu thng tin km theo (bn cnh), nhng nhn nh tham chiu, kch c khi, d liu Vector chuyn ng t nh Inter tip theo. D on trng s c lm tng thm do s chuyn tip dn dn t cnh (scene) n sang cnh kia. Trong mode d on hai hng, tn hiu d on c to thnh bi trung bnh trng s ca tn hiu d on b chuyn ng List 0 v List 1. D on c trng s s c ta cp n sau y. * D on c trng s (weighted Prediction) Tt c cc chun nn ang c hin nay u coi cc nh tham chiu c trng s bng nhau, v d nh tn hiu d on thu c bng cch ly trung bnh cc tn hiu tham chiu c trng s bng nhau. Nhng s bin i dn dn t cnh nay sang cnh khc th cn cc trng s khc nhau. S bin i dn dn l rt ph bin trong cc chuyn ng, chuyn cnh t m dn sang en (fade to black) (fade to black : cc mu thnh phn chi ca cnh dn dn xp x zero, cc mu thnh phn mu dn dn xp x 128), mt cnh chuyn i sang m dn t en (fade from black). H264/MPEG Part 10 s dng phng php d on c trng s cho mt MacroBlock ca Slice P hay Slice B. Mt tn hiu d on l p cho Slice B c thu c bng cc trng s khc nhau t hai tn hiu tham chiu l r1 v r2, ta c: P = w1 x r1 + w2 x r2 Trong w1 v w2 l cc trng s. N c xc nh khc nhau theo hai loi n (Implicit) v hin (explicit) trong b m ho. Trng hp hin, cc tha s c truyn trong phn u ca Slice (header Slice ). Trong trng hp n, cc tha s c tnh ton da trn c s khong cch thi gian gia cc nh. Trng s nh hn c p dng nu khong cch thi gian gia nh tham chiu v nh hin ti l gn ; cn trng s ln hn cho khong cch thi gian di.

Mai Th Lan Oanh


- K46 DB-

Trang 47

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet * Vic phn chia cc Macro-Block : Cc Slice B dng s chia nh Macro-Block tng t nh vi cc Slice P. Tc l vi Macro-Block 16 x 16 c th phn chia thnh cc phn vi kch thc nh: 16 x 16, 16 x 8, 8 x 16 v 8 x 8; cn vi khi c kch thc 8 x 8 th c th chia thnh cc phn vi kch thc nh: 8 x 8, 8 x 4, 4 x 8 v 4 x 4. Ngoi ra vi cc mode d on khc nhau (nh d on trc tip hay d on hai chiu) c th dng cc kch thc nh khc nhau.. Nu khng c tn hiu d on c truyn i cho mode Macro-Block trc tip, n s c dng n mode SKIP Slice Block v c th c m ho rt hiu qu, tng t nh vi mode SKIP trong cc Slice P. Cc Vector b chuyn ng cng tng t nh i vi Slice P vi nhng bin i thch hp v cc khi bn cnh c th c m ho khi dng mode d on khc nhau. 5. Cc mng SP v SI. Trong cc tiu chun trc , vic chuyn i hon ton gia cc dng bt (bitstream) th c th ch trong mt nh I. Vic khi phc li cc nh I ti cc khong thi gian c nh cho php truy cp ngu nhin hay hin th li nhanh. Tuy nhin, mt hn ch ca nh I l n yu cu s lng bt ln, v vy cc nh I khng khai thc c s d tha v mt thi gian. H.264 gii thiu cc mng chuyn i l SP (Switching P) v SI (Switching I) chuyn i gia cc dng bt c m ho cc tc bt khc nhau. Cc tn hiu d on Inter ca cc dng bt cho mt Frame SP c chn c lng t ho trong min bin i, sau c a vo di bin th hn cho php m ho tc bt thp tn hiu khc nhau gia cc dng bt. Cc Frame SI c xc nh thc hin s thch nghi hon thin cho cc Frame SP trong trng hp m d on Inter khng th c s dng do cc li truyn dn. Trong hnh 22 ch ra mt v d v cch s dng cc nh SP chuyn i gia cc dng bt khc nhau nh th no. Chng ta tha nhn rng c 2 dng bt l P(1,k) v P(2,3) tng ng vi cng mt chui bt c m ho ti cc tc bt khc nhau. Trong khong thi gian mi dng bt c m ho, cc nh SP c t ti cc v tr chuyn i t mt dng bt n dng bt khc s c cho php. Trong trng hp chuyn i t dng bt P(1,3) trn n P(2,3), mt nh SP l S(3) cho php a ra nh P(2,3) gii m bng vic s dng P(1,2) trong dng bt khc, thm ch l bao gm cc b chuyn ng. Mng SI c s dng tng t nh mng SP, nhng d on c nh dng bng vic s dng cc mode d on trong nh 4 x 4 t cc mu gii m trc ca nh c khi phc li. Mai Th Lan Oanh
- K46 DBTrang 48 I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet

Hnh 22: chuyn i s dng nh SP 3.3.3.3. Xc nh Vector chuyn ng (Motion Estimation) Trong khi thc hin DCT v lng t ha phc v cho nn khng gian bn ngoi ca mt Frame, xc nh vetor chuyn ng c s dng nn s d tha v thi gian, v d nh trong min thi gian qua hai Frame lin tip. lm mt cnh tiu biu, t mt phim truyn v d t 25 30 frame lin tip c hin th trong mi giy bng tivi hay my chiu phim. Tuy nhin, khng may l trong mt vi giy bt k, mt chui cc hnh nh lu li ging nhau.Phng nn c th khng thay i tt c, cc c tnh cn li cng tng t v v vy cc Frame lin tip rt ging nhau. Vic xc nh vetor chuyn ng thc hin php phn tch gia hai frame lin tip v xc nh nhng min ca hnh nh c thay i hay chuyn ng gia cc nh. Trong nhiu trng hp mt min lu li chnh xc v n trong cc nh d on v th n cho t m ho n gii m hin th min ny khi n trong nh d on. Nu min di chuyn theo mt hng xc nh, thut ton xc nh vetor chuyn ng iu khin qu trnh gii m s dng cc mnh (piece) ca hnh nh nh trong nh d on, nhng di chuyn n mt lng nht nh trong mt hng c xc nh. Trn thc t iu ny c hon thnh bng vic gi vetor chuyn ng trong dng bt MPEG -4. Vetor ny s ch dn gii m trong vic chn cc phn thch hp ca cc nh gii m trc c s dng trong s thit lp li ca mt dng khung hnh. N c lm sch v th t l nn rt cao. Trn thc t, mt vi loi ni dung c th c nn vi phm vi ln dn ti thiu cc hnh ng trong hnh nh. Mt v d l li m Mai Th Lan Oanh
- K46 DBTrang 49 I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet u ca ni dung , nh l mt ngi pht thanh vin, ci to ra mt dng MPEG -4 nn rt cht. c th l mt iu mong i, vic xc nh vector chuyn ng l mt hm c lng rt cao. Vic tm kim qua mt hnh nh cho tt c cc vt c th (cc vng) th c th thay i bt k v tr s cn n nhiu s tnh ton.Tuy nhin ch c 1/15 n 1/30 giy lm iu ny trc khi khung tip theo n x l. hiu tt hn cc cch khc nhau ca vic thc hin xc nh vector chuyn ng, hy quan st k thao tc bn tay. V c bn, vic xcnh vector chuyn ng cn chia hnh nh thnh cc khi nh hn v ly mi khi ti cc thi gian v v tr khc nhau trn pha trn cng ca nh trc xc nh nu l ci khp nhau. Vic so khp c th c lm bng vic tnh ton s khc nhau gia mi im nh (pixel) trong khi nh v vic so khp v tr trong cc nh trc . Nh vy, mt con s (gi tr SAD Summation of Absolute Difference = tng s khc nhau tuyt i) thu c ci biu th how well- tt nh th no l khi ring bit thch hp vi v tr no trong nh trc . Nu gi tr SAD l khng (zero) ngha l mi im nh (pixel) l chnh xc trong cng mt v tr nh trong nh trc , cho nn v tr mi cho khi tm c. Nu khng mt v tr no l khp hon ton, th thut ton c hai la chn : u tin : n kt lun rng tt c s khc nhau l qu ln ngha l mt cu hi t ra l mt thc th mi khng tn ti trong nh trc hay n di chuyn qu xa so vi v tr trc hay v tr sau . Trong trng hp th hai, gi tr SAD nh khc khng (nonezero) n chp nhn s tho mn nht tuy nhin s tho mn khng hon ton.

Trong tiu chun MPEG -4, vi mi 16 x 16 im nh trong mt khi th c tho mn cho tt c cc v tr trong mt vng tm kim, phm vi xa bao nhiu t v tr gc mt khi (block) c th di chuyn gia hai khung (frame). in hnh vng tm kim l +/- 16 im nh. Khi , vi mi v tr tm kim l 256(=16 x 16) im nh ca mi block th c so snh vi nh trc . Vi nh dng CIF phn gii l (352 x 288) ti 30 nh (frame) trn mt giy (frame/s) cho dng video, con s so snh nh sau: Mi Macro-Block c: 16 x 16 = 256 pixel; Mi Macro-BLock c tho mn trong mi v tr tm kim l: 16 x 16 =256; Mi khung hnh (frame) bao gm 396 block;
Trang 50 I HC CNG NGH

Mai Th Lan Oanh


- K46 DB-

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet 30 khung hnh c x l trong mi giy.

Nh vy, tng s khc nhau (c cng v tr) trong mt giy kt qu l: 256 x 256 x 396 x 30 = 778.567.680. V d b x l a nng c kh nng thc hin c vic cng v tr trong mt chu k ng h, b x l c th cn chy vi tn s l 779 MHz thc hin xc nh vector chuyn ng. C hai gii php tiu biu nh sau: 1. Nh nhng hn l dng thut ton ti u nht. 2. C s tr gip ca phn cng l xc nh vector chuyn ng. 3.3.3.4. Nn video 1. Nn theo min thi gian. Nhng d tha v mt thi gian l nhng hnh nh ging nhau lp i lp li t khung ny sang khung khc, v d nh khung nn khng chuyn ng ca mt chng trnh i thoi trn truyn hnh. V vy, gim bt d tha ny ta phi tin hnh nn theo min thi gian. Khi b m ho ang hot ng ch gia khi, khi ny s phi qua cng on hiu chnh chuyn ng. Qu trnh ny s pht hin ra bt k chuyn ng no din ra gia khi v mt khi tng ng mt hoc hn mt nh tham chiu c lu tr t trc, sau to ra khi chnh lch hoc li. thao tc ny lm gim bt d liu trong mi Block mt cch hiu qu do ch phi biu din chuyn ng ca n m thi. Tip n l cng on bin i Cosine ri rc DCT bt u nn theo min khng gian. Khi b m ho hot ng ch trong khi, khi ny s b qua cng on hiu chnh chuyn ng v ti thng cng on DCT. 2. Nn theo min khng gian. D tha v mt khng gian l cc khi c cha cc im nh tng t nhau hoc ging ht nhau. Trong nhiu trng hp cc im nh thng khng thay i nhiu. Nh vy c ngha l tn s thay i gi tr im nh trong khi ny l rt thp. Nhng khi nh th c gi l khi c tn s khng gian thp. B lp m li dng c im ny bng cch chuyn i cc gi tr im nh ca khi thnh cc thng tin tn s trong cng on bin i Cosine ri rc.

Mai Th Lan Oanh


- K46 DB-

Trang 51

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet * Bin i Cosine ri rc (DCT) Bin i Cosine l mt hm m lm bin i d liu hnh nh c th hin trong h to X-Y sang min tn s. Cng on DCT bin i cc gi tr im nh ca khi thnh mt mng li gm cc h s ngang dc t trong khng gian tn s. Khi khi ban u c tn s khng gian thp, DCT s tp hp nng lng tn s vo gc tn s thp ca mng li. Nh vy, nhng h s tn s thp gc s c gi tr cao hn. Mt s lng ln cc h s khc cn li trn mng li u l cc h s c tn s cao, nng lng thp v c gi tr thp. Ti y, h s DC v mt vi h s tn s thp s hm cha phn ln thng tin c m t trong khi ban u. C ngha l b lp gii m c th loi b phn ln h s tn s cao cn li m khng lm gim cht lng hnh nh ca khi. B lp m chun b cc h s cho cng on ny bng cch qut cho mng li theo ng zig-zag, bt u t h s DC v qua v tr ca h s ngang dc tng dn. Do vy n to ra c mt chui h s c sp xp theo tn s. u im c o hn ca H264/MPEG Part 10 l ch n s dng bin i khng gian nguyn(gn ging vi DCT) i vi cc khi 4 x 4 im nh. Ta xt bin i nguyn cho cu trc 4 x 4 nh sau: + Cho h s DCT ca khi d liu u vo 4 x 4 l F, cng thc chnh xc c cho l : X=HFHT Trong ma trn H l (1)

HT l ma trn chuyn v ca ma trn H. Cc gi tr a,b, c l :

Tuy nhin cho n gin ta c th cho gi trc =0.5 v m bo tnh trc giao th cc gi tr ca a, b c la chn nh sau:

Mai Th Lan Oanh


- K46 DB-

Trang 52

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet

Do php nhn trong qu trnh bin i c trnh do phi kt hp vi qu trnh lng t ho, v vy phng trnh (1) c vit thnh :

Trong : + Ma trn H c cho l :

+ Ma trn SF l :

biu din php nhn tch trc tip phn t vi phn t (the element by K hiu element multiplication ) ca ma trn tng ng. So snh vi MPEG-2, th ta thy trong tng Slice s c 1 khi u tin cha gi tr h s DC v cc khi tip theo s c nhng gi tr s c nhng gi tr khc nhau, nhng khi ny c gn thm gi tr d on khi, to thnh chui dng khi. Cn vi MPEG4 c th d on xa hn. Ch cn mt khi cng c th d on ton b hng trn cng ca h s hoc c th d on ton b ct bn tri ca h s t 1 khi u tin. * Lng t ho Qu trnh lng t ho l qu trnh bin i c mt thng tin, lm gim bt s lng bt cn thit biu din cc h s. Da trn mt h s t l xch (c th iu chnh bi b m ho), b lng t ho s cn i tt c cc gi tr h s. Do phn ln cc h s i ra t DCT u mang nng lng cao nhng gi tr thp nn b lng t ho bt u bng mt s gi tr cao u chui, theo sau l mt hng di cc h s c
Trang 53

Mai Th Lan Oanh


- K46 DB-

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet lng t ho v 0. B lp m Entropy c th theo di s lng cc gi tr 0 lin tip trong mt chui m khng cn m ho chng, nh vt gim bt c khi lng d liu trong mi chui. lng t ha cc h s bin i, H264/MPEG Part 10 dng phng php lng t ha v hng. Cc b lng t ho c la chn cho mi Macro-Block l da vo cc tham s lng t ho QP (Quantization Parameter). Cc b lng t ho c sp xp sao cho c s tng khong 12.5% trong kch thc bc lng t ho khi QP tng mt n v. Nhn chung cc h s bin i c lng t ho ca khi c qut zig-zag v c truyn i nh dng phng php m ho Entropy. * M ho Entropy M ho Entropy trong cc tiu chun trc nh MPEG -1,2,4, H.261, v H.263 th c bn l trn cc bng c nh m ho bin i theo chiu di (VLC). Cc tiu chun xc nh cc b m ho t l c bn trn s phn b xc sut ca cc video chung thay cho m Huffman chnh xc n cc chui video. Tuy nhin H.264 s dng cc VLC m khp vi mt biu tng c m ho c bn trn cc c trng ca ng cnh. Tt c cc phn t c php, ngoi tr cc d liu d tha, c m ho bng m ExpGolomb. m c c cc d liu d tha (cc h s bin i lng t ho) th ta s dng phng php qut Zig-Zag (xen k nhau) hay qut ln lt (khng xen k hay phn trng). m ho d liu d tha, mt phng php phc tp hn gi l CAVLC(m ho chiu di bin i tng thch theo tnh hung) c pht trin. Ngoi ra, CABAC (m ho thut ton nh phn tng thch theo tnh hung) c pht trin trong Mail Profile v High Profile, CABAC c kh nng m ho tt hn nhng phc tp cao hn so vi CAVLC.
+ M ho chiu di bin i tng thch theo tnh hung - Context-based

Adaptive Variable Length Coding (CAVLC) Sau khi bin i v lng t ho, xc sut cc h s l zero hay +/-1 l rt ln. CAVLC x l cc h s zero v +/-1 theo cch khc nhau vi cc mc ca cc h s. Tng s cc s zero v +/-1 c m ho. Cc h s khc cc mc ca chng c m ho. + M ho thut ton nh phn tng thch theo tnh hung Context based Adaptive Binary Arithmetic Coding (CABAC) CABAC dng thut ton m ho, t c hiu qu nn tt hn, m hnh c kh nng cho mi phn t biu tng c cp nht nh trong hnh 28. Qu trnh x l m ho CABAC bao gm 3 bc c bn sau y:

Mai Th Lan Oanh


- K46 DB-

Trang 54

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet
Cp nht c lng xc sut M hnh ho tnh hung c lng xc sut Phng tin m ho

Nh phn ho

B m ho thut ton nh phn tng thch

Hnh 23: S khi ca CABAC Bc 1: Nh phn ho; mt biu tng gi tr ca n khng phi l nh phn (nh mt h s bin i hay Vector chuyn ng) l bn duy nht chui nh phn trc c m ho thut ton. Qu trnh x l ny th ging nh vic x l ca vic bin i mt biu tng d liu thnh m ho chiu di bin i, nhng m nh phn c m ho tt hn bng b m ho thut ton trc truyn. Bc 2: phm vi lm m hnh: mt phm vi m hnh th c kh nng cho mt hay nhiu phn t ca biu tng nh phn. Mt m hnh c kh nng c la chn nh vic la chn s tng ng c th ph thuc vo cc phn t c php m ho trc . Bc 3: thut ton m ho nh phn:Mt b m ho thut ton m ho mi phn t theo m hnh c kh nng la chn cng vi mt vic cp nht m hnh tip sau.

3.3.3.5. B lc tch khi Mt c trng ring ca m ho da trn c s khi l c th nhn thy cc cu trc khi. Cc mp ca khi c cu trc li vi chnh xc km hn cc phn t nh (pixel) bn trong v nhn chung dng khi (blocking) c xem l mt trong nhng nhiu artifact d nhn thy nht vi cc phng php nn hin ti. Do nguyn nhn ny m H.264/MPEG-4 Part 10 s dng b lc tch khi (Deblocking Filter) lm gim hin tng tch khi, ngn chn vic truyn ca tp m m ho c tch lu. Ti b lc ny, cng lc c iu khin bi gi tr ca nhiu phn t cu trc. Cc chun nn trc khng s dng b lc tch khi bi v vic b sung rt phc tp, mt khc vic chia cc nhiu khi c th c lm gim bng vic s dng MC chnh xc mt na phn t nh. Mt na phn t nh thu c bng cch lc tuyn tnh (bilinear filtering)ca cc phn t nh nguyn vn bn cnh pht huy vai tr lm nhn ca m ho tp m trong min phn t nh nguyn vn.

Mai Th Lan Oanh


- K46 DB-

Trang 55

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet H.264 s dng b lc tch khi vic thc hin vic m ho cao hn mc d vic thc hin rt phc tp. Vic lc c p dng cho cc mp ca cc Block 4 x 4 trong mt Macro-Block. Qu trnh iu khin b lc tch khi thnh phn chi c thc hin trn 4 cnh ca mu 16 x 16 (16-sample) v qu trnh x l b lc tch khi cho mi thnh phn mu c thc hin trn 2 cnh ca mu 8 x 8. B lc tch khi c p dng tng thch vi mt vi mc(level) sau: Mc mng (Slice Level): Mt mnh ca ca vic lc ton b c th c iu chnh ti cc c im ring ca chui video. Mc cnh ca khi (Block edge Level ): mt mnh ca vic lc l ph thuc vo vic quyt nh d on Inter/Intra, cc chuyn ng khc nhau, v vic hin th ca cc d tha m ho trong 2 Block tham gia. c bit vic lc mnh c p dng cho cc Macro-Block vi cc c im rt phng loi b s nghing nhn to (tilting artifacts). Mc ly mu (Sample Level): cc gi tr mu v cc im bt u ph thuc vo b lng t ha c th dng vic lc cho mi mu ring bit.

Tnh khi b gim m khng nh hng nhiu n sc nt ca ni dung, kt qu l ci thin c ng k cht lng ca hnh nh.

Hnh 24: Tc dng ca b lc tch khi i vi nh c nn nhiu Tri: khng c b lc tch khi; Phi: c b lc tch khi

Mai Th Lan Oanh


- K46 DB-

Trang 56

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet

3.3.4. K thut gii m video

Dng Bt u vo

Gii m Entropy

Gii lng t ho & + Bin i ngc +

B lc tch khi

Video u ra

La chn Inter/Intra Mode

B m nh

nh d on

B chuyn ng

Hnh 25: S gii m Video H264/MPEG -4 Part 10 3.3.4.1. B chuyn ng B chuyn ng thc hin vic thit lp li cc khung hnh (frame) trn c s cc Vector nhn c, d liu khung hnh delta nhn (d liu khc nhau gia hai khung hnh lin tip) v hnh nh m ho trc . V vy, nu d liu delta c nhn, th dng khung hnh c thit lp li bng vic cng d liu khung hnh delta vi d liu t khung hnh c gii m trc trong v tr ring c ch dn bng Vector chuyn ng nhn c. 3.3.4.2. Khi phc li (Error Resiliency) Mt nhim v quan trng nht ca b gii m l lm thch hp v khi phc li t cc li chc chn xy ra, c bit l khi kt ni qua cc lin kt d xy ra li nh mng khng dy. Li n hi bao gm ba loi k thut khc nhau c s dng khi mt li c pht hin. Vic pht hin li c th xy ra trong 3 trng hp sau: Trong trng hp c mt li, li thc s c pht hin; Trong trng hp c mt li, li khng c pht hin; Trong trng hp khng c li, b gii m bit l khng c li;

Nu li c pht hin, h thng b gii m li n hi c gng che giu li. Cc c trng ca li n hi c th c b sung trong h thng MPEG -4 bng vic s Mai Th Lan Oanh
- K46 DBTrang 57 I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet dng tiu chun thit lp cc cng c c cung cp bng tiu chun MPEG -4 pht hin li. Cho mt h thng MPEG -4 tng thch, c kh nng cng lm vic vi h thng MPEG -4 khc, n phi tun theo b cng c chun ho pht hin li. Tuy nhin, phng php m cc b cng c c b sung lm tng ni cung cp b Codec, theo cch , n c th lm cho tt hn hoc xu hn khi thit lp cc thut ton trong h thng tng thch hon ton vi tiu chun MPEG -4. 1. ng b li ( Resynchronisation) B cng c ng b li c gng c th ng b li gia b gii m v dng bt sau khi mt li hay mt lot li c pht hin. Nhn chung, d liu gia im ng b trc b li v im u tin ni m s ng b c thit lp li, th c loi b. Nu nh phng php ng b li c nh hng n vic xc nh s lng d liu b loi b bi b gii m, khi kh nng ca cc loi cng c khc nhau khi phc d liu hay che giu cc nh hng ca li th phi c nng cp rt nhiu. 2. Khi phc d liu (Data Recovery) Sau khi ng b va c thit lp li, cc cng c khi phc d liu c gng khi phc li d liu thng b mt. Cc cng c khng ch n gin l m ho ng cc li, m k thut i hi cao hn l m ho d liu cho mt loi li n hi. V d, mt b cng c ring va c xc nhn bng nhm Video (Video Group) l m ho chiu di bin i ngc RVLC (Reversible Variable Length Codes). Trong phng php ny, cc t m ho chiu di bin i c thit k c c hng tin cng nh hng li. Hnh 26 minh ho cho v d trn s dng mt RVLC c ch ra trong hnh di y. Nhn chung, trong mt tnh hung nh vy, ni m mt s tng vt ca cc li lm sai lc mt phn ca d liu, tt c d liu gia hai im ng b c th b mt. Tuy nhin, c ch ra trong hnh 26, mt RVLC lm cho mt vi d liu c khi phc. Ch n cc thng s QP v HEC trong hnh sau th hin cc trng dnh ring (Field Reserved) trong phn u header gi video cho thng s lng t ho v m ho m rng header, theo th t nh sn.

Mai Th Lan Oanh


- K46 DB-

Trang 58

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet

Hnh 26: V d v M ho chiu di bin i ngc

3.3.5 So snh hiu qu m ho ca H264/MPEG Part 10 vi cc tiu chun trc


Qua qu trnh tm hiu k thut m ho ca H264/MPEG Part 10 v ca MPEG-2, ta thy mt s u im ca H264/MPEG Part 10 so vi MPEG-2 l: D on h s AC/DC m cc h s Macro-Block c d on t cc h s trong cc Macro-Block bn cnh v t mt s d liu trong bn thn Macro-Block . Vic gii m Macro-Block phi thay i khc vi thut ton dng bt n gin trc a vo mt s tnh ton cho mi h s. Cc cng c ton hc mi nh CAVLC v CABAC cho s ci thin ng k trong m ho Entropy. Trong khi b chuyn ng trong MPEG-2 Part 2 c hn ch n ni suy hai chiu pixel th H264/MPEG Part 10 cho php cc Vector chuyn ng chnh xc n pixel v sau dng ni suy nhiu chiu(Bi-cubic). Ni suy nhiu chiu to ra s thch hp hn cho Macro-Block , do vy gim nng lng c lu trong nh li, lm gim s bt cn phi m ho. Tuy nhin ni suy nhiu chiu i hi nhiu thut ton hn, s phc tp thc hin b chuyn ng cao hn. Vic dng b lc tch khi c hai pha b m ho v b gii m lm gim s khng lin tc cc bin ca khi do cc h s cht lng khc nhau c s dng cho cc khi cnh nhau gy ra. iu ny lm gim nhiu khi thng thy trong m ho MPEG-2 tc bt thp v n nm trong vng b chuyn ng, b m ho v b gii m vn cn trong s ng b. Cng c ny c nh hng n tnh phc tp ca b m ho v b gii m v s bin khi v cng v thc t l b lc tch khi cng khng th c thc hin nh mt module ring bit.

Mai Th Lan Oanh


- K46 DB-

Trang 59

I HC CNG NGH

Chung 3: Chun nn Video MPEG -4 v ng dng trong truyn hnh trn mng Internet Kch thc khi thay i t 16 x 16 xung cn 4 x 4. Khi kch thc khi gim cung cp li m ho m khng c s tng ng k tnh phc tp. Cc Header tng i ln trong MPEG-2(trong Sequence, Picture, Slice ) biu din mt OverHead c nh trong dng d liu. OverHead ny l khng ng k trong tc 6 Mb/s nhng tc vi trm Kb/s th chng d nhn thy. V vy H264/MPEG Part 10 thc hin cc Header hiu qu hn. Qua qu trnh thc nghim cho rng s tit kim tc bt trung bnh ca H264/MPEG Part 10 so vi MPEG-2 l khong 65%. Nh vy hiu qu ca nn H264/MPEG Part 10 tng ln ng k. Hiu qu nn tng ca H264/MPEG Part 10 to ra cc phm vi ng dng v cc c hi kinh doanh mi

Mai Th Lan Oanh


- K46 DB-

Trang 60

I HC CNG NGH

Kt lun

KT LUN
Kho lun Cc chun nn v ng dng truyn Video trn mng Internet t c mt s kt qu sau: Nu ln c th no l truyn hnh trn mng Internet v cch thc truy cp xem c cc chng trnh truyn hnh. Tm hiu c nguyn tc chung trong vic nn tn hiu video ca nhm MPEG l nn trong nh v nn lin nh kt hp vi d on b chuyn ng- y l s khc bit so vi cc chun nn JPEG, M-JPEG trc . V trong tp hp cc chun nn MPEG, mi chun nn khc nhau c mt nhim v khc nhau c t ra. Vi MPEG-1 nhim v l m ho m thanh v hnh nh lu tr trong cc thit b lu tr nh: CD-ROM, a quang s dng nh dng trung gian cho ngun tn hiu l SIF ph hp vi mi h thng qut truyn hnh khc nhau hin nay. MPEG -2 k tha tt c cc tiu chun ca MPEG -1 v mc ch nhm h tr cho vic truyn Video s, MPEG -2 chia nh thnh cc Macro-Block v s dng phng php nn trong nh vi nh I v nn lin nh kt hp d on b chuyn ng vi cc nh P v nh B. T s nn ca MPEG -2 tt hn nhiu so vi MPEG -1. MPEG -4 vi nhim v l nhm pht trin cc chun x l, m ho v hin th nh ng, audio v cc t hp ca chng. MPEG -4 khc so vi MPEG -2 l trong mt khung hnh th n khng m ho ton b khung hnh m n miu t tng i tng ring r v sau mi m ho tng i tng . MPEG -4 chia cc Macro-Block thnh cc Block nh hn. Trong khi b chuyn ng trong MPEG-2 Part 2 c hn ch n ni suy hai chiu pixel th H264/MPEG Part 10 cho php cc Vector chuyn ng chnh xc n pixel v sau dng ni suy nhiu chiu(Bi-cubic). V cn nhiu im u vit khc na. Do hiu qu nn ca chun nn MPEG -4 tt hn so vi MPEG -2. MPEG -7 l mt chun dng m t cc ni dung Multimedia, ch khng phi l mt chun cho nn v m ho audio/nh ng nh MPEG-1, MPEG-2 hay MPEG-4. MPEG-7 s dng ngn ng nh du m rng XML(Extansible Markup Language) lu tr cc siu d liu Metadata, nh km timecode gn th cho cc s kin, hay ng b cc d liu. Vi nhiu tnh u vit nh trn, mt hng t ra l: liu MPEG -4 c th s dng cho vic lu tr nh MPEG -1 hay dng trong cng ngh truyn hnh s nh MPEG -2. Thc t cho thy, ngoi cc ng dng trn mi trng mng ni chung v truyn hnh tng tc ni ring theo APB(04/2004)- cc i Truyn hnh Nht Bn nh NHK, TBS, NTV TV Asahi v TV Tokyo chnh thc chp nhn a chun Mai Th Lan Oanh
- K46 DBTrang 61 I HC CNG NGH

Kt lun

H264/MPEG Part 10 cho pht sng s mt t, cho thu di ng, y cng l mt kh nng trong nhng kh nng cn tim n trong chun m ho v trnh din video ca H264/MPEG Part 10. Do vy, ti ny c th nghin cu bc tip theo l nghin cu ng dng H264/MPEG Part 10 cho truyn hnh s v cho thu di ng hay c th ci to cht lng truyn hnh Internet t c cht lng hnh nh tt nh truyn hnh s hin nay.

Mai Th Lan Oanh


- K46 DB-

Trang 62

I HC CNG NGH

TI LIU THAM KHO


[1] inh Quc Tun - ti nghin cu khoa hc cp nghnh Truyn hnh trn mng Internet v gii php cung cp chng trnh VTV qua mng Internet , Trung tm tin hc v o lng THVN, H Ni 7/2004. Hong Tin, V c L - Truyn hnh s, Nh xut bn Khoa Hc v K Thut, H Ni 2001. Ng Thi Tr - Truyn hnh s, H Ni 2002. Nguyn Minh Hng Chuyn Chun nn MPEG -4 v kh nng ng dng trong truyn hnh, Trung tm Tin hc v o lng THVN,H Ni-1/2001. Ni san Khoa hc K thut Truyn hnh cc s trong cc nm t 2001-2005. H.264 & IPTV Over DSL White Paper On H264/MPEG-4 -2004, http://www.envivio.com. Hantro Products Oy, Oulu, Finland MPEG4 Codec Overview 1 ISO/IEC JTC1/SC29/WG11 N4030 March 2001- http://www.hantro.com Jos M. Martnez (UAM-GTI, ES) ,MPEG-7 Overview- ISO/IEC JTC1/SC29/WG11N5525 Pattaya, March 2003 - http://www.mp7c.org/ Ralf Schfer, Thomas Wiegand and Heiko Schwarz - The emerging H.264/AVC Standard - EBU TECHNICAL REVIEW January 2003 Soon-kak Kwon, A. Tamhankar, K.R. Rao - Overview of H.264 / MPEG-4 Part 10 http://www.mpeg.org. Thomas Wiegand, Gary J. Sullivan, Gisle Bjontegaard, and Ajay Luthra Overview of the H.264 / AVC Video Coding Standard - IEEE TRANSACTIONS
ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY, JULY 2003.

[2] [3] [4] [5] [6] [7] [8]

[9] [10]

[11] [12]

http://www.vtc.com.vn., http://www.vdconline.com

Mai Th Lan Oanh


- K46 DB-

I HC CNG NGH