<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Fast Intra Mode Decision for HEVC</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Ban Doan</string-name>
          <email>bandoan@itmo.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Andrey Tropchenko</string-name>
          <email>aatropchenko@itmo.ru</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>ITMO University</institution>
          ,
          <addr-line>Saint Petersburg, 197101, Russian Federation</addr-line>
        </aff>
      </contrib-group>
      <abstract>
        <p>For the higher coding performance than the previous video coding standards, High-E ciency Video Coding (HEVC) adopts an intra prediction method with 35 modes, which requires heavy computational complexity. Intending to reduce this complexity, we analyzed the role of modes and proposed a scheme that contains two rough mode decision (RMD) processes with a customized set of modes to be tested in the rst stage. The second stage of the RMD is calculated for a maximum of 4 modes. As compared to the default encoding scheme in HEVC test model HM-16.20, experimental results show that the proposed method reduces encoding time up to 22.74% with negligible loss of coding e ciency.</p>
      </abstract>
      <kwd-group>
        <kwd>HEVC/H</kwd>
        <kwd>265 Video compression Intra prediction Mode decision Rate-distortion optimization</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        In recent years, there has been a growing interest in services related to the
transmission and storage of high and ultrahigh de nition videos. The video
coding standard H.264/Advanced Video Coding (AVC) [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ] published in 2003 has
been unable to meet those requirements and the introduction of the HEVC [
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]
video coding standard as one of the solutions to the problem.
      </p>
      <p>
        Mainly due to the new coding tools and the exible data structures, HEVC
provides a signi cant improvement in compression e ciency compared to its
predecessors H.264, especially when operating on high-resolution video content [
        <xref ref-type="bibr" rid="ref3 ref4">4,
3</xref>
        ]. Similar to older video compression technologies, HEVC is based on a
hybrid scheme of coding image blocks, which uses intra- and inter-frame prediction
coding together with transform coding of residual data.
      </p>
      <p>
        HEVC contains several elements improving the e ciency of intra
