Selective Video Coding Based On Bezier Curves: Srividya B V Dr. Akhila S

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169

Volume: 5 Issue: 2 133 143


_______________________________________________________________________________________________

Selective Video Coding based on Bezier Curves

Srividya B V Dr. Akhila S


Dayananda Sagar College Of Engineering, BMS College Of Engineering,
Bangalore, Karnataka, Bangalore, Karnataka,
India India

Abstract: In this paper the problem of reconstruction of video frames is addressed, when there are missing pixels in each video frame or is
corrupted with noise and also the locations of corrupted pixels are not known. The modified data can be corrected using Forward Error
Correcting Codes. Forward Error correcting codes detect and correct errors with the help of complex decoders. This work proposes a new
approach called Selective encoding for reconstruction of Video Frames from Error. This algorithm combines the Bezier curves over Galois Field
GF (p^m) and the Low Density Parity Check Codes for performing encoding and decoding. The proposed decoder is capable of detecting and
correcting errors in each video frame, where only selected pixel values are encoded and decoded. This reduces the decoding time significantly.
Further, when binary representation of the Galois Field is used, the speed of the decoder is enhanced as there is no carry generation and carry
propagation when any modular arithmetic operation is carried out. Further time complexity is improvised by using parallel processing. The
coding of the algorithm is carried out using MATLAB.
Keyword: Selective Encoding, Error Recovery, LDPC codes, Bezier curve, Galois field.
__________________________________________________*****_________________________________________________

I. Literature Survey Wasule et al. mainly discusses on the decoding of Low


Density Parity Check Codes using Advanced Gallagers
The work of Daniel Costello J et al. in Applications of algorithm, which has a fully parallel implementation to
Error-Control Coding mainly discusses the various error reduce the Bit Error Rate and lower the hardware
control methods in mobile communication, like the different complexity at the cost of increase in area to achieve
FEC codes like Hamming code, Reed Solomon Code, Golay maximum throughput[7].
code, Low Density Parity Check codes (LDPC) and Turbo Alin Sindhu has proposed A Galois field based very fast
coding for GSM and CDMA along with the different data and compact error correcting technique which discusses on
rates[1]. Euclidean Geometry based LDPC where serial one step
M H Azmi in his PhD Thesis on Design of low-density majority logic decoder is used. The received vector is
parity-check codes in relay channels , discusses about the cyclically shifted and then fed to the shift register circuit to
capacity of LDPC which is the subject of intense interest in perform the error correction. However, as the number of bits
research[2]. increases, the decoding time increases. Also the hardware
Sheryl L. Howard in his work on Error control coding in complexity enhances, if the information to be encoded
wireless sensor networks mainly discusses about the increases, as the proposed method uses p-input XOR gates,
specific error control coding like Checksum, Reed Solomon, depending on the size of the parity matrix[8].
Cyclic Redundancy Check and Convolution codes in M. P. C. Fossorier et al. In their work on Reduced
WSNs. The authors have implemented several decoders complexity iterative decoding of low density parity check
like Reed Solomon, Hard decision Viterbi, Soft Decision nodes based on belief propagation, discusses on Fast
Viterbi, LDPC codes, for the data in different decoding algorithms based on Fast Fourier Transform to
environments[3]. reduce the computation complexity of the belief propagation
The works of sanjeev kumar et al. mainly discusses the algorithm using higher order Galois field but for moderate
methods of improving the total BER which is obtained code lengths. The algorithm reduces the computational
through the combination of RS codes for correcting burst complexity by simplifying the check node computation. But
errors and convolution codes which are good for correcting the algorithm is unable to improve the decoding
random errors, that are caused due to a noisy channel. performance of the LDPC codes[9].
LDPC codes are known to perform well in the presence of J.P chen et al. Have discussed on Density evolution for two
Additive White Gaussian Noise (AWGN) but for very large improved BP-based decoding algorithm for LDPC codes,
block lengths[5]. which have an improvement in the decoding performance,
The authors of Performance study of non-binary LDPC but decoding performance suffers from degradation when
codes over Galois field, V S Ganepola et al. Have output is near to zero[10].
proposed to define the codes over higher order Galois fields The work of Meng Xu et al. is on Modified Offset min-sum
to overcome the limitations of having a large block algorithm (MOMS), which has an improvement in the
length[6]. decoding performance and requires P + 2 more addition
The authors of Review paper on the decoding of LDPC operations compared, to OMS algorithm[11].
codes using Advanced Gallagers algorithm Padmini U
133
IJRITCC | February 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 2 133 143
_______________________________________________________________________________________________
From the Literature Survey, it is observed that a better (i) Linear Bezier curves
performance in decoding is required. The proposed Figure 1 shows the plot of the Linear Bezier curve B (t)
algorithm is on Selective Encoding. Here the complexity of Versus t, which is equivalent to linear interpolation between
the hardware can be simplified and a better performance of two points.
the decoder can be achieved even when output is zero. The equation for linear Bezier curve is given by
Further the improvement achieved in the proposed work, is B(t ) (1 t ) P0 tP1 , t [0,1] Where P0 and P1 are the
reduction in the area as the Hardware used is XOR gates.
control points.
Further, there is No performance degradation seen when
output is zero. Also, K-P modulo-additions are required for
decoding, where K is the length of the information digits
and P is the number of non zero digits of the Parity matrix.
It has been observed that a better improvement in the
decoder performance is achieved using Selective Encoding
in Galois Field GF (2m).

