digital video solutions to final exam 2005 edited by yu-kuang tu confirmed by prof. jar-ferr yang

21
Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang LAB: 92923 R, TEL: ext. 621 E-mail: [email protected] Page of MPL: http://mediawww.ee.ncku.edu.tw

Upload: hetal

Post on 16-Jan-2016

25 views

Category:

Documents


0 download

DESCRIPTION

Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang LAB: 92923 R, TEL: ext. 621 E-mail: [email protected] Page of MPL: http://mediawww.ee.ncku.edu.tw. 2-1. (a) (b) (c) (d). FS: (2*32+1)(2*32+1) = 4225 points - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

Digital VideoSolutions to Final Exam 2005

Edited by Yu-Kuang TuConfirmed by Prof. Jar-Ferr Yang

LAB: 92923 R, TEL: ext. 621E-mail: [email protected]

Page of MPL: http://mediawww.ee.ncku.edu.tw

Page 2: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

2-1.

(a)

(b)

(c)

(d)

FS: (2*32+1)(2*32+1) = 4225 points

TSS: 9+8+8+8+8= 41 points

HS: Best 7+4 = 11 points; Worst???

Cross Search: Best 5+8 = 13 points ; Worst???

Each search points: requires 256 + 255 additions

Difference pixel by pixel(16x16 block-size)

Sum of absolute differences

Page 3: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

2-2. Decoder

De

Mux

VLCDecoder

RLCDecoder

InverseDCT

z-1

FrameBuffer

Motion Vector Prediction

MV difference

++

++

Motion Vector (MV)

DecodedVideo

ACdifference

DCterms

AC1~63

Intra/Inter frame mode

Frame Mean

++

++

z-1

++

DC

Page 4: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

2-2. Encoder

MUX

RLC VLCAC

terms

DC

FrameBuffer

MV

ME

DCT

Inter/Intra Frame Mode

FrameMean

MC

ACdifference

VideoInput

-

-

z-1

DCterms-

++

IDCT

MV

DC AC

Frame Mean

Motion VectorPrediction

MVdiff-

Intra

Inter

++

+

-

Page 5: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

Significance Coding (Normal Mode) [zero coding]

Use to code new significance. 9 contexts according to the significance of its

neighbors.

Significance Coding (Run Mode) [run length coding]

Group 4 insignificant coefficients when they are very probable.

Reduce the average number of symbols needed to be coded.

One context for whether all four are insignificant.

Four Types of Coding Primitives2-8.

Page 6: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

2-8. Four Types of Coding Primitives Magnitude Refinement Coding

3 contexts depending on the significance of its neighbors and whether it is the first time for refinement.

Sign Coding Used to code the sign right after a coefficient is

identified significant. 5 contexts based on the sign of four neighbors.

Page 7: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

