2 Talk Layout What is the L.A.M.E. Project ? Project Goal MP3 Encoding & Hyper-Threading OverviewMulti-Threading strategiesResults & RemarksFuture Work
3 What is the L.A.M.E. Project? An Open Source projectAn Educational Tool used for learning about MP3 encodingIt’s goal is to improvePsycho-acoustics qualityThe speed of MP3 encodingLame is the most popular state of the art MP3 encoder/decoder used by today’s leading products.FOR MORE INFO...
4 Project Goal Speeding up the encryption of an audio stream Turning LAME into a Multi-Threaded (MT) engineBe 1:1 bit compatible with the original versionOptimize specifically for SMT platforms (implementation on Intel’s P4 with Hyper-Threading Technology)
5 Thread Level Parallelism Provides thread level parallelism on each processorResulting inIncreased use of processor execution resourcesHigher processing throughputAchieved by duplicating the architectural state on each processor, while sharing one set of processor execution resources
6 MP3 Encoding Overview Specifically in LAME Break up the audio stream into frames (uniform chunks, typically ~1K)Frame 1Audio StreamFrame 2Frame 3Frame 4Read FramePsycho-AcousticPerceptual ModelAnalysis FilterbankMDCTQuantizationHuffman EncodingBitstream EncodeSpecifically in LAME
7 LAME MT – Intuitive approach The intuitive approach:Frame 1Frame 2Frame 3Frame 4Frame 5Frame 6Thread 1:Thread 2:An unbreakable dependence due to Huffman EncodingThis is actually Data Decomposition
13 Remarks Architectural Issues Implement a PNI version for FFT Pitfall found in version 3.93:Memory access to two different pages with the same offset~11% speedup achieved by fixing itNo longer relevant in later versions No major arch issues found in versions aImplement a PNI version for FFTNo significant gain achievedOverall ~40 blocks of code were change and are under #ifdef