Vous êtes sur la page 1sur 8

SPECIAL TOPICS

Video Multiple Description Coding (MDC)

Prof. Enrico Magli

Campione Salvatore 145781


Peraldo Lorenzo 150327
Brief overview and general description

The aim of this project is to point out the performances of a multiple description
algorithm.
The MDC algorithm used in this project is the temporal division: two descriptions of the
same video (table.yuv, made of 30 frames, 352x288) are created by means of a
MATLAB function (Multidescription.m); each description is characterized by 15 frames
(one takes the even frame, table_sideR.yuv, and the other the odd frame,
table_sideL.yuv).
Then, H.264 encoder/decoder (last version available) is applied to each sequence and, by
means of another MATLAB function (Reconstruction.m), the central description (i.e. the
description obtained when both sequences are received) is reconstructed
(table_recon.yuv).
If only one of the two descriptions is received, an Interpolation algorithm has to be
applied in order to obtain a 30-frame video; depending on which description (left or right)
is received, a slightly different algorithm is implemented: InterpolationL.m and
InterpolationR.m. A linear interpolation is used and where it couldn’t be applied, we just
replicated one frame (i.e. last frame in odd description and first frame in even
description).
The goals are to carry out some graphs which relate:
• Central PSNR vs Side PSNR
• Side PSNR vs Bit-Rate
• Side PSNR vs Quality factor
• Bit-Rate comparison between a situation where MDC is used and where is not
The PSNR data are computed using MSU Visual Quality Measurement Tools.

Simulation results

Central PSNR vs Side PSNR

The analysis is done with constant quality factor. The results are the following:
L Side R Side Central
QP
PSNR PSNR PSNR
10 27,90 29,04 51,89
20 27,80 28,91 42,04
30 26,95 27,80 32,84
40 25,41 25,92 27,86
50 24,26 24,53 25,37
Table 1: Central PSNR vs Side PSNR
Central VS Side PSNR

55

50

45

Central PSNR
40
Left Side
Right Side
35

30

25

20
23 24 25 26 27 28 29 30
Side PSNR

Figure 1: Central PSNR vs Side PSNR


Looking at the graph, you notice that the results are as those expected from the theoretical
side.

Side PSNR vs Bit-Rate

This simulation compares the performances of both side descriptions in terms of PSNR
vs Bit-Rate.
Bitrate L Side Bitrate R Side
(kbit/s) PSNR (kbit/s) PSNR
10051,74 27,90 10253,00 29,04
3437,89 27,80 3699,00 28,91
593,87 26,95 612,37 27,80
91,30 25,41 94,06 25,92
34,93 24,26 35,14 24,53
Table 2: Side PSNR vs Bit-Rate
PSNR vs Bit-rate

30

29

28

27
Side PSNR

Left Side
Right Side
26

25

24

23
0,00 2000,00 4000,00 6000,00 8000,00 10000,00 12000,00
Bit-rate (kbit/s)

Figure 2: Side PSNR vs Bit-Rate


The results respect the theoretical ones.
Side PSNR vs Quality factor

This figure shows the previous one vs the quality factor instead of the bit-rate.
QP L Side PSNR R Side PSNR
10 27,90 29,04
20 27,80 28,91
30 26,95 27,80
40 25,41 25,92
50 24,26 24,53
Table 3: Side PSNR vs Quality factor
Side PSNRvs Quality Factor
30

29

28

27
Side PSNR

26

Left Side
25
Right Side

24

23

22

21
10 20 30 40 50

Quality Factor

Figure 3: Side PSNR vs Quality factor

Bit-Rate comparison between a situation where MDC is used and where is not

In this analysis, we compare MDC with a Single Description implementation.


The simulation is carried out with the same quality factor; this means that the PSNR in
presence of MDC is almost equal to the one in absence of MDC. For this reason, the
comparison can be done looking at the Bit-Rate.
The Bit-Rate of the reconstructed files is computed summing the two side bit-rate of the
side descriptions.
Central PSNR Central PSNR Bit-Rate no Bit-Rate Bitrate Left Bitrate Right
no MDC MDC MDC (kbit/s) MDC (kbit/s) Side (kbit/s) Side (kbit/s)
51,79 51,89 9193,82 20304,74 10051,74 10253,00
41,66 42,04 2747,87 7136,89 3437,89 3699,00
32,64 32,84 486,19 1206,24 593,87 612,37
27,78 27,86 71,44 185,36 91,30 94,06
25,28 25,37 27,84 70,07 34,93 35,14
Table 4: Bit-Rate comparison between a situation where MDC is used and where is not
Bitrate comparison

