Compression encoding method Part 2


Free Download Mp4Gain
picture

Compression encoding method Part 2

Compression encoding method
Compression encoding method

Other divisions of compression methods

Compression encoding method
Compression encoding method

In the field of audio compression, there are two compression methods, lossy compression and lossless compression. Commonly seen MP3, WMA, OGG are called lossy compression As the name suggests, lossy compression reduces the audio sample rate and bit rate, and the output audio file will be smaller than the original file. . Another audio compression is called lossless compression, which is what we’re talking about. Lossless compression can compress the volume of the audio file to a smaller size on the premise of saving 100% of all the data in the original file, and after restoring the compressed audio file, it can achieve the same size and same bitrate as the source file. Lossless compression formats include APE, FLAC, WavPack, LPAC, WMALossless, AppleLossless, La, OptimFROG, Shorten, while common and conventional lossless compression formats are just APE and FLAC. [1]
Main classifications and typical representatives of audio compression algorithms.edit streaming
Generally speaking, audio compression techniques can be divided into two categories: lossless compression and lossy compression, and according to different compression schemes, they can be divided into time-domain compression, transform compression, and time-domain compression. subband, as well as hybrid compression in which multiple technologies are combined with each other. Various compression techniques have large differences in algorithm complexity (including time complexity and space complexity), audio quality, algorithm efficiency (ie compression ratio), and codec delay. The applications of various compression techniques are also different.
Time domain compression technology (or waveform coding)
It directly processes the sample values ​​of the audio PCM code stream and compresses the code stream through silence detection, nonlinear quantization, and difference. Common features of this type of compression technology are low algorithm complexity, average sound quality, small compression ratio (CD quality > 400kbps), and shortest codec delay (relative to other technologies) . This type of compression technology is generally used for voice compression, low bit rate (small source signal bandwidth) applications. Time domain compression technology mainly includes G.711, ADPCM, LPC, CELP, and block compression technology developed on these technologies, such as NICAM, Subband ADPCM (SB-ADPCM) technology.
Subband compression technology
Subband coding theory was first proposed by Crochiere et al. in 1976. The basic idea is to decompose the signal into the sum of components into several subbands and then adopt different compression strategies for each subband component according to its different layout features to reduce code rate. The usual subband compression technology and transform compression technology described below are based on the human perception model (psychoacoustic model) of the sound signal, and the quantization order of the subband samples or the samples The frequency domain is determined by analyzing the spectrum of the signal. other parameters are selected, so it can also be called perceptual compression encoding (Perceptual). Compared with time domain compression technology, these two compression methods are much more complicated. At the same time, the coding efficiency and sound quality are also greatly improved, and the coding delay is correspondingly increased. Generally speaking, the complexity of subband coding is slightly less than that of transform coding and the coding delay is relatively short.


Free Download Mp4Gain
picture


Mp4Gain Main Window
picture


Mp4Gain Features
picture


Free Download Mp4Gain
picture

Compression encoding method

Compression encoding method

Compression encoding
Compression encoding

Transmission

Compression encoding
Compression encoding

According to different compression principles, audio signal coding is divided into waveform coding, parameter coding, and coding forms that integrate various technologies.
(1) Waveform coding directly samples the time-domain or frequency-domain waveform of the audio signal at a certain rate, and then quantizes the amplitude samples hierarchically, transforms them into digital codes, and outputs a signal coding system reconstructed from the waveform data. , the waveform is as consistent as possible with the original sound waveform, preserving detailed signal changes and various transition characteristics.
(2) Parametric coding First, a feature model based on different signal sources, such as language signals, natural sounds, etc., is established through feature parameter extraction and coding processing, trying to that the reconstructed sound signal is as loud as possible. to keep the semantics of the original sound, but reconstructed. The waveform of the signal may be quite different from the waveform of the original sound signal. Characteristic parameters in common use are formant, linear prediction coefficient, frequency band division filter and other parameter coding technologies, which can realize low-speed sound signal coding, and bit rate. can be compressed to 2 Kbit/s – 4.8 Kbit/s, but the sound quality can only reach moderate naturalness, especially low, only suitable for language transmission and expression.
(3) Hybrid coding The coding way that combines waveform coding and parameter coding overcomes the weaknesses of original waveform coding and parameter coding, and strives to maintain high quality of coding of waveforms and the low rate parameter coding, at a rate of 4 -16Kbit/s A high quality synthetic sound signal can be obtained. The basis of hybrid coding is linear predictive coding (LPC), commonly used coding methods such as pulse-excited linear prediction coding (MPLPC), scheduling pulse-excited linear prediction coding (KPELPC), Codebook Excited Linear Prediction (CELPC), etc.

