1159b3361Sopenharmony_ci<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2159b3361Sopenharmony_ci "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3159b3361Sopenharmony_ci<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 4159b3361Sopenharmony_ci <head> 5159b3361Sopenharmony_ci <meta name="generator" content="PSPad editor, www.pspad.com" /> 6159b3361Sopenharmony_ci <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> 7159b3361Sopenharmony_ci <link rel="stylesheet" type="text/css" href="styles/lame.css" /> 8159b3361Sopenharmony_ci <title>LAME MP3 Encoder :: Mid/Side Stereo</title> 9159b3361Sopenharmony_ci </head> 10159b3361Sopenharmony_ci <body> 11159b3361Sopenharmony_ci<div id="menu"> 12159b3361Sopenharmony_ci <ul> 13159b3361Sopenharmony_ci <li><a href="index.html">Index page</a></li> 14159b3361Sopenharmony_ci <li><a href="about.html">About LAME</a></li> 15159b3361Sopenharmony_ci <li><a style="border: 0" href="introduction.html">Intro to encoding</a> 16159b3361Sopenharmony_ci <div id="submenu"> 17159b3361Sopenharmony_ci <ul> 18159b3361Sopenharmony_ci <li><a href="cbr.html">CBR </a></li> 19159b3361Sopenharmony_ci <li><a href="abr.html">ABR </a></li> 20159b3361Sopenharmony_ci <li><a href="vbr.html">VBR </a></li> 21159b3361Sopenharmony_ci <li><a style="border: 0" href="ms_stereo.html">M/S Stereo</a></li> 22159b3361Sopenharmony_ci </ul> 23159b3361Sopenharmony_ci </div> 24159b3361Sopenharmony_ci </li> 25159b3361Sopenharmony_ci <li><a href="usage.html">Usage of LAME</a></li> 26159b3361Sopenharmony_ci <li><a href="history.html">Version history</a></li> 27159b3361Sopenharmony_ci <li><a href="contributors.html">Coders of LAME</a></li> 28159b3361Sopenharmony_ci <li><a href="contact.html">Contact LAME</a></li> 29159b3361Sopenharmony_ci <li><a style="border: 0" href="links.html">LAME links</a></li> 30159b3361Sopenharmony_ci </ul> 31159b3361Sopenharmony_ci</div> 32159b3361Sopenharmony_ci<div id="container"> 33159b3361Sopenharmony_ci<div id="content"> 34159b3361Sopenharmony_ci <div align="center"> 35159b3361Sopenharmony_ci <img src="images/logo.gif" width="358" height="231" alt="LAME Official Logo" /> 36159b3361Sopenharmony_ci <h2 class="hilight">LAME - Mid/Side Stereo</h2> 37159b3361Sopenharmony_ci </div> 38159b3361Sopenharmony_ci <p> 39159b3361Sopenharmony_ci During years, what is called Joint-stereo has been misunderstood.<br/> 40159b3361Sopenharmony_ci Joint stereo in MP3 is a mechanism to selectively choose between three modes 41159b3361Sopenharmony_ci of storing stereo information. These three modes are <a href="#ms">Simple Stereo 42159b3361Sopenharmony_ci </a>, <a href="#mj">Mid-Side Stereo</a>, and <a href="#mi">Intensity-Stereo.</a> 43159b3361Sopenharmony_ci </p> 44159b3361Sopenharmony_ci <p> 45159b3361Sopenharmony_ci In <a name="ms">Simple Stereo</a>, the encoder analyzes the left and the right channels 46159b3361Sopenharmony_ci independently and stores the information as-is, without further checking the 47159b3361Sopenharmony_ci similarities in the signal<a href="#note1"><sup>1</sup></a> 48159b3361Sopenharmony_ci </p> 49159b3361Sopenharmony_ci <p> 50159b3361Sopenharmony_ci In <a name="mj">Mid-Side Stereo</a>, the encoder analyzes the left, right<a href="#note2"><sup>2 51159b3361Sopenharmony_ci </sup></a>, mid (l+r) and side (l-r) channels. It then gives more bits to the 52159b3361Sopenharmony_ci mid than the side channel (as usually the side channel is less complex) and then 53159b3361Sopenharmony_ci stores just the mid and side channels into the resulting MP3.<br/> 54159b3361Sopenharmony_ci This way, the mid channel can be encoded as if the frame was bigger, and as such 55159b3361Sopenharmony_ci have more quality with the same bitrate.<br/> 56159b3361Sopenharmony_ci Note: Mid/side in MP3 is switched frame-by-frame. In AAC, it can be switched 57159b3361Sopenharmony_ci band by band. 58159b3361Sopenharmony_ci </p> 59159b3361Sopenharmony_ci <p> 60159b3361Sopenharmony_ci <a name="mi">Intensity-Stereo</a> (not supported in LAME) uses a technique known as joint 61159b3361Sopenharmony_ci frequency encoding, which is based on the principle of sound localization.<br/> 62159b3361Sopenharmony_ci Human hearing is predominantly less acute at perceiving the direction of certain 63159b3361Sopenharmony_ci audio frequencies. By exploiting this 'limitation', intensity stereo coding can 64159b3361Sopenharmony_ci reduce the data rate of an audio stream with little or no perceived change in 65159b3361Sopenharmony_ci apparent quality.<br/> 66159b3361Sopenharmony_ci It works by merging the upper spectrum into just one channel (thus reducing 67159b3361Sopenharmony_ci overall differences between channels) and transmiting a little side information 68159b3361Sopenharmony_ci about how to pan certain frequency regions.<br/> 69159b3361Sopenharmony_ci This type of coding does not perfectly reconstruct the original audio because 70159b3361Sopenharmony_ci of the loss of information and can cause unwanted artifacts. However, for very 71159b3361Sopenharmony_ci low bitrates this tool usually provides a gain of perceived quality. 72159b3361Sopenharmony_ci <a href="#note3"><sup>3</sup></a> 73159b3361Sopenharmony_ci </p> 74159b3361Sopenharmony_ci <p> 75159b3361Sopenharmony_ci The LAME mid/side switching criterion, and mid/side masking thresholds are 76159b3361Sopenharmony_ci taken from <cite>Johnston and Ferreira, <u>Sum-Difference Stereo Transform 77159b3361Sopenharmony_ci Coding,</u> Proc. IEEE ICASSP (1992) p 569-571.</cite> 78159b3361Sopenharmony_ci </p> 79159b3361Sopenharmony_ci <p> 80159b3361Sopenharmony_ci The MPEG AAC standard claims to use mid/side encoding based on this paper. 81159b3361Sopenharmony_ci </p> 82159b3361Sopenharmony_ci <div id="notes"> 83159b3361Sopenharmony_ci <ol> 84159b3361Sopenharmony_ci <li><a name="note1"></a>This is not the same than dual-mono. Dual-mono should be 85159b3361Sopenharmony_ci used where the left and right channels of the input file contain two different 86159b3361Sopenharmony_ci streams, where you should choose one (as in two different languages) 87159b3361Sopenharmony_ci </li> 88159b3361Sopenharmony_ci <li><a name="note2"></a>If one channel has much less noise masking in a certain 89159b3361Sopenharmony_ci band than the other, it could happen than the noise spread (by mid/side stereo) 90159b3361Sopenharmony_ci may no longer be masked for that channel. If both channels have the same 91159b3361Sopenharmony_ci masking, then the noise spread between both channels will be equally well masked. 92159b3361Sopenharmony_ci <br/> 93159b3361Sopenharmony_ci To prevent this from happening, there is an analysis done on the left and right 94159b3361Sopenharmony_ci channel to determine the noise masking thresholds and properly mask the noise. 95159b3361Sopenharmony_ci </li> 96159b3361Sopenharmony_ci <li><a name="note3"></a>Quote from wikipedia <a 97159b3361Sopenharmony_ci href="http://en.wikipedia.org/wiki/Joint_stereo">Joint_stereo</a>.</li> 98159b3361Sopenharmony_ci </ol> 99159b3361Sopenharmony_ci </div> 100159b3361Sopenharmony_ci</div> 101159b3361Sopenharmony_ci<div id="footer"> 102159b3361Sopenharmony_ci 103159b3361Sopenharmony_ci<a href="http://sourceforge.net/projects/lame"><img src="images/sflogo.gif" 104159b3361Sopenharmony_ci alt="Get LAME (Lame Aint an MP3 Encoder) at SourceForge.net. Fast, secure and Free Open Source software downloads" 105159b3361Sopenharmony_ci border="0" height="30" width="120" /></a> 106159b3361Sopenharmony_ci 107159b3361Sopenharmony_ci<a href="http://validator.w3.org/#validate_by_upload"><img src="images/valid-xhtml10.png" 108159b3361Sopenharmony_ci alt="Valid XHTML 1.0 Transitional" border="0" height="31" width="88" /></a> 109159b3361Sopenharmony_ci 110159b3361Sopenharmony_ci<a href="http://jigsaw.w3.org/css-validator/"><img src="images/valid-css.png" 111159b3361Sopenharmony_ci alt="Valid CSS!" border="0" height="31" width="88" /></a> 112159b3361Sopenharmony_ci 113159b3361Sopenharmony_ci<p>HTML markup and design by <a 114159b3361Sopenharmony_cihref="http://www.rarewares.org" target="_blank">Roberto Amorim</a> and <a 115159b3361Sopenharmony_cihref="http://www.maresweb.de" target="_blank">Sebastian Mares</a>. Logo by <a 116159b3361Sopenharmony_cihref="http://www.brightercreative.co.uk">Sam Fisher</a>.</p> 117159b3361Sopenharmony_ci 118159b3361Sopenharmony_ci</div> 119159b3361Sopenharmony_ci</div> 120159b3361Sopenharmony_ci 121159b3361Sopenharmony_ci</body> 122159b3361Sopenharmony_ci</html> 123