Professional Documents
Culture Documents
=
1 0 1
1 0 1
1 0 1
x
S (2)
(
(
(
=
1 1 1
0 0 0
1 1 1
y
S
(3)
Equation (6) is then used to generate the corresponding
gradient direction. The obtained direction is supposed to
point to the most important variation of pixels intensity.
G
x
= S
x
A (4)
A S G
y y
= (5)
( )
y x
G G a Dir , 2 tan = (6)
That means that in the example case of a pixel located on
an edge, the calculated direction would goes across that
edge. For our case, we have to take the perpendicular
direction to the gradient as it represents the similarity of
pixels intensity.
The generated direction represents an angle that belong to
the interval [-,], however as shown in Fig.2 only the
specified directions that point from Top or Left neighbors
references to the center of the block are considered for
prediction. So in the case of a direction that does not
belong to the semi-circle of HEVC supported directions,
we take the opposite of that direction. This is motivated
by the fact that whatever the angle points to, what we
need is the direction and not the angle itself; pointing
from high to low intensity or the inverse does not affect
the idea of predicting the pixel values from reference
ones.
For each generated direction, we take the nearest
direction from the 33 HEVC supported directions and we
affect the corresponding intra mode to the concerned
pixel position. At the end of this pre-processing step, we
will have a matrix of modes where each mode
corresponds to a pixel location in the original picture.
At the prediction level, for a PU of size NxN, we will
consider the corresponding NxN matrix in the mode map,
from which we will select the candidate set consisting of
the n best modes that would represent the optimal intra
mode for the current PU.
3.2 Algorithm optimization
In the current section, we will propose in a first part to
simplify even more the gradient calculation process used
to generate the pixel based mode map. In a second part,
we will optimize the selection of the best modes from that
International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 3, Issue 3, May-June 2014 ISSN 2278-6856
Volume 3, Issue 3 May June 2014 Page 225
map to generate a better candidate set of modes that
would better approach the theoretical optimal intra mode
for the current PU.
3.2.1 Granular gradient Map
As explained in the previous section, the preprocessing
stage goes through gradient calculation for each pixel
position in the original frame. Even if the gradient based
Intra prediction is intended to simplify the Hadamard
based prediction, such pixel based treatment could be
considered as including relatively much computation. So
in this part, we will investigate on simplifying the
gradients computation by reducing the number of
gradient computed points in each PU.
To have the best coverage of the whole PU, we propose to
have a granular mapping of gradient points as presented
in the figure below. As we can see, all the reference pixels
are taken into account by some computed gradient points;
this consideration is quite important as it brings the
correlation information between the reference pixels and
the current PU pixels. The other computed gradient
points represent the gradient direction information inside
the block itself.
Figure 1 Example of granular gradient coverage 4x4 PU
with gradient pixel positions (in blue) and used reference
pixels for gradients computation (in green)
The proposed granular mapping will reduce the gradient
computed points by half and thus will reduce the pre-
processing stage complexity by 50%.
However the reduction of the gradient points in each PU
from NxN points to N/2xN/2 points will reduce the
accuracy of the candidate set mode to represent the
optimal Intra mode and thus will reduce the algorithm
performance of intra mode detection as will be presented
later in this paper. To solve this issue, we will investigate,
on the next section, on enhancing the process of mode
selection without increasing the computation complexity.
3.2.2 Intra detection optimization
We mention here that the generated mode matrix contains
only angular modes e.g. DC and planar modes are not
represented, and as these two modes have great
probability to be the best mode at the end of the Rate-
Distortion evaluation, we include them automatically in
the candidate set.
For the angular mode selection, we consider
m
N the
number of appearing of a mode m in the current mode
matrix, as the criteria of selection with the assumption
that the most appearing mode would the best approach
the optimal intra mode for the current PU.
However, as the detected modes are just a result of
derivatives approximations, these modes do not have to be
taken as so accurate. So we extend the detection, in one
point, of a mode m to two more angular modes if they
exit. These two modes are the neighbor modes m+1 and
m-1 of the detected mode m.
As expressed in equation (7), for each detected mode m,
we increase the appearing number
m
N with a bonus
value
1
b and the appearing number of its neighbor modes
1 + m
N and
1 m
N with the neighboring bonus value
2
b ,
used to favoring respectively the detected mode against its
neighbors and the two neighbor modes against the other
modes.
+ =
+ =
+ =
+ +
2 1 1
1
2 1 1
b N N
b N N
b N N
m m
m m
m m
(7)
where
1
b and
2
b are the bonus scores so that
2 1
b b > .
Now, to evaluate and compare the behavior of the
prediction algorithms, we consider the metric of the
theoretical Intra best mode matching used as a measure of
the capability of prediction algorithm to approach the
optimal Intra ode in their candidate set. For such
evaluation, we force the encoder to execute the Hadamard
based method as well as the proposed gradient prediction
methods to have as candidate sets as prediction
algorithms; a candidate set for each algorithm. We force
then the second prediction step to perform a FULL rate-
distortion quantization for all the 35 intra modes ignoring
the candidate sets, to find the optimal mode for the
current PU.
In the next prediction step, a rate distortion evaluation
will be performed for the entire modes in the candidate
set, so we consider an algorithm as succeeding to match
the best mode if it offers that mode in its candidate set.
For the investigation on the impact of best bonus values,
we present in the table2 the percentage of matching the
best mode in the candidate set for each PU for different
combinations of
1
b and
2
b .
We notice from the results that, the matching rate is more
related to the quotient q expressed in equation 8, more
than the values of the couple (
1
b ;
2
b ) themselves. i.e. for
example, we have almost the same results for the couples
(2;1) and (4;2).
2
1
b
b
q =
(8)
Therefore, we present in the investigation results below,
the percentage rate of the best mode matching for
different values of the quotient q on the sequences
PeopleOnStreet, Cactus and BasketballPass at QP value of
32.
We notice that, the best mode matching rate is clearly
improved by the neighbor extension of the mode matrix
and this is for all the cases of the bonus combinations. In
International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 3, Issue 3, May-June 2014 ISSN 2278-6856
Volume 3, Issue 3 May June 2014 Page 226
fact, the neighbor extension improves the average rate by
2.8%, 3.0%, 3.1%, 2.83% and 2.48% for respectively q
values of 1.0, 1.3, 1.5, 2.0 and 3.0.
From results, we notice also that the matching rate have
the best result of q value around 1.5 obtained with bonus
couple of (3;2) even if the q variation itself, does slightly
affect the matching rate. Thus, in the remaining of this
paper, we continue working with these bonus values.
Table 2: Percentage rate of Best Mode matching at QP 32
for different q value
Seq OFF
q
1,0 1,3 1,5 2,0 3,0
PeopleOnStreet 66,23 68,13 68,07 68,11 68,03 67,79
Cactus 63,66 66,20 66,40 66,42 66,29 66,02
BasketballPass 60,28 64,38 64,69 64,69 64,34 63,65
Ave. 63,39 66,24 66,39 66,41 66,22 65,82
3.2.3 Performance evaluation
To be able to evaluate the performance of the proposed
gradient method, we will evaluate and compare, in this
section, the performance for different version of the
algorithm. So we consider a gradients calculation with
full pixel positions coverage, a granular coverage and a
granular coverage with the optimized detection with
neighbor extension as described in the previous section,
in addition to considering the original Hadamard based
intra prediction method.
To evaluate these algorithms, we present in the table
below, the performance of the best mode matching, for
different QP values and for different sequences.
We notice, first, from results that the Hadamard based
prediction widely outperforms the gradient methods with
an average best mode matching of 91.3%. The reason
behind this performance difference is that the Hadamard
based algorithm use huge transform computations to
estimate the rate distortion cost of intra modes, and so it
considers the bit consumption of the modes.
Such consideration is not implemented for the gradient
based predictions; To father investigate on our analysis,
we have considered the experiment in which, we have
modified the RD cost function used by HM so that it take
uniquely the distortion part which is represented by the
SATD.
By removing the bit consumption part, the Hadamard
based algorithm succeeds to match the best theoretical
candidate in only 65%. Thus, taking into account the bit
consumption by each mode affects considerably the mode
prediction. Such bit consideration feature can be added to
the proposed algorithm but is not the goal of this work
and we mainly focus here on reducing the complexity
intra prediction algorithm. For the gradient algorithm
performance, the results show an average performance of
best mode matching of 69%, 67, 5% and 68, 2%
respectively the full coverage, the granular coverage and
the optimized granular coverage algorithms. We conclude
from these results that reducing the gradient points by
half implies a loss in the best intra mode detection
performance of 1.5%.
Table 3: Percentage of best Intra mode matching
Seq. QP Hadamard Full map Granular Opt granular
Traffic
22 86% 72% 70% 71%
37 95% 76% 74% 74%
Cactus
22 82% 64% 63% 63%
37 96% 69% 68% 69%
RaceHorcesC
22 82% 65% 64% 65%
37 94% 72% 71% 72%
BasketballPass
22 89% 63% 60% 61%
37 97% 70% 68% 69%
FourPeople
22 92% 68% 67% 68%
37 97% 69% 68% 68%
ChinaSpeed
22 90% 70% 68% 68%
37 95% 71% 69% 70%
Avg. 91,3% 69,0% 67,5% 68,2%
However improving the detection of the granular
coverage would almost eliminate that loss; So with
combining both the granular gradient coverage and the
proposed mode neighbor extension, we reduce by 50% the
number of computed gradient on each pixel location on
the original frame at the pre-processing stage, and we do
just add two instructions as presented in equations 7
International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 3, Issue 3, May-June 2014 ISSN 2278-6856
Volume 3, Issue 3 May June 2014 Page 227
taking into account the neighbor modes m+1 and m-1 of
the detected mode m.
4. Experimental results
For performance evaluation of coding efficiency, the
proposed algorithm was integrated in HM 12.0, and
simulations were performed conforming to common test
condition specified in [7]. To compare the time effect of
the algorithm, we considered the time gain as
12 12
/ ) (
HM prop HM
T T T T = A . (7)
We mention here that the time expressed here include the
preprocessing proposed stage in which we compute the
gradients. As the implemented feature concerns mainly
the intra coding, we present, the results for an All intra
(AI) coding and as we had almost same results for 8 and
10 bit depth coding, we do present the results for only
with 8 bit coding. We note also that the results for Luma
and Chroma components are very similar, so we limit our
commenting here on only the Luma component.
To clearly investigate on the proposed optimization, we
present the detailed results for both algorithm
configurations: the full gradient coverage and the
optimized granular gradient coverage.
From the result tables 4 and 5, we can see that the
proposed gradient Intra perdition algorithm provide a
time gain for all the sequences with an average value of
11.5% for the mandatory classes A to E with an average
increase in BD-rate of just 1.7. For class F, the algorithm
achieves a time gain of 12.8% with an average of 2.0%
increase in BD-rate.
For the optimized granular gradient algorithm, we notice
from simulation results presented in the tables 6 and 7
that the algorithm achieves an encoding time saving of
11.6% with an average increase of 1.6% in BD-rate for
the classes A to E. For the class F, it offers an average
saving encoding time of 12.8% with an average increase
in BD-rate of 2.2%.
We conclude that the reduction of gradient points to the
half, involve a loss in the accuracy of the mode detection
from the gradient map. But with optimizing the detection
by taking into account the detected mode neighbors, we
enhance the mode detection and we do compensate the
loss carried by the number of gradient points reduction
and even we obtain a little bit better coding BR-rate as
shown by the two configurations results. For the time
saving, also, we have a little better results but the reason
why the expected improvement is not that clear here, is
due to the fact that the gradient computation profiling
time, presents a small percentage of the whole encoding
profiling time T of the HM encoder, so that the expected
gain around 50% is not presented here. But such gain can
be clearly explained by the reduction to the half of the
computed gradient points where each gradient point
corresponds to a pixel position in the original frame.
Unlike the testing model we have used, in case of
hardware implementation of the proposed preprocessing
stage, such reduction of 50% would be considered as very
important.
Table 4: Coding efficiency and complexity reduction of
the proposed gradient algorithm on HM12 main profile
for A to E classes sequences according to HEVC
common test condition [7]
Cl Sequence Y U V T
C
l
a
s
s
A
Traffic 1,2 1,0 1,4 10
PeopleOnStreet 1,5 1,9 2,9 10
Nebuta 0,9 1,0 1,0 7
SteamLocomotive 0,4 -0,4 0,2 8
C
l
a
s
s
B
Kimono 0,7 0,5 0,4 15
ParkScene 0,6 0,0 0,1 13
Cactus 1,6 0,9 1,5 11
BasketballDrive 2,2 2,3 1,6 14
BQTerrace 1,1 0,7 1,1 12
C
l
a
s
s
C
BasketballDrill 2,5 1,9 3,5 7
BQMall 1,8 1,0 0,9 10
PartyScene 1,5 0,7 0,8 9
RaceHorses 1,2 0,9 1,2 9
C
l
a
s
s
D
BasketballPass 2,6 2,1 2,4 17
BQSquare 2,8 2,1 2,3 13
BlowingBubbles 3,2 1,9 2,5 8
RaceHorses 2,5 1,9 1,6 7
C
l
a
s
s
E
FourPeople 1,4 1,6 1,9 16
Johnny 2,3 3,1 3,3 17
KristenAndSara 2,2 1,9 1,1 18
Ave. 1,7 1,4 1,6 11,5
Table 5: Coding efficiency and complexity reduction of
the proposed gradient algorithm on HM12 main profile
for the F class sequences according to HEVC common
test condition [7]
Cl Sequence Y U V T
C
l
a
s
s
F
BasketballDrillText 2,4 1,5 2,0 5,4
ChinaSpeed 1,8 1,2 0,9 13
SlideEditing 1,4 1,4 1,2 12
SlideShow 2,3 0,2 1,0 21
Ave. 2,0 1,1 1,3 12,8
Table 6: Coding efficiency and complexity reduction of
proposed fast gradient algorithm on HM12 main profile
for A to E classes sequences according to HEVC
common test condition [7]
Cl Sequence Y U V T
C
l
a
s
s
A
Traffic 1,1 1,0 0,9 10
PeopleOnStreet 1,3 1,1 1,8 9
Nebuta 0,9 1,1 0,8 8
SteamLocomotive 0,3 -0,2 0,2 9
C
l
a
s
s
B
Kimono 0,6 0,5 0,4 15
ParkScene 0,5 0,0 0,1 13
Cactus 1,6 0,9 1,2 11
BasketballDrive 2,0 1,8 1,6 14
BQTerrace 1,1 0,9 1,0 13
C
l
a
s
s
C
BasketballDrill 2,4 1,9 3,0 7
BQMall 1,8 1,5 1,5 10
PartyScene 1,6 0,7 0,6 9
RaceHorses 1,2 1,1 0,7 10
C
l
a
s
s
D
BasketballPass 2,7 2,2 2,5 18
BQSquare 2,8 1,7 1,4 14
BlowingBubbles 3,0 1,4 2,4 8
RaceHorses 2,3 2,0 1,9 8
C
l
a
s
s
E
FourPeople 1,5 1,2 1,9 15
Johnny 2,2 1,8 2,2 17
KristenAndSara 1,9 1,2 1,7 16
Ave. 1,6 1,2 1,4 11,6
International Journal of Emerging Trends & Technology in Computer Science (IJETTCS)
Web Site: www.ijettcs.org Email: editor@ijettcs.org, editorijettcs@gmail.com
Volume 3, Issue 3, May-June 2014 ISSN 2278-6856
Volume 3, Issue 3 May June 2014 Page 228
Table 7: Coding efficiency and complexity reduction of
proposed fast gradient algorithm on HM12 main profile
for F class sequences according to HEVC common test
condition [7]
Cl Sequence Y U V T
C
l
a
s
s
F
BasketballDrillText 2,5 1,4 1,8 6
ChinaSpeed 1,6 1,2 1,2 13
SlideEditing 1,3 1,1 1,0 12
SlideShow 3,4 1,4 1,1 21
Ave. 2,2 1,3 1,3 12,8
5. Conclusion
In this paper, we have presented a pixel-based gradient
Intra prediction algorithm for HEVC. The gradient
computation, proposed at a pre-processing stage use the
Prewitt filter as a discrete differentiation operator used as
an approximation of the gradient at each pixel position in
the original picture.
From the computed map of gradients, we generate a
preferred direction for each pixel, and we choose the
corresponding Intra supported mode for that pixel
position. From the obtained Map of modes, we select a
candidate set of Intra modes that would the best approach
the theoretical best Intra mode, to be tested in rate-
distortion optimization level.
For fasting even more the algorithm and specifically the
gradients calculation, we proposed a second configuration
of the algorithm in which we reduce the gradient
computed points by half by adopting a granular coverage
of gradients. To compensate the introduced loss in
accuracy, this reduction is coupled with an optimized
mode selection through an extension to the two neighbors
of the selected mode. A comparison with the Hadamard
transform based Intra prediction algorithm used in
HM12, shows that the first proposed algorithm, the
gradient based prediction, achieves a time saving of
11.5% with an average increase in BD-rate of just 1.7%.
The second configuration of the proposed fast algorithm,
the optimized granular gradient Intra prediction, achieves
a time saving of 11.6% with an average increase in BD-
rate of just 1.6%.
References
[1] B. Bross, W.-J. Han, J.-R. Ohm, G.-J. Sullivan, Y.-K.
Wang, and T. Wiegand, High efficiency video
coding (HEVC) text specification draft 10, in Doc.
JCTVC-N1002 (rev. 37). Joint Collaborative Team
on Video Coding (JCT-VC) of ITU-T SG16 WP3 and
ISO/IEC JTC1/SC29/WG11, March 2013.
[2] G.-J. Sullivan, J.-R. Ohm, W.-J. Han, and T.
Wiegand, Overview of the high efficiency video
coding (HEVC) standard, IEEE Transactions on
Circuits and Systems for Video Technology, vol. 22,
no. 12, pp. 1649 1668, Dec. 2012.
[3] J. Lainema, F. Bossen, W.-J. Han, J. Min, and K.
Ugur, Intra Coding of the HEVC Standard, IEEE
Transactions on Circuits and Systems for Video
Technology, vol. 22, no. 12, pp. 1792 1801, Dec
2012.
[4] HEVC reference model. [Online]. Available:
http://hevc.hhi.fraunhofer. de/svn/svn
HEVCSoftware/
[5] Piao, J. Min, and J. Chen, Encoder improvement of
unified intra prediction, in JCTVC-C207, October
2010.
[6] Liang Zhao, Li Zhang, and Xin Zhao, Further
Encoder Improvement of intra mode decision,
JCTVC-D283, Daegu, Jan. 2011.
[7] F. Pan, X. Lin, S. Rahardja, K. P. Lim, Z. G. Li, D.
Wu, and S. Wu, Fast mode decision algorithm for
intra prediction in H.264/AVC video coding, IEEE
Transactions on Circuits and Systems for Video
Technology, vol. 15, no. 7, pp.813822, Jul. 2005.
[8] W. Jiang, H. Ma, and Y. Chen, Gradient based fast
mode decision algorithm for intra prediction in
HEVC, in International Conference on Consumer
Electronics, Communications and Networks
(CECNet), April 2012.
[9] F. Bossen, Common HM test conditions and software
reference config- urations, JCT-VC Doc. L1100, Jan.
2013.
AUTHORS
Anis Benhajyoussef received his Dip.
Telecommunication engineering diploma and
the M.S. degree in communication systems
from the National School of Engineers of
Tunis in 2005, 2007 respectively. He is currently
pursuing the Ph.D. degree. His research interests include
digital video coding and algorithm optimization.
Tahar Ezzedine received the electrical
engineering in 1986, the M.S degree in
Telecommunications in 1990, the Ph.D. degree
in telecommunications in 2005 and his
habilitation in 2009 from the National Engineer School of
Tunis (ENIT). He joined the National School of
Engineers of Tunis from 1990 as research assistant. His
research interests include adhoc sensor networking,
embedded system and image and video coding.
Pr. Ammar BOUALLEGUE received the
electrical engineering and engineer doctor
degrees from ENSERG of Grenoble, France,
in 1971 and 1976, respectively, and the Ph.D.
degree from ENSEEIHT, INP of Toulouse, France, in
1984. In 1976, he joined the engineering school of Tunis
(ENIT), Tunisia. From 1984 to 1992, he was the head of
the Electrical Department, ENIT, and from 1993 to 1995,
he was Director of Telecommunication for the High
School of Tunis, Tunisia. He is the head of the
Communication Systems (SysCom) Laboratory at the
National Engineering School of Tunis. His research
interests include passive and active microwave structures,
signal coding theory, and digital communications.