Audio compression, how it works Part 2

Audio compression, how it works Part 2

Audio compression
Audio compression

Redundant information for transmission signals

Audio compression
Audio compression

Digital audio compression coding compresses the audio data signal as much as possible on the premise of ensuring that the signal is not audibly distorted. Digital audio compression coding is implemented by removing redundant components in sound signals. So-called redundant components refer to signals in the audio that cannot be perceived by the human ear and do not help determine the timbre, pitch, and other information of the sound. Redundant signals include audio signals outside the range of human hearing and masked audio signals. For example, the frequency range of the sound signal that can be perceived by the human ear is 20 Hz to 20 KHz, and frequencies other than this frequency that cannot be detected by the human ear can be considered as redundant signals. In addition, according to the physiological and psychoacoustic phenomena of the human ear, when a strong signal and a weak signal exist at the same time, the weak signal will be masked by the strong signal and cannot be heard, so the weak signal can be regarded as a redundant signal. Do not send. This is the masking effect of human hearing, which is mainly manifested in the spectral masking effect and the time-domain masking effect, which are presented below:
Spectral masking effects.
After the sound energy of a frequency is below a certain threshold, it will not be heard by the human ear, and this threshold is called the minimum audible threshold. When another sound with higher energy appears, the threshold value close to the frequency of the sound will increase considerably, which is known as the masking effect.

Masking effects in the time domain.
When strong and weak signals appear at the same time, there is also a masking effect in the time domain. That is, when the two occur very close in time, the masking effect will also occur. Time-domain masking is divided into three parts: pre-masking, simultaneous masking, and post-masking. Pre-masking refers to the short time before the human ear hears a strong signal, the already existing weak signal will be masked and cannot be heard. Simultaneous masking means that when a strong signal and a weak signal exist at the same time, the weak signal is masked by the strong signal and cannot be heard. Post-masking means that when the strong signal disappears, it takes a long period of time to hear the weak signal again, which is called post-masking. These weak masked signals can be considered redundant signals.

Audio compression, how it works

Audio compression, how it works

Audio compression
Audio compression

audio compression

 

audio compression
audio compression

 

Audio compression technology refers to the application of suitable digital signal processing technology to the original digital audio signal stream (PCM encoding), without losing the amount of useful information, or under the condition that the loss introduced be insignificant, reduce (compress) its code rate, and also called compression encoding.

It must have a corresponding inverse transform, called decompression or decoding. The audio signal can introduce a lot of noise and some distortion after passing through a codec system

Audio compression technology refers to the application of suitable digital signal processing technology to the original digital audio signal stream (PCM encoding), without losing the amount of useful information, or under the condition that the loss introduced insignificant, reducing (compressing) its code rate, and also called compression encoding. It must have a corresponding inverse transform, called decompression or decoding. Audio signals can introduce a great deal of noise and some distortion after passing through a codec system. The advantages of digital signal are obvious, but it also has its own corresponding disadvantages, ie increased storage capacity requirements and increased channel capacity requirements during transmission. Taking a CD as an example, the sampling frequency is 44.1KHz and the quantization precision is 16 bits, so a stereo audio signal for 1 minute needs to occupy about 10M bytes of storage capacity, that is, the capacity of a CD turntable is only about 1 hour. Of course, the problem is even more pronounced in the world of much higher bandwidth digital video. Are all these bits necessary? The study found that there is a large redundancy in the direct use of the PCM code stream for storage and transmission. In fact, sound can be compressed at least 4:1 under lossless conditions, that is, only 25% of the digital amount is used to retain all the information, and the compression ratio in the video field can even reach to several hundred times. Therefore, in order to use limited resources, compression technology has received much attention since its inception. The research and application of audio compression technology has a long history, like A-law coding, u-law is a simple almost instant compression technology, and has been applied in ISDN voice transmission. Research on speech signals has been developed before and has matured, and has been widely used, such as adaptive differential PCM (ADPCM), linear predictive coding (LPC), and other technologies.

