Port of a fixed point MPEG2-AAC encoder on a ARM platform

Similar documents
Port of a Fixed Point MPEG-2 AAC Encoder on a ARM Platform

Audio Compression. Audio Compression. Absolute Threshold. CD quality audio:

Audio-coding standards

Simple Excalibur System

Audio-coding standards

Mpeg 1 layer 3 (mp3) general overview

Fundamentals of Perceptual Audio Encoding. Craig Lewiston HST.723 Lab II 3/23/06

5: Music Compression. Music Coding. Mark Handley

Perceptual Coding. Lossless vs. lossy compression Perceptual models Selecting info to eliminate Quantization and entropy encoding

Module 9 AUDIO CODING. Version 2 ECE IIT, Kharagpur

Multimedia Communications. Audio coding

Audio Coding and MP3

Perceptual coding. A psychoacoustic model is used to identify those signals that are influenced by both these effects.

Both LPC and CELP are used primarily for telephony applications and hence the compression of a speech signal.

Lecture 16 Perceptual Audio Coding

Excalibur Device Overview

Rich Recording Technology Technical overall description

MPEG-1. Overview of MPEG-1 1 Standard. Introduction to perceptual and entropy codings

Appendix 4. Audio coding algorithms

Excalibur Solutions DPRAM Reference Design

Principles of Audio Coding

EE482: Digital Signal Processing Applications

ELL 788 Computational Perception & Cognition July November 2015

ARM MPEG-4 AAC LC Decoder Technical Specification

Chapter 14 MPEG Audio Compression

System-on Solution from Altera and Xilinx