Significance Coding (Normal Mode)

][jh

Current sample

][jd

][jv

]1,1[ 21 jj],1[ 21 jj ]1,1[ 21 jj

]1,[ 21 jj

]1,[ 21 jj

]1,1[ 21 jj],1[ 21 jj ]1,1[ 21 jj

Formation of significance coding context

neighbors diagonal

tsignifican ofnumber

:][

neighbors vertical

tsignifican ofnumber

:][

neighbors horizontal

tsignifican ofnumber

:][

j

j

j

d

v

h

2-8.

Page 8: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

Coding Passes 3 coding passes for each bit-plane, p

Significance Propagation Pass Sample location j belongs to this pass if it is

insignificant, but has a significant neighborhood Magnitude Refinement Pass

For any sample which was already significant in the previous bit-plane

Cleanup Pass Including all samples for which information has

not already been coded in bit-plane p

2-8.

Page 9: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

Primitive of Each Coding Pass Significant Propagation Passes

Significance coding (normal mode) + Sign coding primitive

Magnitude Refinement Pass Magnitude refinement primitive

Cleanup Pass Significance coding (normal mode) + Sign coding

primitive + Significance coding (run mode)

2-8.

Page 10: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

zc zc

zc

zc

zc

zc

zc

zc sc

zc

zc

zc

zc sc

zc

zc

zc sc

zc sc

zc sc

zc

zc

zc zc zc

zc

zc

zc sc

zc sc

zc

zc

zc sc

zc

zc

zc sc

zc

Significance Propagation Pass (Pass 1)2-8.

: Coefficient which is already significant

: Significance Propagation Pass (Pass 1)

00

10

01

00

11

10

00

11

01

00

01

00

00

00

00

00

00

00

00

00

00

00

00

00

01

00

11

10

10

00

01

00

ZC: Zero CodingSignificance coding

(normal mode)

SC: Sign Coding

Page 11: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

zc zc

zc

zc

zc

zc

zc

zc sc

zc

zc

zc

zc sc

zc MR

zc

zc sc

zc sc

zc sc

zc

zc

zc zc zc

zc

zc

zc sc

zc sc

zc

zc

MR

zc sc

zc

zc

zc sc

zc

MR

MR MR

MR

Magnitude Refinement Pass (Pass 2)2-8.

00

10

01

00

11

10

00

11

01

00

01

00

00

00

00

00

00

00

00

00

00

00

00

00

01

00

11

10

10

00

01

00

MR: Magnitude Refinement Coding

: Pass 1 (done)

: Magnitude refinement pass (Pass 2)

Page 12: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

zc

zc

zc zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

R L

C zc

zc

zc sc

zc

zc

zc

zc

zc

zc

zc

zc

zc sc

zc

zc

zc

zc sc

zc MR

zc

zc sc

zc sc

zc sc

zc

zc

zc zc zc

zc

zc

zc sc

zc sc

zc

zc

MR

zc sc

zc

zc

zc sc

zc

MR

MR MR

MR

Clean-up Pass (Pass 3)2-8.

00

10

01

00

11

10

00

11

01

00

01

00

00

00

00

00

00

00

00

00

00

00

00

00

01

00

11

10

10

00

01

00

: Pass 1

: Pass 2

: Pass 3 (Normal Mode)

: Pass 3 (Run Mode)

Page 13: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

zc

zc

zc

zc sc

2-8.

(b)

zc zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

R L

C zc

zc

zc sc

zc

zc

zc

zc

zc

zc

zc

zc

zc sc

zc

zc

zc sc

zc MR

zc

zc sc

zc sc

zc sc

zc

zc

zc zc zc

zc

zc

zc

zc sc

zc

zc

MR

zc sc

zc

zc

zc sc

zc

MR

MR MR

MR zc sc

zc

00

10

01

00

11

10

00

11

01

00

01

00

00

00

00

00

00

00

00

00

00

00

00

00

01

00

11

10

10

00

01

00

00

1

01

0

01

0

Zero coding, LL bandh[j] = 0, v[j] = 0, d[j] = 1, sig[j] = 1

Sign codingh[j] = 0, v[j] = 0, sign = 10

Page 14: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

zc zc

zc

zc

2-8.

(b)

zc zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

R L

C zc

zc

zc sc

zc

zc

zc

zc

zc

zc

zc

zc

zc sc

zc

zc

zc sc

zc MR

zc

zc sc

zc sc

zc sc

zc

zc

zc zc zc

zc

zc

zc

zc sc

zc

zc

MR

zc sc

zc

zc

zc sc

zc

MR

MR MR

MR zc sc

zc

00

10

01

00

11

10

00

11

01

00

01

00

00

00

00

00

00

00

00

00

00

00

00

00

01

00

11

10

10

00

01

00

00

0

00

0

00

0

Zero coding, LL bandh[j] = 0, v[j] = 0, d[j] = 0, sig[j] = 0

Page 15: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

zc

zc

zc sc

zc sc

zc sc

zc

zc

zc

MR

2-8.

(b)

zc zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

R L

C zc

zc

zc sc

zc

zc

zc

zc

zc

zc

zc

zc

zc sc

zc

zc

zc sc

zc MR

zc

zc sc

zc sc

zc sc

zc

zc

zc zc zc

zc

zc

zc

zc sc

zc

zc

MR

zc sc

zc

zc

zc sc

zc

MR

MR MR

MR zc sc

zc

00

10

01

00

11

10

00

11

01

00

01

00

00

00

00

00

00

00

00

00

00

00

00

00

01

00

11

10

10

00

01

00

01

0

11

1

10

0

Magnitude refinement coding, LL bandh[j] = 1, v[j] = 2, d[j] = 2, sig[j] = 7

mag[j] = 16 or 17(we don’t know [j])

Page 16: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

zc

zc

zc

2-8.

(b)

zc zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

zc

R L

C zc

zc

zc sc

zc

zc

zc

zc

zc

zc

zc

zc

zc sc

zc

zc

zc sc

zc MR

zc

zc sc

zc sc

zc sc

zc

zc

zc zc zc

zc

zc

zc

zc sc

zc

zc

MR

zc sc

zc

zc

zc sc

zc

MR

MR MR

MR zc sc

zc

00

10

01

00

11

10

00

11

01

00

01

00

00

00

00

00

00

00

00

00

00

00

00

00

01

00

11

10

10

00

01

00

zc sc

zc

zc sc

zc

MR

01

0

11

1

00

1

Magnitude refinement coding, LL bandh[j] = 1, v[j] = 2, d[j] = 1, sig[j] = 7

mag[j] = 16 or 17(we don’t know [j])

Page 17: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

2-8.

(b)

sig[j]LL and LH blocks HL blocks HH blocks

h[j] v[j] d[j] h[j] v[j] d[j] d[j] h[j]+v[j]

8 2 x x x 2 x ≥3 x

7 1 ≥1 x ≥1 1 x 2 ≥1

6 1 0 ≥1 0 1 ≥1 2 0

5 1 0 0 0 0 0 1 ≥2

4 0 2 x 2 0 x 1 1

3 0 1 x 1 0 x 1 0

2 0 0 ≥2 0 0 ≥2 0 ≥2

1 0 0 1 0 0 1 0 1

0 0 0 0 0 0 0 0 0

Assignment of context labels for significant coding

“x” means “don’t care.”

Page 18: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

2-8.

(b)

h[j] v[j] sign flip

1 1 14 1

1 0 13 1

1 -1 12 1

0 1 11 1

0 0 10 1

0 -1 11 -1

-1 1 12 -1

-1 0 13 -1

-1 -1 14 -1

Assignment of context labels and flipping factor for sign coding

h[j] , v[j]: neighborhood sign status

-1: one or both negative.0: both insignificant or both significant but opposite sign.1: one or both positive.

][h j

Current sample

][v j

Page 19: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

2-8.

(b)

[j] sig [j] mag

0 0 15

0 >0 16

1 X 17

Assignment of context labels and flipping factor for magnitude refinement coding

[j]: remains zero until after the first magnitude refinement bit has been coded. For subsequent

refinement bits, [j] = 1.

sig[j]: context label for significant coding of sample j

Page 20: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

III.3.1(c) 3.2(b) 3.3(d) 3.4(d) 3.5(c)3.6(b)

Page 21: Digital Video Solutions to Final Exam 2005 Edited by Yu-Kuang Tu Confirmed by Prof. Jar-Ferr Yang

IV.

4.1 (F): the encoder is with ME and MC; the decoder is with MC to reduce the temporal redundancy.4.2 (F): If the number of bands is equivalent to the number of tran

sform length, the DCT and Subband coding are equivalent.4.3 (F): RLC, which uses data consecution property, is a kind of d

ata compaction. 4.4 (F): Even if you use the same standard, difference encoders co

uld encoded difference coded data.4.5 (F): For the decoder, the same coded data will obtain the same

decoded video data. However, if considering post-processing of the decoded video, we may choose the better or more expensive one.