Joint encoding
In audio engineering, joint frequency encoding is an encoding technique used in audio data compression to reduce the data rate in order to obtain higher quality and/or smaller file size.
The idea is to merge a given frequency range of multiple sound channels together so that the resulting encoding will perceive the sound information of that range not as a bundle of separate channels but as one homogenous lump. This will naturally destroy the original channel separation for good, as the information cannot be accurately reconstructed, but this process will greatly lessen the amount of required storage space.
Joint stereo
The term joint stereo has become prominent as the Internet has allowed for the transfer of relatively low bit rate, acceptable-quality audio with modest Internet access speeds. It should be noted that there are many types of joint stereo encoding. Two of these are described here. Both methods are implemented in various ways with different codecs, such as MP3, AAC and Ogg Vorbis.
Intensity stereo coding
The intensity stereo coding form of joint stereo encoding functions on the principle of sound localization - by removing the stereo component of sounds that humans cannot discern the direction of (i.e. the lowest bass frequencies). Intensity stereo coding does not perfectly reconstruct the original audio because of the loss of data resulting in the simplification of the stereo image, and can produce unwanted artifacts with certain types of source material.
This limitation is usually unapparent, and with high quality algorithms, intensity stereo coding has become a prime choice among most lossy audio encoding authors. In fact, it is usually simply called "joint stereo" in most audio codecs.
M/S stereo coding
M/S stereo coding combines both channels into a mid channel and a side channel, hence the name. The mid channel is the sum of the left and right channels, or . Inversely, the side channel is the difference of the left and right channels, expressed as . Unlike intensity stereo coding, M/S retains the audio perfectly and cannot introduce artifacts by itself. However, when used in conjunction with a lossy form of compression, artifacts can become apparent for obvious reasons.
It is similar to the method used on stereo phonograph records, where the mid channel (L+R) is cut into the groove horizontally, and the side channel (L-R) is cut vertically.