Optimizing the Implementation of Dolby® Digital Plus in SoC Designs

Chris Cavigioli and Brett Miller

MIPS Technologies Inc.

Roger Dresser and Rob Hilsop

MIPS Technologies, Inc. 1225 Charleston Road Mountain View, CA 94043-1353

Copyright © 2006 MIPS Technologies Inc. All rights reserved.

MIPS Verified™

sc players, the players, sc ray Disc™ optical di sly mixed with a moresly mixed recent director's Plus, thereconsiderations are also designthat system- erators are all looking at ways to dramatically improve erators are all looking to dramatically at ways improve ternalstreams from the Internetwith the to be mixed and is defined as optional and is defined in Blu-ray Disc. The specifi- ystem development time. This approach also lowers thetime. approach This lowers alsoystem development l, the standard-setting audio technology Lab- from Dolby st digital TV set-top (STBs), boxes enabling broadcasters rtainment applications, bringing superior sound quality, rtainment applications, bringingsuperior quality, sound es Inc. All rights reserved. pproval testing that is required at Dolby Laboratories testingis required that at Dolby pproval logo is substantial. Working with Dolby Laboratories, with MIPS Dolby logo is substantial. Working 1 surround sound using as few as 224 kbps, a significant a significant kbps,as 224 1 surround soundfew using as of set-top boxes. High-definition TV depends on high-qualityon TV depends High-definition of set-top boxes. for an expensive digital processor signal(DSP). for an expensive een MIPS Technologies and Dolby Laboratories. and Dolby Technologies een MIPS stered stered on the disc that is simultaneou improved user experience to the home. user experience improved ets. For the emerging HD DVD and Blu- HD DVD the emerging ets. For Digital Plus in SoC Designs, 2 om a studio website. Copyright © 2006 MIPS Technologi on-a-chip (SoC) teamson-a-chip need to understand.The rigorous (SoC) a Plus Digital Dolby can use the or a system before a chip This white paper outlines Digital of Dolby consumer the benefits audioPlus for select markets key and details the betw effort collaborative behind the processes to deploy offerings with lower bit rates, reducing costs and adding flexibility and value for consumers. reducingvalue and adding costs and rates, bit flexibility with lower offerings to deploy Digital to using Dolby tremendousadvantages are While there syn- of its 32-bit DigitalPlus thatany Dolby onrun will of an optimized,version tested has developed Technologies thesizablecores—significantly processor slashing audio subs eliminating the need by the SoC cost of overall capabilities of Plus allow movie studios withto combine experience audio a superior movie data compressionDigital capabilitiesof allow Plus Dolby high-definition video. The technology also enhances the late Disc Blu-ray and DVD HD DigitalDolby Plus is mandatory specification in the HD DVD more efficient audio compression, and an audio compression, and more efficient changing to address the require- has been developed (E-AC-3), Enhanced AC-3 as Digital Plus, also known Dolby mark consumer burgeoning two of ments forcations multiple also allow independent streams so a can bemovie shipped with multiple independent soundtracks supportor multiple languages. ex allow players Disc Blu-ray and time, HD DVD the first For videohigh-definition stream a example, For beenshippedconsumer. to the after the disc has discthe on audio native track ma an audio by can be accompanied Dolby® Digital generation DigitaDolby® Plus, the of Dolby newest home intooratories, is making next-generationway ente its commentary streamed fr MIPS Technologies and Dolby Laboratories have collaborated to provide a rapid and low-risk methodologyand low-risk for a rapid toandprovide collaborated have Dolby Laboratories MIPS Technologies Disc™ markets. deployingthethe to latest set-topDolby HD Digital box and DVD/Blu-ray Plus technology Boxes Set-Top Next-Generation DigitalDolby Plus is also vital to the generationnext sound for a complete op and Broadcasters experience. network their offerings. The greater compression of Digital 5. Dolby Plus allows reduction from the current 384-448 kbps data an opportu- This provides rate typically used Digital for Dolby (AC-3). Market Optimizing the Implementationof Dolby® 2 Entertainment the Home for Standards Emerging 1 Introduction