II. INTRODUCTION

The proposed work is based on Bezier curves over Galois


field GF (p^m), combined with the Low Density Parity
check (LDPC) codes for the purpose of encoding and
decoding the data. The construction of the Generator matrix
G for encoding and the parity check matrix H for decoding
is based on Bezier curves over Galois field GF(2^m). The
proposed decoder can detect and correct any random errors
Figure : 1 Linear Bezier Curve
up to 150 digits in a word of 256 digits. Low Density Parity
Check codes, Bezier curve and Galois field are discussed.
(ii) Quadratic Bezier curve
Figure 2 shows the plot of the Quadratic Bezier curve[16] B
2.1 Low Density Parity Check Codes (t) versus t, which can be interpreted as the linear interpolate
of corresponding points on the linear Bezier curves from P0
Low density parity check codes are very widely used for to P1 and from P1 to P2 respectively.
error detection and correction purposes [12]. Low Density A quadratic Bezier curve [11] is defined by the function
Parity Check Codes is a class of codes, which have a small B(t), with P0, P1, and P2 as control points. The curve
number of 1s compared to zeros. LDPC are defined by a equation is
randomly generated parity matrix which can be of type B(t ) (1 t ) 2 P0 2t (1 t ) P1 t 2 P2 , t [0,1]
regular or irregular. The Regular parity matrix P is
constructed to have a uniform column weight and row
weight [12][13]. Such algebraic construction methods
ensure that each row has exactly the same number of
elements and each column has exactly the same number of
elements. These conditions ensure that the parity matrix P
has uniform row and column weights forming a Regular
LDPC code [14]. The Parity matrix P that does not adhere to
the property of having uniform row and column weight
forms an Irregular Parity matrix.
In the proposed work the parity matrix P is of type regular,
constructed using Bezier curve elements over Galois Field
GF (p^m).

2.2 Bezier curve


Figure : 2 Quadratic Bezier Curve
Bezier curves were widely publicized in 1962 by the French
engineer Pierre Bezier. The Bezier curve is a parametric (iii) Cubic Bezier curves
curve. Bernstein polynomial functionally defines the Bezier Figure 3 shows the plot of the Cubic Bezier curve[16] B (t)
curve[16]. Bezier curves are a method of designing versus t.
polynomial curve segments, where in the shape of curves Four control points P0, P1, P2 and P3 defines a cubic Bezier
can be controlled using the control points. The Bezier curves curve for n=3.
have control points from P0 to Pn, where n is the order of The explicit form of the cubic Bezier curve is given by
the Bezier curve. Based on the value of n, the following
are the different classes of Bezier curves.
B(t ) (1 t ) 3 P0 3t (1 t ) 2 P1 3(1 t )t 2 P2 t 3 P3 ; t (0,1)

134
IJRITCC | February 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 2 133 143
_______________________________________________________________________________________________
The first and the last points are on the curve, while the is equal to 1, the field is just the integers mod p. In coding
middle two points are not on the curve. The change in the theory, and in cryptography, normal practice is to almost
control points, changes the shape of the curve. Connecting always take the value of p to be 2, which is called as binary
the control points by the line segments form a control extension and represented as GF (2m). Let GF (2m) be the
polygon. The curve is tangent to the control polygon. root of a primitive polynomial of degree m over GF (p). The
elements of GF (2m) are {0, 1, 2, 3 m-2}. Each
element in GF (2m) can be represented using m-bits.
Arithmetic operations can be performed for the elements of
GF (2m), which is useful in coding theory.
The following section shows the arithmetic operations
performed on GF (2m)

(i) Elements in GF (2m)

