Compression

=An Overview Of Compression Formats=


 * Lossless and lossy compression**

There are two basic categories of compression; lossless and lossy. Lossless compression is a class of algorithms that will allow for the exact original data to be reconstructed from the compressed data. That means that a limited amount of techniques are made available for the data reduction, and the result is limited reduction of data. GIF is an example of lossless images compression, but because of its limited abilities it is not relevant in video surveillance. ZIP and RAR are also examples of Lossless compression.

Lossy compression on the contrary means that the compression data is reduced sometimes to an extent where the original information can not be obtained when the video is decompressed. The difference is called the artifacts. Because of the size of video files, lossy compression has to be used, but as we will see below, advances have been made that keep the file small, the bit-rate fast and the artifacts few.


 * Latency**

Compression involves one or several mathematical algorithms that remove image data. When the video is to be viewed other algorithms are applied to interpret the data and view it on the monitor. Those steps will take a certain amount of time. That delay is called compression latency. The more advanced the compression algorithm, the higher the latency. When using video compression and several adjacent frames are being compared in the compression algorithm, more latency is introduced.


 * JPEG**

The JPEG (Joint Photographic Expert Group) standard is the single most widespread picture compression format of today. It offers the flexibility to either select high picture quality with fairly high compression ratio or to get a very high compression ratio at the expense of a reasonable lower picture quality. Systems, such as cameras and viewers, can be made inexpensive due to the low complexity of the technique.

The artifacts produced sometimes show “blockiness”. The blockiness appears when the compression ratio is pushed too high. In normal use, a JPEG compressed picture shows no visual difference to the original uncompressed picture.


 * MPEG-1**

The first public standard of the MPEG (Motion Pictures Expert Group) committee was the MPEG-1 which first parts were released in 1993. MPEG-1 video compression is based upon the same technique that is used in JPEG. In addition to that it also includes techniques for efficient coding of a video sequence. In Motion JPEG each picture in the sequence is coded as a separate unique picture resulting in the same sequence as the original one.

MPEG-1 is focused on bit-streams of about 1.5 Mbps and originally was for storage of digital video on CDs. The focus is on compression ratio rather than picture quality. It can be considered as traditional VCR quality but digital instead.


 * MPEG-2**

The MPEG-2 project focused on extending the compression technique of MPEG-1 to cover larger pictures and higher quality at the expense of a higher bandwidth usage. MPEG-2 also provides more advanced techniques to enhance the video quality at the same bit-rate. The expense is the need for far more complex equipment. As a note, DVD movies are compressed using the techniques of MPEG-2.

MPEG-2 uses Interframe Compression which is made up of 3 types of frames: I (Intraframe), P (Predictive) and B (Bidirectional). Intraframe is a type of key frame which derive directly from the video and are not calculated from other frames. These I frames are the largest and must store the most data.The Predictive frame is derived frommthe frame before it and specifices how it difers from the frame it follows. P frames are smaller than I frames requiring much less data storage. The Bidirectional frame is computed from both the frames before and after it. B frames are the smallest of the three frames types.

Frames sequences can include any combination of I, P and B frames, but most encoders use a prebuilt fixed pattern such as IBBPBBPBBIBBPBBPBB. This method of compression compares frames by dividing the picture into blocks, typically 8 pixels by 8 pixels. When successive blocks prove sufficiently dissimilar, the change is recorded onto either a B or P frame.


 * MPEG-3**

The next version of the MPEG standard, MPEG-3 was designed to handle HDTV, however, it was discovered that the MPEG-2 standard could be slightly modified and then achieve the same results as the planned MPEG-3 standard. Consequently, the work on MPEG-3 was discontinued.


 * MPEG-4**

The next generation of MPEG, MPEG-4, is based upon the same technique as MPEG-1 and MPEG-2. Once again, the new standard focused on new applications.

The most important new features of MPEG-4 concerning video compression are the support of even lower bandwidth consuming applications, e.g. mobile devices like cell phones, and on the other hand applications with extremely high quality and almost unlimited bandwidth. In general, the MPEG-4 standard is a lot wider than the previous standards. It also allows for any frame rate, while MPEG-2 was locked to 25 frames per second in PAL (the analog television display standard that is used in Europe and certain other parts of the world) and 30 frames per second in NTSC (the analog television system in use in Canada, Japan, South Korea, the Philippines, the United States, Mexico, and some other countries, mostly in the Americas).


 * H.264**

At the end of the 1990s a new group was formed, the Joint Video Team (JVT), which consisted of both VCEG (Video or Visual Coding Experts Group) and MPEG. The purpose was to define a standard for the next generation of video coding. The work was completed in May 2003.

Sometimes the term “MPEG-4 part 10” is used. This refers to the fact that ISO/IEC standard that is MPEG-4 actually consists of many parts, the current one being MPEG-4 part 2. The new standard developed by JVT was added to MPEG-4 as a somewhat separate part, part 10, called “Advanced Video Coding”. This is also where the commonly used abbreviation AVC stems from.

H.264 is the latest generation standard for video encoding. This initiative has many goals. It should provide good video quality at substantially lower bit rates than previous standards and with better error robustness – or better video quality at an unchanged but rate. The standard is further designed to give lower latency as well as better quality for higher latency. In addition, all these improvements compared to previous standards were to come without increasing the complexity of design so much that it would be impractical or expensive to build applications and systems.

An additional goal was to provide enough flexibility to allow the standard to be applied to a wide variety of applications: for both low and high bit rates, for low and high resolution video, and with high and low demands on latency. Indeed, a number of applications with different requirements have been identified for H.264:


 * Entertainment video including broadcast, satellite, cable, DVD, etc (1-10 Mbps, high latency)
 * Telecom services (<1Mbps, low latency)
 * Streaming services (low bit-rate, high latency)
 * And others

As a note, DVD players for high-definition DVD formats such as HD-DVD and Blu-ray support movies encoded with H.264.