Transcript Slide

HEVC CABAC
A PROJECT UNDER THE GUIDANCE OF DR. K. R. RAO
COURSE: EE5359 - MULTIMEDIA
PROCESSING, SPRING 2016
SUBMITTED BY: Satya Avasarala (1001090898)
Mohammed Mahmood Quraishi(1001151028)
Sai Kumar Pola(1001110666)
Email ID :[email protected]
[email protected]
[email protected]
LIST OF ACRONYMS:
AVC : Advance Video Coding
BD-BR: Bjontegaard Delta Bit rate.
CTU : Coding Tree Unit
CU : Coding Unit
CABAC: Context Adaptive Binary Arithmetic Coding.
DBF: De-blocking Filter
PU : Prediction Unit
MPEG : Moving Picture Experts Group
HDTV : High Definition Television
PSNR : Peak Signal To Noise Ratio
ISO: International Organization for Standardization
HEVC: High Efficiency Video Coding.
HM: HEVC Test Model.
DCT: Discrete Cosine Transform
MPEG: Moving Picture Experts Group.
JCT: Joint Collaborative Team.
JCT-VC: Joint Collaborative Team on Video Coding
Introduction : H.264
• H.264 also known as Advanced Video Coding (MPEG-4 AVC)[2] is a video coding
format is developed by ITU-T [4], Video Coding Experts Group (VCEG) together
with the ISO/IEC JTC1[2] Moving Picture Experts Group (MPEG).[1]
• It has been said that 80% of the internet videos use this compression standard .
• It has 50% more video coding efficiency than MPEG 2.
• The Applications Of H.264 were :
1) HDTV broadcast satellite.
2) Real-time video chat and Video Conferencing
3) Internet and mobile videos and many more.
• Advantages Over Previous Standards(MPEG 2)
1) Prediction- Intra prediction using neighboring sample.
2) Transform – It implemented 4x4/8x8 integer transforms and 2x2/4x4
secondary Hadamard.[6]
3) Entropy Coding- Context Adaptive Variable Length Coding(CAVLC) and
CABAC.[8]
DISADVANTAGES OF H.264
• It uses huge bandwidth approximately 40-45% over
HEVC [5]
• At the same bit rate HEVC performs far more better
video quality compared to H.264
• Failure to support UHD,2K and 4K standard.
• H.264 encoding and decoding is more computationally
complex than some other codecs such as MPEG-4 [9]
Part 2 (DivX, XviD).
Figure 1: Comparison of various codecs [1]
REDUNDANCY & IT’S TYPES [11]:
•
•
•
•
SPATIAL REDUNDANCY – FRAME TO FRAME
STATISTICAL REDUNDANCY- FROM THE STATISTICS OF AN IMAGE
TEMPORAL REDUNDANCY-FROM ONE TIME TO ANOTHER
PERCEPTUAL REDUNDANCY- FROM ONE FRAME TO ANOTHER IN TERMS OF
PERCEPTION.
HEVC:
• HEVC was developed by the JCT-VC organization, a collaboration between
the ISO/IEC MPEG and ITU-T VCEG. [2]
• It is an extension of the concepts in H.264/MPEG-4 AVC. [11]
• It offers about double the data compression ratio at the same level of video
quality, or substantially improved video quality at the same bit rate.[6]
• A parallel pipeline approach is most promising and gives highest throughput.
• It incorporates the extension of the correlation and contrast coding areas
from 16×16 pixel to sizes up to 64×64 [14], enhanced variable-square size divisio
enhanced "intra" expectation inside of the same picture, enhanced
movement vector forecast and enhanced movement pay sifting.
Key Features Of HEVC:
FLEXIBLE CODING BLOCK STRUCTURES:
• Each frame is divide into blocks
• In HEVC CTU can have up-to 64x64 pixels which may be a combination of inter
and intra coded blocks [6]
Figure 2:Block partitioning [3]
Different Prediction Units For Intra-Coded and Inter-Coded CU
In the intra-coded CU we can only divide into square partition units like 4
PU or a single PU [8]
Inter Coded Cu Can be divided into non Square and Square PU’S [9]
EXTENSIVE TRANSFORMS
• HEVC supports wide range of integer transform like 4x4, 8x8,16x16 and
32x32 [6]
• Two Types of 4x4 transforms IDST-intra and IDCT-inter
• Due to this there has been an increased computational complexity like:
- 8x more computations per coefficient. [12]
- 16x larger transpose memory.
•There has be an increase of 5-10% in coding efficiency. [13]
HEVC CABAC
• HEVC uses CABAC as it’s entropy coding engine which does lossless coding of syntax elements.
• Thereby, achieves 10-15% coding efficiency when compared to CAVLC used by AVC/H.264. [19]
Figure 3 : HEVC CABAC block diagram [11]
HEVC CABAC & its main steps
1) Binarization : Maps the syntax elements to binary symbols (bins). [12]
2) Context Modelling : Estimates the probability of the bins.
3) Arithmetic Coding : Compresses the bins to bits based on the
estimated probability [18]
Figure 4 :Basic encoding process [12]
Key steps in CABAC
1.Binarization:
• It involves mapping the syntax elements to the binary symbols.
• Combinations of Binarizations can be used in HEVC and AVC. [12]
• Example: Fixed length, Exp-Golomb, truncated unary, etc..,
• Different types of prefix and suffix can be used.
• Truncated unary can be used as prefix and Fixed length as suffix. [10]
2. Arithmetic Coding
• In this, bins(binary symbols) are mapped to bits. [16]
• In here, there is a recursive sub-interval process which is based on
probability of symbol being compressed. [15]
• The encoded bits represent an offset value which when converted to
a fraction selects one of the two intervals indicated as a decoded bin
3. Context Selection
• The context modelling and selection is used to accurately model the
probability of each bin. [13]
• Probability of each bin depends on syntax element and bin index.
• There are several hundred context models in AVC and CABAC. [1]
• The context and probability of next bin is determined by previous bin.
• But these operations should be traded off in term of Power and Area.
ENCODER IMPLEMENTATION STANDARDS:
1. Throughput: Achieve target pixel-rate and bit-rate for real time
applications. Reduce latency of bits to pixels and pixels to bits for
interactive applications.
2. Energy and Power Consumption:Minimize energy consumption to
extend battery life for portable devices. Minimize power
consumption to reduce heat dissipation.
3. Platform Cost : Reduce amount of data to be stored in memory and
amount of logic. Reduce bandwidth requirements such as
reads/writes from memory to reduce demands on off-chip
components.
Throughput improvements in HEVC
1. Reduce total number of bins
• The binarization of coefficient levels was modified to reduce the total
number of bins as a constitute up to 15-25% of total number of bins.
[12]
• HEVC and AVC have same number of bins but upon coefficient values
above 12, the binarization used in HEVC has fewer bins when
compared to AVC bins. [3]
• In a worst case scenario for a given 16*16 block of pixels the total
number of bins were reduced by 1.5 times when compared to
AVC/H.264. [6]
2. Reducing number of context coded bins
• The number of context coded bins was reduced considerably when
compared to AVC by 8 times.
Table 1 &2 : Various context coded bins [12] [11]
3.Grouping of bypass bins
• By grouping of bypass bins, we can improve the coding efficiency.
• This can be done by setting up run length of bin streams from
different syntax elements. [3]
Figure 5 :Rate distortion curve [8]
Formula for PSNR [7]
Flowchart For HEVC Encoding:
Figure 6 :HEVC Encoding flow chart [11]
HEVC Decoding:
Figure 7 :HEVC decoding flow chart [11]
Entropy Coding In HEVC-CABAC Algorithm
The HEVC video compression technology uses Context based Adaptive Binary Arithmetic Coding(CABAC) entropy
which is a modified version of CABAC encoder that is used in MPEG-4 AVC/H.26 video compression standard [9]
Figure 8 :General Block Diagram of CABAC Encoder [12]
Entropy Coding In HEVC-CABAC Algorithm Continued…
• The distinctive feature of CABAC algorithm is application the binary arithmetic codec core that is able to encode
binary symbols.
• 225 models are defined in CABAC with HEVC. [4]
• CABAC introduces two essential simplifications in order to speed up computations:
-Probabilities of symbols are calculated in a simplified way using pre-defined Finite State Machine(FSM) with 64
states.
-Some symbol are encoded in the so-called bypass coding made with no data statistics modelling stage.
Simplifications made in CABAC [2] context modeler block significantly reduces accuracy of symbol probabilities which
negatively affects compression performance. [5]
Improved Version Of CABAC Algorithm in HEVC
• Main idea of improved CABAC uses more accurate mechanism of data statistics estimation relative to original algorithm.
• In the improved CABAC, the CTW method is used by every statistical model to calculate conditional probability of symbols
more accurately. [8]
Figure 9: Improved version of CABAC [8]
Efficiency Of Improved HEVC- Consequences
• Application of the improved CABAC within HEVC increases compression performance of video encoder.
• As seen in the table below an average of 2.6% bitrate reduction was obtained for used video sequences
Table 3: Performance comparison of both version of HEVC [16]
•
•
Compression performance of forthcoming HEVC technology can be further increased when using improved entropy
encoder [15]
Better data statistics estimation in CABAC leads to 1.6% - 4.5% reduction of HEVC bit-stream.
HM CODE: (Source – HM software Lib)
Void TEncBinCABAC::start()
{
m_uiLow
= 0;
m_uiRange
= 510;
m_bitsLeft
= 23;
m_numBufferedBytes = 0;
m_bufferedByte = 0xff;
#if FAST_BIT_EST
m_fracBits
= 0;
#endif
}
Void TEncBinCABAC::finish()
{
if ( m_uiLow >> ( 32 - m_bitsLeft ) )
{
//assert( m_numBufferedBytes > 0 );
//assert( m_bufferedByte != 0xff );
m_pcTComBitIf->write( m_bufferedByte + 1, 8 );
while ( m_numBufferedBytes > 1 )
{
m_pcTComBitIf->write( 0x00, 8 );
m_numBufferedBytes--;
}
m_uiLow -= 1 << ( 32 - m_bitsLeft );
}
else
{
if ( m_numBufferedBytes > 0 )
{
m_pcTComBitIf->write( m_bufferedByte, 8 );
}
while ( m_numBufferedBytes > 1 )
{
m_pcTComBitIf->write( 0xff, 8 );
m_numBufferedBytes--;
}
}
m_pcTComBitIf->write( m_uiLow >> 8, 24 - m_bitsLeft );
}
Void TEncBinCABAC::flush()
{
encodeBinTrm(1);
finish();
m_pcTComBitIf->write(1, 1);
m_pcTComBitIf->writeAlignZero();
start();
}
FUTURE WORK:
• Requirement for backing differing customers with fluctuating
capabilities.
• H.264/AVC does not support combined scalable and multi-view
coding. [22]
• HEVC allows for combined scalable and multi-view coding.
• Scalable video coding: As there is need for more compression
efficiency & huge requirement for mixed format content so we need
to go for Scalable video coding. It regulates the encoding of an
amazing video bit stream that likewise contains one or more subset
bit streams.
• Lastest advancements include the HEVC screen content coding which
started in 2014 April. [29]
FUTURE WORK: contd
Figure 10 : Scalable extension of HEVC [9]
REFERENCES
[1] J. Ohm, et al“ Comparison of the Coding Efficiency of Video Coding Standards –
Including High Efficiency Video Coding (HEVC),” IEEE Trans. on CSVT, vol.22, no.
12, pp. 1669–1684, 2012.
[2] G. Sullivan, et al, “The H.264/AVC Advanced Video Coding Standard: Overview
and Introduction to the Fidelity Range Extensions,” SPIE Conference on
Applications of Digital Image Processing XXVII, vol. 5558, pp. 53-74, Aug. 2004.
[3]M. Goldman, "High-Efficiency Video Coding (HEVC): The Next-Generation
Compression Technology", SMPTE Mot. Imag. J, vol. 121, no. 5, pp. 27-33, 2012.
[4] D. Marpe, et al, “Context-based adaptive binary arithmetic coding in the
H.264/AVC video compression standard,” IEEE Trans. on CSVT, vol. 13, no. 7, pp.
620– 636, July 2003.
[5] M. Zhou, et al "Parallel tools in HEVC for high-throughput processing",
Applications of Digital Image Processing XXXV, 2012.
[6]T. Wiegand, et al" Overview of the H.264/AVC video coding standard", IEEE
Trans. Circuits Syst. Video Technol., vol. 13, no. 7, pp. 560-576, 2003.
[7]S. Kim, et al, "Efficient entropy coding scheme for H.264/AVC lossless video
coding", Signal Processing: Image Communication, vol. 25, no. 9, pp. 687-696,
2010.
[8] V.Sze & M.Budagavi, M. 2012, "High Throughput CABAC Entropy Coding in
HEVC", IEEE Transactions on Circuits and Systems for Video Technology, vol. 22,
no. 12, pp. 1778-1791.
[9] Dajiang Zhou, et al, "Ultra-High-Throughput VLSI Architecture of
H.265/HEVC CABAC Encoder for UHDTV Applications", IEEE Trans.
Circuits Syst. Video Technol., vol. 25, no. 3, pp. 497-507, 2015.
[10] V.Sze et al. (2014). High efficiency video coding (HEVC): Algorithms
and architectures. New York;Cham;: Springer.
[11]S. Choi and S. Chae, "Comparison of CABAC rate estimation models
for HEVC rate distortion optimization", Electronics Letters, vol. 50, no.
6, pp. 441-442, 2014.
[12]J. Choi and Y. Ho, "Efficient residual data coding in CABAC for HEVC
lossless video compression", Signal, Image and Video Processing, vol.
9, no. 5, pp. 1055-1066, 2013.
• [13] HM C++ Code:
https://hevc.hhi.fraunhofer.de/svn/svn_HEVCSoftware/
• [14] HM software manual:
• https://hevc
.hhi.fraunhofer.de/svn/svn_HEVCSoftware/trunk/doc/software-manual.pdf.
• [15] HEVC tutorial by I.E.G. Richardson:
http://www.vcodex.com/h265.html.
• [16] G. J. Sullivan, et al, “Standardized Extensions of High Efficiency Video
Coding (HEVC)”,
• IEEE Journal of selected topics in Signal Processing, Vol. 7, No. 6, pp. 10011016, Dec. 2013.
• [17] Test sequences: https://media.xiph.org/video/derf/
• [18] C. Fogg, “Suggested figures for the HEVC specification”, ITU-T /
ISO-IEC Document: JCTVC J0292r1, July 2012.
• [19] M. Wien, "High Efficiency Video Coding : Coding Tools and
Specification" , Springer , 2014.
• [20] G. Correa et al , " Fast HEVC Encoding Decisions Using Data
Mining " , IEEE Transactions on Circuits and Systems for Video
Technology , Vol . 25 , No. 4 , pp. 660 - 673, Apr. 2015.
• [21] N. Ling, “High efficiency video coding and its 3D extension: A
research perspective,” Keynote Speech, ICIEA, pp. 2150-2155,
Singapore, July 2012.
• [22] Video Sequences: http://forum.doom9.org/archive/index.php/t135034.html http://ultravideo.cs.tut.fi/
• [23] ITU-T website: http://www.itu.int/ITU-T/index.html
• [24] T.Nguyen et al,"Transform Coding Techniques in HEVC", IEEE
Journal of Selected Topics in Signal Processing, vol.7, pp.978–989,
Dec. 2013.
• [25] X. Wang et al,“Paralleling Variable Block Size Motion Estimation of HEVC on
Multicore CPU plus GPU platform”, IEEE International Conference on Image
Processing (ICIP),vol.22, pp. 1836-1839, Sep.2013.
• [26] Y.L. Lee et al, "Improved lossless intra coding for H.264/MPEG-4 AVC", IEEE
Trans on Image Process, vol.15, no.9, pp.2610-2615, Sep.2006.
• [27] M. Jakubowski and G. Pastuszak, “Block-based motion estimation algorithmsa survey”, Journal of Opto-Electronics Review, vol. 21, pp.86-102, Mar.2013.
• [28] Tortoise SVN: http://tortoisesvn.net/downloads.html
• [29] Website on PSNR: http://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio
• [30] White paper on PSNR-NI: http://www.ni.com/white-paper/13306/en/