In GF (2m), modular arithmetic operations are simpler. The


need for hardware also reduces since there is no concept of
carry generation and carry propagation.
The elements of Galois field GF (24) is constructed using the
primitive polynomial P(x) = x4 + x + 1 and is shown in
Table 1

Element Polynomial Binary


Figure 3 : Cubic Bezier Curve
representation representation
0 0 (0000)
(iv) Quartic Bezier curves
Figure 4 shows the plot of the Quartic Bezier curve B (t) 0 1 (1000)
versus t. 1 X (0100)
Five points P0, P1, P2, P3and P4 define a Quartic Bezier 2 X2 (0010)
curve [16] given n=4. The explicit form of the Quartic 3 X3 (0001)
Bezier curve is given by 4 X+1 (1100)
(1 t )4 P0 4t (1 t )3 P1 6t 2 (1 t )2 P2 4t 3 (1 t )P3 t 4 P4 Where 5 X2+X (0110)
6 X2 + X 3 (0011)
t (0,1)
7 1+X+ X3 (1101)
8 1+X2 (1010)
9 X+ X3 (0101)
10 1+X+X2 (1110)
11 X+X2+ X3 (0111)
12 1+X+X2+ X3 (1111)
13 1+X2+X3 (1011)
14 1+ X3 (1001)

Table 1: Elements of GF (24)

(ii) Addition in GF (2m)


Illustrating the Galois field addition with an example: The
Galois Field GF (24) has
P(x) = x4 + x + 1 as the primitive polynomial. Table 1 show
Figure 4 : Quartic Bezier Curve that each element in GF (24) can be represented using 4-bits
in binary. Bitwise XOR is used while adding the elements of
2.3 Galois Field GF (24). For example:
5 + 5 = (0110) + (0110) = (0000) = 0= 0
Galois field Algebra is named after its inventor Evariste 2 + 5= (0010) + (0110) = (0100) = 1= 1
Galois. In Galois field GF (2^m), there are finite number of The addition table for GF (24) is as shown in Table2
elements. These finite fields are extensively used in coding
theory like BCH Codes, Reed Solomon codes [17]. The
order of a finite field is always a prime or power of a prime.
Coding theory focuses on finite fields. For any prime integer
p and any integer m greater than or equal to 1, there is a
unique field with pm elements denoted as GF (pm).In case m
135
IJRITCC | February 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 2 133 143
_______________________________________________________________________________________________
+ 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 1 0 3 2 5 4 7 6 9 8 11 10 13 12 15 14
2 2 3 0 1 6 7 4 5 10 11 8 9 14 15 12 13
3 3 2 1 0 7 6 5 4 11 10 9 8 15 14 13 12
4 4 5 6 7 0 1 2 3 12 13 14 15 8 9 10 11
5 5 4 7 6 1 0 3 2 13 12 15 14 9 8 11 10
6 6 7 4 5 2 3 0 1 14 15 12 13 10 110 8 9
7 7 6 5 4 3 2 1 0 15 14 13 12 11 10 9 8
8 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7
9 9 8 11 10 13 12 15 14 1 0 3 2 5 4 7 6
10 10 11 8 9 14 15 12 13 2 3 0 1 6 7 4 5
11 11 10 9 8 15 14 13 12 3 2 1 0 7 6 5 4
12 12 13 14 15 8 9 10 11 4 5 6 7 0 1 2 3
13 13 12 15 14 9 8 11 10 5 4 7 6 1 0 3 2
14 14 15 12 13 10 11 8 9 6 7 4 5 2 3 0 1
15 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0

Table 2: Addition in GF (24)

(iii) Multiplication in GF (2m) Modular reduction


In most algorithms the modular product is computed using ( X4+ X3+ X2+X) mod(X4+X+1) =1+X2+X3
the polynomial multiplication succeeded by the modular Using the Galois Field GF (24) which is based on P(x)
reduction. Let A(x), B(x) be the polynomial represented =x4+x+1, the multiplication table for
elements of GF (2m) and P(x) be the irreducible field GF ( 24)[10] is as shown in Table 3
generator polynomial.
Example: If P(x) =X4+X+1, A(x) = X2+1, B(x) = X2+X
Then A(x)* B(x) = (X2+1)* (X2+X) = ( X4+ X3+ X2+X)
X 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
2 2 4 6 8 10 12 14 3 1 7 5 11 9 15 13
3 3 6 5 12 15 10 9 11 8 13 14 7 4 1 2
4 4 8 12 3 7 11 15 6 2 14 10 5 1 13 9
5 5 10 15 7 2 13 8 14 11 4 1 9 12 3 6
6 6 12 10 11 13 7 1 5 3 9 15 14 8 2 4
7 7 14 9 15 8 1 6 13 10 3 4 2 5 12 11
8 8 3 11 6 14 5 13 12 4 15 7 10 2 9 1
9 9 1 8 2 11 3 10 4 13 5 12 6 15 7 14
10 10 7 13 14 4 9 3 15 5 8 2 1 11 6 12
11 11 5 14 10 1 15 4 7 12 2 9 13 6 8 3
12 12 11 7 5 9 14 2 10 6 1 13 15 3 4 8
13 13 9 4 1 12 8 5 2 15 11 6 3 14 10 7
14 14 15 1 13 3 2 12 9 7 6 8 4 10 11 5
15 15 13 2 9 6 4 11 1 14 12 3 8 7 5 10