25000

20000

15000

BitRate [Kbit/s]
without MDC
with MDC
Right Side
Left Side
10000

5000

0
0 10 20 30 40 50 60
QP

Figure 4: Bit-Rate comparison between a situation where MDC is used and where is not
As you can see from the graph, the Bit-Rate in presence of MDC is higher than the one
without MDC, as expected from theoretical results.
Appendix
Multidescription.m

clc;

or_path='table.yuv'; % Original file


dest_pathL = 'table_sideL.yuv';
dest_pathR = 'table_sideR.yuv';

height=288;
width=352;
N=30;

frame_size=height*width*1.5;

f_or = fopen(or_path,'rb');
original = fread(f_or);
fclose(f_or);

flag = 0;
sideL = [];
sideR = [];

for i=0:N-1

if(flag == 0)
sideL= [sideL ; original(i*frame_size+1:(i+1)*frame_size)];
flag = 1;
else
sideR= [sideR ; original(i*frame_size+1:(i+1)*frame_size)];
flag=0;
end
end

f_dst=fopen(dest_pathL,'wb');
fwrite(f_dst,sideL,'uint8');
fclose(f_dst);
f_dst=fopen(dest_pathR,'wb');
fwrite(f_dst,sideR,'uint8');
fclose(f_dst);
Reconstruction.m

clc

f_orL=fopen('table_sideL.yuv','rb');
f_orR=fopen('table_sideR.yuv','rb');
originalL=fread(f_orL);
originalR=fread(f_orR);
fclose(f_orL);
fclose(f_orR);

height=288;
width=352;
N=30;
frame_size=height*width*1.5;

f_rec=fopen('table_recon.yuv','a');

for i=0:N/2-1
fwrite(f_rec, originalL(i*frame_size+1:(i+1)*frame_size), 'uint8');
fwrite(f_rec, originalR(i*frame_size+1:(i+1)*frame_size), 'uint8');
end

fclose(f_rec);

InterpolationL.m

clc

or_path='table_sideL_50.yuv'; % Original file


dest_pathL = 'table_sideL_50_30frames.yuv';

f_or = fopen(or_path,'rb');
original = fread(f_or);
fclose(f_or);

height=288;
width=352;
N=30;

frame_size=height*width*1.5;

new = [];

for i=0:N/2-2
new = [new ; original(i*frame_size+1:(i+1)*frame_size)];
new = [new ; (original(i*frame_size+1:(i+1)*frame_size)+original((i
+1)*frame_size+1:(i+2)*frame_size) )/2];
end
new = [new ; original(i*frame_size+1:(i+1)*frame_size)];
new = [new ; original(i*frame_size+1:(i+1)*frame_size)];

f_dst=fopen(dest_pathL,'wb');
fwrite(f_dst,new,'uint8');
fclose(f_dst);
InterpolationR.m

clc

or_path='table_sideR_50.yuv'; % Original file


dest_pathL = 'table_sideR_50_30frames.yuv';

f_or = fopen(or_path,'rb');
original = fread(f_or);
fclose(f_or);

height=288;
width=352;
N=30;

frame_size=height*width*1.5;

new = [];

i=0;

new = [new ; original(i*frame_size+1:(i+1)*frame_size)];


for i=0:N/2-2
new = [new ; original(i*frame_size+1:(i+1)*frame_size)];
new = [new ; (original(i*frame_size+1:(i+1)*frame_size)+original((i
+1)*frame_size+1:(i+2)*frame_size) )/2];
end
new = [new ; original(i*frame_size+1:(i+1)*frame_size)];

f_dst=fopen(dest_pathL,'wb');
fwrite(f_dst,new,'uint8');
fclose(f_dst);