Page 1

Performance Study of an Enhanced Adaptive FEC for

Wireless Media Streaming

Peng Zhang, Yong Jin, Hang Shen, Guangwei Bai

Department of Computer Science and Technology

Nanjing University of Technology

Nanjing, China

penny_njut@163.com, bai@njut.edu.cn

Abstract—This paper proposes an enhanced adaptive

forward error correction (EAFEC) algorithm based on cross-

layer design for wireless media streaming, in the hope that the

media could be played on receivers with high quality. This

algorithm, which uses the Poisson process to predict the current

network condition, can adjust the sending rate of MPEG video

frame adaptively and allocate the network bandwidth resource

between MPEG video source data and redundant data

dynamically. Our mathematical analyses and simulation results

show that EAFEC mechanism achieves better quality of media

streaming comparing with original FEC, in terms of playable

frame rate, reliability and real-time performance on the receiver.

Keywords adaptive FEC, wireless multimedia streaming

performance, end-to-end QoS, cross-layer design

I.

INTRODUCTION

The real-time delivery of multimedia data over wireless

links is a big challenge due to the unreliable and dynamic

characteristics of wireless networks, limited bandwidth and

QoS requirements for multimedia applications.

The QoS guarantee for wireless real-time media streaming

has been fairly well studied in the literature [1-8]. Q. Zhang et

al. proposed a cross-layer policy to provide efficient QoS

support for different types of media over wireless Internet [1].

A mechanism of allocating bandwidth to support video

applications by using the best-effort method is suggested in [2].

An adaptive QoS framework is proposed in [3], based on two

layers of feedback, application QoS and transmission QoS. The

different FEC error control technologies are considered to

combat the different types of packet loss in the heterogeneous

network in [4]. In [5, 7, 8], hybrid FEC/ARQ method was

adopted. A frame decoding model that takes into account the

frames types and the dependence among frames was presented

in [6]. An optimized algorithm which is adopted to allocate

bandwidth resource between the source video data and FEC

data can efficiently adapt to the fluctuation of network state

and to maximize the playable frame rate on receiver.

However, there are some drawbacks in all the methods and

research findings explained above. The information from the

data link layer is not related to the adaptive QoS framework

proposed in [3]. The real-time performance of media streaming

transmission is unconcerned in [4]. The reliability and real-time

performance of that is not mentioned in [2]. How to allocate

bandwidth dynamically was not considered in [5, 7, 8]. The

influence of information from the data link layer on the quality

of video transmission is not concerned in [6].

The purpose is, based on cross-layer design, to contribute

towards an enhanced adaptive forward error correction

(EAFEC) algorithm for wireless media streaming, in order that

the media could be played on receivers with high quality. The

main idea is that the maximum retransmission number at the

data link layer will be mapped to the round trip time (RTT) and

the packet loss rate. The video data is encoded by the FEC

algorithm at the application layer. Using the Poisson process to

predict the current network condition, our mechanism adjusts

the sending rate of MPEG video frames adaptively, and

allocates the network bandwidth resource between MPEG

source video data and redundant data dynamically. As a result,

we obtain the maximal number of playable frames and improve

the reliability and real-time performance.

The remainder of this paper is organized as follows. Section

II proposes the enhanced adaptive forward error correction

mechanism based on cross- layer design. Section III presents

the performance analyses and evaluation of the proposed

mechanism in both analytic and simulation approaches. Finally,

Section IV concludes the paper.

II.

ENHANCED ADAPTIVE FORWARD ERROR CORRECTION

MECHANISM

In this work, we assume that the data can be correctly

transmitted in the reverse channel, then the response

information is correctly received and the correlation of forward

channel is described by the Markov model.

A. RS Encoder

To meet the real-time performance requirement of video

transmission, we use the forward error correction (FEC)

technology. The source video stream is encoded by the RS(n,k)

encoder. Note that the number of packets that are generated

from the video frames is denoted by k and the number of

redundant packets which are made from k source packets is

denoted by n-k and n is the total number of data packets