Table 3: Multiplication in GF (24)

Multiplication takes place on the 4-bit binary values and 57= (5 x 5 x 5 x 5 x 5 x5 x 5) GF (2 4)


then the modular reduction is performed on the binary = (2 x 2 x 2 x 5) GF (24)
product. = (4 x 10) GF (24)
The Binary representation of P(x) = (X4+X+1) = (1101). =14
The modular multiplication in binary can be performed as Section 2 discusses briefly describes the proposed
illustrated in Table 3. algorithm. Section 3 discusses the results obtained and
For example: If A=9 and B=9, then Section 4 is the conclusion arrived about the proposed work.
AXB= 9 9 = (1001) (1001) = (1010001)
(1010001) mod (1101) = (1011) = 13

Exponential operation performed using GF (2 m) is shown


below
136
IJRITCC | February 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 2 133 143
_______________________________________________________________________________________________
III. PROPOSED RECONSTRUCTION OF VIDEO same. This selected data Ds is encoded, by performing
FRAMES modular multiplication of Ds and the Generator matrix G.

The proposed approach consists of the following five broad


steps: (1) Construction of Parity matrix P, to obtain the
Generator matrix G for the purpose of encoding at the
senders end(2) Reading the YUV Video (3) Selecting the
pixels for Encoding (4) Decoding (5) Parallelization for
reducing computational complexity.
Each of these are discussed in the following sections

3.1 CONSTRUCTION OF PARITY MATRIX

Construction of LDPC codes are based on Cubic Bezier