visually impaired. visually impaired. for the hearing for or ). Figure 2 Figure , they can upgrade can 5.1-channelto, they surround soundusing es Inc. All rights reserved. the worldwide installedbase more of than 36 million ficient low-latency, low-complexity conversion process, conversion low-complexity low-latency, ficient ). services by allowing value-added services value-added allowing services by Figure 1 Copyright © 2006 MIPS Technologi e Home Entertainmente Home Market Figure Figure 1 Broadcasters Digital Plus for to Dolby of Upgrading Advantages Dolby DigitalDolby Plus maintains backward compatibility with using an S/PDIFconnection ( Digital audio/videoDolby receivers Fullydecoding the streamprocess- to linear Digital PCMthenand require significant re-encoding toit would Dolby an ef Using quality. the audio reduce would and power ing DigitalintostreamsDolby more with easily and less impact on audio qual-Digital streams PlusDolby are converted ity. nity for broadcasters to enhance their to enhance nity for broadcasters For those broadcastersFor using MPEG stereo at 160-256 kbps essentially same bandwidth the (see 3 Optimizing the ImplementationDolby® Digital of Plus in SoC Designs 2 StandardsEmerging for th

ive considering the cost of the extra the cost of the extra considering ive om theom floating-point reference code w generation of A/V receivers, resulting in audio receivers, of A/V generation w es Inc. All rights reserved. ). audio DSP and adapt the audio code fr and audio DSP This approach can be arduous and expens Figure 3 Digital Plus in SoC Designs, 4 uncoded) can be transmitted to a ne directly Copyright © 2006 MIPS Technologi Dolby Digital Plus Stream be converted to a 640 kbps Dolby Digital bitstream. bitstream. Digital Dolby kbps to a 640 converted be Stream Plus Digital Dolby of a higher quality than ever before ( a higher qualityof than ever silicon, DSP royalties and board tests. Working with a different set of development tools with set silicon, a DSPof fordifferent development the androyalties DSP board design tests. inWorking addi- implementation. the The endtion unit to the to develop has to be then systemtimethe design also increasesit takes Laboratories Dolby Digitalattain toPlus logo.Dolby the by and tested approved extensively that is Laboratories. suppliedDolby by With the high-speed HDMITM interface becoming increasingly common on newer STBs, the Dolby Digital Plus becoming STBs, the Dolby interface high-speed the increasingly HDMITM commonon newer With coded or streams (either Some system developers use a dedicated use a developers Some system Figure 2Figure a that requires today Receiver A/V to Player Disc Optical or Box Set-top from Connection S/PDIF Figure 3 Figure directly. transmitted be to Stream Plus Digital Dolby full a allows Box on Set-top HDMI Connection Optimizing the Implementationof Dolby® 3Software Development Digital Plus Dolby

a reference implementation, chip, providing the Dolby Dig- rt of the algorithm at a low low at a algorithm rt of the ng the pre-approved code sig- ng the pre-approved the algorithms. The audio pro- audio The the algorithms. ™ SoCs, thissignificantly optimized specifically for that core for that core optimized specifically Passing both sets of tests in-house is is in-house tests sets of both Passing d for approval at Dolby Laboratories at Dolby approval d for worked closely with Dolby Laboratorieswith closely Dolby theonworked imple- st (DUT) with the outputof es Inc. All rights reserved. boratories for approval, usi boratories for approval, e needed, less board space and less power is is used. Because power board space and less less e needed, rigorously exercise each pa rigorously exercise econd processor in a econd processor system in addition to decoding or converting thein audio addition stream. to decoding or converting Laboratories for approval testing. Laboratories Dolby Laboratories main- for approval oating-point C code and delivered to the licensee for imple- oating-point C code and delivered ers users of or MIPS-Based l-purpose processor core for echnology and MIPS processor technology. While a MIPS- a While echnologyMIPSand processor technology. processor core and code that has been has that processor core and code ding Dolby Digitalding Plus Dolby product.end to the ter and helps ensure a quicker turnaroun testing Dolby Laboratories testing will perform. Dolby nal cost. Fewer components ar components nal cost. Fewer Copyright © 2006 MIPS Technologi ). ). Figure 4 Figure nificantly reduces risk for the implemen nificantly and a more rigorous set of tests to verify the final implementationand a more rigorousfinal theusingof set tests to verify Audio Precision® test equipment.The Audio Precision tests essentially duplicate the required prior to submission to reduce risk and it makes more that likely the implementation will Labo-pass at Dolby ratories. optimizedantocode of the streamline version the process pro- and to has developed Technologies As noted, MIPS vide a high-quality implementation. Laboratories, Dolby is provided to devel- This code, by which has been approved Digital licensed thet both Plus Dolby whoopers have Based SoC implementation still must go back to La Dolby ( tains a high standard of quality, so the testingso the procedure correspondingly is extensive. tainshigh a standard of quality, testssets oftheto imple- Laboratories two provides Dolby process goes smoothly, help that ensure the approval To to of test vectors a set development: menter for use during and quicklythecomparea decoder output under of te level mentation in a device or a DSP that is then sent to Dolby or a DSP that is then sent to Dolby mentation in a device The Dolby The Dolby Digital Plus reference software is written in fl A lower cost, more flexible approach is to use a genera use to is approach flexible more cost, A lower ital Plus capability at a nomi ital Plus capability a high-performance This approach requires has Technologies Laboratories. MIPS Dolby by and approved design For mentation of theDigital Dolby Plus decoder. it is general purpose, the for other tasks core can be used purpose, it is general reduces the risk, timescale and cost of ad risk, timescale the reduces cessing can subsumedbe the to a host by s CPU or moved 5 Optimizing the ImplementationDolby® Digital of Plus in SoC Designs 4 Implementation 4 Implementation

ypical project and point arithmetic rather than lopmentt of time a mulation and testing procedure, mulation esentation while still providing suffi- still providing esentation while the need for saturation checks after each offers optimized and approval-tested optimizedapproval-tested and offers andards established by Dolby andards establishedLaboratories.Dolby by an audio algorithm uses fixed- t representationst and operations are chosen and hardwired es Inc. All rights reserved. representation (or potentially multiple representations at other popular audio algorithms such as MPEG-2, AAC, popularother audio algorithmsAAC, such as MPEG-2, mic rangemic and precision throughout of data the algorithmic of dynamic range and precision. This allows the algorithm the of dynamic range and precision. This allows e STB and optical disc SoCs are based on industry-standard ersion process using an extensive si using an extensive ersion process of the first steps in optimizing reference Dolby the the of implementation first is tocon- e code can shave months from the deve from the months can shave e code lar fashion, MIPS Technologies also MIPS Technologies lar fashion, sing the optimal representation avoids exceeding the dynamic range of its repr the dynamic range of its exceeding Digital Plus in SoC Designs, 6 efficient implementation of implementation efficient onwill meet the stringent audio-quality st Dolby Digital Plus system chips and equipment. equipment. and chips system Plus Digital Dolby Copyright © 2006 MIPS Technologi different processing stages) that finds an optimal balance that processing finds stages) different without input potential to handle any In embedded systems, the most systems, In embedded floating-point arithmetic. Therefore, one floating-point thecode. reference vert choosingrequiresfixed-point a A high-quality conversion cient precision. as important, choo Just run-time improving significantly operation,performance. conv this accomplishes Technologies MIPS that the implementati ensuring Dolby Laboratories benefits in several ways, as most of th ways, in several Laboratories benefits Dolby MIPS processor cores. theUsing MIPS-optimized of th version In a cycle. simi accelerate the approval andLogic®Pro II, Dolby Digital code for (AC-3), Dolby MP3, and SRS TruSurround XT®. MP3, and SRS TruSurround processing. At thethe end simulation of process, fixed-poin An abstract C++ fixed-point class tracks the required dyna An abstract C++ fixed-point pure C implementation. back into a Figure 4Figure for process approval and time development the from months cut can code MIPS-optimized Using Optimizing the Implementationof Dolby® 5 MIPS32® Implementation for Optimizing

