Contenu connexe
Similaire à A computationally efficient method to find transformed residue
Similaire à A computationally efficient method to find transformed residue (20)
A computationally efficient method to find transformed residue
- 1. International INTERNATIONAL JOURNAL OF ELECTRONICS (IJECET), ISSN
Journal of Electronics and Communication Engineering & Technology AND
0976 –COMMUNICATION ENGINEERING & October- December (2012), © IAEME
6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, TECHNOLOGY (IJECET)
ISSN 0976 – 6464(Print)
ISSN 0976 – 6472(Online)
Volume 3, Issue 3, October- December (2012), pp. 84-102
IJECET
© IAEME: www.iaeme.com/ijecet.asp
Journal Impact Factor (2012): 3.5930 (Calculated by GISI) ©IAEME
www.jifactor.com
A COMPUTATIONALLY EFFICIENT METHOD TO FIND
TRANSFORMED RESIDUE COEFFICIENTS IN INTRA 4x4 MODE
DECISION IN H.264ENCODER
P. Essaki Muthu, Research Scholar, Dr. MGR Educational and Research Institute,
Chennai, INDIA
Dr. R M O Gemson, Professor, SCT Institute of Technology, Bangalore, INDIA
pessakimuthu@yahoo.com, mogratnam@rediffmail.com
ABSTRACT
To achieve the best coding efficiency and video quality, H.264 encoder has to evaluate
exhaustively all the mode combinations of intra predictions for deciding coding mode. The
computational complexity and time taken for predicting for all intra modes, subtracting from
original blockand forward transforming the residues are heavy. A novel Intra 4x4 Prediction
method to reduce the computational complexity, thus enhancing the time savings is proposed
here. The experimental results demonstrate that proposed method reduces at least 40% of
computational complexity without compromising the coding efficiency and performance.
This can be used in any hardware / processor platforms.
Keywords : H.264/AVC, Mode decision, Intra 4x4 Prediction, Computational Complexity
SECTION 1: INTRODUCTION
The newest international video coding standard H.264/ advanced video coding (AVC) has
been approved by ITU-T as recommended H.264 and by ISO/IEC as the MPEG-4 part 10
AVC international Standard [1]. The emerging H.264/AVC achieves significantly better
performance in both peak signal-to-noise ratio (PSNR) and visual quality at the same bit rate
compared with prior video coding standards. H.264/AVC can save up to 39%, 49%, and 64%
of the bit rate, when compared with MPEG-4, H.263, and MPEG-2 [2]. H.264 uses one
important technique calledLagrangian rate-distortion optimization (RDO) performed for intra
and inter mode decision. The rate-distortion optimization technique is very time consuming
and the computational complexity of H.264/AVC is drastically high using the RDO
technique.
The computational complexity refers the basic operations (e.g., Add, Shift). The method of
calculating the computational complexity of the intra prediction module was done by number
of cycles taken by basic operations by Zouch[3]. Mustafa et al [4], [5] used number of
additions and shifts performed in intra prediction, as metric for computational complexity.
84
- 2. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
H.264 has Intra 4x4 prediction, Intra 16x16 prediction, Intra 8x8 prediction and Intra
Chroma prediction. This paper focuses on Intra 4x4 prediction only. Intra 4x4 prediction has
nine different modes and these modes have identical equations and calculating these common
equations for each mode is unnecessary. The Pixel equality based computation reduction
(PECR) technique used in [4] focussed only on pixel domain predictions. It saved
computational complexity, but it did not include the computational complexity for
comparison operation which is generally equivalent to addition operation. Still there is a
scope of optimization in the data reuse techniques presented in [5] to reduce the
computational complexity.
The techniques used in [6], [7], [8], [9] and [10] reduce the amount of computations
performed by Intra prediction by trying selected intra prediction modes rather than trying all
possible intra prediction modes, thus lacking in video quality and consuming more bits.
The objective of this paper is (i) to calculate the computational complexity of pixel
domain prediction and its forward transformation, (ii) to reduce the computational complexity
of Intra 4x4 Prediction of a given 4x4 sub-macroblock, and (iii)to give the transform domain
residue directly.
This paper is organized in five sections. Section 2 explains the pixel domain Intra 4x4
Prediction for all modes and its computational complexity. Section 3explains the
computational complexity of finding residue and its standard forward transform. Section 4
explains the novel method to find key pixel domain predicted values, transformed
coefficients and its computational complexity. Finally,in Section 5, the comparison and the
inferences of the proposed method are presented.
SECTION 2:COMPLEXITY OF PIXEL DOMAIN INTRA 4x4 PREDICTION
An intra (I) macroblock is coded without referring to any data outside the current slice. I-
macroblocks may occur in any slice type. Every macroblock in an I-slice is an I-macroblock.
I-macroblocks are coded using intra prediction, i.e. prediction from previously-coded data in
the same slice. For a typical block of luma or chroma samples, there is a relatively high
correlation between samples in the block and samples that are immediately adjacent to the
block. Intra prediction therefore uses samples from adjacent, previously coded blocks to
predict the values in the current block [11].
There are four different Intra prediction types based on block size and components. They
are Intra 16x16, Intra 8x8 and Intra 4x4 for Luma components and Intra Chroma for Chroma
components. Intra 16x16 Prediction has 4 different ways of prediction, namely, Vertical,
Horizontal, DC and Plane Prediction. There are 9 different Intra 4x4 Prediction modes
namely, Vertical, Horizontal, DC, Diagonal-Down-Left, Diagonal-Down-Right, Vertical-
Right, Horizontal-Down, Vertical-Left and Horizontal-Up, possible for a given 4x4 sub-
macroblock in Intra 4x4 Prediction. The same Intra 4x4 Prediction techniques are followed
by Intra 8x8 Prediction. Intra Chroma modes are DC, Horizontal, Vertical and Plane
Prediction. The mode for a Macroblock is decided based on the Rate-Distortion Cost (RD-
Cost) calculated for Intra 16x16, Intra 4x4 and Intra 8x8 Predictions.
In the process of RD-Cost calculation of Intra 4x4 Prediction for a given Macroblock, each
4x4 sub-macroblock is subjected to all nine prediction modes. The 4x4 sub-macroblock is
predicted by all nine different prediction techniques. The residue 4x4 sub-macroblock is
found out by subtracting the predicted 4x4 sub-macroblock from original 4x4 sub-
macroblock. There are 9 set of residue 4x4 sub-macroblocks, which are forward transformed
and quantized. The quantized coefficients are subjected to variable length coding, by then the
rate, i.e., bitlength is calculated for each prediction mode. The quantized coefficients are
dequantized and inverse transformed to get reconstructed residue 4x4 sub-macroblocks.
85
- 3. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
These reconstructed residue 4x4 sub-macroblocks are added with already predicted 4x4 sub-
macroblocks to get reconstructed 4x4 sub-macroblocks. The distortions are calculated
between original 4x4 sub-macroblock and reconstructed 4x4 sub-macroblocks, by means of
Sum of Absolute Error (SAE) or Sum of Squares of Error (SSE). For all 9 different modes,
the RD-Cost are calculated by the following equation.
ܴ + ݊݅ݐݎݐݏ݅ܦ = ݐݏܥ − ܦλ. ܴܽ݁ݐ (1)
The minimum RD-Cost will decide the mode for the given 4x4 sub-macroblock. The same
process is continued for other fifteen 4x4 submacroblocks in a Macroblock. This way of
finalizing Intra 4x4 Prediction modes are followed by Joint Motion (JM) Group [12] and
X264 [13]. The minimum RD-Cost among the four Intra 16x16 Prediction modes will decide
the best Intra 16x16 Prediction mode for the same Macroblock. The minimum RD-Cost
among the finalized Intra 4x4 Prediction modes and Intra 16x16 Prediction mode will decide
the Macroblock type and its mode(s) to coding. The RD-Cost calculation to find best Intra
mode is done for all Macroblocks in all frames of a video sequence.
The metric for computational complexity used here is number of additions/subtractions
and number of shifts. The intra 4x4 prediction mainly depends upon the eight pixels in the
previous row (A, B, C, D, E, F, G and H), four pixels in the previous column (I, J, K, and L)
and a top-left pixel (M).
Vertical Prediction (VP) mode copies down the top four pixels (A, B, C and D) as predicted
block.
ܸܲሺ1 ,ݓݎሻ = 4 ≤ ݓݎ ≤ 1 ,ܣ
ܸܲሺ2 ,ݓݎሻ = 4 ≤ ݓݎ ≤ 1 ,ܤ
ܸܲሺ3 ,ݓݎሻ = 4 ≤ ݓݎ ≤ 1 ,ܥ
ܸܲሺ4 ,ݓݎሻ = 4 ≤ ݓݎ ≤ 1 ,ܦ
The computational complexity of Vertical Prediction is zero, as there is only loading
operation.
Horizontal Prediction (HP) mode copies right the left four pixels (I, J, K and L) as predicted
block.
ܲܪሺ1, ܿ ݈ሻ = 4 ≤ ݈ܿ ≤ 1 ,ܣ
ܲܪሺ2, ܿ ݈ሻ = 4 ≤ ݈ܿ ≤ 1 ,ܤ
ܲܪሺ3, ܿ ݈ሻ = 4 ≤ ݈ܿ ≤ 1 ,ܥ
ܲܪሺ4, ܿ ݈ሻ = 4 ≤ ݈ܿ ≤ 1 ,ܦ
The computational complexity of Horizontal Prediction is zero, as there is only loading
operation.
DC Prediction mode finds the average of top four pixels (A, B, C and D) and left four pixels
(I, J, K, and L), and copies the average in the entire predicted block.
= ݒܣሺ4 + ܮ + ܭ + ܬ + ܫ + ܦ + ܥ + ܤ + ܣሻ ≫ 3
If the any of top or left four pixels are not available, the ݒܣis calculated by averaging the
available four pixels.
= ݒܣሺ2 + ܦ + ܥ + ܤ + ܣሻ ≫ 2
= ݒܣሺ2 + ܮ + ܭ + ܬ + ܫሻ ≫ 2
86
- 4. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
If the current block is first in the frame, then ݒܣis the predicted as half of Pixel bitwidth.
ܥܦሺ ݈ܿ ,ݓݎሻ = 4 ≤ ݈ܿ ≤ 1 ,4 ≤ ݓݎ ≤ 1 ,ݒܣ
Considering the best case, the computational complexity is 8 additions and 1 shift operations.
In Diagonal-Down-Left(DDL) Prediction, there are 7 unique pixel values calculated. The
other 9 pixels are copied from the seven unique pixel values. The 7 uniquepixels are
calculated as follows.
ܮܦܦሺ1,1ሻ = ሺ2 + ܥ + 1 ≪ ܤ + ܣሻ ≫ 2
ܮܦܦሺ1,2ሻ = ܮܦܦሺ2,1ሻ = ሺ2 + ܦ + 1 ≪ ܥ + ܤሻ ≫ 2
ܮܦܦሺ1,3ሻ = ܮܦܦሺ2,2ሻ = ܮܦܦሺ3,1ሻ = ሺ2 + ܧ + 1 ≪ ܦ + ܥሻ ≫ 2
ܮܦܦሺ1,4ሻ = ܮܦܦሺ2,3ሻ = ܮܦܦሺ3,2ሻ = ܮܦܦሺ4,1ሻ = ሺ2 + ܨ + 1 ≪ ܧ + ܦሻ ≫ 2
ܮܦܦሺ2,4ሻ = ܮܦܦሺ3,3ሻ = ܮܦܦሺ4,2ሻ = ሺ2 + ܩ + 1 ≪ ܨ + ܧሻ ≫ 2
ܮܦܦሺ3,4ሻ = ܮܦܦሺ4,3ሻ = ሺ2 + ܪ + 1 ≪ ܩ + ܨሻ ≫ 2
ܮܦܦሺ4,4ሻ = ሺ2 + ܪ + 1 ≪ ܪ + ܩሻ ≫ 2
The computational complexity of DDL Prediction is 21 additions and 14 shifts.
In Diagonal-Down-Right (DDR) Prediction, there are 7 pixel values calculated. Out of 7
pixel values, five are unique and two can be derived from Diagonal-Down-Left Prediction.
ܴܦܦሺ1,1ሻ = ܴܦܦሺ2,2ሻ = ܴܦܦሺ3,3ሻ = ܴܦܦሺ4,4ሻ = ሺ2 + ܫ + 1 ≪ ܯ + ܣሻ ≫ 2
ܴܦܦሺ1,2ሻ = ܴܦܦሺ2,3ሻ = ܴܦܦሺ3,4ሻ = ሺ2 + ܤ + 1 ≪ ܣ + ܯሻ ≫ 2
ܴܦܦሺ1,3ሻ = ܴܦܦሺ2,4ሻ = ሺ2 + ܥ + 1 ≪ ܤ + ܣሻ ≫ 2
ܴܦܦሺ1,4ሻ = ሺ2 + ܦ + 1 ≪ ܥ + ܤሻ ≫ 2
ܴܦܦሺ2,1ሻ = ܴܦܦሺ3,2ሻ = ܴܦܦሺ4,3ሻ = ሺ2 + ܬ + 1 ≪ ܫ + ܯሻ ≫ 2
ܴܦܦሺ3,1ሻ = ܴܦܦሺ4,2ሻ = ሺ2 + ܭ + 1 ≪ ܬ + ܫሻ ≫ 2
ܴܦܦሺ4,1ሻ = ሺ2 + ܮ + 1 ≪ ܭ + ܬሻ ≫ 2
The computational complexity of DDR Prediction is 21 additions and 14 shifts.
Vertical-Right(VR) Prediction has 10 distinct pixel values. Among that, only four are unique
pixel values and the other six values can be derived from DDL and DDR Predictions.
ܸܴ ሺ1,1ሻ = ܸܴሺ3,2ሻ = ሺ1 + ܣ + ܯሻ ≫ 1
ܸܴ ሺ1,2ሻ = ܸܴሺ3,3ሻ = ሺ1 + ܤ + ܣሻ ≫ 1
ܸܴ ሺ1,3ሻ = ܸܴሺ3,4ሻ = ሺ1 + ܥ + ܤሻ ≫ 1
ܸܴ ሺ1,4ሻ = ሺ1 + ܦ + ܥሻ ≫ 1
ܸܴ ሺ2,1ሻ = ܸܴሺ4,2ሻ = ሺ2 + ܫ + 1 ≪ ܯ + ܣሻ ≫ 2
ܸܴ ሺ2,2ሻ = ܸܴሺ4,3ሻ = ሺ2 + ܤ + 1 ≪ ܣ + ܯሻ ≫ 2
ܸܴ ሺ2,3ሻ = ܸܴሺ4,4ሻ = ሺ2 + ܥ + 1 ≪ ܤ + ܣሻ ≫ 2
ܸܴ ሺ2,4ሻ = ሺ2 + ܦ + 1 ≪ ܥ + ܤሻ ≫ 2
ܸܴ ሺ3,1ሻ = ሺ2 + ܬ + 1 ≪ ܫ + ܯሻ ≫ 2
ܸܴ ሺ4,1ሻ = ሺ2 + ܭ + 1 ≪ ܬ + ܫሻ ≫ 2
The computational complexity of VR Prediction is 26 additions and 16 shifts.
Horizontal-Down(HD) Prediction has 10 distinct pixel values. Out of those, 6 values can be
derived from DDL and DDR Predictions.
87
- 5. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
ܦܪሺ1,1ሻ = ܦܪሺ2,3ሻ = ሺ1 + ܫ + ܯሻ ≫ 1
ܦܪሺ1,2ሻ = ܦܪሺ2,4ሻ = ሺ2 + ܫ + 1 ≪ ܯ + ܣሻ ≫ 2
ܦܪሺ1,3ሻ = ሺ2 + ܤ + 1 ≪ ܣ + ܯሻ ≫ 2
ܦܪሺ1,4ሻ = ሺ2 + ܥ + 1 ≪ ܤ + ܣሻ ≫ 2
ܦܪሺ2,1ሻ = ܦܪሺ3,3ሻ = ሺ1 + ܬ + ܫሻ ≫ 1
ܦܪሺ2,2ሻ = ܦܪሺ3,4ሻ = ሺ2 + ܬ + 1 ≪ ܫ + ܯሻ ≫ 2
ܦܪሺ3,1ሻ = ܦܪሺ4,3ሻ = ሺ1 + ܭ + ܬሻ ≫ 1
ܦܪሺ3,2ሻ = ܦܪሺ4,4ሻ = ሺ2 + ܭ + 1 ≪ ܬ + ܫሻ ≫ 2
ܦܪሺ4,1ሻ = ሺ1 + ܮ + ܭሻ ≫ 1
ܦܪሺ4,2ሻ = ሺ2 + ܮ + 1 ≪ ܭ + ܬሻ ≫ 2
The computational complexity of HD Prediction is 26 additions and 16 shifts.
Vertical-Left (VL) Prediction has 10 distinct pixel values. Among that, only two are unique
pixel values and the other eight values can be derived from DDL and VR Predictions.
ܸܮሺ1,1ሻ = ሺ1 + ܤ + ܣሻ ≫ 1
ܸܮሺ1,2ሻ = ܸܮሺ3,1ሻ = ሺ1 + ܥ + ܤሻ ≫ 1
ܸܮሺ1,3ሻ = ܸܮሺ3,2ሻ = ሺ1 + ܦ + ܥሻ ≫ 1
ܸܮሺ1,4ሻ = ܸܮሺ3,3ሻ = ሺ1 + ܧ + ܦሻ ≫ 1
ܸܮሺ2,1ሻ = ሺ2 + ܥ + 1 ≪ ܤ + ܣሻ ≫ 2
ܸܮሺ2,2ሻ = ܸܮሺ4,1ሻ = ሺ2 + ܦ + 1 ≪ ܥ + ܤሻ ≫ 2
ܸܮሺ2,3ሻ = ܸܮሺ4,2ሻ = ሺ2 + ܧ + 1 ≪ ܦ + ܥሻ ≫ 2
ܸܮሺ2,4ሻ = ܸܮሺ4,3ሻ = ሺ2 + ܨ + 1 ≪ ܧ + ܦሻ ≫ 2
ܸܮሺ3,4ሻ = ሺ1 + ܨ + ܧሻ ≫ 1
ܸܮሺ4,4ሻ = ሺ2 + ܩ + 1 ≪ ܨ + ܧሻ ≫ 2
The computational complexity of VL Prediction is 25 additions and 15 shifts.
Horizontal-Up (HU) Prediction has 7 distinct pixel values. Out of those, 5pixel values can be
derived from DDR and HD Predictions and one pixel value is L itself.
ܷܪሺ1,1ሻ = ሺ1 + ܬ + ܫሻ ≫ 1
ܷܪሺ1,2ሻ = ሺ2 + ܭ + 1 ≪ ܬ + ܫሻ ≫ 2
ܷܪሺ1,3ሻ = ܷܪሺ2,1ሻ = ሺ1 + ܭ + ܬሻ ≫ 1
ܷܪሺ1,4ሻ = ܷܪሺ2,2ሻ = ሺ2 + ܮ + 1 ≪ ܭ + ܬሻ ≫ 2
ܷܪሺ2,3ሻ = ܷܪሺ3,1ሻ = ሺ1 + ܮ + ܭሻ ≫ 1
ܷܪሺ2,4ሻ = ܷܪሺ3,2ሻ = ሺ2 + ܮ + 1 ≪ ܮ + ܭሻ ≫ 2
ܷܪሺ3,3ሻ = ܷܪሺ3,4ሻ = ܮ
ܷܪሺ4,1ሻ = ܷܪሺ4,2ሻ = ܷܪሺ4,3ሻ = ܷܪሺ4,4ሻ = ܮ
The computational complexity of HU Prediction is 15 additions and 9 shifts.
For a 4x4 Sub-Macroblock, all possible predictions are done for all the nine modes. The
computational Complexity of Intra 4x4 Prediction is 142 additions and 85 shifts.
SECTION 3: COMPLEXITY OF FINDING RESIDUE AND FORWARD
TRANSFORM
Each predicted 4x4 sub-macroblock is subtracted from the original 4x4sub-macroblockto get
residue 4x4 sub-macroblocks. The computational complexity for one 4x4 sub-macroblock is
88
- 6. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
16 subtractions and zero shift. The computational complexity of finding residue for all nine
prediction modes is 9x16 subtractions, i.e., 144 addition and zero shiftoperations.
The residue sub-macroblock is forward transformed using the following equation.
ܴݐ݂ܥ × ݏ݁ݎ × ݂ܥ = ܵܧ
1 1 1 1
ݓℎ݁ = ݂ܥ ݁ݎቌ 2 1 −1 −2ቍ
1 −1 −1 1
1 −2 2 −1
ܽ݊݀ ݁ݏݏ݊ܽݎݐ = ݐ݂ܥሺ݂ܥሻ
This forward transform (It is a matrix multiplication) is simplified with additions and shifts
only as follows.
for row = 1 to 4
f(row,1) = ref(row,1) + ref(row,4)
f(row,2) = ref(row,2) + ref(row,3)
f(row,3) = ref(row,2) - ref(row,3)
f(row,4) = ref(row,1) - ref(row,4)
end
for row = 1 to 4
g(row,1) = f(row,1) + f(row,2)
g(row,2) = f(row,3) + f(row,4)<< 1
g(row,3) = f(row,1) - f(row,2)
g(row,4) = f(row,4) - f(row,3)<< 1
end
for col = 1 to 4
h(1,col) = g(1,col) + g(4,col)
h(2,col) = g(2,col) + g(3,col)
h(3,col) = g(2,col) - g(3,col)
h(4,col) = g(1,col) - g(4,col)
end
for col = 1 to 4
RES(1,col) = h(1,col) + h(2,col)
RES(2,col) = h(3,col) + h(4,col) << 1
RES(3,col) = h(1,col) - h(2,col)
RES(4,col) = h(4,col) - h(3,col) << 1
end
The computational complexity of forward transform of one residue 4x4 sub-macroblock is 64
additions and 16 shifts. For all nine modes, the computational complexity is 9x64 additions
and 9x16 shifts, i.e., 576 addition and 144 shift operations.
SECTION 4: PROPOSED METHOD WITH COMPUTATIONAL COMPLEXITY
There are 24 unique equations to find predicted values of all nine intra 4x4 modes.
ܥܦሺ1,1ሻ = ሺ4 + ܪ + ܩ + ܨ + ܧ + ܦ + ܥ + ܤ + ܣሻ ≫ 3
89
- 7. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
ܮܦܦሺ1,1ሻ = ሺ2 + ܥ + 1 ≪ ܤ + ܣሻ ≫ 2
ܮܦܦሺ1,2ሻ = ሺ2 + ܦ + 1 ≪ ܥ + ܤሻ ≫ 2
ܮܦܦሺ1,3ሻ = ሺ2 + ܧ + 1 ≪ ܦ + ܥሻ ≫ 2
ܮܦܦሺ1,4ሻ = ሺ2 + ܨ + 1 ≪ ܧ + ܦሻ ≫ 2
ܮܦܦሺ2,4ሻ = ሺ2 + ܩ + 1 ≪ ܨ + ܧሻ ≫ 2
ܮܦܦሺ3,4ሻ = ሺ2 + ܪ + 1 ≪ ܩ + ܨሻ ≫ 2
ܮܦܦሺ4,4ሻ = ሺ2 + ܪ + 1 ≪ ܪ + ܩሻ ≫ 2
ܴܦܦሺ1,1ሻ = ሺ2 + ܫ + 1 ≪ ܯ + ܣሻ ≫ 2
ܴܦܦሺ1,2ሻ = ሺ2 + ܤ + 1 ≪ ܣ + ܯሻ ≫ 2
ܴܦܦሺ2,1ሻ = ሺ2 + ܬ + 1 ≪ ܫ + ܯሻ ≫ 2
ܴܦܦሺ3,1ሻ = ሺ2 + ܭ + 1 ≪ ܬ + ܫሻ ≫ 2
ܴܦܦሺ4,1ሻ = ሺ2 + ܮ + 1 ≪ ܭ + ܬሻ ≫ 2
ܷܪሺ2,4ሻ = ሺ2 + ܮ + 1 ≪ ܮ + ܭሻ ≫ 2
ܸܴ ሺ1,1ሻ = ሺ1 + ܣ + ܯሻ ≫ 1
ܸܴሺ1,2ሻ = ሺ1 + ܤ + ܣሻ ≫ 1
ܸܴሺ1,3ሻ = ሺ1 + ܥ + ܤሻ ≫ 1
ܸܴሺ1,4ሻ = ሺ1 + ܦ + ܥሻ ≫ 1
ܸܮሺ1,4ሻ = ሺ1 + ܧ + ܦሻ ≫ 1
ܸܮሺ3,4ሻ = ሺ1 + ܨ + ܧሻ ≫ 1
ܦܪሺ1,1ሻ = ሺ1 + ܫ + ܯሻ ≫ 1
ܦܪሺ2,1ሻ = ሺ1 + ܬ + ܫሻ ≫ 1
ܦܪሺ3,1ሻ = ሺ1 + ܭ + ܬሻ ≫ 1
ܦܪሺ4,1ሻ = ሺ1 + ܮ + ܭሻ ≫ 1
The DC Prediction has only one unique equation, the Diagonal-Down-Left Prediction has 7
equations, the Diagonal-Down-Right Prediction has 5 equations, the Vertical-Right
Prediction has 4 equations, the Horizontal-Down Prediction has 4 equations, the Vertical-Left
Prediction has 2 equations and the Horizontal-Up Prediction has 1 equation. The other pixel
values are copied from the already calculated pixel values by the above-said 24
equations.Thus reduces the computational complexity to 67 addition and 37 shift
operations.But those 24 equations are split intelligently and modified as follows.
1 + ܤ + ܣ = ܤܣ
1 + ܥ + ܤ = ܥܤ
1 + ܦ + ܥ = ܦܥ
1 + ܧ + ܦ = ܧܦ
1 + ܨ + ܧ = ܨܧ
1 + ܩ + ܨ = ܩܨ
1 + ܪ + ܩ = ܪܩ
1 + ܯ + ܣ = ܯܣ
1 + ܫ + ܯ = ܫܯ
1 + ܬ + ܫ = ܬܫ
1 + ܭ + ܬ = ܭܬ
1 + ܮ + ܭ = ܮܭ
ܸܴ ሺ1,2ሻ = 1 ≫ ܤܣ
ܸܴ ሺ1,3ሻ = 1 ≫ ܥܤ
ܸܴ ሺ1,4ሻ = 1 ≫ ܦܥ
ܸܴ ሺ1,1ሻ = 1 ≫ ܯܣ
90
- 8. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
ܸܮሺ1,4ሻ = 1 ≫ ܧܦ
ܸܮሺ3,4ሻ = 1 ≫ ܨܧ
ܦܪሺ1,1ሻ = 1 ≫ ܫܯ
ܦܪሺ2,1ሻ = 1 ≫ ܬܫ
ܦܪሺ3,1ሻ = 1 ≫ ܭܬ
ܦܪሺ4,1ሻ = 1 ≫ ܮܭ
ܥܦሺ1,1ሻ = ሺܪܩ + ܨܧ + ܦܥ + ܤܣሻ ≫ 3
ܮܦܦሺ1,1ሻ = ሺ ܥܤ + ܤܣሻ ≫ 2
ܮܦܦሺ1,2ሻ = ሺܦܥ + ܥܤሻ ≫ 2
ܮܦܦሺ1,3ሻ = ሺ ܧܦ + ܦܥሻ ≫ 2
ܮܦܦሺ1,4ሻ = ሺ ܨܧ + ܧܦሻ ≫ 2
ܮܦܦሺ2,4ሻ = ሺ ܩܨ + ܨܧሻ ≫ 2
ܮܦܦሺ3,4ሻ = ሺܪܩ + ܩܨሻ ≫ 2
ܮܦܦሺ4,4ሻ = ሺ1 + 1 ≪ ܪ + ܪܩሻ ≫ 2
ܴܦܦሺ1,1ሻ = ሺ ܫܯ + ܯܣሻ ≫ 2
ܴܦܦሺ1,2ሻ = ሺܤܣ + ܯܣሻ ≫ 2
ܴܦܦሺ2,1ሻ = ሺܬܫ + ܫܯሻ ≫ 2
ܴܦܦሺ3,1ሻ = ሺ ܭܬ + ܬܫሻ ≫ 2
ܴܦܦሺ4,1ሻ = ሺܮܭ + ܭܬሻ ≫ 2
ܷܪሺ2,4ሻ = ሺ1 + 1 ≪ ܮ + ܮܭሻ ≫ 2
Now, computational complexity of finding pixel domain predictions for all nine modes is 42
addition and 26 shift operations.
The novel approach of finding transform domain residue 4x4 sub-macroblocks is explained
hereafter. The facts of transform domain coefficients are given below.
1) The pixel domain predicted 4x4 sub-macroblock of each mode has spatial
redundancy. When predicted sub-macroblock is subtracted from original sub-
macroblock to form residue sub-macroblock, this spatial redundancy is not
utilized/exploited. Instead, the pixel domain predicted values are forward transform to
exploit the spatial redundancy.
ܶ ݔሺ݀݁ݎ – ݃ݎሻ = ܶݔሺ݃ݎሻ − ܶݔሺ݀݁ݎሻ
2) The additive property of Forward Transform is shown below.
3) Using the above-said equation and the spatial redundancy of pixel domain predicted
sub-macroblock, certain selected transform domain predicted sub-macroblock
coefficients are directly calculated.
TRANSFORM OF ORIGINAL
The original 4x4 sub-macroblock is forward transformed and its computational complexity is
64 additions and 16 shifts.
ܱܴݐ݂ܥ × ݃ݎ × ݂ܥ = ܩ
ݓℎ݈݁ܽ݊݅݃݅ݎ ݀݁݉ݎ݂ݏ݊ܽݎݐ ݀ݎܽݓݎ݂ ݏ݅ ܩܴܱ ݁ݎ
91
- 9. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
VERTICAL PREDICTION
coefficients ሺܸܲ_ܶݔሻand they are calculated using these values as follows.
The unique pixel predicted values are A, B, C and D. There are four unique transform
ܦ + ܣ = ܦܣ
ܦ − ܣ = 1ܦܣ
ܥ + ܤ = ܥܤ
ܥ − ܤ = 1ܥܤ
ܸܲ_ܶݔሺ1,1ሻ = ሺܥܤ + ܦܣሻ ≪ 2
ܸܲ_ܶݔሺ1,2ሻ = ሺ1ܥܤ + 1 ≪ 1ܦܣሻ ≪ 2
ܸܲ_ܶݔሺ1,3ሻ = ሺܥܤ − ܦܣሻ ≪ 2
ܸܲ_ܶݔሺ1,4ሻ = ሺ1 ≪ 1ܥܤ − 1ܦܣሻ ≪ 2
ܸܲ_ܶݔሺ2,1ሻ = ܸܲ_ܶݔሺ2,2ሻ = ܸܲ_ܶݔሺ2,3ሻ = ܸܲ_ܶݔሺ2,4ሻ = 0
ܸܲ_ܶݔሺ3,1ሻ = ܸܲ_ܶݔሺ3,2ሻ = ܸܲ_ܶݔሺ3,3ሻ = ܸܲ_ܶݔሺ3,4ሻ = 0
ܸܲ_ܶݔሺ4,1ሻ = ܸܲ_ܶݔሺ4,2ሻ = ܸܲ_ܶݔሺ4,3ሻ = ܸܲ_ܶݔሺ4,4ሻ = 0
The computational complexity to find transform domain Vertical Prediction mode
coefficients is 8 additions and 6 shifts.The transform domain residue for Vertical Prediction
Mode is calculated by subtracting these four transform coefficients from original transform
coefficients.
ܸܲ_ܴܵܧሺ1,1ሻ = ܱܴܩሺ1,1ሻ − ܸܲ_ܶݔሺ1,1ሻ
ܸܲ_ܴܵܧሺ1,2ሻ = ܱܴܩሺ1,2ሻ − ܸܲ_ܶݔሺ1,2ሻ
ܸܲ_ܴܵܧሺ1,3ሻ = ܱܴܩሺ1,3ሻ − ܸܲ_ܶݔሺ1,3ሻ
ܸܲ_ܴܵܧሺ1,4ሻ = ܱܴܩሺ1,4ሻ − ܸܲ_ܶݔሺ1,4ሻ
The other values of ܸ ܵܧܴ_ܴܧis copied from respective ܱܴ ܩvalues.The computational
complexity to find transform domain residue coefficients of Vertical Prediction mode is 4
additions and zero shifts.
HORIZONTAL PREDICTION
coefficients ሺݔܶ_ܲܪሻand they are calculated using these values as follows.
The unique pixel predicted values are I, J, K and L. There are four unique transform
ܮ + ܫ = ܮܫ
ܮ − ܫ = 1ܮܫ
ܭ + ܬ = ܭܬ
ܭ − ܬ = 1ܭܬ
ݔܶ_ܲܪሺ1,1ሻ = ሺܭܬ + ܮܫሻ ≪ 2
ݔܶ_ܲܪሺ2,1ሻ = ሺ1ܭܬ + 1 ≪ 1ܮܫሻ ≪ 2
ݔܶ_ܲܪሺ3,1ሻ = ሺܭܬ − ܮܫሻ ≪ 2
ݔܶ_ܲܪሺ4,1ሻ = ሺ1 ≪ 1ܭܬ − 1ܮܫሻ ≪ 2
ݔܶ_ܲܪሺ1,2ሻ = ݔܶ_ܲܪሺ2,2ሻ = ݔܶ_ܲܪሺ3,2ሻ = ݔܶ_ܲܪሺ4,2ሻ = 0
ݔܶ_ܲܪሺ1,3ሻ = ݔܶ_ܲܪሺ2,3ሻ = ݔܶ_ܲܪሺ3,3ሻ = ݔܶ_ܲܪሺ4,3ሻ = 0
ݔܶ_ܲܪሺ1,4ሻ = ݔܶ_ܲܪሺ2,4ሻ = ݔܶ_ܲܪሺ3,4ሻ = ݔܶ_ܲܪሺ4,4ሻ = 0
92
- 10. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
The computational complexity to find transform domain Horizontal Prediction mode
coefficients is 8 additions and 6 shifts.The transform domain residue for Horizontal
Prediction Mode is calculated by subtracting these four transform coefficients from original
transform coefficients.
ܵܧܴ_ܲܪሺ1,1ሻ = ܱܴܩሺ1,1ሻ − ݔܶ_ܲܪሺ1,1ሻ
ܵܧܴ_ܲܪሺ2,1ሻ = ܱܴܩሺ2,1ሻ − ݔܶ_ܲܪሺ2,1ሻ
ܵܧܴ_ܲܪሺ3,1ሻ = ܱܴܩሺ3,1ሻ − ݔܶ_ܲܪሺ3,1ሻ
ܵܧܴ_ܲܪሺ4,1ሻ = ܱܴܩሺ4,1ሻ − ݔܶ_ܲܪሺ4,1ሻ
The other values of ܵܧܴ_ܲܪis copied from respective ܱܴ ܩvalues.The computational
complexity to find transform domain residue coefficients of Horizontal Prediction mode is 4
additions and zero shifts.
DC PREDICTION
There is one unique transform coefficient ሺݔܶ_ܥܦሻcalculated as follows.
ݔܶ_ܥܦሺ1,1ሻ = ܥܦሺ1,1ሻ ≪ 4
The computational complexity to find transform domain DC Prediction mode coefficients is
zero additions and 1 shift. The transform domain residue for DC Prediction Mode is
calculated by subtracting this one transform coefficient from original transform coefficient.
ܵܧܴ_ܥܦሺ1,1ሻ = ܱܴܩሺ1,1ሻ − ݔܶ_ܥܦሺ1,1ሻ
The other values of ܵܧܴ_ܥܦis copied from respective ܱܴ ܩvalues.The computational
complexity to find transform domain residue coefficients of Vertical Prediction mode is 4
additions and zero shifts.
DIAGONAL-DOWN-LEFT PREDICTION
There are ten unique transform coefficients ሺݔܶ_ܮܦܦሻcalculated as follows.
ܮܦܦ = 00_ܮܦܦሺ1,1ሻ + ܮܦܦሺ4,4ሻ
ܮܦܦ = 10_ܮܦܦሺ1,1ሻ − ܮܦܦሺ4,4ሻ
ܮܦܦ = 20_ܮܦܦሺ1,3ሻ + ܮܦܦሺ2,4ሻ
ܮܦܦ = 30_ܮܦܦሺ1,3ሻ − ܮܦܦሺ2,4ሻ
ܮܦܦ = 40_ܮܦܦሺ1,2ሻ + ܮܦܦሺ3,4ሻ
ܮܦܦ = 50_ܮܦܦሺ1,2ሻ − ܮܦܦሺ3,4ሻ
ܮܦܦ = 60_ܮܦܦሺ1,4ሻ ≪ 2
ܮܦܦ = 70_ܮܦܦሺ1,4ሻ ≪ 3 + ܮܦܦሺ1,4ሻ ≪ 1
20_ܮܦܦ + 1 ≪ 20_ܮܦܦ = 80_ܮܦܦ
50_ܮܦܦ + 1 ≪ 50_ܮܦܦ = 90_ܮܦܦ
1 ≪ 40_ܮܦܦ = 01_ܮܦܦ
60_ܮܦܦ + 00_ܮܦܦ = 11_ܮܦܦ
30_ܮܦܦ + 10_ܮܦܦ = 21_ܮܦܦ
1 ≪ 30_ܮܦܦ = 31_ܮܦܦ
93
- 11. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
ݔܶ_ܮܦܦሺ1,1ሻ = 01_ܮܦܦ + 80_ܮܦܦ + 11_ܮܦܦ
ݔܶ_ܮܦܦሺ1,2ሻ = 90_ܮܦܦ + 1 ≪ 21_ܮܦܦ
ݔܶ_ܮܦܦሺ1,3ሻ = 20_ܮܦܦ − 00_ܮܦܦ
ݔܶ_ܮܦܦሺ1,4ሻ = 50_ܮܦܦ − 21_ܮܦܦ
ݔܶ_ܮܦܦሺ2,2ሻ = ሺ40_ܮܦܦ + 00_ܮܦܦሻ ≪ 2 − 70_ܮܦܦ − 80_ܮܦܦ
ݔܶ_ܮܦܦሺ2,3ሻ = ሺ31_ܮܦܦ − 10_ܮܦܦሻ ≪ 1 − 50_ܮܦܦ
ݔܶ_ܮܦܦሺ2,4ሻ = ሺ40_ܮܦܦ − 00_ܮܦܦሻ ≪ 1 + 40_ܮܦܦ − 20_ܮܦܦ
ݔܶ_ܮܦܦሺ3,3ሻ = 01_ܮܦܦ − 20_ܮܦܦ − 11_ܮܦܦ
ݔܶ_ܮܦܦሺ3,4ሻ = 90_ܮܦܦ − 31_ܮܦܦ + 21_ܮܦܦ
ݔܶ_ܮܦܦሺ4,4ሻ = 70_ܮܦܦ − 2 ≪ 40_ܮܦܦ − 3 ≪ 20_ܮܦܦ + 00_ܮܦܦ
The other coefficients are copied from those 10 unique coefficients.
ݔܶ_ܮܦܦሺ2,1ሻ = ݔܶ_ܮܦܦሺ1,2ሻ
ݔܶ_ܮܦܦሺ3,1ሻ = ݔܶ_ܮܦܦሺ1,3ሻ
ݔܶ_ܮܦܦሺ4,1ሻ = ݔܶ_ܮܦܦሺ1,4ሻ
ݔܶ_ܮܦܦሺ3,2ሻ = ݔܶ_ܮܦܦሺ2,3ሻ
ݔܶ_ܮܦܦሺ4,2ሻ = ݔܶ_ܮܦܦሺ2,4ሻ
ݔܶ_ܮܦܦሺ4,3ሻ = ݔܶ_ܮܦܦሺ3,4ሻ
The computational complexity to find transform domain coefficients of Diagonal-Down-Left
Prediction mode is 31 additions and 13 shifts. The transform domain residue for Diagonal-
Down-Left Prediction Mode is calculated by subtracting these transform coefficients from
original transform coefficient. The computational complexity to find transform domain
residue coefficients of Diagonal-Down-Left Prediction mode is 16 additions and zero shifts.
DIAGONAL-DOWN-RIGHT PREDICTION
There are ten unique transform coefficients ሺݔܶ_ܴܦܦሻ calculated as follows.
ܮܦܦ = 00_ܴܦܦሺ1,1ሻ + ܴܦܦሺ3,1ሻ
ܮܦܦ = 10_ܴܦܦሺ1,2ሻ + ܴܦܦሺ4,1ሻ
ܮܦܦ = 20_ܴܦܦሺ1,1ሻ − ܴܦܦሺ3,1ሻ
20_ܴܦܦ + 1 ≪ 20_ܴܦܦ = 30_ܴܦܦ
ܴܦܦ = 40_ܴܦܦሺ1,2ሻ + ܴܦܦሺ2,1ሻ
40_ܴܦܦ + 1 ≪ 40_ܴܦܦ = 50_ܴܦܦ
ܴܦܦ = 60_ܴܦܦሺ1,2ሻ − ܴܦܦሺ2,1ሻ
ܮܦܦ = 70_ܴܦܦሺ1,2ሻ − ܴܦܦሺ4,1ሻ
70_ܴܦܦ + 60_ܴܦܦ = 80_ܴܦܦ
ܴܦܦ = 90_ܴܦܦሺ1,1,5ሻ ≪ 2
= 01_ܴܦܦሺܴܦܦሺ1,1ሻ + 90_ܴܦܦሻ ≪ 1
1 ≪ 00_ܴܦܦ = 11_ܴܦܦ
90_ܴܦܦ + 10_ܴܦܦ = 21_ܴܦܦ
1 ≪ 10_ܴܦܦ = 31_ܴܦܦ
1 ≪ 11_ܴܦܦ = 41_ܴܦܦ
1 ≪ 60_ܴܦܦ = 51_ܴܦܦ
ݔܶ_ܴܦܦሺ1,1ሻ = 21_ܴܦܦ + 11_ܴܦܦ + 50_ܴܦܦ
ݔܶ_ܴܦܦሺ1,2ሻ = − 1 ≪ 80_ܴܦܦ − 30_ܴܦܦ
94
- 12. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
ݔܶ_ܴܦܦሺ1,3ሻ = 40_ܴܦܦ − 10_ܴܦܦ
ݔܶ_ܴܦܦሺ1,4ሻ = 80_ܴܦܦ − 20_ܴܦܦ
ݔܶ_ܴܦܦሺ2,2ሻ = 1 ≪ 31_ܴܦܦ − 41_ܴܦܦ − 01_ܴܦܦ + 50_ܴܦܦ
ݔܶ_ܴܦܦሺ2,3ሻ = ሺ51_ܴܦܦ − 70_ܴܦܦሻ ≪ 1 − 20_ܴܦܦ
ݔܶ_ܴܦܦሺ2,4ሻ = 31_ܴܦܦ − 11_ܴܦܦ + 40_ܴܦܦ − 00_ܴܦܦ
ݔܶ_ܴܦܦሺ3,3ሻ = 40_ܴܦܦ − 11_ܴܦܦ − 21_ܴܦܦ
ݔܶ_ܴܦܦሺ3,4ሻ = 51_ܴܦܦ − 70_ܴܦܦ − 60_ܴܦܦ − 30_ܴܦܦ
ݔܶ_ܴܦܦሺ4,4ሻ = 01_ܴܦܦ + 3 ≪ 40_ܴܦܦ − 10_ܴܦܦ − 41_ܴܦܦ
ݔܶ_ܴܦܦሺ2,1ሻ = −ݔܶ_ܴܦܦሺ1,2ሻ
ݔܶ_ܴܦܦሺ3,1ሻ = ݔܶ_ܴܦܦሺ1,3ሻ
ݔܶ_ܴܦܦሺ4,1ሻ = −ݔܶ_ܴܦܦሺ1,4ሻ
ݔܶ_ܴܦܦሺ3,2ሻ = −ݔܶ_ܴܦܦሺ2,3ሻ
ݔܶ_ܴܦܦሺ4,2ሻ = ݔܶ_ܴܦܦሺ2,4ሻ
ݔܶ_ܴܦܦሺ4,3ሻ = −ݔܶ_ܴܦܦሺ3,4ሻ
The computational complexity to find transform domain coefficients of Diagonal-Down-
Right Prediction mode is 32 additions and 12 shifts. The transform domain residue for
Diagonal-Down-Right Prediction Mode is calculated by subtracting these transform
coefficients from original transform coefficient. The computational complexity to find
transform domain residue coefficients of Diagonal-Down-Right Prediction mode is 16
additions and zero shifts.
VERTICAL-RIGHT PREDICTION
All the transform coefficients ሺܸܴ_ܶݔሻ calculated as follows.
ܴܸ = 00_ݐሺ1,4ሻ + ܴܦܦሺ3,1ሻ
ܴܸ = 10_ݐሺ1,4ሻ − ܴܦܦሺ3,1ሻ
ܴܦܦ = 20_ݐሺ2,1ሻ + ܮܦܦሺ1,2ሻ
ܴܦܦ = 30_ݐሺ2,1ሻ − ܮܦܦሺ1,2ሻ
ܴܸ = 40_ݐሺ1,1ሻ + ܮܦܦሺ1,1ሻ
ܴܸ = 50_ݐሺ1,1ሻ − ܮܦܦሺ1,1ሻ
ܴܸ = 60_ݐሺ1,3ሻ − ܴܦܦሺ1,1ሻ
1 << 40_ݐ = 70_ݐ
ܸܴ_00 = 20_ݐ − 00_ݐ
ܸܴ_01 = ܸܴ_00 − 20_ݐ
ܸܴ_02 = 20_ݐ + 00_ݐ
ܸܴ_03 = 20_ܴܸ + 00_ݐ
ܸܴ_04 = ܸܴሺ1,3ሻ + ܴܦܦሺ1,1ሻ
ܸܴ_05 = 1 ≪ 40_ܴܸ + 70_ݐ
ܸܴ_06 = 1 ≪ 40_ܴܸ − 70_ݐ
ܸܴ_07 = ܸܴሺ1,2ሻ + ܴܦܦሺ1,2ሻ
ܸܴ_08 = ܸܴ_07 ≪ 1
ܸܴ_09 = ܸܴ_08 + ܸܴ_07
ܸܴ_10 = 30_ݐ − 10_ݐ
ܸܴ_11 = 01_ܴܸ + 10_ݐ
ܸܴ_12 = 60_ݐ − 50_ݐ
ܸܴ_13 = ܸܴ_12 ≪ 1 + ܸܴ_12
95
- 13. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
ܸܴ_14 = 30_ݐ + 10_ݐ
ܸܴ_15 = ܸܴ_14 + 30_ݐ
ܸܴ_16 = 60_ݐ + 50_ݐ
ܸܴ_17 = ܸܴ_16 ≪ 1 + ܸܴ_16
ܸܴ_18 = ܸܴሺ1,2ሻ − ܴܦܦሺ1,2ሻ
ܸܴ_19 = ܸܴ_18 ≪ 1 + ܸܴ_18
ܸܴ_20 = 70_ݐ + 40_ݐ
ܸܴ_ܶݔሺ1,1ሻ = ܸܴ_02 + ܸܴ_05 + ܸܴ_08
ܸܴ_ܶݔሺ1,2ሻ = ܸܴ_13 − ܸܴ_10 ≪ 1
ܸܴ_ܶݔሺ1,3ሻ = ܸܴ_02 − ܸܴ_08
ܸܴ_ܶݔሺ1,4ሻ = −ܸܴ_10 − ܸܴ_12
ܸܴ_ܶݔሺ2,1ሻ = ܸܴ_11 + ܸܴ_16 + ܸܴ_18
ܸܴ_ܶݔሺ2,2ሻ = ܸܴ_20 − ܸܴ_03 ≪ 1 + ܸܴ_09
ܸܴ_ܶݔሺ2,3ሻ = ܸܴ_11 + ܸܴ_13 − ܸܴ_18
ܸܴ_ܶݔሺ2,4ሻ = ܸܴ_04 − ܸܴ_03 + ሺܸܴ_05 − ܸܴ_09ሻ ≪ 1
ܸܴ_ܶݔሺ3,1ሻ = ܸܴ_00
ܸܴ_ܶݔሺ3,2ሻ = ሺܸܴ_18 − ܸܴ_14ሻ ≪ 1 + ܸܴ_16
ܸܴ_ܶݔሺ3,3ሻ = ܸܴ_00 + ܸܴ_06
ܸܴ_ܶݔሺ3,4ሻ = ܸܴ_17 − ܸܴ_14 − ܸܴ_18 ≪ 2
ܸܴ_ܶݔሺ4,1ሻ = ܸܴ_15 + ܸܴ_17 + ܸܴ_19
ܸܴ_ܶݔሺ4,2ሻ = ሺܸܴ_06 − ܸܴ_01ሻ ≪ 1 − ܸܴ_04 − ܸܴ_07
ܸܴ_ܶݔሺ4,3ሻ = ܸܴ_15 − ܸܴ_12 − ܸܴ_19
ܸܴ_ܶݔሺ4,4ሻ = ܸܴ_08 − ܸܴ_01 − ܸܴ_20
The computational complexity to find transform domain coefficients of Vertical-Right
Prediction mode is 55 additions and 12 shifts. The transform domain residue for Vertical-
Right Prediction Mode is calculated by subtracting these transform coefficients from original
transform coefficient. The computational complexity to find transform domain residue
coefficients of Vertical-Right Prediction mode is 16 additions and zero shifts.
HORIZONTAL-DOWN PREDICTION
All the transform coefficients ሺݔܶ_ܦܪሻ calculated as follows.
ܴܦܦ = 00_ܦܪሺ1,2ሻ + ܴܦܦሺ4,1ሻ
ܴܦܦ = 10_ܦܪሺ1,2ሻ − ܴܦܦሺ4,1ሻ
ܮܦܦ = 20_ܦܪሺ1,1ሻ + ܦܪሺ4,1ሻ
ܮܦܦ = 30_ܦܪሺ1,1ሻ − ܦܪሺ4,1ሻ
ܦܪ = 40_ܦܪሺ1,1ሻ + ܴܦܦሺ3,1ሻ
ܦܪ = 50_ܦܪሺ1,1ሻ − ܴܦܦሺ3,1ሻ
ܴܦܦ = 60_ܦܪሺ1,1ሻ + ܦܪሺ3,1ሻ
ܴܦܦ = 70_ܦܪሺ1,1ሻ − ܦܪሺ3,1ሻ
ܦܪ = 80_ܦܪሺ2,1ሻ + ܴܦܦሺ2,1ሻ
ܦܪ = 90_ܦܪሺ2,1ሻ − ܴܦܦሺ2,1ሻ
70_ܦܪ + 50_ܦܪ = 01_ܦܪ
70_ܦܪ − 50_ܦܪ = 11_ܦܪ
20_ܦܪ + 00_ܦܪ = 21_ܦܪ
20_ܦܪ − 00_ܦܪ = 31_ܦܪ
96
- 14. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
00_ܦܪ + 31_ܦܪ = 41_ܦܪ
20_ܦܪ + 21_ܦܪ = 51_ܦܪ
30_ܦܪ + 10_ܦܪ = 61_ܦܪ
30_ܦܪ − 10_ܦܪ = 71_ܦܪ
30_ܦܪ + 61_ܦܪ = 81_ܦܪ
10_ܦܪ + 71_ܦܪ = 91_ܦܪ
40_ܦܪ + 1 ≪ 40_ܦܪ = 02_ܦܪ
1 ≪ 80_ܦܪ = 12_ܦܪ
80_ܦܪ + 12_ܦܪ = 22_ܦܪ
= 32_ܦܪሺ60_ܦܪ + 40_ܦܪሻ ≪ 1
= 42_ܦܪሺ60_ܦܪ − 40_ܦܪሻ ≪ 1
90_ܦܪ + 11_ܦܪ = 52_ܦܪ
90_ܦܪ − 11_ܦܪ = 62_ܦܪ
01_ܦܪ + 1 ≪ 01_ܦܪ = 72_ܦܪ
ݔܶ_ܦܪሺ1,1ሻ = 12_ܦܪ + 32_ܦܪ + 21_ܦܪ
ݔܶ_ܦܪሺ1,2ሻ = 81_ܦܪ − 52_ܦܪ
ݔܶ_ܦܪሺ1,3ሻ = − 31_ܦܪ
ݔܶ_ܦܪሺ1,4ሻ = 52_ܦܪ + 1 ≪ 52_ܦܪ + 91_ܦܪ
ݔܶ_ܦܪሺ2,1ሻ = 72_ܦܪ + 1 ≪ 61_ܦܪ
ݔܶ_ܦܪሺ2,2ሻ = 22_ܦܪ + 1 ≪ 51_ܦܪ − 02_ܦܪ
ݔܶ_ܦܪሺ2,3ሻ = 52_ܦܪ + 1 ≪ 71_ܦܪ − 90_ܦܪ
ݔܶ_ܦܪሺ2,4ሻ = ሺ42_ܦܪ + 41_ܦܪሻ ≪ 1 − 80_ܦܪ − 60_ܦܪ
ݔܶ_ܦܪሺ3,1ሻ = 12_ܦܪ − 21_ܦܪ
ݔܶ_ܦܪሺ3,2ሻ = 90_ܦܪ − 81_ܦܪ − 72_ܦܪ
ݔܶ_ܦܪሺ3,3ሻ = 31_ܦܪ − 42_ܦܪ
ݔܶ_ܦܪሺ3,4ሻ = 90_ܦܪ − 1 ≪ 90_ܦܪ − 01_ܦܪ − 91_ܦܪ
ݔܶ_ܦܪሺ4,1ሻ = 01_ܦܪ − 61_ܦܪ
ݔܶ_ܦܪሺ4,2ሻ = − 51_ܦܪ − 60_ܦܪሺ32_ܦܪ − 22_ܦܪሻ ≪ 1
ݔܶ_ܦܪሺ4,3ሻ = 1 ≪ 62_ܦܪ + 90_ܦܪ − 71_ܦܪ − 62_ܦܪ
ݔܶ_ܦܪሺ4,4ሻ = 12_ܦܪ + 02_ܦܪ − 41_ܦܪ
The computational complexity to find transform domain coefficients of Horizontal-Down
Prediction mode is 56 additions and 12 shifts. The transform domain residue for Horizontal-
Down Prediction Mode is calculated by subtracting these transform coefficients from original
transform coefficient. The computational complexity to find transform domain residue
coefficients of Horizontal-Down Prediction mode is 16 additions and zero shifts.
VERTICAL-LEFT PREDICTION
All the transform coefficients ሺܸݔܶ_ܮሻ calculated as follows.
ܸܴܸ = 00_ܮሺ1,2ሻ + ܮܦܦሺ2,4ሻ
ܸܴܸ = 10_ܮሺ1,2ሻ − ܮܦܦሺ2,4ሻ
ܸܮܦܦ = 20_ܮሺ1,1ሻ + ܸܮሺ3,4ሻ
ܸܮܦܦ = 30_ܮሺ1,1ሻ − ܸܮሺ3,4ሻ
ܸܴܸ = 40_ܮሺ1,3ሻ + ܮܦܦሺ1,4ሻ
ܸܴܸ = 50_ܮሺ1,3ሻ − ܮܦܦሺ1,4ሻ
ܸܴܸ = 60_ܮሺ1,4ሻ + ܮܦܦሺ1,3ሻ
97
- 15. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
ܸܴܸ = 70_ܮሺ1,4ሻ − ܮܦܦሺ1,3ሻ
ܸܮܸ = 80_ܮሺ1,4ሻ + ܮܦܦሺ1,2ሻ
ܸܮܸ = 90_ܮሺ1,4ሻ − ܮܦܦሺ1,2ሻ
ܸ 20_ܮܸ + 00_ܮܸ = 01_ܮ
ܸ 20_ܮܸ − 00_ܮܸ = 11_ܮ
ܸ 00_ܮܸ + 01_ܮܸ = 21_ܮ
ܸ 20_ܮܸ − 11_ܮܸ = 31_ܮ
ܸ 30_ܮܸ + 10_ܮܸ = 41_ܮ
ܸ 30_ܮܸ − 10_ܮܸ = 51_ܮ
ܸ 41_ܮܸ + 10_ܮܸ = 61_ܮ
ܸ 30_ܮܸ − 51_ܮܸ = 71_ܮ
ܸ 50_ܮܸ + 90_ܮܸ = 81_ܮ
ܸ 50_ܮܸ − 90_ܮܸ = 91_ܮ
ܸ 80_ܮܸ + 1 ≪ 80_ܮܸ = 02_ܮ
ܸ 1 ≪ 60_ܮܸ = 12_ܮ
ܸ = 22_ܮሺܸ80_ܮܸ + 40_ܮሻ ≪ 1
ܸ = 32_ܮሺܸ80_ܮܸ − 40_ܮሻ ≪ 1
ܸ 70_ܮܸ + 1 ≪ 70_ܮܸ = 42_ܮ
ܸ 81_ܮܸ + 1 ≪ 81_ܮܸ = 52_ܮ
ܸ 91_ܮܸ + 1 ≪ 91_ܮܸ = 62_ܮ
ܸݔܶ_ܮሺ1,1ሻ = ܸ 22_ܮܸ + 12_ܮܸ + 01_ܮ
ܸݔܶ_ܮሺ1,2ሻ = ܸ 62_ܮܸ − 1 ≪ 41_ܮ
ܸݔܶ_ܮሺ1,3ሻ = ܸ 12_ܮܸ − 01_ܮ
ܸݔܶ_ܮሺ1,4ሻ = ܸ 91_ܮܸ + 41_ܮ
ܸݔܶ_ܮሺ2,1ሻ = ܸ 81_ܮܸ + 61_ܮܸ + 70_ܮ
ܸݔܶ_ܮሺ2,2ሻ = ሺܸ60_ܮܸ − 21_ܮሻ ≪ 1 − ܸ 02_ܮܸ − 60_ܮ
ܸݔܶ_ܮሺ2,3ሻ = ܸ 62_ܮܸ + 70_ܮܸ − 61_ܮ
ܸݔܶ_ܮሺ2,4ሻ = ܸ + 12_ܮܸ + 40_ܮܸ − 21_ܮሺܸ22_ܮܸ − 12_ܮሻ ≪ 1
ܸݔܶ_ܮሺ3,1ሻ = ܸ 11_ܮ
ܸݔܶ_ܮሺ3,2ሻ = ሺܸ70_ܮܸ − 51_ܮሻ ≪ 1 − ܸ 81_ܮ
ܸݔܶ_ܮሺ3,3ሻ = ܸ 32_ܮܸ − 11_ܮ
ܸݔܶ_ܮሺ3,4ሻ = ܸ 52_ܮܸ − 51_ܮܸ + 2 ≪ 70_ܮ
ܸݔܶ_ܮሺ4,1ሻ = ܸ 52_ܮܸ + 71_ܮܸ + 42_ܮ
ܸݔܶ_ܮሺ4,2ሻ = ܸ + 60_ܮܸ + 40_ܮሺܸ32_ܮܸ + 31_ܮሻ ≪ 1
ܸݔܶ_ܮሺ4,3ሻ = ܸ 91_ܮܸ − 42_ܮܸ − 71_ܮ
ܸݔܶ_ܮሺ4,4ሻ = ܸ 12_ܮܸ − 02_ܮܸ + 31_ܮ
The computational complexity to find transform domain coefficients of Vertical-Left
Prediction mode is 56 additions and 14 shifts. The transform domain residue for Vertical-Left
Prediction Mode is calculated by subtracting these transform coefficients from original
transform coefficient. The computational complexity to find transform domain residue
coefficients of Vertical-Left Prediction mode is 16 additions and zero shifts.
98
- 16. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
HORIZONTAL-UP PREDICTION
All the transform coefficients ሺݔܶ_ܷܪሻ calculated as follows.
ܦܪ = 00_ܷܪሺ2,1ሻ + ܴܦܦሺ3,1ሻ
ܦܪ = 10_ܷܪሺ2,1ሻ − ܴܦܦሺ3,1ሻ
ܦܪ = 20_ܷܪሺ3,1ሻ + ܴܦܦሺ4,1ሻ
ܦܪ = 30_ܷܪሺ3,1ሻ − ܴܦܦሺ4,1ሻ
ܦܪ = 40_ܷܪሺ4,1ሻ + ܷܪሺ2,4ሻ
ܦܪ = 50_ܷܪሺ4,1ሻ − ܷܪሺ2,4ሻ
ܦܪ = 60_ܷܪሺ2,1ሻ + 00_ܷܪ
ܴܦܦ − 10_ܷܪ = 70_ܷܪሺ3,1ሻ
ܮ − 40_ܷܪ = 80_ܷܪ
ܮ + 1 ≪ ܮ = 90_ܷܪ
ܮ + 50_ܷܪ + 1 ≪ 50_ܷܪ = 01_ܷܪ
90_ܷܪ − 50_ܷܪ = 11_ܷܪ
ܴܦܦ = 21_ܷܪሺ4,1ሻ + 80_ܷܪ
ܴܦܦ = 31_ܷܪሺ4,1ሻ − 80_ܷܪ
30_ܷܪ + 1 ≪ 30_ܷܪ + 70_ܷܪ = 41_ܷܪ
80_ܷܪ − 20_ܷܪ = 51_ܷܪ
ݔܶ_ܷܪሺ1,1ሻ = + 00_ܷܪሺ90_ܷܪ + 40_ܷܪ + 20_ܷܪሻ ≪ 1
ݔܶ_ܷܪሺ1,2ሻ = 11_ܷܪ + 30_ܷܪ + 60_ܷܪ
ݔܶ_ܷܪሺ1,3ሻ = 10_ܷܪ
ݔܶ_ܷܪሺ1,4ሻ = 01_ܷܪ + 41_ܷܪ
ݔܶ_ܷܪሺ2,1ሻ = ሺܮ − 20_ܷܪ + 00_ܷܪሻ ≪ 1 + 3 ≪ ܮ − 20_ܷܪ
ݔܶ_ܷܪሺ2,2ሻ = ሺ21_ܷܪ − 60_ܷܪሻ ≪ 1 − 21_ܷܪ
ݔܶ_ܷܪሺ2,3ሻ = ሺ50_ܷܪ − 10_ܷܪሻ ≪ 1 − 30_ܷܪ
ݔܶ_ܷܪሺ2,4ሻ = 21_ܷܪ + 30_ܷܪ − 1 ≪ 41_ܷܪ
ݔܶ_ܷܪሺ3,1ሻ = 80_ܷܪ − 1 ≪ 80_ܷܪ − 00_ܷܪ
ݔܶ_ܷܪሺ3,2ሻ = 11_ܷܪ − 20_ܷܪ − 1 ≪ 20_ܷܪ − 60_ܷܪ
ݔܶ_ܷܪሺ3,3ሻ = 1 ≪ 30_ܷܪ − 10_ܷܪ
ݔܶ_ܷܪሺ3,4ሻ = 01_ܷܪ − 20_ܷܪ + 70_ܷܪ
ݔܶ_ܷܪሺ4,1ሻ = 20_ܷܪ − 00_ܷܪ
ݔܶ_ܷܪሺ4,2ሻ = 21_ܷܪ + 51_ܷܪ − 2 ≪ 51_ܷܪ − 60_ܷܪ
ݔܶ_ܷܪሺ4,3ሻ = − 10_ܷܪሺ50_ܷܪ − 30_ܷܪሻ ≪ 2 + 30_ܷܪ
ݔܶ_ܷܪሺ4,4ሻ = 31_ܷܪ + 1 ≪ 31_ܷܪ + 80_ܷܪ + 70_ܷܪ
The computational complexity to find transform domain coefficients of Horizontal-Up
Prediction mode is 51 additions and 16 shifts. The transform domain residue for Horizontal-
Up Prediction Mode is calculated by subtracting these transform coefficients from original
transform coefficient. The computational complexity to find transform domain residue
coefficients of Horizontal-Up Prediction mode is 16 additions and zero shifts.
SECTION 5: COMPARISON ANDINFERENCES OF THE PROPOSED METHOD
The computational complexity of reference software and the proposed method are
compared here. The computational complexity of Pixel domain Intra 4x4 Prediction for all
99
- 17. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
the nine prediction modes in the reference softwares[12] and [13] tabulatedin the table 1
below.
Table 1 Complexity of Pixel domain Intra 4x4 prediction in reference software
Reference
Prediction Type Software
Addition Shifts
Vertical 0 0
Horizontal 0 0
DC 8 1
Diagonal-Down-
21 14
Left
Diagonal-Down-
21 14
Right
Vertical-Right 26 16
Horizontal-Down 26 16
Vertical-Left 25 15
Horizontal-Up 15 9
Total 142 85
The reference software does the pixel domain prediction first, and then finds the residue and
last it does the forward transform for all nine modes. In that order, the computational
complexity of the existing reference software is listed in the table 2.
The proposed method does the selective pixel domain prediction, calculates the selective
transform domain coefficients and finds the transform domain residue coefficients. The
computational complexity of the proposed method is listed in table 3.
Table 2 Complexity of Reference software during Intra 4x4 prediction
Reference
Process Software
Addition Shift
Pixel domain
142 85
Prediction
Finding Residue 144 0
Forward Transform 576 144
Total 862 229
Table 3 Complexity of Proposed method during Intra 4x4 prediction
Proposed Method
Process
Addition Shift
Pixel domain
42 26
Prediction
Forward Transform 361 108
Finding Residue 105 0
Total 508 134
100
- 18. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
The transform domain residue sub-macroblocks for all the nine modes are available by
508 additions and 134 shifts only, where as the existing reference software can produce the
same by 862 additions and 229 shifts. After finalizing mode, the corresponding pixel domain
prediction values can be generated just by copying from available 24 unique pixel values.
CONCLUSION
The process of predicting the intra 4x4 prediction for all the nine modes, finding the
residue and forward transforming will take more complexity in terms of addition and shifts.
Every macroblock in the frame of the sequence is subjected to do this process repeatedly for
all its sixteen sub-macroblocks. The proposed method used (i) the unique equations for
prediction, (ii) the additive property of core forward transform and (iii) the spatial
redundancy of pixel domain predicted values, and reduced the computational complexity into
59% addition and 59% shift operations, thus saved 41% computational complexity. But the
proposed method did not compromise the accuracy of the results, thus maintaining the same
quality and bitrate. The same method can be extended to Intra 16x16 Prediction, Intra 8x8
Prediction and Intra Chroma Predictions also in H.264 Encoder.
ACKNOWLEDGMENT
The author thanks RiverSilica Technologies Private Limited, INDIA for their
encouragement and support.
REFERENCES
[1] T. Wiegand, G. J. Sullivan, G. Bjontegaard, and A. Luthra, “Overview of the H.264/AVC
video coding standard,” IEEE Transactions on Circuits and Systems for Video Technology.,
Vol. 13, No. 7, pp. 560–576, Jul. 2003.
[2] A. Joch, F. Kossentini, H. Schwarz, T. Wiegand, and G. J. Sullivan, “Performance
comparison of video standards using Lagrangian control,” in Proc. IEEE Int. Conf. Image
Process., pp. 501–504, 2002.
[3] W. Zouch, A. Samet, M. A. Ben Ayed, F Kossentini, N. Masmoudi, “Complexity
Analysis of Intra Prediction in H.264/AVC”, Micro Electronics, 2004. ICM 2004
Proceedings, 16th International Conference on Dec 6-8, 2004
[4] Mustafa Parlak, Yusuf Adibelli, and IlkerHamzaoglu, “A Novel Computational
Complexity and Power Reduction Technique for H.264 Intra Prediction”, IEEE Transactions
on Consumer Electronics, Vol. 54, No. 4, Nov’2008
[5] Yusuf Adibelli, Mustafa Parlak, and IlkerHamzaoglu, “A Computation and Power
Reduction Technique for H.264 Intra Prediction”, 13thEuromicro Conference on Digital
System Design: Architecture, Methods and Tools, 2010
[6] E. Sahin, I. Hamzaoglu, “An Efficient Hardware Architecture for H.264 Intra Prediction
Algorithm”, DATE Conference, Apr’2007
[7] Y. Lai, T. Liu, Y. Li, C. Lee, “Design of An Intra Predictor with Data Reuse for High-
Profile H.264 Applications”, IEEE ISCAS, May 2009
[8] F. Pan, X. Lin, S. Rahardja, K. Lim, Z. Li, S. Dajun Wu, “Fast Mode Decision Algorithm
for Intra Prediction in H.264/AVC Video Coding”, IEEE Transactions on CAS for Video
Technology, Vol. 15, No. 7.,pp 813 – 822, Jul’2005
[9] I. Choi, J. Lee, B. Jeon, “Fast Coding Mode Selection With Rate-Distortion Optimization
for MPEG-4 Part 10 AVC/H.264”, IEEE Transactions on CAS for Video Technology, Vol.
16, No. 12, pp 1557 – 1561, Dec’2006
101
- 19. International Journal of Electronics and Communication Engineering & Technology (IJECET), ISSN
0976 – 6464(Print), ISSN 0976 – 6472(Online) Volume 3, Issue 3, October- December (2012), © IAEME
[10] A. Elyousfi, A. A. Tamtaoui, and E. Bouyakhf, “A New Fast Intra Prediction Mode
Decision Algorithm for H.264/AVC Encoders”, World Academy of Science, Engineering and
Technology, 2007
[11] The H.264 – Advanced Video Compression Standard – Second Edition – Iain E.
Richardson – A John Wiley and Sons, Ltd., Publication, 2010
[12] Joint Video Team, JM Reference Software V17.1 - iphome.hhi.de/suehring/tml/
[13] X264 Encoder Open Source - http://www.videolan.org/developers/x264.html
102