Human Hearing: An Approach to Compressing Audio Data

 

Medical and physical examinations of human hearing and noise processing in the brain have shown that the hearing aid has its own perceptual characteristics. In certain circumstances, the brain does not register sounds or only partially registers them. Many signal components that are present in the acoustic signal are not even perceived by humans. The psychoacoustic call is concerned with investigating these facts. So far the following deficits in human ear perception have been discovered:

Curva auditiva del oído humano

Hearing perception range:

The waves can be emitted in a wide range of frequencies. However, the human ear can only really perceive a small section of this frequency range, the audio frequency range. In theory, humans can hear sounds with frequencies between 20 Hz and 20 kHz. In practice, however, it has been shown that ear sensitivity decreases considerably towards low and high frequencies. In the image above, amplitude, that is, sound pressure, is plotted against frequency.

Curva de audición específica de una pieza musical

Measurements have shown that all signals that are completely below the threshold of hearing at rest (red line) are inaudible. The amplitude of these tones (green peaks in the image) is too low, so their volume is too low to be perceived. It is interesting to see that the silent hearing threshold is not constant at a certain amplitude value, but changes with frequency. Very low tones (less than 50 Hz) are only perceptible from very high amplitudes, as are tones above 15 kHz. It should also be noted that not everyone has the same silent hearing threshold. Children can hear high frequencies much better than older people.

Masking:

Another deficit of the human hearing aid is the inability to distinguish between tones of very similar frequency and very different volume that occur simultaneously. This effect is also called auditory masking. Or German called simultaneous masking. A high-amplitude signal (dark blue in the image above), also known as a masker, hides quieter signals that have a similar frequency. In the image, these are all signals that are within the area highlighted in yellow. Some turquoise peaks are shown as an example. The yellow area is outlined by the orange individual masking threshold of the masker. The individual masking threshold and the silent hearing threshold can be combined to form the so-called global masking threshold. Thus, all signals below the global masking threshold are inaudible. In practice, auditory masking means nothing more than loud music signals cover the quiet parts and make them inaudible.
Another masking effect occurs when two tones follow each other in a very short time. Of these two tones, only the one with greater amplitude is perceived, that is, greater volume. Interestingly, even if the soft sound reaches the ear first, only the strong signal that arrives later is registered in the brain. This second important masking effect is also called temporary masking in technical jargon.

Low-frequency localization deficits:

Although the human ear is able to pinpoint the origin of high and mid-frequency tones in the room well, problems arise in the lower-frequency region. The brain calculates the location of the sound source from the difference in signal transit time between the left and right ears. If there is a sound source on the right, the waves emitted by this source are perceived earlier by the right ear than by the left. The origin of the tones is calculated from the time interval between the perception of the left and right ears. However, very low-frequency sound signals have very long wavelengths, making clear localization impossible. Therefore, there is practically no tonal difference between a mono sound source for low-frequency signals and a stereo sound source for very low-frequency sounds. Joint stereo effect. It is used, for example, in the construction of subwoofer satellite systems and is also a starting point for audio compression in the area of ​​low tones.
Therefore, the human ear can only improperly or not at all perceive a complete series of frequency ranges. In electrical engineering, the field of digital signal processing (DSP) deals, among other things, with mathematical processes that, in combination with the psychoacoustic model of the hearing aid, lead to data reduction.

What is an audio compressor

You’ve certainly heard of compression before: you know it’s an essential effect for mixing, but at the same time, don’t you necessarily master every setting of your plugins?

This is normal: it is a somewhat complex subject. And if you don’t know exactly what effect each parameter has on the sound, you risk damaging your mixes rather than improving them.

