Basic concepts of audio and video: physical audio and digital audio

One: Physical audio junior high school physical knowledge
Here are some important physical knowledge that may be related to coding

The frequency of the sound is the reciprocal of the cycle, which represents the number of cycles of the sound in 1 second, and the unit is Hertz (Hz). Kilohertz (kHz), or 1000Hz, means 1000 vibrations per second. Sound can be divided according to frequency as follows:

Infrasound 0~20Hz
Sound that can be heard by human ears 20Hz~20KHz
Ultrasound 20KHz~1GHz
Ultrasound 1GHz~10THz

Two: digital audio

In order to explain the digitalization of analog signals into three concepts:
sampling frequency, sampling quantization, and encoding,
the computer does not directly use continuous and smooth waveforms to represent sound, it samples the amplitude of the waveform at regular intervals, and uses A series of numeric quantities representing sounds. The figure below is a schematic diagram of the digitally sampled waveform.
insert image description here
PCM pulse code modulation
PCM (Pulse Code Modulation), pulse code modulation. What the human ear hears is an analog signal, and PCM is a technology that converts sound from an analog signal to a digital signal.
insert image description here
According to Nyguist's sampling law, to fully recover the original signal waveform from the samples, the sampling frequency must be at least twice the highest frequency in the signal.
As mentioned earlier, the frequency range that the human ear can hear is [20H~20kHz], so the sampling frequency is generally 44.1Khz, which can ensure that the sound can be digitized even when it reaches 20Khz, so that after digital processing, the human ear hears Sound quality will not be reduced.

Sampling frequency: the number of points sampled per second. Commonly used sampling frequencies are:
22000 (22kHz): Wireless broadcasting.
44100 (44.1kHz): CD quality.
48000 (48kHz): Digital TV, DVD.
96000 (96kHz): Blu-ray, HD DVD.
192000(192kHz): Blu-ray, HD DVD.

Sampling quantization : Sampling is performed at discrete time points, and the sampled value itself is also discrete in the computer. The precision of a sampled value depends on how many bits it uses to represent it, which is quantization . For example 8-bit quantization can represent 256 different values, while CD-quality 16-bit quantization can represent 65 536 values ​​in the range [-32768, 32767].

The figure below is a schematic diagram of 3-bit quantization. It can be seen that 3-bit quantization can only represent 8 values: 0.75, 0.5, 0.25, 0, ─0.25, ─0.5, ─0.75 and ─1, so the fewer quantization bits, The harder it is to make out the waveform, the worse the quality of the restored sound (probably nothing but a hum)

insert image description here

Guess you like

Origin blog.csdn.net/weixin_43907175/article/details/129126494