ARM MPEG-4 AAC LC Decoder Technical Specification Intellectual Property Products Division Software Systems Group Document number: PRD10-GENC-001288 4.0 Date of Issue: 19 June 2003 Copyright ARM Limited 2002-2003. All rights reserved. Abstract Technical specification for the ARM MPEG-2 AAC Low Complexity profile decoder. This document details the performance of the decoder when it has been integrated into an ARM-supplied example player. Keywords AAC, MPEG, MPEG2, audio, decoder, technical specification PRD10-GENC-001288 4.0 Page 1 of 8
Contents 1 ABOUT THIS DOCUMENT 3 1.1 Change control 3 1.2 References 3 1.3 Terms and abbreviations 3 1.4 Licensing Notice 3 2 SCOPE 4 3 INTRODUCTION 4 4 TECHNICAL SPECIFICATION 5 4.1 AAC Decoder Object Library 5 4.1.1 Library Variants 5 4.1.1.1 Big or little endian 5 4.1.1.2 ARM Architecture 4, 4T or 5TE 5 4.1.1.3 Toolkit and Object Code Format 5 4.1.2 Decoder Support 5 4.1.2.1 Low Complexity Profile 5 4.1.2.2 Input Bit Stream Format 5 4.1.2.3 Input Bit Rates 5 4.1.2.4 Output Sample Rates 5 4.1.2.5 Channel Support 6 4.1.2.6 Application Programmer Interface 6 4.2 Support Code and Test Files 6 4.3 Memory & Performance Requirements 7 4.4 Decoder Accuracy 8 PRD10-GENC-001288 4.0 Page 2 of 8
1 ABOUT THIS DOCUMENT 1.1 Change control Issue Date By Change 2.0 11 November, 2002 Martyn Capewell First release 3.0 16 th April 2003 Paddy Grove / Martyn Capewell Updated and re-issued 1.2 References This document refers to the following documents. Ref Doc No Author(s) Title [1] IS026-GENC-000682 ARM ARM Common Audio Decoder API User Guide [2] ISO/IEC 13818-7 MPEG Information technology-generic coding of moving pictures and associated audio information-part 7: Advanced Audio Coding, 1997. [3] PRD10-GENC- 001287 MPEG ARM MPEG-4 AAC LC Decoder User Guide 1.3 Terms and abbreviations This document uses the following terms and abbreviations. Term AAC API LC MPEG ROPI RWPI ADS RVCT Meaning Advanced Audio Coding Application Programmer Interface Low Complexity Motion Picture Experts Group Read-only position-independent (refers to object code) Read-write position independent (refers to object code) ARM Developers Suite RealView Compilation Tools 1.4 Licensing Notice This product implements MPEG-AAC Technology which is subject to third party intellectual property rights. Supply of this product does not convey a license under the relevant intellectual property rights of Dolby Laboratories PRD10-GENC-001288 4.0 Page 3 of 8
Licensing Corporation or others, nor imply any right to use this product in any finished end user or ready-to-use final product without such a license. An independent license for such use is required. For details on AAC patent licensing, please send email to the Advanced Audio Coding Licensing Administration at AACLA@dolby.com, or visit the web site at http://www.aacaudio.com/ 2 SCOPE This document describes the technical capabilities and performance requirements of the ARM software MPEG-4 AAC LC decoder. 3 INTRODUCTION ARM has developed a family of fast, high-quality audio decoder libraries. They are intended to be integrated into applications for ARM-based platforms that require the ability to playback audio data in real time. From http://www.aac-audio.com/ : Advanced Audio Coding, or AAC, is the latest technology co-developed by experts in the art and science of audio compression, and standardized as part of the MPEG specifications. Compared to MPEG-1 Layer 3 (MP3) audio, AAC provides higher quality audio reproduction, yet it requires approximately 50% less data. That means music that sounds better, downloads faster, and takes less storage space or network bandwidth. PRD10-GENC-001288 4.0 Page 4 of 8
4 TECHNICAL SPECIFICATION 4.1 AAC Decoder Object Library 4.1.1 Library Variants Different library variants are available, corresponding to different combinations of the features described in the following sections. 4.1.1.1 Big or little endian Libraries are available for big and little endian archtectures. 4.1.1.2 ARM Architecture 4, 4T or 5TE Libraries are available for ARM architectures 4, 4T and 5TE. Each is compatible with devices that that implement the appropriate ARM architecture or higher. The 4T and 5TE libraries are built for ARM-Thumb interworking and are compatible with both ARM and Thumb code. 4.1.1.3 Toolkit and Object Code Format The library is available in ADS ELF format, for use with ADS1.1 (or later version) or RVCT. The library is ROPI and RWPI compatible and is suitable for use in a shared library. 4.1.2 Decoder Support The decoder is a 2.0.0.0 Channel Low Complexity Profile MPEG-4 AAC Decoder, as defined by the standard [2]. All versions of the decoder support the following. 4.1.2.1 Low Complexity Profile The decoder is compliant with the MPEG-4 AAC Low Complexity profile. The decoder does not support Main Profile or Scaleable Sample Rate Profile. The decoder is also backward compatible with the MPEG-2 AAC Low Complexity profile. 4.1.2.2 Input Bit Stream Format Both Audio Data Interchange Format (ADIF) and Audio Data Transport Stream (ADTS) are supported. 4.1.2.3 Input Bit Rates The input rate for an MPEG-4 AAC stream is defined in the frame header in a 23-bit field, as defined in the MPEG- 4 AAC standard [2]. All input bit rates defined in this field are supported, including variable bit rate. 4.1.2.4 Output Sample Rates The decoder supports the following output sample rates, in Hz: 8000, 11025, 12000, 16000, 22050, 24000, 32000, 44100, 48000, 64000, 88200 and 96000. PRD10-GENC-001288 4.0 Page 5 of 8
4.1.2.5 Channel Support The decoder supports decoding of AAC streams with either one or two channels. The decoder does not support other channel configurations. 4.1.2.6 Application Programmer Interface The decoder supports the ARM Common Audio Decoder API, defined in [1] and supplemented by [3]. 4.2 Support Code and Test Files The following support code and test files are supplied with the decoder 1. A command-line test harness application that decodes an AAC file into a PCM file. 2. An example AAC bitstream. 3. A reference PCM file 4. A tool to compare the reference PCM data with the output from the test harness PRD10-GENC-001288 4.0 Page 6 of 8
4.3 Memory & Performance Requirements The ARM decoder has target requirements for the following resources to decode a 48kHz 320kbps stereo input stream using 32-bit wide zero wait state memory. TNS Processor Peak CPU MHz ROM / kbytes RAM / kbytes ARM7M 27 Disabled Enabled ARM9M 23 ARM9E 21 ARM7M 35 ARM9M 31 ARM9E 25 44 23 44 23 These figures, were obtained using the supplied test harness and test files. Peak MHz is for the worst frame of 1152 samples of all the test files decoded. 4.3.1 CPU MHz requirement In addition to the CPU MHz for decoding the AAC bit-stream additional MHz will be required to fill the input buffer with bit-stream and to empty the output buffer of PCM samples. The actual MHz required for these tasks will depend on the source of the bit-stream and destination of the PCM samples and the means implemented to perform the data transfers. Successfully decoding an AAC bit-stream in real time requires that the output buffer never becomes empty and that the input buffer never overflows. In both of these case data will be lost and the audio quality of the AAC file being played back will be reduced. Ensuring the highest quality playback requires that the decoder is called often enough and for long enough to avoid these problems. In a system using the recommended buffering the decoder must be called every frame of 1024 PCM samples, this equates to every 21ms for a 48KHz sampling frequency. The decoder must also be given adequate CPU cycles to completely decode the frame within the 21ms. If it is not possible to call the decoder often enough then consideration should be given to providing larger input and out buffers. 4.3.2 Memory requirement The ROM size figure includes all AAC decoder library code and constant data. The object code of the customer s player application will be in addition to this figure. The RAM size is sufficient for the decoder to play back AAC audio in real-time, and consists of the following: AAC decoder state 17kBytes State which must be preserved whilst the decoder is running AAC decoder workspace 0 Workspace that can be corrupted between API calls CPU stack 256Bytes The maximum CPU stack depth inside the AAC decoder PCM output buffer 4096Bytes Circular PCM output buffer as recommended and discussed in [1] PRD10-GENC-001288 4.0 Page 7 of 8
Single input buffer 1536Bytes For most applications a single input buffer is sufficient, but double buffering may sometimes be required. All areas of RAM are allocated and owned by the external application. The decoder does not allocate any RAM itself, either statically or dynamically. 4.4 Decoder Accuracy Each 16-bit PCM output sample from the ARM AAC Decoder differs from the corresponding output sample from the ISO reference decoder by a maximum of twice the magnitude of the least significant bit, for all test files used. PRD10-GENC-001288 4.0 Page 8 of 8