m) and window over- and window m) so facilitates the reuse of so facilitates wfora similar capability as mpiler alone is not capablegenerat- of mulator to provide extra precision or precision extra to provide mulator rete cosine cosine transfor rete erations. In some cases, where 32 bits is still insuffi- bits is still 32 where cases, In some erations. mpiler toolis chaincapable of producing highly effi- advantage of its architecture.its By carefully choosing of rep- advantage o algorithms are used, the SAI al ). both the MIPS architecture and the structure of the DSP es Inc. All rights reserved. ents that can be readily added or removed from an applica- readilyents that added or removed can be cessing tasks, and makes it easy to cascade multiple audio to cascade it easy cessing tasks, and makes of the MIPS32 architecture allo of the MIPS32 Figure 5 Figure ecture-specific optimizations that the co that the optimizations ecture-specific dio Interface (SAI), a standard API (SAI), dio Interface e accumulator can be used as a 64-bit accu a 64-bit can be used as e accumulator ines, such as IMDCT (inverse modified disc modified IMDCT (inverse ines, such as erent or changing audio pro Copyright © 2006 MIPS Technologi codecs using shared intermediate memory buffers ( memory buffers intermediate shared codecs using After producing a fully implementation optimized fixed-point of Digitalthe Dolby Plus code, MIPS encapsulates the with its Soft Au decoder-converter MIPS-optimizedall supportedby codecs. audio of the The SAI of particular complexities many algorithms abstracts think to compon of them in terms of developers and allows tion. By standardizing the in way which the MIPS Soft Audi resentations, 32-bit the (GPRs) general-purposeregisters op GPR-to-GPR with even bits, guard with accumulator DSP a dynamic range as needed. Csource fixed-point the pointis already one form of optimization. And the given source code to fixed Converting co (SDE) Environment Development Software code, the MIPS lap/add, can further from archit benefit ing. Such optimizationsrequiredetailed a understanding of routines employed in Dolby Digital Plus. code for diff application-level When choosingrepresentations, MIPS fixed-point takes full cient, the HI/LO register pair of th pair HI/LO register cient, the of some the fixed-point However, core pipeline without MIPS additionalcode,cient scheduled effort. specific for a andoperations critical DSP rout 7 Optimizing the ImplementationDolby® Digital of Plus in SoC Designs 6 Interface Integration Audio Soft 6 Soft Audio Interface6 Soft Integration

vel 4KETM core can be used vel (a host processor and audio nge ofnge other functionsas as well ). The multi-threading allows the 34K core ). The multi-threading allows also simplifies load balancing. simplifies also Figure 6 Figure es Inc. All rights reserved. able. A smallentry-le low-cost, y code to highly optimized fixed-point MIPS32 MIPS32 code. optimized fixed-point to highly y code designing a multi-core system re means it can be used for a wide ra be used for a means it can re common development environment. Using the same set of development tools the Using same of set development environment. common development together, to debug the system, and debug to together, Digital Plus in SoC Designs, 8 Copyright © 2006 MIPS Technologi to behave as two virtualprocessorswithin optimizing the single coreusethe ofto behave by the instruction pipelineand the memory to fully maximize the hardware. The two processors look independent to the main system, so one can handle the hostoperating systemthe while other handles audio thevideo and subsystems. to the developer distinct advantage there is a Finally, a utilize to for example) coprocessor, it easiermakes for teams towork All this allows the system designer significant flexibility. The codec can be runcancodec Themain on the CPU sec- system on or a flexibility. system the designer significant thisAll allows itsandof supporting The size the core issuean memorysystem for the is coreond used as an audio co-processor. a general-purpose MIPS co architect. Using Dolby Digital and PlusDolby other codecs. audio to be scal design system the This approach also allows implementationlow-bandwidthfor a DigitalPlus,Dolby ofthe while multi-threaded latest 34KTM core could be implementationhigh-definition used for a host controller and a ( Figure 5 Figure Dolb floating-point converting for flow The Optimizing the Implementationof Dolby®

by Dolby Laboratories. Laboratories. Dolby by industry benefits by saving develop- saving by industry benefits In order to facilitate the In order tofacilitate rapid deploy- een tested and approved and approved een tested a shortcut to get to market with less risk. They get a shortcutwith less risk. They toget to market onfidently use the code from MIPS Technologies that has theMIPS Technologies code from use onfidently EG stereo, they can now transmit 5.1-channel can EG now stereo, they surround es Inc. All rights reserved. canbe used the ofMIPS across entire array cores. ased SoCs in those markets, MIPS Technologies has has SoCs MIPSased in those markets, Technologies itecture and has already b chnologies Laboratories, and Dolby the the STB, DTV and DVD recorder markets today. recorder markets STB, DTV and DVD the Copyright © 2006 MIPS Technologi Dolby Digital Plus is a new audio coding technology that represents significant value to broadcasters in the STB mar- to broadcasters audio coding value technologythat significant represents Digital Plus is a new Dolby 33 Digital saves Plus Dolby video disc markets. a standard audiohigh-definition for the format as isspecified and ket ser- transmissionthe costs ability or value-added deploy to lower percent them bandwidth for broadcasters,giving broadcasters usingunusedvices on the MP bandwidth. For insound virtually the same bandwidthDigital using Plus. Dolby the In Digital blue-laser optical Dolby disc market, Plus is and mandatory optional for HDfor Blu-ray DVD Disc. architecture in is the #1 MIPS ment of Dolby Digital Plus across the variety of MIPS-B of Digitalment Plus of Dolby across the variety licensedDigital the Dolby Plustechnology andalreadycompleted the tedious pointoptimizing for task of in it fixed SoC designers have the whole of MIPS processors. family Now, can c they but Laboratories, from Dolby code the reference arch optimized for the MIPS been already Final SoCs are more likely to pass Dolby Laboratories approval testing quickly. Laboratories approval moreFinal to pass Dolby arelikely SoCs Te MIPS the cooperation between With andmentbringing reducing costs Digital risk, toDolby the retail Plus, faster. consumer and its benefits, Figure 6Figure code Plus Digital Dolby optimized tested, The 9 Optimizing the ImplementationDolby® Digital of Plus in SoC Designs 7Conclusion 7 Conclusion

, FS2 c, 24Kf, SEAD-2, of the user Technologies DOCUMENT States and other and States omputer software o use and distribution o use and ng, modifying or use of or use modifying ng, he Government is further he Government is information from MIPS t arise regarding the export, t arise regarding ise. MIPS Technologies does Technologies ise. MIPS ng of this document does not does this document ng of enalties and fines. tion. Any warranties, whether warranties, Any tion. arty is strictly prohibited. At a in violation of the law of any in violation of the law Regulation 12.212 for civilian Regulation elease, modification, disclosure, elease, modification, elated technical data or manuals, the governing law. thegoverning a particular purpose, are excluded. document. MIPSsim, MIPSpro, MIPS information by t information by er software, commercialsoftware, c er conditions covering th conditions covering Technologies, Inc. in the United Technologies, third party, thefurnishi party, third es or an authorized p third e, duplication, reproduction, r cies. The use of this MIPS64, MIPS-Based, merchantability or fitness for merchantability or fitness contractterms and es Inc. All rights reserved. of States the United of America shall be cted in accordance with Federal Acquisition transferred, or released, directly or indirectly, nologies or an authorized ndments or supplements thereto. Should a conflic Should thereto. supplements or ndments in FrameMaker or Microsoft Word format) is subject t or in FrameMaker Word Microsoft 4KEc, 4KEm,4KEp, 4KS, 4KSc, 4KSd, M4K, 5K, 5Kc, 5Kf, 24K, 24K the following: commercial comput commercial the following: , MDMX, MED, MGB, OCI, PDtrace, the Pipeline, Pro Series, SEAD, in this document to improve function, design or otherw or design function, to improve document in this registered trademarks of registered MIPS rmation, or error of any or omission in such informa 1004Kc, 1004Kf, R3000, R4000, R5000, ASMACRO, the core "At Atlas, ASMACRO, R5000, R4000, R3000, 1004Kf, 1004Kc, d copyright laws. Violations thereof may resultd copyright in Violations criminal laws. p Technologies, Inc. ("MIPS Technologies"). Any copying, reproduci copying, Any Technologies"). ("MIPS Inc. Technologies, and all confidentiality restrictions. UNDER NO CIRCUMSTANCES MAY A MAY UNDERrestrictions. CIRCUMSTANCES NO confidentiality and all cluding any patent rights, that cover the information in this that cover patent rights, cluding any rmitted in writing by MIPS Technologi rmittedby in writing government ("Government"), the us the ("Government"), government mitedimplied to the warranties of laws of the United States laws of America and other countries. ation Supplement 227.7202 for military agen ation Supplement 227.7202 for in a modifiable form such as form in a modifiable e user of this information, or any related documentation of any kind, including r including kind, any of documentation related any or information, e user this of constitutes one or more of constitutes one or plication or use of this info AM, CorExtend, CoreFPGA, CoreLV, EC, FPGA View, FS2, FS2 FIRST SILICON FS2, FS2 SOLUTIONS logo View, EC, FPGA CorExtend,AM,CoreLV, CoreFPGA, ge the information contained contained information the ge MIPS V, MIPS-3D, MIPS16, MIPS16e, MIPS-3D, MIPS16,MIPS32, MIPS V, license agreement MIPSfrom Tech the licenseagreement(s) and/or applicable ation contained in this ation contained in this document, the laws e the propertyowners. of their respective related documentation is kind, restri of any Copyright © 2006 MIPS Technologi gulation, treaty, Executive Order, statute, ame Order, Executive gulation, treaty, this document shall not be exported, reexported, reexported, be exported, not shall this document thorized third party. Technologies or an au Technologies MIPS, MIPS I, MIPS II, MIPS III, MIPS IV, experience.", BusBridge, Bus Navigator, CL experience.", BusBridge, Bus Navigator, Malta Logic Navigator, JALGO, HyperJTAG, HyperDebug, NAVIGATOR, are trademarks or YAMON and SmartMIPS,SOC-it, System Navigator, 24KE, 24KEc, 24KEf, 34K, 34Kc, 34Kf, 74K, 74Kf, 74Kc, 1004K, 74Kc, 1004K, 74Kf, 74K, 34Kf, 34Kc, 34K, 24KEf, 24KEc, 24KE, Except as expressly provided in any written in any provided Except as expressly restricted in accordance with the terms of 4KE, 4Kp, 4Kc, 4Km, 4K, logo, MIPS-VERIFIED MIPS-VERIFIED, logo, give recipient any license to any intellectual recipientlicense to any property rights, any in give in The information contained minimum,this information is protected underunfaircompetition an in source format (i.e., document provided Any this information (in whole or in part) that is not pe expressly restrictions that are independent of and supplemental to any PROVIDED IN SOURCE FORMAT BE DISTRIBUTED TO A THIRD PARTY IN SOURCE FORMAT WITHOUT THE EXPRESS WRITTEN IN SOURCE FORMAT BE A DISTRIBUTED THIRD TO PARTY IN SOURCE FORMAT PROVIDED PERMISSION OF MIPS TECHNOLOGIES, INC. chan the right to reserves Technologies MIPS arising liability out of not the any assume ap notli implied or otherwise, including but statutory, express, re country or international law, department, or other entity of the United States is an agency, or transfer of this information, or any and DefenseagenciesRegul Federal Acquisition The informationin this document contained documentation or other commercial items. If th countries. All other trademarks referred to herein ar Copyright Inc. © All 2006 rights MIPS Technologies, reserved. copyright the under reserved any) (if rights Unpublished This document contains information that is proprietary to MIPS that is proprietary information contains document This reexport, transfer, or release of the transfer, inform reexport,