curve over Galois fields GF (2m). The systematic generator
matrix G is defined as [P IK] that is used for the purpose of
encoding. While the parity check matrix H defined as [I N-K
PT] is used for the purpose of decoding.
The coefficients of the Bezier curve over GF (2m) are used
for the construction of Parity matrix. The first row of the
Parity matrix is the coefficients of the Cubic Bezier curve
over GF (2m). The Remaining rows are obtained by shifting
the coefficients of the Bezier curve to the left using shift
register. The Parity matrix so obtained is of size 2m X2m.
The parity matrix P has the following important properties.
Any ith row or jth column is the transpose of the
other.
Also (P.PT) over GF (2m) = I2^m; where PT is the
transpose of P.
The systematic generator matrix G is obtained by appending
I2m which is 2mX2m Identity matrix, to the Parity matrix P,
thereby making the generator matrix of size 2 mX2m+1.
Figure 5: Selective Encoding in Video frames
3.2 SELECTIVE ENCODING
In Selective encoding, the repeated data is replaced by zero.
Let MXN be the size of the Video Frame to be encoded and The following example illustrates the methodology used in
MXN1 be the encoded Video Frame. In selective encoding, selective encoding. Let D be the data that needs to be
the encoded data is generated by multiplying the selected encoded and the pixel values form 200-215 that needs to be
digits of the message and the generator matrix G over Galois encoded is chosen from one of the rows of a Video Frame.
field GF (2m). D= [200, 201, 201, 201, 201, 201, 205, 206, 208, 209, 210,
This encoded data is obtained by performing modular 210, 210, 210, 211, 215]. After selecting the data to be
multiplication of the selected N digits of data and the encoded, the repeating pixel values are replaced by zeros
constructed generator matrix G over Galois field GF (2 m). leading to Ds=
The code word C is given by C= [D][G] [200,0,0,0,0,201,205,206,208,209,0,0,0,210,211,215].
These N1 digits of code vector C is of the form C= [C1 C2 Ds, when multiplied with G over GF (2 m), give the
C3 C512] where the first 2m digits of codeword codeword C. It is seen that in selective encoding, replacing
C are the checksum produced and the remaining 2m digits is the repetitive pixel values by zero, reduces the number of
the information. multiplication operation leading to increase in speed of
Figure 5 shows the flow chart used in Selective encoding. encoding.
An uncompressed raw video is accepted as an input and is
converted to .mpg format using the FFMPEG line command 3.3 PROPOSED DECODING
tool. The number of video Frames, of this .mpg video is
determined. Further, the size of each video Frame is The decoder has to recover the original data from the
determined. Processing on each Video Frame is performed received code vector sent by the transmitter, without
parallely. In every ith row of the Video Frame, if two requesting for re-transmission. To recover the original data
consecutive data digits data(i) and data(i+1) are the same, without re-transmission being performed, the FEC Codes
then the first digit data(i) is replaced with a zero. This are applied. In LDPC, each row of the encoded Video Frame
process continues till all the 2m digits of data have been has 2m+1 digits of data that is given as input to the decoder
checked for repetition with its adjacent value. This selected which consist of 2m digits of checksum and 2m digits of
data denoted as Ds has zeros when adjacent values are the
137
IJRITCC | February 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 2 133 143
_______________________________________________________________________________________________
information. The Received vector R has 2m digits of Figure 6 shows the flowchart of the proposed decoding.
checksum and 2m digits of information. Each Video Frame is processed Parallely. The syndrome is
The decoder calculates the syndrome after obtaining this calculated for every ith row of every received Video Frame.
received vector. This syndrome S is calculated using If the Syndrome S is Zero, then the received vector is error
S=R.HT by performing modular multiplication over GF (28), free else, the decoder determines the location of the error, by
where R is the received vector and H is the parity check determining the first zero syndrome digit. The checksum
matrix. The syndrome is 2m digits denoted as S= [S1 S2 S3 equation corresponding to the zero syndrome digit is used to
S4 S2m] where S GF (2m). correct the errors. This corrected data is denoted as V. Thus
If the Syndrome S is Zero, then the received vector is error each received video frame is made error free.
free else, the decoder determines the location of the error.
The error location is determined by referring to the Parity
Check matrix H.
To illustrate this with an example, if the Syndrome S1 is
Zero and the syndrome digits [S2...S256] is Non-zero, then
according to the Parity Check matrix H, the received data
has errors in the position 107 to 256. These P digits of
errors can be corrected using the checksum equation
C256=2RI2+ 6RI3+ 7RI4+10RI5+15RI6+17RI7+ 21RI8+
23RI9+ 31RI10 + 32RI11 + 36RI12 +. 252RI105 +
255RI106.
The following Table 4 illustrates some of the Zero
Syndrome value and the possible error location, which is
determined using the parity check matrix.

Zero Syndrome Error in position

S1 (RI107- RI256)

S8 (RI100-RI249)

S16 (RI92-RI241)

S32 (RI76-RI225)

S64 (RI64-RI193) Figure 6: Proposed Decoding

S128 (RI1-RI129) &(RI236-RI256) The figure 7 shows the pseudo code for correcting errors in
M video frames when any of the Syndrome digits between
S255 (RI1-RI2)&(RI109-RI256) S4 to S106=0
parfor ie=1:M /* using parallel for loop for M video frames
Table 4: Syndrome values for i=1:103-ki+k2
tempz2(i+1)= atable(tempz2(i)+1,tempz1(i)+1);
. end
These erroneous digits can be corrected by determining the if((s(inew,3+ki)==0)&(tempz2(104-
first zero syndrome digit. The checksum corresponding to ki+k2))~=cv{ie}(inew,3+ki-k2))
the identified zero syndrome digit is used to correct errors. for i=1:103-ki+k2
After correcting the errors, the consecutive zeros will be tempz4(i+1)=atable(tempz4(i)+1,tempz3(i)+1);
replaced by the right most non zero pixel value. The end
following example illustrates the removal of consecutive tempz5=atable(tempz4(104-ki+k2)+1,r(inew,3+ki-k2)+1);
zeros after the error correction is performed by the decoder. tempz6=1;
If the corrected vector Vc is obtained as tempz7=1;
[200,0,0,0,0,201,205,206,208,209,0,0,0,210,211,215] , then while(tempz7~=0)
by replacing all zeros with the right most non zero value the tempz8=ptable(255,tempz6);
final decoded vector V would be, V=[200, 201, 201, 201, tempz7=atable(tempz5+1,tempz8+1);
201, 201, 205, 206, 208, 209, 210, 210, 210, 210, 211, 215]. tempz6=tempz6+1;
Mean Square Error can be calculated between the Data D if(tempz6==256)
that was encoded selectively before transmission and the tempz6=1;
decoded data V at the receiver, to check for equality. break;
The speed of error correction is increased, as the repeating else
consecutive pixel values are replaced by zero. continue;
end
138
IJRITCC | February 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 2 133 143
_______________________________________________________________________________________________
end
r(inew,360-ki+k2)=tempz6-1;
else
r(inew,360-ki+k2)=r(inew,360-ki+k2);
end
end

/*All the additions and multiplications are over Galois field


GF(28)*/