transmitted. Let P(n,k) denote the probability that a k-packet

video frame is successfully transmitted with n-k redundant

FEC packets, which is given by equation (1).

This work is supported by the following projects: 1) National Natural

Science Foundation of China under Grant No. 60673185; 2) the Scientific

Research Foundation for the Returned Overseas Chinese Scholars by the State

Education Ministry China; 3) Qing-Lan Project Foundation of the Jiangsu

Province, China.

Page 2

()

( )

l

∑

=

−=

−

n

kl

lnln

ppknP) 1 (,

(1)

Where p denotes the average packet loss probability

B. The GOP Structure and the Definition of Wireless

Network Condition

The MPEG algorithm uses a combination of intra coding

and interframe coding. Three frame types are defined, i.e.,

intra coded frames I-frames, predictive coded frames P-frames

and bidirectionally-predictive coded frames B-frames. The

three frame types are organized in a so-called group of picture

(GOP). A sample GOP structure is IBBPBBPBBPBBPBB.

According to [6], there are five parameters used to define the

GOP structure, that is, NF represents the number of frames in a

GOP; NP represents the number of P-frame in a GOP; SI

represents the size of I-frame; SP represents the size of P-

frame; SB represents the size of B-frame.

In this work, we describe the wireless network condition

with four parameters. Let Pf be the frame loss probability at

the data link layer; let Nmax be the number of maximal

retransmission; let tRTT be the round trip time; let Rcur be the

achieved bandwidth of sending a GOP.

C. Adaptive Forward Error Correction Algorithm

The variation of the achieved bandwidth of sending a GOP,

which is caused by the unreliable and dynamic quality of

wireless channel, influences the number of decodable frames

in a GOP. When the bandwidth is insufficient, the main

problems are which frames in a GOP should be selected to be

sent, and how to allocate the remained bandwidth, in order to

ensure the maximum number of playable frames.

In accordance with [6], the foregoing problems can be

described as

⎪⎪

⎩

⎪⎪

⎨

⎧

∑

∈

f

∑

∈

f

∑

∈

f

=

⎥⎦

⎥

⎢⎣

⎢

≤+=

D

gop

DD

CUR

fEfE

S

R

f fecf SizeFD BWts

][ max][

][][),(. .

(2)

Where D represents the set of frames to be sent in a GOP; F

represents the allocation scheme of FEC data; E[fgop]

represents the number of decodable frames in a GOP; E[f]

represents the correctly decodable probability of a frame;

BW(D,F) represents the full bandwidth of current transmission

mechanism; Size[f] represents the size of a frame; fec[f]

represents the FEC data allocated to a frame; S represents the

size of a data packet.

The decodable probability of a frame E[f] is determined by

the frame type. We have four equations (3)~(6) to compute the

value of E[f] respectively, referring to equation (1) and [6].

))(),((][IkInPIE

=

(3)

))(),((*][][

1

∏

=

j

=

i

jji

PkPnPIEPE

(4)

))(),((*))(),((*][][

1

ijij

i

l

llij

BkBnPPkPnPIEBE

∏

=

=

(5)

))(),((*))(),((*][][

1

2

ijijl

N

∏

=

l

lij

BkBnPPkPnPIEBE

P

=

(6)

A frame decoding model was proposed in [6] based on

analyzing the video frame types and the dependency among

MPEG frames. Take IBBPBBPBBPBBPBB in every GOP as

an example. The frame decoding dependency sequence is

given by I0P1B11B12P2B21B22P3B31B32P4B41B42B01B02. We can

find a solution of formula (2) according to frame decoding

dependency sequence. First, we find the set of all

combinations of sending frames. Second, the FEC bandwidth

should be allocated according to frame decoding dependency

sequence. Finally, we will obtain the combination of the

sending frames which is the maximum number of decodable

frame by computing number of decodable frames respectively

and the result how to allocate the bandwidth.

However, it is not concerned that the influence of

retransmission at the data link layer on the end-to-end delay

and achieved bandwidth in the algorithm. Obviously, the

performance will be improved if we combined some

information of the data link layer with the algorithm.

D. Enhanced Daptive Forward Error Correction Algorithm

In this section, the EAFEC mechanism is proposed to

improve the foregoing algorithm in performance. The basic

idea is that the source video data frames of the sender are

encapsulated to data packets size of S and some redundant

data packets are generated by using RS encoder, which is to be

sent together with the video source data packets for improving

the reliability of the video data transmission. At the data link

layer, every data packet is divided into m data frames, which

are stored in the queue. When the data frames are transmitted

at the data link layer, some data frames may be error or lost

because of the unreliable and dynamic characteristics of

wireless networks, then the sender will retransmit those data

frames. Let Nmax denote the maximum number of

retransmission. Retransmission at the data link layer clearly

improves the probability of correctly received frames;

however, retransmission increases the round trip time at the

transport layer. Therefore, the throughput can be improved

and the quality of video transmission will be enhanced if

retransmission at the data link layer is completed before the

timeout at the transport layer. Otherwise, the retransmission

competition between the data link layer and the transport layer

will occur, and decrease the throughput of wireless network.

The number of retransmission depends on the wireless

channel condition. However, the number is equal or lesser

than Nmax. The data frame will be discarded if it has not been

correctly received after having been retransmitted up to Nmax.

Thereby the data packet, which the frames belongs to, will be

discarded. Let Pf denote the frame loss probability.

Hence, packet loss probability of the wireless link is

determined by equation (7).

Page 3

m

tw

PP

−= 1

(7)

Where Pw is the packet loss probability; Pt is the probability

of every data frame received correctly in a packet; m is the

number of data frames in a packet. Let pf be frame loss

probability. Thus we have

1

2

f

max max

1) 1 () 1 () 1 (

f

p) 1 (

=

+

−=−++−+−+−

N

ff

N

fffft

pppppppP

?

(8)

We can obtain Pw from the equation (7) and equation (8).

Since the retransmission number of every data frame is

different then the average retransmission number of every

frame is denoted byNavg, which is expressed by equation (9).

max

N

f

p

max

N

f

p

max

N

+

1

1 (

max

N

2

1 (

f

p) ) 1

−

()2) 1 (

f

p

=

fff avg

pppN

−++−+−

−

?

max

N

f

p

3

f

2

ff

ppp

++++=

?

(9)

Let Tavg denote average delay of transmitting a frame, which

is expressed by equation (10).

) 1 (

avgavg

NTT

+=

f

N

f

p

p

T

ma

−

−

=

+

1

1

1

(10)

The delay of transmitting a frame at the data link layer is

denoted by T. The round trip time of a packet that is caused by

retransmission at the data link layer is denoted by TTOL, which

is expressed by equation (11).

avgTOL

mTT

=

(11)

We use the TCP-friendly rate control protocol to ensure the

fairness in channel bandwidth allocation and the smoothness

of sending rate at video application to adjust to the variation of

wireless channel. Padhye et al. [9] analytically derived the

following TCP equation:

()

() sbytes

pp

p

RTO

t

p

RTT

t

S

⎛

R

/

2

321

8

3

3

3

2

++

=

⎟⎟

⎠

⎞

⎜⎜

⎝

(12)

Where p is the average packet loss probability; tRTO is TCP

retransmission timeout threshold; tRTT is the round trip time; S

is the size of a data packet. R provides an upper bound of the

network bandwidth.

Thus we can obtain the efficient bandwidth of current

network, which is denoted by R, referring to Pw, TTOL and

equation (12). We assume the generating rate of video frame is

30 frames per second, the GOP structure is IBBPBBPBBPBB

PBB, so the achieved bandwidth of sending a GOP is decided

by Rcur, which is given by equation (13).

2/RRcur=

(13)

The above mathematical analyses demonstrate that the

enhanced adaptive forward error correction (EAFEC)

algorithm can utilize the link bandwidth sufficiently and

improve both the reliability and real-time performance of

media streaming significantly. The next section will focus on

performance study of the algorithm in simulation approach.

III. PERFORMANCE EVALUATION

In this work, we use NS-2 to simulate, analyze and evaluate

the performance of wireless media streaming with EAFEC.

The simulation environment is illustrated in Table I. The

source material used in this work is a MPEG-compressed

media clip taken from the movie “Star Wars IV” (www.tkn.tu-

berlin.de/research/trace/ltvt.html), with GOP structure of

IBBPBBPBBPBB. In the following sections, we analyze the

frame loss process and prove that it follows a Poisson process,

which can be used to predict the current network condition.

Also, we will design and conduct a series of simulation

experiments with focus on frame loss probability.

A. Counting Process

A stochastic process {N(t),t≥0} is said to be a counting

process where N(t) represents the number of occurrences in

the interval (0,t]. If we let N(t) be the number of frame loss at

the data link layer, then {N(t),t≥0} is a counting process of

occurrences corresponds to a frame loss at the data link layer.

We see that for a counting process N(t) must satisfy: (i)

N(t)≥0.; (ii) N(t) is integer value; (iii) If t1<t2, then N(t1)≤

N(t2).; (iv) For t1<t2, N(t2)- N(t1) equals the number of

occurrences in the interval (t1,t2].

Then we denote the time of the first frame loss at the data

link layer by S1. Further, for n>1, let Sn denote the time of the

nth frame loss at the data link layer. In detail, we define the

counting process {N(t),t≥0} as follows.

If 0≤t<S1, then we let N(t)=0. If Sn≤t<Sn+1, then we let

N(t)=n…. Continuing, we can obtain

∑

=

n

∞

≤

=

1

)(

)(

tSn

ItN

.

B. Poisson Process

Suppose that {N(t),t≥0} is a Poisson process, thus when

N(t)=n, the conditional probability density of the sequence of

interval times, that is S1 , S2, … Sn, is

TABLE I.

PARAMETER SETTINGS

Parameters

Simulation time

Topology size

Number of mobile nodes

Traffic type

Packet size

Routing protocol

MAC protocol

Pause time of mobile nodes

Motion & Traffic model

Number of sessions

Maximal speed

T

NF

NP

SI

SP

SB

m

Nmax

value

1500sec

800m*800m

50

MPEG-4 video

1500bytes

AODV

IEEE802.11

0sec

Random

1

10m/sec

0.01sec

15

4

20bytes

12bytes

3bytes

6

1~4

Page 4

{

,0 ,

!

., 0

21

21

),,,(

tttt

t

n

elsewhere

n

n

n

tttf

≤<<<<

=

?

?

(theorem 1)

Null hypothesis: H0: {N(t),t≥0}is a Poisson process. We

n

kn

S

1

let

∑

=

k

=σ

. When

0

H is true, we obtain

2

}{}{})(| E{

1

)(

1

)(

nT

YEYEnTN

n

i

i

n

i

n

∑

=

in

∑

=

n

∑

=

∑

=

====σ

(14)

12

}{}{})(|{

2

1

)(

1

)(

nT

YDYDnTND

i

i

i

in

====σ

(15)

by the theorem 1.

Note that

} 1 ,

)

{

(

niYi

≤≤

are independent identically distributed,

. Considering the central limit theorem, there exists

], 0 [U~

)(

tYi

duexx

nT

12

T

n

2

Y

PnTNx

n

T

T

n

2

P

x

u

n

i

i

n

n

n

∫

∑

=

∞−

−

∞→∞→

=Φ=≤

−

==≤

−

2

2

1

)(

2

2

1

)()

(lim})(|

12

{ lim

π

σ

(16)

For n which is large enough, we have

)())( | ])

