SlideShare a Scribd company logo
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 67
SELECTION OF INTRA PREDICTION MODES FOR INTRA FRAME
CODING IN ADVANCED VIDEO CODING STANDARD
Manjanaik.N1
, Manjunath.R2
1
Electronics and Communication Engineering, Jain University, Bangalore, India.
2
Senior Domain Specialist, Philips Company, Bangalore, India.
manjubdt2009@gmail.com, manju_r_99@yahoo.com
Abstract
This paper proposes selection of Intra prediction modes for Intra frame coding in Advanced Video Coding Standard using Matlab.
The proposed algorithm selects prediction modes for intra frame coding. There are nine prediction modes are there to predict the
intra frame in AVC using Intra prediction,but all the prediction modes are not required for all the applications. Intra prediction is the
first process of advanced video coding standard. It predicts a macro block by referring to its previous macro blocks to reduce spatial
redundancy,appling all the prediction modes to predict intra frame it leads to more computational complexity is increased at the
encoder of AVC. In the proposed algoriyhm, applied all the prediction modes(0-8) for prediction of intra frame but only few modes
such as mode0, mode1, mode2,mode4,mode6 gives good PSNR, high comprssion ratio and low bit rate. Out of these modes mode2
gives good PSNR, compression ratio and redced bit rate, mode5, mode7 and mode8 gives lower PSNR, low compression ratio and
increased bitrate compared to mode0,mode1, mode2, mode4 and mode6. The simulation results are presented using Matlab. The
PSNR , compressed ratio and bit rate achived for different quantization parameters of mother daughter frames , foreman frames was
presented.
Keywords: AVC, PSNR, CAVLC, Macroblock, Prediction modes.
------------------------------------------------------------------------***----------------------------------------------------------------------
1. INTRODUCTION
Compression is the basic process of reduceing the size of data
in order to save storge space and transmission band
width.compression consist of removing redundancies
(spatial,spectra and temporal) and encoding the true
information in the form of appropriate to suite for applications.
There are two compression techniques ie. Lossless and lossy
techniques. In lossless the reconstured image after comprssion
is identical to original image, this method achieve maximum
compression ratio.To compress data ,it is important to
recognize redundancies in data in the form of coding
redundancy, inter- pixel redundancy, and psycho-visual
redundancy. Data redundancies occur when unnecessary data is
used to represent source information. compression is achived
when one or more of these types of redundancies are
reduced.In lossy the reconstructed image is not identical to the
original image ie there is loss in information.lossy method is
capble of achiving a high comprssion compare to lossless
method. Image compression/video coding is impotant in
indusrial imaging, commercial and academic applications.
Image /video coding plays a important role in multimedia.
H.264/AVC is the latest video coding standard jointly
developed by Joint video team which is organized by two
international standards bodies ie the Internatonal
Telecommunication Union-Telecommunications sector (ITU-
T) and International Organization for Standardization/
International Electro-technical Comission (ISO/IEC). This
standard consists of various adavanced features(Intra prediction
unit, integer transform, variable block mation estimation,
entropy encoding ,deblocking filter and coding tools.due to
these features this standard achieves greater compression
without sacrificing on video quality. Intra prediction unit is the
first unit of H.264 standard. H.264 standard support intra
prediction for diffent size ie 16x16 macro block as whole or
4x4 sub blocks.there are seventeen prediction modes for a
macroblock, nine prediction modes for 16 4x4 luma sub
macroblocks, four modes for a 16x16 luma macro block and
four modes for two each two chorma 8x8 blocks. All possible
combinations of intra prediction modes are used it lead to
increase computational complexity of H.264 encoder and it is
difficult to use for real time applications.All the modes are not
relavant to all the applications, so that proposed algorithm is
implemented for nine prediction mode.out of these mode few
modes gives good PSNR, high compression ratio and low bit
rate. These modes can use for suitable multi media
applications.
2. METHODOLOGY
A raw recorded video in yuv format is used as an input file.
The video is then decomposed into frames(I-frame). Each Intra
frame is processed in terms of 4x4 sub macro block. For each
Intra frame processing is done in order to get good video
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 68
quality, high compression ratio and low bitrate as compared to
previous video coding compression standards. Each Intra
frame processing includes frame conversion i.e. RGB to
YCBCR format down sampling i.e. (4:4:4 to 4:2:0), 4x4 sub
macro block segmentation, all prediction modes (vertical,
horizontal,DC, diagonal down left, horizontal down, diagonal
down right, vertical left, horizontal up, vertical right etc)
integer transformation, quantization, scaling and entropy
encoding(cavlc). The video is reconstructed by inverse
quantization, inverse transformation and deblocking filter.
3. BLOCK DIAGRAM
The block diagram of H.264 encoder for selection of Intra
prediction modes is shown in fig.1. The h.264 encoder block
consists of integer transform, quantization context adaptive
variable length coding, inverse quantization, invese
transformation, intra prediction unit and deblocking filter.
Fig.1 Block diagram of H.264 encoder
The block diagram of H.264/AVC encoder includes two
dataflow paths, a forward path and a reconstruction path. An
input frame is given for encoding. Every frame is processed in
terms of a Macroblock (MB) of size 16x16 pixels. Each
macroblock is further sub divided into 4x4 sub macroblock.
Each 4x4 sub macroblock is encoded in intra prediction modes.
A prediction macroblock P is formed based on a reconstructed
block. In intra mode, P is formed from samples in the current
block is based on previously reconstructed block. The
prediction P is subtracted from the current macroblock to
produce a residual or difference macroblock. This is
transformed using integer transform and quantized using
quantization block to give quantized transform coefficients.
These coefficients are reordered and entropy encoded using
context adaptive variable length coding (CAVLC) and the
compressed bit stream is transmitted over a band-limited serial
transmission channel . In the reconstruction path the quantized
macroblock coefficients are decoded to reconstruct a frame for
encoding of other macroblocks. The quantized coefficients are
inverse quantized and inverse transformed to produce a
difference macroblock. The prediction macroblock P is added
to difference maroblock to create a reconstructed macroblock
after a de-blocking filter, which improves the quality of the
reconstructed frame[1-2].
4. INTRA PREDICTION
The H.264/AVC intra prediction unit achieves higher
compression ratio and image quality compared with preivious
standard(JPEG2000).The H.264 support different block sizes, it
supports 4x4 and 16x16 block sizes for base line, main and
extended profiles and 8x8 block size for high profile. There are
nine prediction modes for 4x4 blocks, four for 16x16 blocks
and and two for 8x8 blocks. All the prediction pixels are
calculated based on the the reconstructed pixels of previously
encoded neighbouring blocks. The prediction of 4x4 blocks is
predicted based on the previously reconstructed pixels labelled
(A-M) shown in Fig.2 the pixels (A-M) are reconstructed
previously and consider as reference pixels for current block.
The pixels labeled (a-m) are prediction pixels.
Fig. 2. labeling of 4x4 prediction samples
Each 4x4 sub macroblock is predicted using eight directional
prediction modes and one DC mode.The directional prediction
modes are vertical, horizontal, diagonal down left, horizontal
down, diagonal down right, vertical left, horizontal up, vertical
right.For directional modes the predicted samples are formed
from a weighted average of the perdiction samples A-M.For
DC mode the predicted samples are formed by mean of
samples A-D and I-L.The encoder select prediction mode for
each 4x4 sub macroblock.The selection of best prediction mode
is obtained by minimizing the residual encoded block and its
prediction[3-5]. The fig.3 shows the intra prediction modes.
Fig.3. 4x4 intra prediction modes
M A B C D E F G H
I a b c d
J e f g h
K i j k l
L m n o p
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 69
The equations of 4x4 sub macroblock for few prediction modes
are:
Vertical
a=e=i=m=A
b=f=j=n=B
c=g=k=o=C
d=h=l=p=D
Horizontal
a=b=c=d=I
e=f=g=h=J
i=j=k=l=K,
m=n=o=p=L
DC
Mean of A-D and I-L,
for horizontal prediction sum of (A-D) and vertical prediction
sum of (I-L).
Diagonal Down Left
a=(A+2B+C+2)>>2
b=e=(B+2C+D+2)>>2
c=f=i=(C+2D+E+2)>>2
d=g=j=m=(D+2E+F+2)>>2
h=k=n=(E+2F+G+2)>>2
i=o=(F+2G+H+2)>>2
p=(G+3H+2)>>2.
5. STEPS OF IMPLEMENTATION
The following steps are to required to selection of intra
prediction modes for intra frame coding in AVC.
• A recorded video in YUV CIF format as input file
• This file is decomposed into Intra frames (1-30)
• Each I-frame is divided into 16x16 macroblocks
• Eac h 16x16 macroblock further sub divided into 4x4 sub
macroblocks
• A first 4x4 sub block is processed directly without using
previously reconstructed block followed by integer
transform, quantization, entropy encoding (cavlc) at
encoder and reverse process at reconstruction path.
• Reconstruct a 4x4 subblock using inverse process (at
reconstruction path)
• Obtain residual block by subtracting next 4x4 sub block
with previously reconstructed sub block
• Residual of 4x4 sub block is integer transformed,
quantized and entropy encoded at encoder and reverse
process at reconstuction path.
• Finally measure PSNR, Compression ratio and Bit rate of
intra frames with different QP for all prediction modes
6. IMPLEMENTAION
The proposed work is carried out using Matlab. The input is
yuv sequences CIF format video file. For test purpose mother-
daughter frame of resolution 352x288 and also other frames
(foreman, news, etc) also taken, A Matlab program is written,
which reads the yuv video file, extracts Intra frames. The next
process involves reading a true RGB colour frame and convert
into ycbcr format down sampling (4:4:4 to 4:2:0) to reduce bits
of intra frame.ycbcr intra frame is divided into 4x4sub block is
processed directly by following usual procedure of forward
path of H.264 encoder and reconstruct the processed block
which serves as reference to the next sub block using basic
reverse process in reconstruction path of h.264 encoder. Apply
all the prediction modes to each sub block followed by,
quantization, context adaptive variable length coder (CAVLC)
to get compressed bit. At H.264 encoder in the reconstruction
path, perfom reverse process to get reconstruct image and
finally measure quality picture (PSNR).
7. RESULTS AND DISCUSSION
The proposed method, selection of intra prediction modes and
best prediction mode for intra frame is done using Matlab. The
test sequences are coded with only intra frames with frame rate
25 frames per second.The results obtained for the test yuv
sequences in CIF format, five forman cif frames for
quantization parameter 30 and ten mother-daughter cif frames
for quantization parameter 35. Other quantization
parametes[10, 25, 40, 45,51] also chosen (not shown in table).
Table-1
PSNR, Compression ratio, Bit-rate, of foreman cif frames (1-5) with QP=30
Modes Frame1 Frame2 Frame3 Frame4 Frame5
PSNR db
0 31.75 31.7723 31.7593 31.7743 31.755
1 31.743 31.7171 31.6864 31.6939 31.67
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 70
The table 1 shows comparison of nine intra prediction modes
for formen cif frames 4x4 sub macroblocks with QP=30 and
table 2 shows that comparison of nine prediction modes for
mother-daughter cif frames 4x4 sub macroblocks with QP=35.
The various figs (4-22 ) are simulation results (i.e. original
frame, reconstructed frames and reconstructed frames with
deblocking filter) of mother-daughter cif frames, foreman cif
frames, news cif frames for nine intra prediction modes (0-8)
and quantization parameters-30, 35. Quantization parameter 30
for foreman cif frames, news cif frames. Quantization
parameter 30 mother-daughter cif frames.
2 31.9123 31.9029 31.878 31.891 31.8734
3 31.3911 31.3794 31.3674 31.3834 31.3826
4 31.3611 31.3585 31.3511 31.359 31.3526
5 28.6738 28.6752 28.6804 28.6671 28.6521
6 30.5477 30.5331 30.5119 30.5188 30.5123
7 27.2161 27.2159 27.2144 27.2127 27.1954
8 26.6998 26.6965 26.6952 26.692 26.6837
Compression
Ratio (%)
0 75.5339 75.5365 75.5508 75.6185 75.4362
1 75.319 75.3607 75.319 75.2826 75.2435
2 76.8424 76.8776 76.7617 76.9245 76.7943
3 68.6198 68.7096 68.8906 68.7891 68.6549
4 66.7331 66.9635 66.9193 66.9245 66.9596
5 42.625 42.6003 42.6523 42.6185 42.6042
6 67.6641 67.6849 67.6589 67.8789 67.6875
7 59.1706 59.2604 59.2995 59.2396 59.1602
8 53.1146 53.1276 53.181 53.1758 53.1393
Bit rate
0 3.5839 3.5835 3.5814 3.5715 3.5982
1 3.6154 3.6093 3.6154 3.6207 3.6264
2 3.3922 3.3870 3.4040 3.3802 3.9928
3 4.5967 4.5835 4.5570 4.5719 4.5915
4 4.8730 4.8393 4.8458 4.8450 4.8399
5 8.4054 8.4081 8.4005 8.4054 8.4075
6 4.7367 4.7336 4.7374 4.7052 4.7332
7 5.9808 5.9677 5.9619 5.9707 5.9824
8 6.8679 6.8660 6.8582 6.8590 6.8643
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 71
Table 2
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 72
Mode 0
Fig.4. Original frame
Fig.5. Reconstructed frame
Fig.6. Reconstructed frame with Deblocking-filter
Mode 1
Fig.7. Reconstructed frame
Mode 2
Fig.8. Reconstructed frame
Mode 3
Fig.9. Reconstructed frame
Mode 4
Fig 10. Reconstructed frame
Mode 5
Fig.11. Reconstructed frame
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 73
Mode 6
Fig.12 Reconstructed frame
Mode 7
Fig.13. Reconstructed frame
Mode 8
Fig.14. Reconstructed frame
Fig.15. Reconstructed frame with Deblocking-filter
Mode 0
Fig.16. Reconstructed frame
Mode 1
Fig.17. Reconstructed frame
Mode 2
Fig.18. Reconstructed frame
Mode 7
Fig.19. Reconstructed frame
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 74
Mode 8
Fig.20. Reconstructed frame
Mode 0
Fig.21. Reconstructed frame
Mode1
Fig.22. Reconstructed frame
Mode2
Fig.23. Reconstructed frame
Mode 7
Fig.24. Reconstructed frame
Mode 8
Fig.25. Reconstructed frame
CONCLUSIONS
The proposed work is selection of intra prediction modes and
best prediction mode for intra frame coding in advanced video
coding standard is carried out using Matlab. The results shows
that the reconstructed picture quality (PSNR), compression
ratio and bit rate achieved for test yuv I-frames, CIF format
(mother-daughter and foreman and news) for different
quantization parameters. Obtained results for all the nine intra
prediction modes. The mode0, mode1, mode2, mode3, mode4
and mode6 gives good PSNR, compression ratio and low bit
rate (tables I And II) compared to mode 5, mode7 and mode 8.
In the proposed method The mode0, mode1, mode2, mode3,
mode4 and mode6 gives good PSNR, compression ratio and
low bit rate, out of these modes mode 2 gives high PSNR,
compression ratio and Low Bit rate indicted yellow mark in
table(I and II), which is the best prediction mode.
REFERENCES
[1]. Iain E.Richardson,The H.264 and MPEG-4 Video
Compression :Video coding for Next-generation Multimedia,
Johan Wiley& Sons, first edition 2003.
[2]. Iain E. Richarson, The H.264 Advanced Video
Compression Standard, Johan Wiley& Sons, Second edition
2010.
[3]. Youn-Long Steve Lin, Chao-Yang Kao Hung-Chih Kuo
VLSI Design for Video Coding, Springer-2010.
IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308
__________________________________________________________________________________________
Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 75
[4]. Huang Hui, Cao Tie-Yong, Zhang Xiong-wei, The
Enhanced Intra Prediction Algorithm for H.264,congress on
Image and signal processing 2008.
[5]. Chaminda Sampath Kannangara, Complexity Management
of H.264/AVC Video Compression, the Robert Gordon
University 2006.
[6]. http://www.vcodex.com

More Related Content

PDF
Efficient video compression using EZWT
PDF
Efficient document compression using intra frame prediction tecthnique
PDF
AN EFFICIENT M-ARY QIM DATA HIDING ALGORITHM FOR THE APPLICATION TO IMAGE ERR...
PDF
Image Compression Using Intra Prediction of H.264/AVC and Implement of Hiding...
PDF
AN OPTIMIZED BLOCK ESTIMATION BASED IMAGE COMPRESSION AND DECOMPRESSION ALGOR...
PDF
Reconfigurable and versatile bil rc architecture
PDF
Reconfigurable and versatile bil rc architecture design with an area and powe...
PDF
Transformation and dynamic visualization of images from computer through an F...
Efficient video compression using EZWT
Efficient document compression using intra frame prediction tecthnique
AN EFFICIENT M-ARY QIM DATA HIDING ALGORITHM FOR THE APPLICATION TO IMAGE ERR...
Image Compression Using Intra Prediction of H.264/AVC and Implement of Hiding...
AN OPTIMIZED BLOCK ESTIMATION BASED IMAGE COMPRESSION AND DECOMPRESSION ALGOR...
Reconfigurable and versatile bil rc architecture
Reconfigurable and versatile bil rc architecture design with an area and powe...
Transformation and dynamic visualization of images from computer through an F...

What's hot (18)

PDF
A Study of Image Compression Methods
PDF
Comparative Analysis of Lossless Image Compression Based On Row By Row Classi...
PDF
Optimized block size based video coding algorithm
PDF
Compressed Medical Image Transfer in Frequency Domain
PDF
Lossless Image Compression Techniques Comparative Study
PDF
Halftoning-based BTC image reconstruction using patch processing with border ...
PDF
Ijarcet vol-2-issue-7-2230-2231
PDF
Analysis of various mcm algorithms for reconfigurable rrc fir filter
PDF
An overview Survey on Various Video compressions and its importance
PDF
AVC based Compression of Compound Images Using Block Classification Scheme
PDF
PERFORMANCE EVALUATION OF JPEG IMAGE COMPRESSION USING SYMBOL REDUCTION TECHN...
PDF
S.A.kalaiselvan- robust video data hiding at forbidden zone
PDF
Paper id 25201490
PDF
Designing of telecommand system using system on chip soc for spacecraft contr...
PDF
E04552327
PDF
HARDWARE/SOFTWARE CO-DESIGN OF A 2D GRAPHICS SYSTEM ON FPGA
PDF
Ca31317323
PDF
hetero_pim
A Study of Image Compression Methods
Comparative Analysis of Lossless Image Compression Based On Row By Row Classi...
Optimized block size based video coding algorithm
Compressed Medical Image Transfer in Frequency Domain
Lossless Image Compression Techniques Comparative Study
Halftoning-based BTC image reconstruction using patch processing with border ...
Ijarcet vol-2-issue-7-2230-2231
Analysis of various mcm algorithms for reconfigurable rrc fir filter
An overview Survey on Various Video compressions and its importance
AVC based Compression of Compound Images Using Block Classification Scheme
PERFORMANCE EVALUATION OF JPEG IMAGE COMPRESSION USING SYMBOL REDUCTION TECHN...
S.A.kalaiselvan- robust video data hiding at forbidden zone
Paper id 25201490
Designing of telecommand system using system on chip soc for spacecraft contr...
E04552327
HARDWARE/SOFTWARE CO-DESIGN OF A 2D GRAPHICS SYSTEM ON FPGA
Ca31317323
hetero_pim
Ad

Viewers also liked (20)

PDF
Detection of chlorpyrifos pesticide in various water
PDF
Design of file system architecture with cluster
PDF
Hydrostatic transmission as an alternative to conventional gearbox
PDF
Investigation of various parameters on the
PDF
Localization based range map stitching in wireless sensor network under non l...
PDF
Wavelet based denoisiong of acoustic signal
PDF
Speckle noise reduction using hybrid tmav based fuzzy filter
PDF
Integration of artificial intelligence control to the unified power quality c...
PDF
Analysis of mhd non darcian boundary layer flow and heat transfer over an exp...
PDF
Comparison of flow analysis of a sudden and gradual change
PDF
Comparative analysis of singularities of 3 prs and 3-
PDF
Study of bad block management and wear leveling in
PDF
A comprehensive review on performance of aodv protocol for wormhole attack
PDF
Collectors innovation to increase performance solar
PDF
Costomization of recommendation system using collaborative filtering algorith...
PDF
A novel approach on a robot for the blind people which can trained and operat...
PDF
Dual purpose blind navigation box
PDF
Flow and heat transfer of micro polar and viscous
PDF
Realization of high performance run time loadable mips soft-core processor
PDF
Voiceandaccelerometercontrolledwheelchair
Detection of chlorpyrifos pesticide in various water
Design of file system architecture with cluster
Hydrostatic transmission as an alternative to conventional gearbox
Investigation of various parameters on the
Localization based range map stitching in wireless sensor network under non l...
Wavelet based denoisiong of acoustic signal
Speckle noise reduction using hybrid tmav based fuzzy filter
Integration of artificial intelligence control to the unified power quality c...
Analysis of mhd non darcian boundary layer flow and heat transfer over an exp...
Comparison of flow analysis of a sudden and gradual change
Comparative analysis of singularities of 3 prs and 3-
Study of bad block management and wear leveling in
A comprehensive review on performance of aodv protocol for wormhole attack
Collectors innovation to increase performance solar
Costomization of recommendation system using collaborative filtering algorith...
A novel approach on a robot for the blind people which can trained and operat...
Dual purpose blind navigation box
Flow and heat transfer of micro polar and viscous
Realization of high performance run time loadable mips soft-core processor
Voiceandaccelerometercontrolledwheelchair
Ad

Similar to Selection of intra prediction modes for intra frame (20)

PDF
h264_publication_1
PDF
Overview_of_H.264.pdf
PDF
A computationally efficient method to find transformed residue
PDF
A REAL-TIME H.264/AVC ENCODER&DECODER WITH VERTICAL MODE FOR INTRA FRAME AND ...
PDF
H.264 Library
PDF
Intra Frame Coding in H.264 to Obtain Consistent PSNR and Reduce Bit Rate for...
PPTX
High Efficiency Video Codec
PDF
A04840107
PPT
Introduction to Video Compression Techniques - Anurag Jain
PDF
FPGA DESIGN FOR H.264/AVC ENCODER
PPT
H 264 in cuda presentation
PDF
Gg3311121115
PDF
Compression: Video Compression (MPEG and others)
PPTX
Multimedia basic video compression techniques
PDF
Lec 04.4_Video compression standards_H.264 Only_Intra_InterModes_OK_Tham khao...
PDF
An Introduction to Versatile Video Coding (VVC) for UHD, HDR and 360 Video
PDF
HEVC VIDEO CODEC By Vinayagam Mariappan
h264_publication_1
Overview_of_H.264.pdf
A computationally efficient method to find transformed residue
A REAL-TIME H.264/AVC ENCODER&DECODER WITH VERTICAL MODE FOR INTRA FRAME AND ...
H.264 Library
Intra Frame Coding in H.264 to Obtain Consistent PSNR and Reduce Bit Rate for...
High Efficiency Video Codec
A04840107
Introduction to Video Compression Techniques - Anurag Jain
FPGA DESIGN FOR H.264/AVC ENCODER
H 264 in cuda presentation
Gg3311121115
Compression: Video Compression (MPEG and others)
Multimedia basic video compression techniques
Lec 04.4_Video compression standards_H.264 Only_Intra_InterModes_OK_Tham khao...
An Introduction to Versatile Video Coding (VVC) for UHD, HDR and 360 Video
HEVC VIDEO CODEC By Vinayagam Mariappan

More from eSAT Publishing House (20)

PDF
Likely impacts of hudhud on the environment of visakhapatnam
PDF
Impact of flood disaster in a drought prone area – case study of alampur vill...
PDF
Hudhud cyclone – a severe disaster in visakhapatnam
PDF
Groundwater investigation using geophysical methods a case study of pydibhim...
PDF
Flood related disasters concerned to urban flooding in bangalore, india
PDF
Enhancing post disaster recovery by optimal infrastructure capacity building
PDF
Effect of lintel and lintel band on the global performance of reinforced conc...
PDF
Wind damage to trees in the gitam university campus at visakhapatnam by cyclo...
PDF
Wind damage to buildings, infrastrucuture and landscape elements along the be...
PDF
Shear strength of rc deep beam panels – a review
PDF
Role of voluntary teams of professional engineers in dissater management – ex...
PDF
Risk analysis and environmental hazard management
PDF
Review study on performance of seismically tested repaired shear walls
PDF
Monitoring and assessment of air quality with reference to dust particles (pm...
PDF
Low cost wireless sensor networks and smartphone applications for disaster ma...
PDF
Coastal zones – seismic vulnerability an analysis from east coast of india
PDF
Can fracture mechanics predict damage due disaster of structures
PDF
Assessment of seismic susceptibility of rc buildings
PDF
A geophysical insight of earthquake occurred on 21 st may 2014 off paradip, b...
PDF
Effect of hudhud cyclone on the development of visakhapatnam as smart and gre...
Likely impacts of hudhud on the environment of visakhapatnam
Impact of flood disaster in a drought prone area – case study of alampur vill...
Hudhud cyclone – a severe disaster in visakhapatnam
Groundwater investigation using geophysical methods a case study of pydibhim...
Flood related disasters concerned to urban flooding in bangalore, india
Enhancing post disaster recovery by optimal infrastructure capacity building
Effect of lintel and lintel band on the global performance of reinforced conc...
Wind damage to trees in the gitam university campus at visakhapatnam by cyclo...
Wind damage to buildings, infrastrucuture and landscape elements along the be...
Shear strength of rc deep beam panels – a review
Role of voluntary teams of professional engineers in dissater management – ex...
Risk analysis and environmental hazard management
Review study on performance of seismically tested repaired shear walls
Monitoring and assessment of air quality with reference to dust particles (pm...
Low cost wireless sensor networks and smartphone applications for disaster ma...
Coastal zones – seismic vulnerability an analysis from east coast of india
Can fracture mechanics predict damage due disaster of structures
Assessment of seismic susceptibility of rc buildings
A geophysical insight of earthquake occurred on 21 st may 2014 off paradip, b...
Effect of hudhud cyclone on the development of visakhapatnam as smart and gre...

Recently uploaded (20)

PPTX
Geodesy 1.pptx...............................................
PPTX
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PDF
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
PPTX
Welding lecture in detail for understanding
PDF
Well-logging-methods_new................
PDF
Operating System & Kernel Study Guide-1 - converted.pdf
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
DOCX
573137875-Attendance-Management-System-original
PDF
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
PPTX
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
PPTX
Construction Project Organization Group 2.pptx
PDF
Structs to JSON How Go Powers REST APIs.pdf
PPTX
OOP with Java - Java Introduction (Basics)
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Digital Logic Computer Design lecture notes
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PDF
Mitigating Risks through Effective Management for Enhancing Organizational Pe...
Geodesy 1.pptx...............................................
Recipes for Real Time Voice AI WebRTC, SLMs and Open Source Software.pptx
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Mohammad Mahdi Farshadian CV - Prospective PhD Student 2026
Welding lecture in detail for understanding
Well-logging-methods_new................
Operating System & Kernel Study Guide-1 - converted.pdf
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
573137875-Attendance-Management-System-original
Evaluating the Democratization of the Turkish Armed Forces from a Normative P...
KTU 2019 -S7-MCN 401 MODULE 2-VINAY.pptx
Construction Project Organization Group 2.pptx
Structs to JSON How Go Powers REST APIs.pdf
OOP with Java - Java Introduction (Basics)
Lecture Notes Electrical Wiring System Components
Digital Logic Computer Design lecture notes
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
Mitigating Risks through Effective Management for Enhancing Organizational Pe...

Selection of intra prediction modes for intra frame

  • 1. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 67 SELECTION OF INTRA PREDICTION MODES FOR INTRA FRAME CODING IN ADVANCED VIDEO CODING STANDARD Manjanaik.N1 , Manjunath.R2 1 Electronics and Communication Engineering, Jain University, Bangalore, India. 2 Senior Domain Specialist, Philips Company, Bangalore, India. manjubdt2009@gmail.com, manju_r_99@yahoo.com Abstract This paper proposes selection of Intra prediction modes for Intra frame coding in Advanced Video Coding Standard using Matlab. The proposed algorithm selects prediction modes for intra frame coding. There are nine prediction modes are there to predict the intra frame in AVC using Intra prediction,but all the prediction modes are not required for all the applications. Intra prediction is the first process of advanced video coding standard. It predicts a macro block by referring to its previous macro blocks to reduce spatial redundancy,appling all the prediction modes to predict intra frame it leads to more computational complexity is increased at the encoder of AVC. In the proposed algoriyhm, applied all the prediction modes(0-8) for prediction of intra frame but only few modes such as mode0, mode1, mode2,mode4,mode6 gives good PSNR, high comprssion ratio and low bit rate. Out of these modes mode2 gives good PSNR, compression ratio and redced bit rate, mode5, mode7 and mode8 gives lower PSNR, low compression ratio and increased bitrate compared to mode0,mode1, mode2, mode4 and mode6. The simulation results are presented using Matlab. The PSNR , compressed ratio and bit rate achived for different quantization parameters of mother daughter frames , foreman frames was presented. Keywords: AVC, PSNR, CAVLC, Macroblock, Prediction modes. ------------------------------------------------------------------------***---------------------------------------------------------------------- 1. INTRODUCTION Compression is the basic process of reduceing the size of data in order to save storge space and transmission band width.compression consist of removing redundancies (spatial,spectra and temporal) and encoding the true information in the form of appropriate to suite for applications. There are two compression techniques ie. Lossless and lossy techniques. In lossless the reconstured image after comprssion is identical to original image, this method achieve maximum compression ratio.To compress data ,it is important to recognize redundancies in data in the form of coding redundancy, inter- pixel redundancy, and psycho-visual redundancy. Data redundancies occur when unnecessary data is used to represent source information. compression is achived when one or more of these types of redundancies are reduced.In lossy the reconstructed image is not identical to the original image ie there is loss in information.lossy method is capble of achiving a high comprssion compare to lossless method. Image compression/video coding is impotant in indusrial imaging, commercial and academic applications. Image /video coding plays a important role in multimedia. H.264/AVC is the latest video coding standard jointly developed by Joint video team which is organized by two international standards bodies ie the Internatonal Telecommunication Union-Telecommunications sector (ITU- T) and International Organization for Standardization/ International Electro-technical Comission (ISO/IEC). This standard consists of various adavanced features(Intra prediction unit, integer transform, variable block mation estimation, entropy encoding ,deblocking filter and coding tools.due to these features this standard achieves greater compression without sacrificing on video quality. Intra prediction unit is the first unit of H.264 standard. H.264 standard support intra prediction for diffent size ie 16x16 macro block as whole or 4x4 sub blocks.there are seventeen prediction modes for a macroblock, nine prediction modes for 16 4x4 luma sub macroblocks, four modes for a 16x16 luma macro block and four modes for two each two chorma 8x8 blocks. All possible combinations of intra prediction modes are used it lead to increase computational complexity of H.264 encoder and it is difficult to use for real time applications.All the modes are not relavant to all the applications, so that proposed algorithm is implemented for nine prediction mode.out of these mode few modes gives good PSNR, high compression ratio and low bit rate. These modes can use for suitable multi media applications. 2. METHODOLOGY A raw recorded video in yuv format is used as an input file. The video is then decomposed into frames(I-frame). Each Intra frame is processed in terms of 4x4 sub macro block. For each Intra frame processing is done in order to get good video
  • 2. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 68 quality, high compression ratio and low bitrate as compared to previous video coding compression standards. Each Intra frame processing includes frame conversion i.e. RGB to YCBCR format down sampling i.e. (4:4:4 to 4:2:0), 4x4 sub macro block segmentation, all prediction modes (vertical, horizontal,DC, diagonal down left, horizontal down, diagonal down right, vertical left, horizontal up, vertical right etc) integer transformation, quantization, scaling and entropy encoding(cavlc). The video is reconstructed by inverse quantization, inverse transformation and deblocking filter. 3. BLOCK DIAGRAM The block diagram of H.264 encoder for selection of Intra prediction modes is shown in fig.1. The h.264 encoder block consists of integer transform, quantization context adaptive variable length coding, inverse quantization, invese transformation, intra prediction unit and deblocking filter. Fig.1 Block diagram of H.264 encoder The block diagram of H.264/AVC encoder includes two dataflow paths, a forward path and a reconstruction path. An input frame is given for encoding. Every frame is processed in terms of a Macroblock (MB) of size 16x16 pixels. Each macroblock is further sub divided into 4x4 sub macroblock. Each 4x4 sub macroblock is encoded in intra prediction modes. A prediction macroblock P is formed based on a reconstructed block. In intra mode, P is formed from samples in the current block is based on previously reconstructed block. The prediction P is subtracted from the current macroblock to produce a residual or difference macroblock. This is transformed using integer transform and quantized using quantization block to give quantized transform coefficients. These coefficients are reordered and entropy encoded using context adaptive variable length coding (CAVLC) and the compressed bit stream is transmitted over a band-limited serial transmission channel . In the reconstruction path the quantized macroblock coefficients are decoded to reconstruct a frame for encoding of other macroblocks. The quantized coefficients are inverse quantized and inverse transformed to produce a difference macroblock. The prediction macroblock P is added to difference maroblock to create a reconstructed macroblock after a de-blocking filter, which improves the quality of the reconstructed frame[1-2]. 4. INTRA PREDICTION The H.264/AVC intra prediction unit achieves higher compression ratio and image quality compared with preivious standard(JPEG2000).The H.264 support different block sizes, it supports 4x4 and 16x16 block sizes for base line, main and extended profiles and 8x8 block size for high profile. There are nine prediction modes for 4x4 blocks, four for 16x16 blocks and and two for 8x8 blocks. All the prediction pixels are calculated based on the the reconstructed pixels of previously encoded neighbouring blocks. The prediction of 4x4 blocks is predicted based on the previously reconstructed pixels labelled (A-M) shown in Fig.2 the pixels (A-M) are reconstructed previously and consider as reference pixels for current block. The pixels labeled (a-m) are prediction pixels. Fig. 2. labeling of 4x4 prediction samples Each 4x4 sub macroblock is predicted using eight directional prediction modes and one DC mode.The directional prediction modes are vertical, horizontal, diagonal down left, horizontal down, diagonal down right, vertical left, horizontal up, vertical right.For directional modes the predicted samples are formed from a weighted average of the perdiction samples A-M.For DC mode the predicted samples are formed by mean of samples A-D and I-L.The encoder select prediction mode for each 4x4 sub macroblock.The selection of best prediction mode is obtained by minimizing the residual encoded block and its prediction[3-5]. The fig.3 shows the intra prediction modes. Fig.3. 4x4 intra prediction modes M A B C D E F G H I a b c d J e f g h K i j k l L m n o p
  • 3. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 69 The equations of 4x4 sub macroblock for few prediction modes are: Vertical a=e=i=m=A b=f=j=n=B c=g=k=o=C d=h=l=p=D Horizontal a=b=c=d=I e=f=g=h=J i=j=k=l=K, m=n=o=p=L DC Mean of A-D and I-L, for horizontal prediction sum of (A-D) and vertical prediction sum of (I-L). Diagonal Down Left a=(A+2B+C+2)>>2 b=e=(B+2C+D+2)>>2 c=f=i=(C+2D+E+2)>>2 d=g=j=m=(D+2E+F+2)>>2 h=k=n=(E+2F+G+2)>>2 i=o=(F+2G+H+2)>>2 p=(G+3H+2)>>2. 5. STEPS OF IMPLEMENTATION The following steps are to required to selection of intra prediction modes for intra frame coding in AVC. • A recorded video in YUV CIF format as input file • This file is decomposed into Intra frames (1-30) • Each I-frame is divided into 16x16 macroblocks • Eac h 16x16 macroblock further sub divided into 4x4 sub macroblocks • A first 4x4 sub block is processed directly without using previously reconstructed block followed by integer transform, quantization, entropy encoding (cavlc) at encoder and reverse process at reconstruction path. • Reconstruct a 4x4 subblock using inverse process (at reconstruction path) • Obtain residual block by subtracting next 4x4 sub block with previously reconstructed sub block • Residual of 4x4 sub block is integer transformed, quantized and entropy encoded at encoder and reverse process at reconstuction path. • Finally measure PSNR, Compression ratio and Bit rate of intra frames with different QP for all prediction modes 6. IMPLEMENTAION The proposed work is carried out using Matlab. The input is yuv sequences CIF format video file. For test purpose mother- daughter frame of resolution 352x288 and also other frames (foreman, news, etc) also taken, A Matlab program is written, which reads the yuv video file, extracts Intra frames. The next process involves reading a true RGB colour frame and convert into ycbcr format down sampling (4:4:4 to 4:2:0) to reduce bits of intra frame.ycbcr intra frame is divided into 4x4sub block is processed directly by following usual procedure of forward path of H.264 encoder and reconstruct the processed block which serves as reference to the next sub block using basic reverse process in reconstruction path of h.264 encoder. Apply all the prediction modes to each sub block followed by, quantization, context adaptive variable length coder (CAVLC) to get compressed bit. At H.264 encoder in the reconstruction path, perfom reverse process to get reconstruct image and finally measure quality picture (PSNR). 7. RESULTS AND DISCUSSION The proposed method, selection of intra prediction modes and best prediction mode for intra frame is done using Matlab. The test sequences are coded with only intra frames with frame rate 25 frames per second.The results obtained for the test yuv sequences in CIF format, five forman cif frames for quantization parameter 30 and ten mother-daughter cif frames for quantization parameter 35. Other quantization parametes[10, 25, 40, 45,51] also chosen (not shown in table). Table-1 PSNR, Compression ratio, Bit-rate, of foreman cif frames (1-5) with QP=30 Modes Frame1 Frame2 Frame3 Frame4 Frame5 PSNR db 0 31.75 31.7723 31.7593 31.7743 31.755 1 31.743 31.7171 31.6864 31.6939 31.67
  • 4. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 70 The table 1 shows comparison of nine intra prediction modes for formen cif frames 4x4 sub macroblocks with QP=30 and table 2 shows that comparison of nine prediction modes for mother-daughter cif frames 4x4 sub macroblocks with QP=35. The various figs (4-22 ) are simulation results (i.e. original frame, reconstructed frames and reconstructed frames with deblocking filter) of mother-daughter cif frames, foreman cif frames, news cif frames for nine intra prediction modes (0-8) and quantization parameters-30, 35. Quantization parameter 30 for foreman cif frames, news cif frames. Quantization parameter 30 mother-daughter cif frames. 2 31.9123 31.9029 31.878 31.891 31.8734 3 31.3911 31.3794 31.3674 31.3834 31.3826 4 31.3611 31.3585 31.3511 31.359 31.3526 5 28.6738 28.6752 28.6804 28.6671 28.6521 6 30.5477 30.5331 30.5119 30.5188 30.5123 7 27.2161 27.2159 27.2144 27.2127 27.1954 8 26.6998 26.6965 26.6952 26.692 26.6837 Compression Ratio (%) 0 75.5339 75.5365 75.5508 75.6185 75.4362 1 75.319 75.3607 75.319 75.2826 75.2435 2 76.8424 76.8776 76.7617 76.9245 76.7943 3 68.6198 68.7096 68.8906 68.7891 68.6549 4 66.7331 66.9635 66.9193 66.9245 66.9596 5 42.625 42.6003 42.6523 42.6185 42.6042 6 67.6641 67.6849 67.6589 67.8789 67.6875 7 59.1706 59.2604 59.2995 59.2396 59.1602 8 53.1146 53.1276 53.181 53.1758 53.1393 Bit rate 0 3.5839 3.5835 3.5814 3.5715 3.5982 1 3.6154 3.6093 3.6154 3.6207 3.6264 2 3.3922 3.3870 3.4040 3.3802 3.9928 3 4.5967 4.5835 4.5570 4.5719 4.5915 4 4.8730 4.8393 4.8458 4.8450 4.8399 5 8.4054 8.4081 8.4005 8.4054 8.4075 6 4.7367 4.7336 4.7374 4.7052 4.7332 7 5.9808 5.9677 5.9619 5.9707 5.9824 8 6.8679 6.8660 6.8582 6.8590 6.8643
  • 5. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 71 Table 2
  • 6. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 72 Mode 0 Fig.4. Original frame Fig.5. Reconstructed frame Fig.6. Reconstructed frame with Deblocking-filter Mode 1 Fig.7. Reconstructed frame Mode 2 Fig.8. Reconstructed frame Mode 3 Fig.9. Reconstructed frame Mode 4 Fig 10. Reconstructed frame Mode 5 Fig.11. Reconstructed frame
  • 7. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 73 Mode 6 Fig.12 Reconstructed frame Mode 7 Fig.13. Reconstructed frame Mode 8 Fig.14. Reconstructed frame Fig.15. Reconstructed frame with Deblocking-filter Mode 0 Fig.16. Reconstructed frame Mode 1 Fig.17. Reconstructed frame Mode 2 Fig.18. Reconstructed frame Mode 7 Fig.19. Reconstructed frame
  • 8. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 74 Mode 8 Fig.20. Reconstructed frame Mode 0 Fig.21. Reconstructed frame Mode1 Fig.22. Reconstructed frame Mode2 Fig.23. Reconstructed frame Mode 7 Fig.24. Reconstructed frame Mode 8 Fig.25. Reconstructed frame CONCLUSIONS The proposed work is selection of intra prediction modes and best prediction mode for intra frame coding in advanced video coding standard is carried out using Matlab. The results shows that the reconstructed picture quality (PSNR), compression ratio and bit rate achieved for test yuv I-frames, CIF format (mother-daughter and foreman and news) for different quantization parameters. Obtained results for all the nine intra prediction modes. The mode0, mode1, mode2, mode3, mode4 and mode6 gives good PSNR, compression ratio and low bit rate (tables I And II) compared to mode 5, mode7 and mode 8. In the proposed method The mode0, mode1, mode2, mode3, mode4 and mode6 gives good PSNR, compression ratio and low bit rate, out of these modes mode 2 gives high PSNR, compression ratio and Low Bit rate indicted yellow mark in table(I and II), which is the best prediction mode. REFERENCES [1]. Iain E.Richardson,The H.264 and MPEG-4 Video Compression :Video coding for Next-generation Multimedia, Johan Wiley& Sons, first edition 2003. [2]. Iain E. Richarson, The H.264 Advanced Video Compression Standard, Johan Wiley& Sons, Second edition 2010. [3]. Youn-Long Steve Lin, Chao-Yang Kao Hung-Chih Kuo VLSI Design for Video Coding, Springer-2010.
  • 9. IJRET: International Journal of Research in Engineering and Technology eISSN: 2319-1163 | pISSN: 2321-7308 __________________________________________________________________________________________ Volume: 02 Issue: 12 | Dec-2013, Available @ http://www.ijret.org 75 [4]. Huang Hui, Cao Tie-Yong, Zhang Xiong-wei, The Enhanced Intra Prediction Algorithm for H.264,congress on Image and signal processing 2008. [5]. Chaminda Sampath Kannangara, Complexity Management of H.264/AVC Video Compression, the Robert Gordon University 2006. [6]. http://www.vcodex.com