Figure 7: Pseudo code

The proposed algorithm for encoding and decoding is


verified for a Video Frame by taking different cases and is
discussed in the following section.
If the Video Frame to be transmitted is denoted as V, then
the encoded Video Frame denoted as CV is obtained by
performing matrix multiplication of the selected pixel values
of every Video Frame and the Generator matrix G, over GF
(28). The encoded Video Frame is transmitted by the sender.
Figure 8: Classification of variables
The receiver calculates the syndrome to know whether the
received Video Frame is modified. If the Syndrome is zero,
To improve the time complexity of the proposed method,
then the Video Frame received is error free else the Video
the MATLAB parfor construct is used, as discussed above,
Frame has to be recovered from the erroneous Video Frame.
in our test videos, so that multiple Video frames are handled
The Mean Square Error is calculated between the Original
by multiple workers in parallel.
Video Frame and the decoded Video Frame. The Mean
Square Error (MSE) measures the difference between the
The coding for the proposed algorithm is done in MATLAB.
Original Video Frame and the estimated Video Frame.
The video considered for experimental purpose is
1 n
The MSE is given
n i 1
( Xi Xi ) 2
where Xi are the
foreman.yuv. This .yuv video is converted to .mpg using
line Command tool FFMPEG. This .mpg video has a
sequence of 152 frames, with each frame being a JPG image
pixel values of the estimated Video Frame and Xi are the of size 352X288. BER is considered to draw conclusions
pixel values of the Original Video Frame. about the algorithm. The Bit Error Rate (BER) is the number
of bit errors divided by the total number of transferred bits
The coding for the proposed algorithm is done in MATLAB. during a time interval.
BER is considered to draw conclusions about the algorithm.
The Bit Error Rate (BER) is the number of bit errors divided Case 1: Selective encoding
by the total number of transferred bits during a time interval. Here for the purpose of experimentation, noise has been
introduced randomly. The BER is a parameter used to derive
3.4 PARALLELIZATION conclusion about the performance of the algorithm. 1st and
8th Video frame has been randomly chosen experimental
Handling video files is computationally much more purpose. The BER is taken as 612/1289 in the case of 1st
intensive as compared to images. When a large dataset is Video Frame and 663/1408 in the case of 8th Video Frame.
used, the implementation and the experimentations involve Figure 9a, b, c, d shows the 1st Video Frame, 1st Encoded
considering the time complexity. Parallel computing is a Video Frame, 1st modified Video Frame and the 1st
solution to this problem. Recovered Video Frame. Non repeating pixel values of the
In MATLAB parallel processing tool box, the basic original Video Frame is encoded and transmitted. The
parallelization approach uses the parfor construct to execute encoded Video Frame is obtained by performing modular
independent passes through a loop [18]. Each variable in the multiplication of the selected pixel values of the Video
parfor loop are classified as shown in Fig. 8. In the code Frame with the generator matrix over GF (28). Error has
snippet shown in Fig. 8, the loop variable represents the been introduced randomly. At the receivers end, a modified
loop index. Sliced variables are arrays whose segments are Video Frame due to the introduced error has been obtained.
operated on in different iterations of the loop. Broadcast Now the decoder identifies the error by calculation of the
variables are defined before the loop begins, and are syndrome values. Based on these values, errors are corrected
required within the loop, but never assigned values inside to retrieve the original Video Frame.
the loop.
Reduction variables are those which accumulate values
across multiple iterations of the loop, regardless of iteration
order. Temporary variables are created inside the loop, and
never accessed outside the loop.

139
IJRITCC | February 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 2 133 143
_______________________________________________________________________________________________
from S108 to S168 and S228 to S240 and has been
eliminated using the decoding algorithm. 48,132, missing
pixel values are corrected using the proposed algorithm.

Figure 10a, b, c, d shows the 8th Video Frame, 8th Encoded


Video Frame, 8th modified Video Frame and the 8th
Recovered Video Frame.

Figure 9a: 1st video frame; Figure 9b: Selectively encoded