3

([

2

1

(

2

1

xnTN

n

xn

T

P

n

Φ≈=+≤

σ

(17)

When

])

3

( 96. 1

±

[

2

1

2

1

n

n

T

n

∈

σ

at the confidence level

05 . 0

=∂

we do not reject H0; otherwise we reject H0.

We do not reject H0 with the simulation experiment result.

In other words, the counting process {N(t),t≥0} i.e. frame loss

process at the data link layer follows a Poisson process. So we

can obtain the value of parameter λ by using the maximum

likelihood estimation.

The frame loss process at the data link layer, referred to as

{N(t),t≥0}is a Poisson process, the value of S1,S2,…,Sn which

are observed at the interval [0，T] satisfy t1,t2,…,tn≤T (the

value of T is given by us).Consequently, the likelihood

function is denoted by

ttL,,(

21

?

Tn

n

et

λ−

λλ

,

=

),

.

Letting

0

=

λ

d

dL

, the value of parameter λ is as follow:

«½

T

n

=

λ

(18)

Since {N(t),t≥0}is a Poisson process, the probability density

n

kn

XS

1

function of

∑

=

k

=

is

) 0( ,

)()!1(

)(

n

)(

1

1

≥

Γ

=

−

=

−−−

−

tet

n

e

t

tf

tn

n

t

n

n

λλ

λλλ

(19)

Note that we denote the Гfunction by

)!1()(

−=Γ

nn

.

Hence, the probability density function of

∫

=∂Γ

∞

0

−−∂

1

)(dxex

x

and

n

S

λ

2

is

) 0(

)

2

2

(2

1

)(

2

1

2

2

2

2

≥

Γ

=

−

−

tt

n

tg

t

e

n

n

n

(20)

Because this is equal to the density of

the following equation

)2 (

2

n

χ

, we obtain

n

S

λ

2=

)2 (

2

n

χ

(21)

We denote confidence degree by

∂−

1

, then

∂−=≤≤

∂

2

−

∂

2

1))2 (2)2 ((

2

1

2

nSnP

n

χλχ

(22)

Consequently, when the confidence degree of λ is

equivalent to

∂−

1

, the confidence interval of λ is

]

2

)2 (

,

2

)2 (

[

2

−

2

S

1

2

∂

2

nn

n

S

n

∂

χχ

(23)

We obtain the value of parameterλ , which is 15.415977,

according to equation (18). And we obtain the confidence

interval is [15.2183, 15.6157] according to equation (23).

22

n

−

∈

λ

In other words,

]

2

) 2 (

,

2

)2 (

[

2

S

1

2

nn

n

S

∂∂

χχ

. The value of parameter

λ is authentic. We denote the frame loss probability at the data

link layer by

} 1

≥

,{nUn

.

Let

∑

=

k

==

n

kn

XSS

1

0

, 0

,

kk

UX

distributed random variables.

ln

1

−

−= λ

. Clearly

} 1

≥

,{nXn

are independent identically

From above all, we can obtain the value of Uk ,k=1,2,…n.

So we have the probability distribution as shown by Figure

1(a), which completely presents the stochastic property of

discrete random variables.

C. Performance with EAFEC

In accordance with the value of

from the simulation experiment, we analyze and evaluate the

performance of the EAFEC mechanism, including packet loss

rate, delay, achieved bandwidth of GOP, number of decodable

frames, when there are different values of Nmax.

} 1

≥

,{nUn

, which is obtained

Figure 1(b) compares the packet loss rate for different Nmax.

The packet loss rate is obviously decreased, as the value of

Nmax is increased. When the quality of the channel is poor, the

wireless link frame loss rate is increased. Lower packet loss

rate is observed at high Nmax.

Figure 1(c) shows that the wireless link delay is declined

when the value of Nmax is increased. For instance, when frame

loss rate is 0.400018 and the value of Nmax is decreased from 3

to 1, the round trip time for transmitting a data packet

(1500bytes) of the latter is 0.0022sec lesser than the one of the

former. In terms of the GOP structure and some parameters in

Page 5

(a) Frame loss probability (b) Packet loss rate (c) End-to-end delay

(d) Achieved bandwidth of GOP (e) Number of decodable frames

Figure 1. Performance with EAFEC

this paper, there are about 100 data packets in a GOP.

Therefore, the round trip time of transmitting a GOP is

0.22sec lesser than before. Hence, it is efficient to improve the

real time performance of the video transmission to decrease

the value of Nmax when the quality of wireless channel is good.

Figure 1(d) indicates that the achieved bandwidth of GOP

is improved, as the value of Nmax is increased. Because the

packet loss rate is largely declined with the increased value of

Nmax. As a result, the network throughput is enhanced. At the

same time, the round trip time is increased because of the

added value of Nmax. However, comparing with the influence

of decreased packet loss rate, the increased round trip time has

insignificant influence on the throughput.

Figure 1(e) describes that the decodable frames rate in a

GOP is largely enhanced with the increased value of Nmax.

Obviously, with the increase of Nmax, the packet loss rate is

clearly decreased and the throughput is enhanced, reflecting

that the achieved bandwidth of GOP is largely increased and

the decodable frames rate in a GOP is improved.

IV. CONCLUSION

In this paper, an enhanced adaptive forward error correction

(EAFEC) mechanism was proposed for wireless media

streaming. Our research shows that the event of frame loss at

the data link layer follows a Poisson process. That means, the

network condition is able to be predicted by means of the

Poisson process. Then the type of video frame to be sent and

the sending rate are adaptively adjusted and the achieved

bandwidth between source video data and redundant data is

dynamically allocated based on the network state for

achieving the best decodable frames rate. We map the

maximum retransmission number at the data link layer to

round trip time and packet loss rate and adjust the number to

decrease the transmission delay. Our investigations in both

analytic and simulation approaches demonstrate that the

EAFEC algorithm provides a significant improvement in the

reliability and the real-time performance of wireless media

streaming transmission, with adapting to the fluctuation of the

wireless network state dynamically.

REFERENCES

[1] Q. Zhang, W. Zhu, and Y. Zhang, “A Cross-Layer QoS-Support

Framework for Multimedia Delivery over Wireless Internet”, EURASIP

JOURNAL ON APPLIED SIGNAL PROCESSING, Special Issue on

Cross Layer Design for Communications and Signal Processing

Systems, 2005, pp. 207-219.

[2] S. Shah. “Dynamic Channel-Aware Bandwidth Management in IEEE

802.11 Networks”, University of Illinois, Urbana-Champaign, USA,

September, 2005.

[3] ZHANG Zhan-jun. “Guaranteeing End-to-End Adaptive QoS in

Wireless Multimedia Networks”, Chinese Journal of Computers, 2004,

27(8), pp. 1064-1073.

[4] Fan Zhai, Eisenberg Y, and Pappas T N et al., “Rate-Distortion

Optimized Product Code Forward Error Correction for Video

Transmission over IP-Based Wireless Networks”, Proc. of IEEE

ICASSP, 2004, pp. 857-860.

[5] Q. Zhang and S. Kassam. “Hybrid ARQ with Selective Combining for

Fading Channels”, IEEE JSAC, 1999, 17(5), pp. 867–880.

[6] MEI Zheng, “An Adaptive Forward Error Correction Algorithm for

Streaming Video,” Journal of Software, 2004, 15(9), pp. 1405-1412.

[7] R. EI Azouzi, T. Peyre, and A. Benslimane “Optimal design of hybrid

FEC/ARQ schemes for real-time applications in wireless networks” ,

Proc. of ACM WMuNeP, 2006, pp. 11-18.

[8] V. Subramanian, S. Kalyanaraman and K. K. Ramakrishnan “Hybrid

Packet FEC and Retransmission-based Erasure Recovery Mechanisms

(HARQ) for Lossy Networks: Analysis and Design”, Proc. of

WISARD, January 2007, Bangalore, India (Invited paper).

[9] J. Padhye, V. Firoiu, D. Towsley, and J. Kurose, “Modeling tcp

throughput: A simple model and its empirical validation”, Proc. of the

ACM SIGCOMM, 1998, pp. 303-314.

[10] L. Yuan-lie and R. Process, China Tsinghua University Press,

November, 2002.