You are on page 1of 6

ELEC S334

Signal Processing and Multimedia Technology

Assignment 4
Cut-off date: 27 December 2020

Spring 2020

Solution
Not all steps given. For reference only.

Assignment 4 ELEC S334, Spr 2020 Pres. Solution 1


ELEC S334 Assignment 4 (2020) Cut-off date: 27 December 2020

The distribution of marks for this assignment is shown in the following table:
Question 1 2 3 4 Total
Percentage 25% 25% 25% 25% 100%

Question 1 ( 25 marks )

(a) By inverse warping, a planar image view of 1024 x 576 resolution is obtained from a full
panorama of size 3800 x 1000 (360 degrees). Given that the planar view is rotated by π/4
and the focal length is 500, determine the source pixel coordinates at the panorama for the
destination point (630, 320) at the planar image view. [ 11 marks ]
Answer: The coordinates in the source panorama are (615.2, 537.7).

(b) What are the major technical advantages of using digital terrestrial television (DTT) for
video broadcasting? What are the technical limitations of DTT? [ 8 marks ]
Answer:
Advantage: Not require high cost for network or cabling
Limitation:
- Spectrum in the air is limited
- The delivery is uni-directional instead of interactive

(c) Describe what Over-the-Top (OTT) streaming is. What are the major technical challenges
of using OTT? [ 6 marks ]
Answer:
OTT: Streaming video content through public Internet
Major challenge:
- Video delivery path is not controllable, not easy to guarantee the quality
- High cost for content delivery network (CDN)