1st Video frame

Figure 10a: 8th video frame; Figure 10b Encoded 8th Video
Frame

Figure 9c: Received 1st video frame; Figure 9d: Corrected


1st Video frame
Figure 9b shows the encoded Video Frame that needs to be
transmitted. The dots in the encoded Video Frame indicate
the repeating pixel values that have been replaced by zeros.
Figure 9c, shows the modified Video Frame (the darkened Figure 10c: Received 1st Video Frame; Figure 10d:
portion of the Video Frame) has non zero syndrome values Corrected 1st Video Frame
140
IJRITCC | February 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 2 133 143
_______________________________________________________________________________________________
Case2: With Selective Encoding
Here for the purpose of experimentation, White Gaussian
Noise with value of mean=0.3 and variance=0.1 has been
introduced. The BER is a parameter used to derive
conclusion about the performance of the algorithm and is
taken as 1000/2048 in this case.
The proposed algorithm is tested for various values of mean
and variance 2.
141st Video frame has been randomly chosen experimental
purpose.
Figure 11a, b, c, d shows the 141 st Video Frame, 141st
Encoded Video Frame, 141st modified Video Frame and the
141st Recovered Video Frame. The original Video Frame is
selectively encoded and transmitted. The encoded Video
Frame is obtained by performing modular multiplication of
the non repeating pixel values of the Video Frame with the
generator matrix over GF (28). Error has been introduced by
white Gaussian noise. At the receivers end, a modified
Video Frame due to the introduced error has been obtained.
Now the decoder identifies the error by calculation of the
syndrome values. Based on these values, errors are corrected
to retrieve the original Video Frame.

Figure 11c: Received 141st Video Frame; Figure 11d:


Reconstructed 141st Video frame

Figure 11a, shows the 141st video frame. Figure 11b shows
the selectively encoded Video Frame. Figure 11c, shows the
141st video frame that is received and has 49,500 missing
pixel values and has been corrected using the decoding
algorithm. This reconstructed 141st Video Frame is shown in
Figure 11d.

A mean square error of zero is obtained between the original


video frame and the encoded video frame that implies the
corrected video frame to be same as the original video
frame. Figure 12 shows the mean square error between the
original 141st video frame and the encoded 141st video
frame, as well as the mean square error between the original
video frame and the corrected video frame.

Figure 11a: 141st Video Frame; Figure 11b: 141st selectively


encoded Video frame
141
IJRITCC | February 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 2 133 143
_______________________________________________________________________________________________
Figure 12: Mean Square Error of Original Video Frame and Table 5: Comparative execution times (msec) for selective
Corrected Video frame. encoding of video frames with Parallelization and without
From figure 12, the Mean Square Error between the original Parallelization
video frame and the encoded video frame is close to 125, From Table 5, it can be inferred that the proposed
which implies many of the repeating consecutive pixel parallelization approach has helped to improve the time
values are replaced by zeros. The Mean Square Error complexity while reconstructing the video frames.
between the original video frame and the Corrected video Figure 15 shows the graph of the execution time with and
frame is 0, indicating both the video frames to be the same, without parallelization.
after performing selective encoding and selective decoding.
In Selective encoding, the repeating consecutive values are
replaced by zeros.

IV. RESULTS

Figure 13 shows a plot of the execution times for different


values of BER with using selective encoding and without
using selective encoding. When Selective encoding is used,
the repeating consecutive pixel values are replaced by zeros.
The number of modular arithmetic operations gets
significantly reduced. Thus the decoding time for selective
encoding is lesser compared to the method which does not
use selective encoding.

Figure 15: Comparative execution times, with and without


parallelization

It can be inferred that using Parallelization, selectively


encoding the Video Frames reduces the execution time
significantly.

V. CONCLUSION

This paper, establishes the working of Selective Encoding