Therefore, I advise you to take a few minutes to see what the different settings of your compressors correspond to, so that you can adjust them yourself: in fact, whether you use a compressor for mastering or an analog audio compressor, the settings they are generally still the same!

 

What is an audio compressor?

It is mainly an effect, as well as equalizers, reverbs, distortions, etc. It can take the form of an add-on or an external effects module.

In general, and although there are many possible ways to use a compressor, you can reduce the dynamic range of a recording or a complete mix. That is, reduce the gap between the loudest and weakest sounds on the track.

Hence the name, moreover: a compressor compresses the sound.An example of an external stereo compressor, the ART Pro Audio VLA II
For example, if we have a voice track with a significant level variation between the words, we can level the sound by attenuating the loudest parts.

Here is an example in pictures:

Ejemplo de compresión

Compression example

In the image above, there is no compression: the signal (the singer’s voice, for example) alternates between significant peaks and less strong elements.

In the image below, compression was used to attenuate these spikes. In fact, they are now at a level closer to the rest of the recording. The dynamic range has therefore been reduced.

Compression threshold

The Threshold parameter is particularly important for successful compression.

It is simply the level in decibels (dBFS) from which the compressor begins to operate; in other words, it attenuates the signal.

For example, if your recording reaches a maximum of -12 dBFS and you set its threshold to -6 dBFS, the signal will not be compressed. In fact, the threshold is higher than the signal (-6 dBFS> -12 dBFS). Conversely, if you set it to -20 dBFS, the portion of the signal above this threshold can be compressed.

The audio compressor, what is it for?

If there is an instrument in the audio field that says everything and the opposite of everything, and whose very function may be almost incomprehensible to novices, this is the compressor.

compression

What is it and especially what is a compressor for?

Let’s try to get some clarity. A compressor is an instrument, analog or digital, hardware or software, that allows to intervene in the dynamics of the audio; The way it intervenes is regulated by a series of parameters that modify its operation.
In general, the use of a compressor aims to reduce the dynamic extension of the audio on which it acts, to subsequently increase its volume.
Let’s take any audio track as a reference.

 

What is meant by dynamics of an audio track?

The dynamics of an audio track defines the amplitude of the variation, in terms of volume, of the track itself: in practice, the difference between the maximum and minimum volume.
Let’s take an example.
Considering that we are in the digital environment, the volume of an audio track could vary, for example, between -50 dB (light background noise) and -5 dB (high volume): the dynamics (that is, the difference between the minimum value and the highest peak (highest) in this case would be 45 dB.
Track compression can reduce high peaks, for example by reducing them to -10 dB, with a decrease in overall dynamics to 40 dB: therefore, the dynamic spread decreases, i.e. by attenuating signal levels higher, we have limited the difference in volume of the same with the lower.
But why would you want to reduce the dynamics of a track?
Basically, because I lowered the highest peaks, I could now increase the overall volume of the entire track, causing audible sounds to be heard that were previously too low (or too hidden by too loud sounds).

How a compressor works

The compressor generally works on the basis of some user defined parameters:

– threshold: generally expressed in dB, it sets the volume level from which you want the compressor to start operating.
For example, by setting a threshold of -10 dB, the compressor will act on all sounds that exceed this threshold in volume.

– compression ratio (ratio): Sets how much the signal beyond the threshold should be compressed.
The ratio is expressed as a ratio: for example, a 2: 1 ratio means that a signal that exceeded the 10 dB threshold, after compression, will only exceed it by 5 dB.
That is, a 2: 1 ratio tells the compressor to reduce the signal overshoot beyond the threshold to 1/2.
When using very high compression ratios (over 10: 1), we are talking about limitation (and the compressor can be defined as a limiter), which is extreme compression that practically doesn’t allow anything or almost to cross the threshold.
When, on the other hand, we use an inverse compression ratio (for example, 1: 3), we talk about expander instead of compressor: the expander has an opposite action, that is, it tries to increase the dynamics of an audio track reducing the volume of the signals below a certain threshold. For example, an expander can be used as a noise reduction, zeroing signals below a very low threshold (that is, effectively eliminating background noise).