prediction over earlier solutions. HEVC design supports a total of 35 intra prediction
modes, including Planar, DC and 33 angular modes, as presented in Figure 1,
which contribute to representing di erent texture and object edge direction more
precisely [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Due to the signi cantly increased number of intra modes, more
techniques are required to e ciently encode the mode, one of which is to divide
the frame into segments called coding units (CU), prediction units (PU), and
transformation units (TU). The encoder needs to try all the combinations of
CU, PU, and TU in the rate-distortion optimization (RDO) process to nd the
best mode with the lowest rate-distortion (RD) cost [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. Such a process is very
time-consuming.
While an increase in the number of intra prediction modes can provide
substantial performance gains, it also makes the RDO process more complex. To
reduce the computational load of intra prediction, the o cial HM software [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]
uses a fast encoding algorithm [
        <xref ref-type="bibr" rid="ref10 ref5 ref7">5, 7, 10</xref>
        ] with two phases through a combination
of RMD and RDO process. First, all 35 modes are evaluated with respect to a
cost function. N modes with minimum cost JSAT D are then selected as the most
promising candidate modes.
      </p>
      <p>JSAT D = SAT D + pred</p>
      <sec id="sec-1-1">
        <title>Rpred</title>
        <p>(1)
where SAT D represents the absolute sum of Hadamard transformed residual
signal for a PU. pred is a Lagrange multiplier, and Rpred represents the number
of bits for the prediction mode. The number N is varied depending on the PU
size. The N is set to f8, 8, 3, 3, 3g for 4 4, 8 8, 16 16, 32 32, and 64 64
PU, respectively.</p>
        <p>
          In the second step, three most probable modes (MPM), which are derived
from the intra modes of the left and top neighboring PUs [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ], are added to the
list of candidates [
          <xref ref-type="bibr" rid="ref8 ref9">8, 9</xref>
          ]. The full RD costs with the reconstructed residual signal
used for the actual encoding process are compared among those (N + 3) modes,
and the prediction mode with the minimum RD cost is selected as the nal
prediction mode. The RD cost (JRDO) for each intra mode is computed by:
(2)
JRDO = SSE + pred
        </p>
      </sec>
      <sec id="sec-1-2">
        <title>Rtotal</title>
        <p>where SSE represents the sum of the squared errors between the original CU
and the reconstructed CU. Rtotal is the total number of bits used for encoding
with this mode.</p>
        <p>In this way, the RDO process has to check only a maximum of 11 modes
instead of all 35, and so the computational load can be reduced. However, the
complexity is still high, since, in the RMD step all the 35 modes need to perform
the cost calculation, the number of modes for RDO is still large. In this paper, a
fast intra mode decision is proposed to further reduce the complexity of HEVC
intra coding while maintaining the RD performance.
2</p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Analysis mode selection probability</title>
      <p>Theoretically, 35 intra modes play the same role and their probability of choice
is equal. However, the results of analyzing some videos of various categories have
given a di erent perspective. To perform the statistical analyses of frequently
chosen modes, HEVC reference software HM-16.20 was used to encode a set of
video sequences of di erent classes and resolutions. Statistical results for test
sequences in class B and the sequence "PeopleOnStreet" are shown in tables 1
and 2 with the four most frequent modes are represented in bold.
Figure 2 shows diagrams re ecting the probability (P ) of the choice of speci c
prediction modes when encoding test video sequences.</p>
      <p>Statistics show that Planar and DC prediction modes are most likely for all video
sequences. However, the probability of being the best choice for the vertical and
horizontal modes (Angular10 and Angular26) is much greater than the other
angular modes.
Fig. 2. Mode selection probability.</p>
      <p>There has been signi cant work to speed up the intra mode decision process.
Based on the above analysis, this paper proposes a scheme for reducing intra
modes in RMD and hence increasing the encoding speed, the descriptions of
which will be described below.
3</p>
    </sec>
    <sec id="sec-3">
      <title>Fast mode selection</title>
      <p>Instead of all 35, we prefer to test the most probability modes. For this purpose,
a set of modes was created, including DC, Planar and Angular modes (2 + 4i)
where 0 i 8. As a result, only 11 modes are tested using the RMD process to
nd modes with the lowest cost. Let's call the 2 best modes FM ( rst mode) and
SM (second mode). After that, a exible step (RMD2) was added after the rst.
The input data for RMD2 depends on what the FM and SM are. The general
scheme is shown in gure 3 with the mode selection algorithm for the second
step is presented as follows:
- For PU 16 16, 32 32 and 64 64: check if FM is not Planar, DC or
vertical mode (0, 1, 26) then perform the second step of calculating RMD2 for
4 adjacent FM modes: F M 2, F M 1, F M + 1, F M + 2, after that update
the list of candidates. Otherwise, RMD2 is skipped.</p>
      <p>- For PU 8 8 and 4 4: if FM and SM are Planar or DC modes, the encoder
will add MPM modes (if not already included in the candidate list) and perform
the RD cost calculation step. In other cases, the second step RMD2 will check
some other modes F M 2, F M 1, F M + 1, F M + 2 (if FM is an angular
mode) or SM 2, SM 1, SM + 1, SM + 2 (if FM is DC or Planar).</p>
      <p>According to the proposed scheme, in the second stage of calculating cost
RMD2, we can calculate a maximum of 4 more modes surrounding FM and
SM. The minimum and the maximum number of checked modes is 11 and 15,
respectively, which reduces computational load. After that, the RDO process
will be performed with MPM modes added to the candidate list.
4</p>
    </sec>
    <sec id="sec-4">
      <title>Experimental results</title>
      <p>
        The proposed scheme has been implemented on top of the HEVC reference
software HM-16.20. A set of standard video sequences in ve classes covering a
wide range of resolutions and use cases (see Table 3) was tested using the All
Intra-Main con guration and four values of the quantization parameter QP 22,
27, 32 and 37 as speci ed by [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ].
To evaluate the e ciency of the algorithm, comparisons were made in terms of
the Bjontegaard peak signal-to-noise ratio (BD-PSNR) and Bjontegaard bitrate
(BD-Bitrate) [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], and time-saving T (%).
T = THM 16:20
      </p>
      <sec id="sec-4-1">
        <title>Tprop</title>
        <p>THM 16:20
(3)
where THM 16:20 denotes the time consuming of the default HM-16.20 and Tprop
represents the time consumed by the proposed algorithm.</p>
        <p>Di erent sequences are obtained di erent results, due to di erent detail and
complexity. The RD curves of the proposed algorithm and the HM for some
sequences are shown in Figures 4 and 5. It can be seen that the proposed
algorithm achieves almost the same PSNR on di erent bitrates.
By interfering with the mode selection for the RMD process, the number of
modes to be tested has been signi cantly reduced. It can be argued that the
proposed scheme requires less computational load, while the coding performance
remains almost at the same level compared to the original HEVC encoder. It
may be recommended to be combined with an algorithm that optimizes the CU
separation process.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Wiegand</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sullivan</surname>
            ,
            <given-names>G.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bjontegaard</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Luthra</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Overview of the H.264/AVC video coding standard</article-title>
          .
          <source>IEEE Transactions on Circuits and Systems for Video Technology</source>
          <volume>17</volume>
          (
          <issue>7</issue>
          ),
          <volume>560</volume>
          {
          <fpage>576</fpage>
          (
          <year>2003</year>
          ) https://doi.org/10.1109/TCSVT.
          <year>2003</year>
          .815165
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Sullivan</surname>
            ,
            <given-names>G.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ohm</surname>
          </string-name>
          , J.-R., Han, W.-J.,
          <string-name>
            <surname>Wiegand</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Overview of the high e ciency video coding (HEVC) standard</article-title>
          .
          <source>IEEE Transactions on Circuits and Systems for Video Technology</source>
          <volume>22</volume>
          (
          <issue>12</issue>
          ),
          <volume>1649</volume>
          {
          <fpage>1668</fpage>
          (
          <year>2012</year>
          ) https://doi.org/10.1109/TCSVT.
          <year>2012</year>
          .2221191
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Vanne</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Viitanen</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hamalainen</surname>
          </string-name>
          , T. D.,
          <string-name>
            <surname>Hallapuro</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Comparative RateDistortion-Complexity Analysis of HEVC and AVC Video Codecs</article-title>
          .
          <source>IEEE Transactions on Circuits and Systems for Video Technology</source>
          .
          <volume>22</volume>
          (
          <issue>12</issue>
          ),
          <year>1885</year>
          {
          <year>1898</year>
          (
          <year>2012</year>
          ) https://doi.org/:10.1109/tcsvt.
          <year>2012</year>
          .2223013
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Ohm</surname>
            ,
            <given-names>J.-R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Sullivan</surname>
            ,
            <given-names>G.J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schwarz</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Tan</surname>
            ,
            <given-names>T.K.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wiegand</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Comparison of the Coding E ciency of Video Coding Standards|Including High E ciency Video Coding (HEVC)</article-title>
          .
          <source>IEEE Transactions on Circuits and Systems for Video Technology</source>
          <volume>22</volume>
          (
          <issue>13</issue>
          ),
          <fpage>1669</fpage>
          -{
          <volume>1684</volume>
          (
          <year>2013</year>
          ) https://doi.org/10.1109/TCSVT.
          <year>2012</year>
          .2221192
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Lainema</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Bossen</surname>
          </string-name>
          , F.,
          <string-name>
            <surname>Han</surname>
          </string-name>
          , W.-J.,
          <string-name>
            <surname>Min</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ugur</surname>
            ,
            <given-names>K.</given-names>
          </string-name>
          :
          <article-title>Intra Coding of the HEVC Standard</article-title>
          .
          <source>IEEE Transactions on Circuits and Systems for Video Technology</source>
          <volume>22</volume>
          (
          <issue>12</issue>
          ),
          <volume>1792</volume>
          {
          <year>1802</year>
          (
          <year>2012</year>
          ) https://doi.org/10.1109/TCSVT.
          <year>2012</year>
          .2221525
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6. HEVC reference software, https://hevc.hhi.fraunhofer.de/.
          <source>Last accessed Nov</source>
          <year>2019</year>
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Hosseini</surname>
            ,
            <given-names>E.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Pakdaman</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hashemi</surname>
            ,
            <given-names>M.R.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ghanbari</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>A computationally scalable fast intra coding scheme for HEVC video encoder</article-title>
          .
          <source>Multimed Tools Appl</source>
          .
          <volume>78</volume>
          (
          <issue>9</issue>
          ),
          <volume>11607</volume>
          {
          <fpage>11630</fpage>
          (
          <year>2019</year>
          ) https://doi.org/10.1007/s11042-018-6713-y
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ma</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Fast mode decision algorithm for intra prediction in HEVC. 2011 Visual Communications and Image Processing (VCIP) https</article-title>
          ://doi.org/10.1109/VCIP.
          <year>2011</year>
          .6115979
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Fan</surname>
            ,
            <given-names>X.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ma</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhao</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <article-title>Fast intra-encoding algorithm for High E ciency Video Coding</article-title>
          .
          <source>Signal Processing: Image Communication</source>
          .
          <volume>29</volume>
          (
          <issue>9</issue>
          ),
          <volume>935</volume>
          {
          <fpage>944</fpage>
          (
          <year>2014</year>
          ) https://doi.org/10.1016/j.image.
          <year>2014</year>
          .
          <volume>06</volume>
          .008
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Piao</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Min</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
          </string-name>
          , J.:
          <article-title>Encoder improvement of uni ed intra prediction</article-title>
          .
          <source>Document JCTVC-C207</source>
          ,
          <article-title>JCT-VC. Guangzhou, CN (</article-title>
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Bossen</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Common test conditions and software reference con gurations</article-title>
          .
          <source>Document JCTVC-L1100</source>
          ,
          <article-title>JCT-VC. Geneva, CH (</article-title>
          <year>2013</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Bjontegaard</surname>
          </string-name>
          , G.:
          <article-title>Calculation of average PSNR di erences between RD-curves</article-title>
          .
          <source>Document VCEG-M33</source>
          , ITU-T. Austin,
          <string-name>
            <surname>Texas</surname>
          </string-name>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>