













Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!














iv
The rapid growth of internet and real time communication, it has been brought under consideration to use the maximum of bandwidth with full efficiency. This lead to the compression of various protocols used for the real time communication. This includes the compression of Real Time Transmission Protocol. My project RTP header compression includes various steps to carry out the compression of main RTP. It comprises of compression of simple real time payload e.g. voice packet. This has been done using linear predictive coding. This compressed voice packet is then been transmitted with compressed RTP. The next phase is to implement simple UDP and RTP headers for analysis purpose. Compression of both headers and other required headers is then done using differential coding technique. Finally the transmission time of voice packet using uncompressed and then compressed header is analyzed for results.
This document is based on RTP header compression. RTP is related to real time data communication such as in VoIP. A brief description of VoIP along with the RTP header compression details is given below. The RTP header compression is basically the coding part of the project. The present document lists the basic concept of the compression part.
VoIP (voice over IP - that is, voice delivered using the Internet Protocol) is a term used in IP telephony for a set of facilities for managing the delivery of voice information using the Internet Protocol (IP).
As the IP network was primarily designed to carry data, it does not provide real-time guarantees but only provides best effort service, which is inadequate for voice communication. The major issues governing transfer of a voice stream over the Internet or using Internet protocols are listed below. ļ· Bandwidth ļ· Mean Opinion Score ļ· Delay
_1. Serialization delay
Speech compression is concerned with obtaining compact digital representation of voice signals to reach more efficient transmission or smaller data size. The objective is to represent speech signal with minimum number of bits yet maintain the perceptual
ļ½ (^) k akz
H z G 1
The LPC analysis of each frame also involves the decision-making process of concluding if a sound is voiced or unvoiced. If a sound is decided to be voiced, an impulse train is used to represent it, with nonzero taps occurring every pitch period. A pitch-detecting algorithm is employed to determine the correct pitch period / frequency. We used the autocorrelation function to estimate the pitch period. However, if the frame is unvoiced, then white noise is used to represent it and a pitch period of T=0 is transmitted.
Autocorrelation (correlating a signal with itself) can be used to extract a signal from noise. Since; ļ· Random noise has a distinctive 'spike' autocorrelation function. ļ· A sine wave has a periodic autocorrelation function ļ· So the autocorrelation function of a noisy sine wave is a periodic function with a single spike which contains all the noise power. The separation of signal from noise using autocorrelation works because the autocorrelation function of the noise is easily distinguished from that of the signal.
RTP which provides end-to-end delivery services for data with real-time characteristics, such as interactive audio and video. Those services include payload type identification, sequence numbering, time stamping and delivery monitoring. Applications typically run RTP on top of UDP to make use of its multiplexing and checksum services [1]. RTP does not provide any mechanism to ensure timely delivery or provide other quality-of-service guarantees, but relies on lower-layer services to do so. It does not guarantee delivery or prevent out-of-order delivery, nor does it assume that the underlying network is reliable and delivers packets in sequence. The sequence numbers included in RTP allow the receiver to reconstruct the sender's packet sequence, but sequence numbers might also be used to determine the proper location of a packet. To guarantee the delivery the data transport is
augmented by a control protocol (RTCP) to allow monitoring of the data delivery in a manner scalable to large multicast networks, and to provide minimal control and identification functionality. RTP and RTCP are designed to be independent of the underlying transport and network layers. To start the basic coding of RTP packet the following are the basic concept used to differentiate between different RTP packet parts.
2.1 RTP payload
It is the data transported by RTP in a packet, for example audio samples or compressed video data.
2.2 RTP header
It is the basic information transported over the network along with the payload. It includes certain fields like the version, padding, marker etc.
2.3 RTP packet
It is the data packet consisting of the fixed RTP header, a possibly empty list of contributing sources, and the payload data. Some underlying protocols may require an encapsulation of the RTP packet to be defined. Typically one packet of the underlying protocol contains a single RTP packet, but several RTP packets may be contained if permitted by the encapsulation method.
2.4 RTCP packet
It is a control packet consisting of a fixed header part similar to that of RTP data packets, followed by structured elements that vary depending upon the RTCP packet type. The formats are defined in Section 6. Typically, multiple RTCP packets are sent together as a compound RTCP packet in a single packet of the underlying protocol; this is enabled by the length field in the fixed header of each RTCP packet.
2.5 RTP session
It is the association among a set of participants communicating with RTP. For each participant, the session is defined by a particular pair of destination transport addresses (one network address plus a port pair for RTP and RTCP). The destination
3.4 CSRC Count (CC)
It takes 4 bits. The CSRC count contains the number of CSRC identifiers that follow the fixed header.
3.5 Marker (M)
It takes 1 bit. The interpretation of the marker is defined by a profile. It is intended to allow significant events such as frame boundaries to be marked in the packet stream.
3.6 Payload Type (PT)
It takes 7 bits. This field identifies the format of the RTP payload and determines its interpretation by the application. A profile specifies a default static mapping of payload type codes to payload formats.
3.7 Sequence Number
It takes 16 bits. The sequence number increments by one for each RTP data packet sent, and may be used by the receiver to detect packet loss and to restore packet sequence. The initial value of the sequence number is chosen randomly for security reasons.
3.8 Timestamp
It takes 32 bits. The timestamp reflects the sampling instant of the first octet in the RTP data packet. The sampling instant is derived from a clock that increments monotonically and linearly in time. The resolution of the clock must be sufficient for the desired synchronization accuracy and for measuring packet arrival jitter. The clock frequency is dependent on the format of data carried as payload and is specified statically in the profile or payload format specification that defines the format, or may be specified dynamically for payload formats defined through non-RTP means. If RTP packets are generated periodically, the nominal sampling instant as determined from the sampling clock is used, not a reading of the system clock. The initial value of the timestamp is random.
3.9 SSRC
It takes 32 bits. The SSRC field identifies the synchronization source. This identifier is chosen randomly, with the intent that no two synchronization sources within the same RTP session will have the same SSRC identifier.
It contains 0 to 15 items, 32 bits each. The CSRC list identifies the contributing sources for the payload contained in this packet. The number of identifiers is given by the CC field. CSRC identifiers are inserted by mixers, using the SSRC identifiers of contributing sources [3].
In recent years voice-over-IP and other streaming media applications in the Internet has grown at a phenomenal rate. As such services become more widely deployed the limitations of best-effort IP transport are becoming apparent, and it is clearly necessary to provide these media streams with some protection from the worst effects of packet loss.
The compression algorithm defined in this document draws heavily upon the design of TCP/IP header compression. The design of this algorithm is based on a combined TCP/IP header compression scheme, which reduces the number of bits in the headers by exploiting the fact that for the duration of the connection, half the bytes in the headers remain unchanged. The remaining compression is then achieved by differential encoding of the changing fields between headers of successive packets. In the CRTP scheme, a further gain is achieved from the fact that the difference of several fields between successive packets is constant, thereby representing a second- order difference of zero. This means that the transmitter need only transmit an initial uncompressed header and first order differences, followed by indications of which fields in subsequent packets have zero second-order differences. The de-compressor must therefore maintain a context consisting of the most recent uncompressed header received, which it combines with each received compressed RTP/UDP/IP header to reconstruct the original headers. For RTP header compression, some of the same techniques may be applied with some extension. However, the big gain comes from the fact that although several fields change in every packet, the difference from packet to packet is often constant and, therefore, the second-order difference is zero. By noting this and passing the first
change at the same time. For example, during an FTP data transfer only the packet ID, sequence number and checksum change in the sender->receiver direction and only the packet ID, acknowledgement, checksum and, possibly, window, change in the receiver->sender direction. With a copy of the last packet sent for each connection, the sender can figure out what fields change in the current packet then send a bit-mask indicating what changed followed by the changing fields. If the sender only sends fields that differ, the above scheme gets the average header size down to around ten bytes. However, it's worthwhile looking at how the fields change: The packet ID typically comes from a counter that is incremented by one for each packet sent. I.e., the difference between the current and previous packet IDs should be a small, positive integer, usually less than 256 (one byte) and frequently = 1. For packets from the sender side of a data transfer, the sequence number in the current packet will be the sequence number in the previous packet plus the amount of data in the previous packet (assuming the packets are arriving in order). Since IP packets can be at most 64K, the sequence number change must be less than 2^16 (two bytes). So, if the differences in the changing fields are sent rather than the fields themselves, another three or four bytes per packet can be saved. This gets us to the five-byte header target. Recognizing a couple of special cases will get us three byte headers for the two most common cases: ļ· Interactive typing traffic ļ· Bulk data transfer But the basic compression scheme is the differential coding developed above. Given that this intellectual exercise suggests it is possible to get five byte headers, it seems reasonable to flesh out the missing details and actually implement something [4].
4.3 Session Context
The compression protocol must maintain a collection of shared information in a consistent state between the compressor and de-compressor. There is a separate session context for each IP/UDP/RTP packet stream. A session context is defined by the combination of the IP source and destination addresses, the UDP source and destination ports, and the RTP synchronization source (SSRC) field. A compressor implementation might use a hash function on these fields to index a table of stored
session contexts. The compressed packet carries a small integer, called the session context identifier, or CID, to indicate which session context that packet should be interpreted in. The de-compressor can use the CID to index its table of stored session contexts. CRTP can compress the 40 bytes of header down to 2ā4 bytes most of the time. At times, the IP/UDP/RTP header cannot be compressed, because of a change in a field that is normally constant. For example, if a particular field (such as the payload type field) changes, then an uncompressed header must be sent [5].
4.4 Un-compressed Headers
As already mentioned, that the information to be communicated is that the second order difference is zero. In that case, the de-compressor can reconstruct the original header without any loss of information simply by adding the first-order differences to the saved uncompressed header as each compressed packet is received. The following headers and their fields are considered for the compression.
Figure 3: RTP Header Compression
In IPv4 header total length, packet ID, and header check-sum fields will normally change. The total length is redundant with the length provided by the link layer, and since this compression scheme must depend upon the link layer to provide good error detection, the header checksum may also be elided. This leaves only the packet ID, which, assuming no IP fragmentation would not need to be communicated. However, in order to maintain loss-less compression, changes in the packet ID will be
it sequence number to establish synchronization between the compressor and de- compressor.
It communicates the IP and UDP headers compressed to 6 or fewer bytes which is often 2 if UDP checksums are disabled, followed by any subsequent headers possibly RTP in uncompressed form, plus data. This packet type is used when there are differences in the usually constant fields of the RTP header. The RTP header includes a potentially changed value of the SSRC field, so this packet may redefine the session context. The format is shown below.
Figure 4: Format of compressed UDP
It indicates that the RTP header is compressed along with the IP and UDP headers. The size of this header may still be just two bytes or more if differences must be communicated. This packet type is used when the second-order difference (at least in the usually constant fields) is zero. It includes delta encoding for those fields that have changed by other than the expected amount to establish the first-order differences after an uncompressed RTP header is sent and whenever they change. The format is shown below.
Figure 5: Format of compressed RTP
It indicates a special packet sent from the de-compressor to the compressor to communicate a list of context IDs for which synchronization has or may have been lost. This packet is only sent across the point-to-point link so it requires no IP header. The format is shown below [6].
The RTP header compression will be implemented after following a few important tasks. The basic tasks and their definition are described below.
The very first task is the study of an over all VoIP Solution. The RTP is the basic protocol being used for real time communication which is today being done in VoIP. To implement the header compression it is necessary to give a detailed study to VoIP solution for real time communication.
The next step is to study in detail VoIP architecture. This includes the study of protocols and the VoIP network and its major issues.
Along with the study of VoIP architecture the next step is to study the technique for compression. Linear predictive coding is the speech compression technique used for this project. This is almost done.
A simple Implementation of a RTP header without RTP header compression is done next. LPC is implemented for this and real time communication between two terminals is then made possible using this implementation which enables to study the deficiencies of our implementation. This task is under progress.
The next task is to analyze and measure the transmission time of packets over various networks (Dial up; GPRS; DSL etc). This is only done if required.
The next task is to compare the already implemented techniques with proposed solution.
The next task is the modification of VoIP implementation with proposed header compression technique.
The last task is measuring the transmission time over various networks. And finally the out come of the project.
Figure 7: Project Time Line