using LDPC with cubic Bezier curve over Galois field GF
(28). Bezier curves are used for the construction of the
generator matrix G and parity check matrix H. The
Figure 13: Comparison between Selective Encoding and generator matrix is used for encoding while the Parity check
without selective encoding. matrix is used for decoding.
The proposed decoder is able to detect and correct errors in
Table 5 shows the significance of using parallelization to Video frames. These video frames of size 352X288 can be
improve the time complexity of the decoder. reconstructed from modified Video frames, which have
52,800 missing pixel values.
Data Selective Selective Encoding The proposed algorithm uses Selective Encoding, where in
Encoding Without With Parallelization the repeating consecutive pixel values of the video frame are
parallelization using Workers in replaced by zeros. Using this approach, it is possible to
MATLAB encode a few non zero pixel values. The Encoding involves
Video1 220.8333mSec 3.680mSec modular arithmetic operations. At the receiver, decoding a
with 60 few pixel values still preserves the concept of Error
frames detection and correction.
Video2 368.0555mSec 5.52mSec Selective encoding speeds up the encoding and decoding
with 100 process as the repeating consecutive pixel values are
frames replaced by zeros, thus enhancing the speed of
Video3 568.992mSec 7.48mSec communication.
with 152 It is found that this method is more convenient as the
frames encoding and the error correction involves modular addition
over Galois field and also reduces the hardware complexity.
142
IJRITCC | February 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________
International Journal on Recent and Innovation Trends in Computing and Communication ISSN: 2321-8169
Volume: 5 Issue: 2 133 143
_______________________________________________________________________________________________
Parallelization reduces the time complexity due to the usage Research and Applications www.ijera.com ISSN : 2248-
of parfor loop construct in MATLAB. 9622, Vol. 4, Issue 1( Version 4), January 2014, pp.94-97.
[9] M. P. C. Fossorier, M. Mihaljevic, and H. Imai, "Reduced
complexity iterative decoding of low density parity check
nodes based on belief propagation," IEEE Trans. on
REFERENCES Communication., vol. 47, no. 5, pp. 673- 680, May 1999.
[10] J P chen and M P C Fossorier Density evolution for two
[1] Costello Daniel J, J., Imai H, Wicker S.B, Applications improved BP-based decoding algorithm for LDPC codes ,
of Error-Control Coding, IEEE Transactions on IEEE Communication letters, vol 6, no.5, pp 208-210, May
Information Theory, Vol. 44, No. 6, October 1998 . 2002
[2] Ph.D thesis onby Azmi, M.H, UNSW Design of low- [11] Meng Xu, Jianhui Wu, Meng Zhang, A modified offset
density parity-check codes in relay channels Electrical Min-sum decoding algorithm for LDPC codes, 3rd IEEE
Engineering & Telecommunications, 2012, Faculty of International Conference on computer science and
Engineering . information technology, (ICCSIT), vol 3, 2010.
[3] Sheryl L. Howard , C.S.a.K.I, Error control coding in [12] Jaehong Kim, Aditya Ramamoorthy, The Design of
wireless sensor networks EURASIP Journal onWireless Efficiently Encodable Rate- Compatible LDPC
Communications and Networking, DOI CodesIEEE transactions on communications, vol.57, no.
10.1155/WCN/2006/74812, Volume 2006, Article ID 2, February 2009.
74812, Pages 1-14. [13] L. Barnault and D. Declercq, "Fast Decoding Algorithm
[4] I. S. Reed and G. Solomon, "Polynomial Codes over for LDPC over GF (2^q), The Proc. 2003 Inform. Theory
Certain Finite Fields," SI AM Journal of Applied Workshop, pp. 7073, 2003
Mathematics, 1960, Volume 8, (pp. 300-304 ). [14] Robert Gallager, Low Density Parity Check Codes ,[On-
[5] Sanjeev kumar, R.G., Performance Comparison of line] http://www.rle.mit.edu/rgallager/documents/ldpc.pdf
Different Forward Error Correction Coding Techniques for [15] Shu Lin, D.L.C., "Error Control coding fundamentals and
Wireless Communication Systems (I S S N : 2 2 2 9 - 4 3 application", 2nd Edition, Editor, Prentice Hall series in
3 3 ( P r i n t ) | I S S N : 0 9 7 6 - 8 4 9 1 (On l i n e )) . computer application in Electrical Engineering.
[6] V.S.Ganepola et.al Performance study of non-binary [16] Weisstein, Eric W, Bzier Curve, From MathWorld--A
LDPC codes over Galois field CSNDSP08, IEEE, 2008 Wolfram Web
[7] Padmini U Wasule, Shubhagini Ugale, Review paper on Resource. http://mathworld.wolfram.com/BezierCurve.htm
decoding of LDPC codes using Advanced Gallagers l
algorithm, IJAICT Volume 1, Issue 7, November 2014. [17] The Encyclopedia of design theory: Galois fields by Peter
[8] AlinSindhu A Galois field based very fast and compact J.Cameron, May 30, 2003.
error correcting technique Int. Journal of Engineering [18] World wide web:
http://in.mathworks.com/help/distcomp/parfor.html

143
IJRITCC | February 2017, Available @ http://www.ijritcc.org
_______________________________________________________________________________________

You might also like