_äìé`çêé. Audio Compression Codec Specifications and Requirements. Application Note. Issue 2

AUDIOVISUAL COMMUNICATION

2.4 Audio Compression

The MPEG-4 General Audio Coder

MPEG-1 Bitstreams Processing for Audio Content Analysis

Audio Fundamentals, Compression Techniques & Standards. Hamid R. Rabiee Mostafa Salehi, Fatemeh Dabiran, Hoda Ayatollahi Spring 2011

Bit or Noise Allocation

Speech and audio coding

AUDIOVISUAL COMMUNICATION

CISC 7610 Lecture 3 Multimedia data and data formats

Designing Embedded Processors in FPGAs

Principles of MPEG audio compression

Ch. 5: Audio Compression Multimedia Systems

CS 074 The Digital World. Digital Audio

ARM-Based Embedded Processor Device Overview

MPEG-4 General Audio Coding

Optical Storage Technology. MPEG Data Compression

Modeling of an MPEG Audio Layer-3 Encoder in Ptolemy

Implementation of FPGA Based MP3 player using Invers Modified Discrete Cosine Transform

Wavelet filter bank based wide-band audio coder

Bits and Bit Patterns

Nios Soft Core Embedded Processor

Introduction to Computer Science (I1100) Data Storage

ITNP80: Multimedia! Sound-II!

Active Serial Memory Interface

Contents. 3 Vector Quantization The VQ Advantage Formulation Optimality Conditions... 48

Chapter 1. Data Storage Pearson Addison-Wesley. All rights reserved

Objectives. Connecting with Computer Science 2

WB_MP3DEC - Wishbone MP3 Decoder

Binary representation and data

Implementing High-Speed Search Applications with APEX CAM

Graduate Institute of Electronics Engineering, NTU Advanced VLSI SOPC design flow

3-D Accelerator on Chip

<< WILL FILL IN THESE SECTIONS THIS WEEK to provide sufficient background>>

Design and Implementation of an MPEG-1 Layer III Audio Decoder KRISTER LAGERSTRÖM

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Storage I/O Summary. Lecture 16: Multimedia and DSP Architectures

ISO/IEC INTERNATIONAL STANDARD

Figure 1. Generic Encoder. Window. Spectral Analysis. Psychoacoustic Model. Quantize. Pack Data into Frames. Additional Coding.

Building A Custom System-On-A-Chip

DVB Audio. Leon van de Kerkhof (Philips Consumer Electronics)

DAB. Digital Audio Broadcasting

5. Configuring Cyclone FPGAs

Copyright of the University of East Anglia Version 1

WHITE PAPER. Fraunhofer Institute for Integrated Circuits IIS

Efficient Representation of Sound Images: Recent Developments in Parametric Coding of Spatial Audio

Compressed Audio Demystified by Hendrik Gideonse and Connor Smith. All Rights Reserved.

For Mac and iphone. James McCartney Core Audio Engineer. Eric Allamanche Core Audio Engineer

D Demonstration of disturbance recording functions for PQ monitoring

System Development Tools for Excalibur Devices

Cisco D9054 HDTV Advanced Compression Encoder

Excalibur Solutions Using the Expansion Bus Interface. Introduction. EBI Characteristics

FriendlyARM. Mini2440.

Audio and video compression

ARM Processors for Embedded Applications

Experiment 6 The Real World Interface

ECE 372 Microcontroller Design Assembly Programming Arrays. ECE 372 Microcontroller Design Assembly Programming Arrays

Final Exam CS4LP Time : 1 hour 30 minutes Close books

Survey. Motivation 29.5 / 40 class is required

Data Compression. Audio compression

2001 Altera Corporation (1)

14th European Signal Processing Conference (EUSIPCO 2006), Florence, Italy, September 4-8, 2006, copyright by EURASIP

4. Configuring Cyclone II Devices

Bits, bytes, binary numbers, and the representation of information

ECE 1160/2160 Embedded Systems Design. Midterm Review. Wei Gao. ECE 1160/2160 Embedded Systems Design

Tutorial - Using Xilinx System Generator 14.6 for Co-Simulation on Digilent NEXYS3 (Spartan-6) Board

Digital Recording and Playback

Introducing Audio Signal Processing & Audio Coding. Dr Michael Mason Snr Staff Eng., Team Lead (Applied Research) Dolby Australia Pty Ltd

Implementation of a MPEG 1 Layer I Audio Decoder with Variable Bit Lengths

9. PIO Core. Core Overview. Functional Description

Music & Engineering: Digital Encoding and Compression

Qsys and IP Core Integration

Parametric Coding of Spatial Audio

Data Storage. Slides derived from those available on the web site of the book: Computer Science: An Overview, 11 th Edition, by J.

Transcription:

Port of a fixed point MPEG2-AAC encoder on a ARM platform Romain Pagniez University College Dublin Information Hiding Laboratory Department of Computer Science Belfield, Dublin 4 Ireland http://ihl.ucd.ie/ UCD, August 2004

Overview Introduction Perceptual Audio Coding Fixed Point Elements Development Toolset Implementation Results Summary 1/22

Introduction: hardware encoding MPEG2 AAC: state of the art in perceptual audio compression. It achieves a compression rate about 30% higher than mp3. Compressed stereo audio at 128 kbit/s is indistinguishable from the original 1.4 Mbit/s CD quality. MPEG-like perceptual encoders are quite complex and involve a significant amount of calculations. Computing the algorithm on a dedicated hardware chip could be an efficient solution allowing fast encoding at reduced cost. Hardware encoding research is been conduced in the IHL on that specific subject and particularly highlights fixed point encoding. 2/22

Introduction: main points of my work Having the encoder properly working on a ARM platform. Communication functions: serial port of the board. Ethernet port. Double precision multiplication algorithm. 3/22

Introduction: workflow AAC Specifications Floating Point Software Encoder Keith Cullen (PhD) Fixed Point Software Encoder Keith Cullen (PhD) My project Fixed Point ARM Encoder Fixed Point FPGA Encoder Alexis Guerin (MSc) 4/22

Perceptual Audio Coding: Encoding Digital Audio Input Filterbank Time / Frequency Mapping Bit / Noise Allocation and Coding Bitstream Formatting Encoded Bitstream Psychoacoustic Model Ancillary Data (optional) Filter bank: frequency. divides the input stream into multiple subbands of Psychoacoustic model: simultaneously determines the overall masking threshold for each subband. Allocation block: uses the masking threshold to decide how many bits should be used. Bitstream formatting: multiplexes all the data to be transmitted. 5/22

Perceptual Audio Coding: Threshold in Quiet 100 Threshold in Quiet 80 Sound Pressure Level (db) 60 40 20 0 10 1 10 2 10 3 10 4 Frequency (Hz) 6/22

Perceptual Audio Coding: Threshold in Quiet Amplitude Masking Tone Masking Threshold Masked Tone Frequency 7/22

Perceptual Audio Coding: Masking Level (db) Frequency Time 8/22

Fixed point WL 1 0-1 -2 2 2 2 2 S IWL FWL Fixed point representation virtually places a radix point somewhere in the middle of the digits and uses integer arithmetics. This is equivalent to considering integers of portion of some unit. For example, one might represent 1/100ths of a unit; with 4 decimal digits, 10.82 or 00.01 can be represented. What is the more accurate position for the radix point? 9/22

Fixed point: range and error Range 4-bit Unsigned Step Size [0, 0.46875] 0.03125 [0, 0.93750] 0.06250 [0, 1.87500] 0.12500 [0, 3.75000] 0.25000 [0, 7.50000] 0.50000 [0, 15.00000] 1.00000 [0, 30.00000] 2.00000 10/22

Fixed point: optimal position The optimal position of the radix point must be chosen considering precision and range of data. The goal is to minimize error: overflow must be avoided and precision maximized. Position of the binary point may vary along the encoding process. Simulations must be carried out to determine the optimal position of each binary point. 11/22

Development Toolset: development kit EPXA1 development board: EPXA1F484C device ARM922T 32-bit RISC microprocessor 100 k gates APEX 20KE FPGA 32 Mo RAM 8 Mo flash 100 Mbit Ethernet JTAG header LCD display Quartus II software GNUpro compiler 12/22

Development Toolset: development board 13/22

Development Toolset: architecture LCD Ethernet LEDs ARM AHB PLD Switch etc. Serial Port The PLD is the only interface of the ARM processor. We must configure the FPGA. 14/22

Development Toolset: flash programming Software Source Files MegaWizard Plug-in Manager System Build Descriptor File Quartus II Software Builder quartus_swb Simulator Initialisation Files To Quartus II Simulator or other EDA Simulation Tools From Quartus II Hardware Compiler (full compilation) Slave Binary Image File Flash Programming File 15/22

Implementation: simulation files Simulation program running on a PC Audio data Fixed Point AAC Encoder Simulated fixed point environment AAC Compressed audio file 16/22

Implementation: master slave architecture Master program running on a host PC Audio data Slave fixed point encoder running on the EPXA1 Communication Functions Communication Functions Fixed Point AAC Encoder AAC Compressed audio file 17/22

Implementation: communication sequence From Host PC to Board From Board to Host PC Bit Rate (4 Bytes) Number of channels (4 Bytes) Sample Rate (4 Bytes) Bytes per sample (4 Bytes) Number of samples (4 Bytes) encode (2 Bytes) 1024 audio samples (mono - 1024 * 2 Bytes) or 2048 audio samples (stereo - 2048 * 2 Bytes) Size of Buffer (4 Bytes) Encoded Bitstream (size_of_buffer * 1 Byte) encode (2 Bytes) Size of Buffer (4 Bytes) Encoded Bitstream (size_of_buffer * 1 Byte) STOP (2 Bytes) Size of Buffer (4 Bytes) Encoded Bitstream (size_of_buffer * 1 Byte) 18/22

Implementation: naive vs overlapped protocol Host PC EPXA1 Dev. Board Host PC EPXA1 Dev. Board AAC Encoding AAC Encoding AAC Encoding AAC Encoding AAC Encoding AAC Encoding AAC Encoding Time 19/22

Results: communication vs computations Naive implementation Proportion Real Time Communications 8.63 s 0.411 s/frame 48.6 % 0.056 Computations 8.88 s 0.434 s/frame 51.4 % 0.053 Total 17.51 s 0.845 s/frame 100 % 0.027 Communication overlapped with (faster) computations Proportion Real Time Communications 140 s 0.392 s/frame 100 % 0.059 Computations 93 s 0.260 s/frame 66.3 % 0.089 Total 140 s 0.392 s/frame 100 % 0.059 20/22

Results: overlapped and high speed mult. Encoding time for the communication overlapped with computations encoder (high speed multiplication) at 128 kbit/s. Encoding Time Real Time 86.1 ko 0.48 s 8.30 s 0.415 s/frame 0.058 1.41 Mo 8.45 s 139.3 s 0.385 s/frame 0.063 10.9 Mo 1 min 04 s 1065 s 0.384 s/frame 0.060 21/22

Conclusion The encoder works as expected Communications on the serial port, even if slower the Ethernet, are sufficient to manage the encoding of a complete file 22/22