You are on page 1of 3

9/24/21, 4:19 PM Joint encoding - Wikipedia

Joint encoding
In audio engineering, joint encoding refers to a joining of several channels of similar information
during encoding in order to obtain higher quality, a smaller file size, or both.

Contents
Joint stereo
Intensity stereo coding
M/S stereo coding
Joint frequency encoding
Implementations
References
External links

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. Joint stereo refers to any
number of encoding techniques used for this purpose. Two forms are described here, both of which
are implemented in various ways with different codecs, such as MP3, AAC and Ogg Vorbis.

Intensity stereo coding

This form of joint stereo uses a technique known as joint frequency encoding, which functions on
the principle of sound localization. Human hearing is predominantly less acute at perceiving the
direction of certain audio frequencies. By exploiting this characteristic, intensity stereo coding can
reduce the data rate of an audio stream with little or no perceived change in apparent quality.

More specifically, the dominance of inter-aural time differences (ITD) for sound localization by
humans is only present for lower frequencies. That leaves inter-aural amplitude differences (IAD) as
the dominant location indicator for higher frequencies. The idea of intensity stereo coding is to merge
the lower spectrum into just one channel (thus reducing overall differences between channels) and to
transmit a little side information about how to pan certain frequency regions to recover the IAD cues.

This type of coding does not perfectly reconstruct the original audio because of the loss of information
which results in the simplification of the stereo image and can produce perceptible compression
artifacts. However, for very low bit rates this type of coding usually yields a gain in perceived quality
of the audio. It is supported by many audio compression formats (including MP3, AAC, Vorbis and
Opus) but not always by every encoder.

M/S stereo coding


https://en.wikipedia.org/wiki/Joint_encoding#M/S_stereo_coding 1/3
9/24/21, 4:19 PM Joint encoding - Wikipedia

M/S stereo coding transforms the left and right channels into a mid channel and a side channel.
The mid channel is the sum of the left and right channels, or . The side channel is the
difference of the left and right channels, or . Unlike intensity stereo coding, M/S coding is
a special case of transform coding, and retains the audio perfectly without introducing artifacts.
Lossless codecs such as FLAC or Monkey's Audio use M/S stereo coding because of this characteristic.

To reconstruct the original signal, the channels are either added or subtracted

This form of coding is also sometimes known as matrix stereo and is used in many different forms of
audio processing and recording equipment. It is not limited to digital systems and can even be created
with passive audio transformers or analog amplifiers. One example of the use of M/S stereo is in FM
stereo broadcasting, where modulates the carrier wave and modulates a subcarrier.
This enables backwards compatibility with mono equipment, which will only require the mid channel.
Another example of M/S stereo is the stereophonic microgroove record. Lateral motions of a stylus
represent the sum of two channels and the vertical motion represents the difference between the
channels.

Joint frequency encoding


Joint frequency encoding is an encoding technique used in audio data compression to reduce the
data rate.

The idea is to merge a given frequency range of multiple sound channels together so that the resulting
encoding will preserve the sound information of that range not as a bundle of separate channels but as
one homogeneous data stream. This will destroy the original channel separation permanently, as the
information cannot be accurately reconstructed, but will greatly lessen the amount of required storage
space. Only some forms of joint stereo use the joint frequency encoding technique, such as intensity
stereo coding.

Implementations
When used within the MP3 compression process, joint stereo normally employs multiple techniques,
and can switch between them for each MPEG frame. Typically, a modern encoder's joint stereo mode
uses M/S stereo for some frames and L/R stereo for others, whichever method yields the best result.
Encoders use different algorithms to determine when to switch and how much space to allocate to
each channel; quality can suffer if the switching is too frequent or if the side channel doesn't get
enough bits. With some encoding software, it is possible to force the use of M/S stereo for all frames,
mimicking the joint stereo mode of some early encoders like Xing. Within the LAME encoder, this is
known as forced joint stereo.[1]

As with MP3, Ogg Vorbis stereo files can employ either L/R stereo or joint stereo. When using joint
stereo, both M/S stereo and intensity stereo methods may be used. As opposed to MP3 where M/S
stereo (when used) is applied before quantization, an Ogg Vorbis encoder applies M/S stereo to
samples in the frequency domain after quantization, making application of M/S stereo a lossless step.
After this step, any frequency area can be converted to intensity stereo by removing the corresponding
part of the M/S signal's side channel. Ogg Vorbis' floor function will take care of the required left-right
panning.
https://en.wikipedia.org/wiki/Joint_encoding#M/S_stereo_coding 2/3
9/24/21, 4:19 PM Joint encoding - Wikipedia

References
1. "Detailed command line switches" (http://lame.cvs.sourceforge.net/viewvc/lame/lame/doc/html/det
ailed.html). LAME documentation. Retrieved 2013-12-13. "JOINT STEREO [...] means the
encoder can use (on a frame by frame basis) either L/R stereo or mid/side stereo. In mid/side
stereo, [...] more bits are allocated to the mid channel than the side channel. When there isn't too
much stereo separation, this effectively increases the bandwidth, so having higher quality with the
same amount of bits. Using mid/side stereo inappropriately can result in audible compression
artifacts. Too much switching between mid/side and regular stereo can also sound bad. To
determine when to switch to mid/side stereo, LAME uses a much more sophisticated algorithm
than the one described in the ISO documentation. FORCED MID/SIDE STEREO forces all frames
to be encoded with mid/side stereo. It should only be used if you are sure every frame of the input
file has very little stereo separation."

External links
Jürgen Herre, Fraunhofer IIS. From Joint Stereo to Spatial Audio Coding - Recent Progress and
Standardization. (https://web.archive.org/web/20060405112352/http://dafx04.na.infn.it/WebProc/P
roc/P_157.pdf) October 2004, Paper 157, DAFx'04 7th International Conference of Digital Audio
Effects.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Joint_encoding&oldid=940934974"

This page was last edited on 15 February 2020, at 15:44 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License;


additional terms may apply. By using this
site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia
Foundation, Inc., a non-profit organization.

https://en.wikipedia.org/wiki/Joint_encoding#M/S_stereo_coding 3/3

You might also like