Course Project:
Ehsan Maani
122 107 106 111
103 example of the square error distribution over a 4x4 block.
106
102 101 112
100 98 110
121 105 101 123
• Block-based discrete cosine transform
(DCTs) and coarse quantization of the transform coefficients.
• Motion compensated blocks. (blocks copied from different locations of the reference frames.)
• Post Filter : Operates at the display buffer outside of the coding loop.
• Loop Filter : Operates inside coding loop, i.e. filtered frames are used as reference frames for motion compensation.
• Encoder performs the deblocking; thus, content providers can safely assume that their material is processed by proper deblocking filter.
• There is no need for an extra buffer at the decoder .
• Loop filters achieve higher quality by preventing propagation of blocking artifacts due to motion compensation.
• On the slice level , the global filtering strength can be adjusted to the individual characteristics of the sequence.
• On the block-edge level, filter strength depends on the parameters of the participating blocks.
• On the sample level, sample values and quantizer-dependent thresholds can turn the filter off for each individual sample
• To every edge between two 4x4 luminance samples, a Boundary-Strength (Bs) is assigned an integer value between 0 to 4.
A macroblock
Block modes and conditions
One of the blocks is Intra and the edge is a macroblock edge.
One of the blocks is Intra 3
One of the blocks has coded residues 2
Difference of block motion >1 luma sample
1
Motion compensation from different reference frames
Else
1
0
Bs
4
16 pix
• Filtering on a line of samples takes place only if: p
3 p
2 p
1 p
0 q
0 q
1 q
2
1-D visualization of a block edge q
3
|p
0
-q
0
| < a
(Index
A
)
|p
1
-p
0
| < b
(Index
B
)
|q
1
-q
0
| < b
(Index
B
)
Index
A and Index
B linearly depend on QP and offset parameters
35
36
250
37
38
200
39
40
150
41
42
43
100 44
50
45
46
47
0 48
50
114
126
144
159
180
204
69
78
90
99
42
48
54
63
255
14
14
15
15
16
16
17
10
11
11
12
12 a
13
13 b
18 index
31 41
Pre-defined arrays a and b
• Let
0 i
(4( q
0
p
0
) (( p
1
q
1
) 4)
3 p
3 p
2 p
1 p
0 q
0 q
1 q
2
1-D visualization of a block edge q
3 q then, edge pixel values are calculated as p
0
0 q p
0
0
0
0
30
25
20
15
10
5
0
1
Bs=1
11
Bs=2 Bs=3
21
Index
31 41 51
p
2 • Furthermore, if p
3 p
1 p
0 q
0 q
1 q
2 q
3 p
2
p
0
b
( Index
B
) q
2
q
0
b
( Index
B
)
Then
( p
2
(( p
0 0
1) 1) 2 p
1
)
1 and p
1 p
1 p 1 q
1 q
1 p 1
• In nearly uniform image areas very small differences in intensity values are perceived as abrupt steps; thus, if p
0
q
0
( a
2)
2 then, a very strong 4- and 5-tap filter is used that modifies the edge and two interior luma samples.
Otherwise a weaker 3-tap filter is used.
PSNR=29.3374
SSIM=0.8043
PSNR=29.7730
SSIM=0.8500
PSNR=30.1537
SSIM=0.7902
PSNR=30.4492
SSIM=0.8115