Lossy Compression Part 3


Free Download Mp4Gain
picture

Lossy Compression Part 3

lossy compression

MPEG-1 and MPEG-2 video compression formats

lossless  compression

As an initial step in image processing, the MPEG-1 and MPEG-2 compression formats divide the reference frames into several equal blocks, which are then subjected to a floppy cosine transform (DCT). Compared to MPEG-1, the MPEG-2 compression format provides better image resolution at a higher video bit rate by using new compression algorithms and elimination of redundancy and encoding of the output data stream. . Also, the MPEG-2 compression format allows you to select the compression level due to quantization precision. For video with a resolution of 352×288 pixels, the MPEG-1 compression format provides a bit rate of 1.2 – 3 Mbps and MPEG-2 – up to 4 Mbps.

Compared with MPEG-1, the MPEG-2 compression format has the following advantages:

MPEG-2 provides scalability for various levels of image quality in a single video stream.
In the MPEG-2 compression format, the precision of the motion vector increases to 1/2 pixel.
User can select arbitrary discrete cosine transform precision.
Additional prediction modes are included in the MPEG-2 compression format.
Compression format MPEG-4

MPEG-4 uses a technology called fractal image compression. Fractal compression (contour-based) means extracting the contours and textures of objects in the image. The contours are presented in the form of so-called. splines (polynomial functions) and are encoded with reference points. Textures can be represented as spatial frequency transform coefficients (eg, discrete cosine or wavelet transform).

The bit rate range that the MPEG 4 video image compression format supports is much wider than that of MPEG 1 and MPEG 2. The new developments from the specialists are aimed at a complete replacement of the processing methods used by the MPEG 2 format. The MPEG 4 video compression format supports a wide range of standards and data transfer rates. MPEG 4 includes interlaced and progressive scanning techniques and supports arbitrary spatial resolutions and bit rates ranging from 5 kbps to 10 Mbps. MPEG 4 has an improved compression algorithm that improves quality and efficiency at all supported bit rates.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Lossy Compression Part 2

Lossy Compression Part 2

Lossy Compression

Compress audio and video

LOSSY COMPRESSION

The term “bit rate” refers to the number of bits of information transmitted per second. This term is translated into Russian in different ways in different sources. Recently, the word “bitrate”, which is new to the Russian language, is often used instead of a formal translation. The translation options are also as follows: “data stream width”, “bit stream complexity”, “stream rate”, “bit rate”. This same parameter is sometimes called the file compression rate for sound files. For example, the file is said to be compressed at 128 Kbps. The fact is that the bit rate value is directly related to the physical size of the sound file per second of sound.

All compression formats of the MPEG family use a high redundancy of information in images separated by a short time interval. Between two adjacent frames, usually only a small part of the scene changes; for example, there is a smooth movement of a small object against the background of a fixed background. In this case, the complete information about the scene is saved selectively, only for reference images. For the rest of the frames, it is enough to transmit differential information: on the position of the object, the direction and magnitude of its displacement, on new background elements that open up behind the object as it moves. Furthermore, these differences can form not only in comparison with the previous images, but also with the later ones (since it is in them, as the object moves, that the previously hidden part of the background is revealed).

The MPEG family of compression formats reduces the amount of information as follows:

Temporal video redundancy is eliminated (only difference information is considered).
The spatial redundancy of the images is eliminated by suppressing the small details of the scene.
Some of the color information is removed.
The information density of the resulting digital stream is increased by choosing the optimal mathematical code for its description.
MPEG compression formats compress only anchor frames: I-frames (intraframes). The intervals between them include frames that contain only changes between two adjacent I-frames: P-frames (predicted frame – predicted frame). To reduce the loss of information between the I frame and the P frame, so-called B frames (bidirectional frame) are introduced. They contain information that is taken from the previous and next frames. When encoding in MPEG compression formats, a chain of frames of different types is formed. A typical sequence of frames looks like this:

I B B P B B I B B P B B I B B …

Consequently, the sequence of frames according to their numbers will be played in the following order:
1 4 2 3 7 6 5 …

Lossy compression

Lossy compression

Lossy compression

Compress audio and video

lossy compression

High-quality digitized audio requires a large amount of disk space. Attempts to reduce file sizes using standard cabinets do not yield significant gains due to the specificity of the audio data. However, it is possible to achieve a fairly significant level of compression of the audio information using special methods based on the analysis of the data structure and subsequent compression with some loss.

The real possibility of sound processing comparable in quality to existing analog examples appeared only in the late 1980s. In 1988, the International Organization for Standardization (ISO) formed the MPEG (Moving Pictures Expert Group) committee, whose main task is develop coding standards for moving images, sound and their combination. During the ten years of its existence, the committee has developed a series of norms on this subject. As a result, when summarizing extensive research in this area, several specific formats were recommended for storing data, differing in the quality of the results and the data flow.

Currently, there are three most common video storage standards: MPEG-1, MPEG-2, and MPEG-4. Within the first two formats, there are also formats for storing audio information: Layer-1, Layer-2 and Layer-3. These three audio formats are defined for MPEG-1 and minor extensions are used in MPEG-2. The three formats are similar to each other, but use different levels of compression and complexity compensation. Layer-1 is the simplest, it does not require significant compression costs, but it also provides a negligible compression ratio. Layer-3 level: the most time consuming and provides the best compression. Recently, this format has gained immense popularity. It is often called MP3. This name is associated with the extension of the audio files stored in this format.

Founded idea, in which all lossy audio signal compression methods – ignore the subtle details of the original sound, which are outside of that perceived by the human ear. Here several points can be highlighted.

Noise level. Sound compression is based on a simple fact: if a person is next to a loud siren, it is unlikely that he will hear the conversation of the people who are nearby. Also, this happens not because a person pays close attention to a loud sound, but to a greater extent because the human ear actually misses out sounds that are in the same frequency range as a louder sound. This effect is called masking, it changes with the difference in volume and frequency of the sound.

The second point is the division of the audio frequency band into subbands, each of which is further processed separately. The encoding program extracts the loudest sounds from each band and uses this information to determine an acceptable noise level for that band. The best encoding programs also take into account the influence of adjacent bands. A very loud sound in one band can affect the masking effect and nearby bands.

Another point of coding is the use of a psychoacoustic model based on the peculiarities of human perception of sound. Compression The use of this model is based on the removal of obviously inaudible frequencies with a more careful preservation of sounds that are clearly distinguishable by the human ear. Unfortunately, there can be no exact mathematical formulas here. Human perception of sound is a complex process that is not fully understood, so the choice of compression methods is based on analyzing listening and comparing compressed sounds differently by teams of experts. But here there are practically unlimited possibilities in the field of improving psychoacoustic models. Most of the existing algorithms to encode the human voice are based on the high predictability of said signal; Universal MPEG compression algorithms have tried to apply this technique with variable success.