Referece Audio Sigal Processig I Shyh-Kag Jeg Departmet of Electrical Egieerig/ Graduate Istitute of Commuicatio Egieerig M. Bosi ad R. E. Goldberg, Itroductio to Digital Audio Codig ad Stadards, Kluwer Academic Publishers,. *Referece: Maria Bosi, Perceptual Audio Codig-Lecture ote of Music 4/EE67C, CCRMA, Staford Uiversity, Sprig 999 Cotets Itroductio Quatizatio Time to Frequecy Mappig Psychoacoustics Bit Allocatio Perceptual Audio Coders MPEG- Audio Audio Coder Ecode Decode 4 Codig Goals Maximize the perceived quality of the soud Miimize the data rates ad complexity Related parameters Delay Error robustess Scalability etc. Pulse-Code Modulatio PCM Ecoder PCM Decoder [] Sample Quatize [] Quatize - Iterpolate 5 6
PCM Example: CD Format Samplig frequecy: Fs = 44. KHz (i.e. oe sample every ~. ms) umber of bits per sample: R = 6 (i.e. up to 6 = 6 6556 6l levels) l ) Bit rate: I = Fs*R = 76.5 kb/s per chael Total bit rate: I stereo =.4 Mb/s Sigal to oise ratio: SR ~ 9 db Fourier trasform Fourier X ( f ) x( e Iverse Fourier trasform x( X ( f ) e jft jft dt df 7 8 Eergy ad Power Sigal Samplig Power Eergy p( x( E T p( dtt p( Ts / f s t 9 Aliasig Samplig Theorem fs f max -f s f s fmax -f s fmax f s
Elimiatig Aliasig If your applicatio requires a sample rate below the highest frequecies i the sigal, you will eed to low pass filter the sigal before samplig Example: The telephoe sample rate is 8 KHz ad a 4 KHz low pass filter is employed. (speech: ~ Hz to ~7 KHz, you really do soud differet o the phoe) Coder Implicatios We ca oly hear up to ~ KHz so we should filter out higher frequecies ad sample at ~4 KHz to get high quality reproductios of broadbad soud For example, CDs sample at 44. KHz ad provide much greater soud quality tha telephoe system 4 Biary umbers Decimal otatio Symbols:,,,, 4,,, 9 e.g., 999 * 9* 9* 9* Biary otatio t ti Symbols:, e.g., 7 6 5 4 [] * * * * * * * * egative umbers Folded biary Use the highest order bit as a idicator of sig Two s complemet Follows the highest positive umber with the lowest egative e.g., bits, [], 4 [] 4 4 We use folded biary otatio whe we eed to represet egative umbers 5 6 Two Quatizatio Methods Uiform quatizatio Costat limit o absolute roud-off off error / Poor performace o SR at low iput power Floatig poit quatizatio Some bits for a expoet the rest for a matissa SR is determied by the umber of matissa bits ad remai roughly costat Gives up accuracy for high sigals but gais much greater accuracy for low sigals Quatizatio Error Mai source of coder error Characterized by q A better measure SR log( x / q ) Does ot reflect auditory perceptio Ca ot describe how perceivable the errors are Satisfactory objective error measure that reflects auditory perceptio does ot exist 7 8
Quatizatio Error (cot.) Roud-off off error Overload error Overload 9 Roud-Off Error Comes from mappig rages of iput amplitudes oto sigle codes Worse whe the rage of iput amplitude oto a code is wider Assume that the error follows a uiform distributio / Average error power q q dq For a uiform quatizer / / R q xmax /(* ) Roud-Off Error (cot.) SR log( x log( x / q ) / xmax) R log log log ( x / xmax ) 6.R 4.77 SR(dB) 6 bits 8 bits 4 bits Iput power (db) Overload Error Comes from sigals where x( xmax Depeds o the probability distributio of sigal values Rd Reduced df for hih high x max High x max implies wide levels ad therefore high roud-off off error Requires a balace betwee the eed to reduce both errors Frequecy Domai Codig Widow Fuctio Subdivide the iput sigal ito a umber of frequecy compoets ad quatize these compoets separately Subdivisio ito frequecy compoets removes redudacy i the iput sigal umber of bits to ecode each frequecy compoet ca be variable, so that ecodig accuracy ca be placed i frequecies where is most eeded x( w( t 4 4
Widows Fourier of a Sie Wave with Various Widows.9.8 4.7.6 Sie T c 8/ f o Rectagle Sie Haig amplitud de 5.5.4... Haig ormalized amplitude i db - -4....4.5.6.7.8.9-6 t /T c 5-8..4.6.8..4.6.8 f/fo 6 M TD samples x' FD samples y k Overlap-Add Scheme Iverse FD samples yk TD samples x" Recostructio Widow iput sigal with aalysis widow x x' x w Apply trasform to the widowed sigal x' y F ( x' ) y k Apply the iverse trasform y k x" F ( yk ) x' Widow with the sythesis widow s a s x' z x' w x w w a M -M 7 8 Widow Costraits --M M - +M- a s a s w w w M w M w a s w w a s w 9 Perfect Recostructio Assume that the aalysis widow is the same as the sythesis widow Assume that the widow is symmetrical Assume o quatizatio w( ) w( M ),, M A possible widow si( (( / )/( M ))/ ),, M w( ) M,, M si( (( / )/( M ))/ ) M,, 5
Overlappig ad Required System Rate Overlap -M samples Slide the widow by M samples Perform a -poit trasform to obtai frequecy samples Trasmit frequecy samples every M time samples If there is o overlap, we eed oly to trasmit frequecy samples every time samples Thus the required system rate is higher tha that of the o-overlappig overlappig case, because M< Perfect Recostructio TDAC / TD samples / FD samples / FD samples Iverse TD samples / Oddly Stacked TDAC (OTDAC) Modified discrete cosie trasform (MDCT) ( ) X k x'( )cos( ( o )( k )) k,, ( o )/ X ( k) X ( k ) Iverse modified discrete cosie trasform (IMDCT) "( ) x X ( k)cos( ( o )( k )),, k Perfect Recostructio TDAC Symmetric aalysis ad sythesis widows Idetical aalysis ad sythesis widows [ w ( )] [ w ( / )],, / Sie widow w( ) si( *(( / )/( / ))/ ),, / 4 Steady-State State vs. Trasiet Block Selectio 5 6