Question 2 ( 25 marks )
("#$%)' %
(a) Eight samples are taken from the signal: 𝑝(𝑟) = cos ) %( * − " for r = 0 to 7. A one-
dimensional DCT is performed on p(r) to obtain the DCT output components P(u) for u =
0 to 7. Determine the DCT output components at DC and at u=5. Show your work.
[ 10 marks ]
Answer:
P(0) = -1.414
P(5) = 0

Assignment 4 ELEC S334, Spr 2020 Pres. Solution 2


(b) Given the DCT coefficients shown in the following table:
u 0 1 2 3 4 5 6 7
P(u) 0 0 1 0 0 0 2 0
Compute the 1-D IDCT. Show your work. [ 10 marks ]

Answer:
p~(0) = 0.845 p~(1) = -0.733
p~(2) = 0.733 p~(3) = -0.845
p~(4) = -0.845 p~(5) = 0.733
p~(6) = -0.733 p~(7) = 0.845

(c) Explain why 2-D DCT is used in JPEG compression. What is the size of each DCT block
in JPEG compression? What are the pros and cons of using larger size of DCT blocks?
[ 5 marks ]
Answer:
- Separate high frequency (texture) from low frequency (gradual color change) component
- High frequency and low frequency components can be applied with different quantization
factor such that smaller bits allocated for less noticeable high frequency components
- 8x8 DCT block
Larger block size:
Cons – Much higher computational cost
Pros – Less blocky even insufficient bits is allocated

Question 3 ( 25 marks )

(a) Describe the differences between MPEG and H.261 in terms of their encoding schemes.
[ 3 marks ]
Answer:
- H.261 only has I-frame and P-frame
- MPEG has I-,P- and B-frame
- H.261 only reference to previous frame, but MPEG reference to previous and future frame

(b) Describe an application in which H.261 is preferred over MPEG. Explain why H.261 is
preferred for the application you described. [ 6 marks ]
Answer: Video conferencing more prefer H.261
- H.261 has less delay as only has I-frame and P-frame.
- MPEG has B-frame which reference to future frame. It induces more delay which is not
beneficial to real-time complication application such as video conferencing.

(c) Some MPEG frames are received in the order: 1, 5, 2, 3, 4, 9, 6, 7, 8, 13, 10, 11, 12 … .
Given that only Frames 1 and 13 are I-frames, what can be said about the identities of the
other frames? What are the M and N of the GOP (Group of Picture)? [ 4 marks ]
Answer: Frames 5, 9 are P-frames. Frames 2, 3, 4, 6, 7, 8, 10, 11, 12 are B-frames
M = 4, N = 12

Assignment 4 ELEC S334, Spr 2020 Pres. Solution 3


(d) Name and describe two (2) algorithms used for motion vector search. [ 4 marks ]

Answer:

Sequential Search:
All the displacements [i,j] with the (2d+1)×(2d+1) windows are examined.

Logarithm Search:
Similar to a divide-and-conquer or binary search.

Hierarchical Search:
Hierarchical search takes a multi-resolution and iterative approach. The first iteration starts
with a low-resolution image. In each iteration, the resolution is doubled, and at full resolution
the final motion vector is found.

(e) Refer to the following playlist: [ 8 marks ]

#EXTM3U
#EXT-X-VERSION:4
#EXT-X-TARGETDURATION:8
#EXTINF:7.160,
https://priv.example.com/fileSequence380.ts
#EXTINF:7.840,
https://priv.example.com/fileSequence381.ts
#EXTINF:7.400,
https://priv.example.com/fileSequence382.ts

(i) Which streaming protocol does it use?


Answer: HTTP Live Streaming (HLS)

(ii) Is the playlist live stream or VOD stream? Explain.


Answer: Live. There is no end tag “#END-X-ENDLIST”

(iii) What is the total duration or time-shift period of the contents?


Answer: 22.4 sec

(iv) What are the effects if we choose a smaller segment size for Live Stream?
- Smaller segment can achieve smaller latency
- But the server loading would be higher
- Too short segment size may lead to insufficient buffer and hence unstable playback

Assignment 4 ELEC S334, Spr 2020 Pres. Solution 4


Question 4 ( 25 marks )
(a) A default luminance quantization table is given below:
16 11 10 16 24 40 51 61
12 12 14 19 26 58 60 55
14 13 16 24 40 57 69 56
14 17 22 29 51 87 80 62
18 22 37 56 68 109 103 77
24 35 55 64 81 104 113 92
49 64 78 87 103 121 120 101
72 92 95 98 112 100 103 99
Obtain the actual quantization table for a quality factor of 85. Show all your work.
[ 8 marks ]
Answer: step_size =0.3𝑞
The actual quantization table is:
5 3 3 5 7 12 15 18
4 4 4 6 8 17 18 17
4 4 5 7 12 17 21 17
4 5 7 9 15 26 24 19
5 7 11 17 20 33 31 23
7 11 17 19 24 31 34 28
15 19 23 26 31 36 36 30
22 28 29 29 34 30 31 30

(b) Given the following 64 DCT coefficients, use the obtained actual quantization table from
Part (a) to determine the quantized DCT coefficients. Round your answers to nearest
integers. Show all your work. [ 8 marks ]
653 347 115 106 48 -80 -27 -41
-52 -59 -41 -31 -24 -10 -12 -1
-11 -22 -25 -5 2 -6 5 6
-18 26 16 -23 7 1 -1 11
9 34 -6 -25 22 7 -25 25
9 3 3 28 -20 16 22 3
0 -2 5 3 2 -6 -24 -2
0 -8 -18 34 -40 4 17 27
Answer: Quantized DCT
131 116 38 21 7 -7 -2 -2
-13 -15 -10 -5 -3 -1 -1 0
-3 -6 -5 -1 0 0 0 0
-5 5 2 -3 0 0 0 1
2 5 -1 -1 1 0 -1 1
1 0 0 1 -1 1 1 0
0 0 0 0 0 0 -1 0
0 0 -1 1 -1 0 1 1

Assignment 4 ELEC S334, Spr 2020 Pres. Solution 5


(c) In JPEG, the quantized AC coefficients are put into a sequence based on a zig-zag pattern
followed by run-length encoding into a sequence of ordered pairs (runlength, value). Copy
the table from Part (b) and draw the zig-zag pattern on the table. [ 4 marks ]

Answer:

131 116 38 21 7 -7 -2 -2
-13 -15 -10 -5 -3 -1 -1 0
-3 -6 -5 -1 0 0 0 0
-5 5 2 -3 0 0 0 1
2 5 -1 -1 1 0 -1 1
1 0 0 1 -1 1 1 0
0 0 0 0 0 0 -1 0
0 0 -1 1 -1 0 1 1

(d) Referring to your table and zig-zag pattern from Part (c), write down the sequence of
(runlength, value) for AC run-length encoding.
[ 5 marks ]

Answer:
(-,116),(0,-13),(0,-3),(0,-15),(0,38),(0,21),(0,-10),(0,-6),(0,-5),(0,2),(0,5),(0,-5),(0,-5),(0,7),
(0,-7),(0,-3),(0,-1),(0,2),(0.5),(0,1),(2,-1),(0,-3),(1,-1),(0,2),(0,-2),(0,-1),(2,-1),(5,1),(0,1),
(6,-1),(1,-1),(0,1),(1,1),(0,-1),(0,1),(0,1),(0,1),(1,1),(1,-1),(2,1),(0,1)

[ End of Assignment 4 ]

Assignment 4 ELEC S334, Spr 2020 Pres. Solution 6

You might also like