12.07.2015 Views

Data Compression: The Complete Reference

Data Compression: The Complete Reference

Data Compression: The Complete Reference

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

7.9 MPEG-1 Audio Layers 749<strong>The</strong> MDCT uses n input samples x k (where n is either 36 or 12) to obtain n/2 (i.e.,18 or 6) transform coefficients S i . <strong>The</strong> transform and its inverse are given byn−1∑ ( π[S i = x k cos 2k +1+ n ] )(2i +1) ,i=0, 1,..., n 2n 22 − 1,x k =k=0n/2−1∑i=0( π[S i cos 2k +1+ n ] )(2i +1) ,k=0, 1,...,n− 1.2n 236 12 12 123618 18 18 6 6 6 6 6 6 1818Figure 7.41: Overlapping MDCT Windows.<strong>The</strong> size of a short block is one-third that of a long block, so they can be mixed.When a frame is constructed, the MDCT can use all long blocks, all short blocks (threetimes as many), or long blocks for the two lowest-frequency subbands and short blocksfor the remaining 30 subbands. This is a compromise where the long blocks providefiner frequency resolution for the lower frequencies, where it is most useful, and theshort blocks maintain better time resolution for the high frequencies.Since the MDCT provides better frequency resolution, it has to result in poorertime resolution because of the uncertainty principle (Section 5.3). What happens inpractice is that the quantization of the MDCT coefficients causes errors that are spreadover time and cause audible distortions that manifest themselves as preechoes (read:“pre-echoes”).<strong>The</strong> psychoacoustic model used by layer III has extra features that detect conditionsfor preechoes. In such cases, layer III uses a complex bit allocation algorithm thatborrows bits from the pool of available bits in order to temporarily increase the number ofquantization levels and thus reduce preechoes. Layer III can also switch to short MDCTblocks, thereby reducing the size of the time window, if it “suspects” that conditions arefavorable for preechoes.(<strong>The</strong> layer-III psychoacoustic model calculates a quantity called “psychoacousticentropy” (PE) and the layer-III encoder “suspects” that conditions are favorable forpreechoes if PE > 1800.)<strong>The</strong> MDCT coefficients go through some processing to remove artifacts causedby the frequency overlap of the 32 subbands. This is called aliasing reduction. Onlythe long blocks are sent to the aliasing reduction procedure. <strong>The</strong> MDCT uses 36 inputsamples to compute 18 coefficients, and the aliasing reduction procedure uses a butterflyoperation between two sets of 18 coefficients. This operation is illustrated graphicallyin Figure 7.42a with a C-language code shown in Figure 7.42b. Index i in the figure isthe distance from the last line of the previous block to the first line of the current block.Eight butterflies are computed, with different values of the weights cs i and ca i that are

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!