Energy Efficiency Measurement for Multimedia Audio Decoding on Embedded Systems Chu-Hsing Lin, Chih-Hsiong Shih1, Jung-Chun Liu, Mao-Hua Cheng, Yan-Wei Lee Department of Computer Science and Information Engineering Tunghai University, 181, Section 3, Taichung-kang Road, Taichung, Taiwan
{chlin, jcliu, G95280065, G98280063}@thu.edu.tw,
[email protected]
Various codecs are used to compress audio data for faster transmission and easier storage. In this paper we measure the power consumption versus audio data of different genres on the embedded systems environment to compare experimentally the energy efficiency of audio data compressed by different codecs. Two parameters, the bit rate and the sample rate, can be assigned when decoding or compressing audio data. We also measure the power consumption versus audio data decoded with various bit rates and sample rates to find effects of the two parameters on energy efficiency. Optimal combinations of the codec, the bit rate, and the sample rate are suggested for the embedded system users [2-3].
ABSTRACT Handheld devices with embedded systems are massively used in modern times due to their characteristics of portability and convenience. In addition to the basic general functions, video and audio capabilities are also indispensable to embedded systems. The performance of application software running on embedded devices is limited to the optimization process done by the manufacturers. In this paper, we analyze the energy consumption of multimedia audio decoding on embedded systems. Given the electric power analysis results, we are able to compress audio data with the best energy conservation ability to replay on embedded systems. By fine tuning audio compression settings of various popular codecs, an energy efficient suggestion is provided for devices with embedded systems.
This paper is organized as follows: Section 2 introduces popular audio codecs applicable on embedded systems. Section 3 describes the experimental design and setup. Experimental results will be shown and energy analyses will be performed in Section 4. Conclusions are made in Section 5.
Keywords Multimedia audio coding/decoding, Embedded systems, Energy consumption, Energy efficiency, Codecs.
2. BACKGROUNDS In this section, we introduce popular codecs applicable on embedded systems:
1. INTRODUCTION In the information age, mobile and ubiquitous devices gradually gain popularity. The mobile and ubiquitous devices with embedded systems have diverse applications and their applications on multimedia are also quite widespread. However, embedded systems are characterized by their small sizes and light weights. Since the battery size is small, thus the electric power capacity is limited. The approach to save the electric power consumption during the multimedia playback process is quite important. Replaying audio data on embedded systems is one of the most popular applications. Therefore, we want to find strategy to save the electric power in the audio decompressing process to prolong battery life, and thus enhance the operational period of the embedded system, which is the key component of mobile and ubiquitous devices.
2.1 AC3: Audio Coding-3 is also called Dolby Digital. AC3 is one of the technologies which Dolby Laboratory researches and develops. AC3 is one kind of lossy audio compression technology, and its Digital Audio Compression Standard 5.1 sound channel technologies are the most famous applications out of this standard [10].
2.2 MP2: MPEG-1 Audio Layer II, MP2, is an audio encoding technology developed by Moving Pictures Experts Group (MPEG). It is a standard defined by ISO/ICE 11172-3. The video CD has used MP2 standard. In our experiment, MP2-1 means the musical format is MP2 with AVI header, MP2-2 means the musical format is MP2 with MP2 header, and MP2-3 means the musical format is MP2 with MPG header [4].
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee.
404
2.3 MP3: MPEG-1 Audio Layer III, MP3, is the famous digital audio encoder. It is also developed by MPEG. MP3 is a standard defined by ISO/ICE 13818-3. It is one kind of lossy audio compression technology. MP3 is an audio compression algorithm proposed by Digital Audio Broadcasting (DAB) plans in 1987. Engineers in the research organization of Fraunhofer Gesellschaft located in German, Erlangen, developed and defined the MP3 standard in 1991. Its compression ratio is higher than MP2 [5].
2.4 MPC:
Figure 1. Simplified Universal Player Encoder & Renderer, SUPER©.
Musepack, MPC, is an open source lossy audio codec, specifically optimized for transparent compression. Development of MPC was initiated in 1997 by Andree Buschmann and later taken over by Frank Klemm, and is currently maintained by the Musepack Development Team (MDT) with assistance from Frank Klemm [7].
2.5 OGG: OGG is an open standard for a free container format for digital multimedia, unrestricted by software patents and designed for efficient streaming and manipulation. OGG is maintained by the Xiph.Org Foundation. Because the format is free, OGG's various codecs have been incorporated into a number of different free and proprietary media players, including commercial and noncommercial, as well as portable media players from different manufacturers [15].
Figure 2. The Core Pocket Media Player, TCPMP.
3.2 Experiment Setup 2.6 WMA:
We first compressed audio data from audio CDs with various codecs on SUPER©, and then loaded the encoded audio data to embedded systems. We tested energy consumptions of many audio data of different genres listed in Table 1. The experiment setup is shown in Figure 3. We used DMATEK ARM9 DMA2410 Embedded System with a 266 MHz Samsung S3C2410 processor, 64MB NAND Flash, 32MB SDRAM, and Microsoft® Windows Mobile™ Version 4.2 as its operating system. The embedded unit was powered by a DC 12V voltage source, and series-connected with a 1 ohm resistor as shown in Figure 4. We used the National Instruments PCI DAQ data acquisition board to sample the voltage across the resistor to calculate the current, with a sampling rate of 1000 samples/sec. The energy measurement was done by using LabVIEW 8 [8-9], a GUI-based data acquisition, measurement analysis, and presentation software. According to the Joule's law, we calculated the instantaneous power consumption corresponding to each sample and the total energy using the following equations:
Windows Media Audio, WMA, is an en/decode format developed by Microsoft Corporation. WMA is a part of the proprietary technology of Windows Media framework [14].
3. EXPERIMENT SETING 3.1 Experiment Environment We used AC3, MP2, MP3, MPC, OGG, and WMA as encoders to encode audio data on Simplified Universal Player Encoder & Renderer, SUPER© [12], freeware developed by eRightSoft, shown in Figure 1. It supports many audio formats, including AAC, AMR, MPC, WMA, etc. We used TCPMP [13] (The Core Pocket Media Player), shown in Figure 2, as the media player. TCPMP is Open Source software. TCPMP can be used on handheld systems based on Palm OS, Windows CE / Windows Mobile OS and it supports many audio file formats. We first obtained the source code which TCPMP provides, then established a TCPMP cross compilation environment using Microsoft Embedded C++. We recompiled the TCPMP code to execute on embedded systems, and used ActiveSync as migration tool to the embedded system environment.
PInst =
VR × VEmbeddedSystem R
E = ΣPInst × T
405
(1) (2)
header, and MP2-3 means the musical format is MP2 with MPG header.
Table 1. Audio tracks tested in the experiment. R&B Rap Rock Instrumental
One sweet day Hey mama
I will always love you Don't lie
Hit the floor The red sun
Cure for the itch Desperado
Furthermore, from the graphs of audio tracks of different music types, we find among them a similar trend that OGG consumes the most electricity, MPC is the next, and MP2 consumes least electricity. AC3 also consumes lower electric power, but the sound quality of it is the worst in our experiments.
What can I do Smells like funk Mike From a distance
(a)
Figure 3. Experimental setup.
(b)
Figure 4. Eecoding and decoding processes.
4. EXPERIMENT RESULTS We encoded audio data of different music genres and measured their power consumptions when decoding or replaying them on the mobile embedded systems at experiment 1. Then, we investigated at experiment 2 the effects on power consumption from changing the bit rate and the sample rate, which are the two parameters that need to be set when decoding audio data.
(c)
4.1 Experiment 1 We used AC3, MP2, MP3, MPC, OGG, WMA codes to encode three audio tracks of each music genre. The results for energy consumption are shown in Figure 5. The average energy consumption of audio data of R&B type was 50.77 joules, Rap type was 50.93 joules, Rock type was 51.05 joules, and Instrumental type was 51.10 joules. Audio tracks of various music genres consumed similar electricity on the average. Note that in our experiment, MP2-1 means the musical format is MP2 with AVI header, MP2-2 means the musical format is MP2 with MP2
(d) Figure 5. Energy consumption (unit in Joules) of four music types: (a) R&B (b) Rap (c) Rock (d) Instrumental.
406
4.2 Experiment 2 In this experiment, we analyze the electric power consumption of audio data compressed with various bit rates and sample rates. AC3, MP2, MP3, MPC, OGG, WMA were used to encode the audio data. First of all, we observe the growth of electric power due to the change of the bit rate. The growth of the electric consumption is calculated by the as the following equation:
Latter ' s Energy − Former ' s × 100% Former ' s
Figure 8. Energy consumption of various sample rate (unit on Joules).
(3)
First, we tested the energy consumption of audio tracks of different bit rates and of the same sample rate of 44.1 kHz. The Average energy consumption in Figure 6 is 45.04 joules. The growth rate of energy consumption when bit rate is doubled is shown in Figure 7. The average growth rate is 4.28% when bit rate is doubled, which means that we can decode audio data in higher bit rates to enjoy higher audio quality with small increase of power consumption. Second, we tested the energy consumption of different sample rates and of the same bit rate of 48 kbps. The energy consumptions using various sample rates are shown in Figure 8. The average energy consumption is 43.17 joules. Figure 9 shows the growth rate of energy consumption when sample rate is doubled. The average growth rate when sample rate is doubled is 24.77%, which is much greater than the average growth rate when bit rate is doubled. Since audio CDs have sample rate of 44.1 kHz with high audio quality, it is not recommendable to decode audio data to replay on mobile embedded systems with higher sample rate than that.
Figure 9. Growth rate of energy consumption when sample rate is doubled.
5. CONCLUSIONS In this paper, we use AC3, MP2, MP3, MPC, OGG, and WMA to test energy consumption on embedded systems. Experiment results show that playing music encoded by AC3 consumes the least amount of electricity, but the sound quality of AC3 is the worst. OGG consumes the most electricity in our experiment. We adjust two important parameters: the bit rate and the sample rate. The experimental results of bit rate adjustment show that by increasing the bit rate to get better sound quality, does not increase too much energy consumption. On the other hand, experimental results show that increasing sample rate induces sharper increase of energy consumption. So, we suggest the users of embedded systems to use higher bit rates and keep or decrease the sample rate. This strategy normally results in a better sound quality and higher energy efficiency [1,6,11].
Figure 6. Energy consumption of various bit rates (unit on Joules).
6. ACKNOWLEDGMENT This work was supported in part by Taiwan Information Security Center (TWISC), National Science Council under grants NSC-952218-E-001-001,NSC-95-2218-E-011-015,iCAST NSC96-3114P-001-002-Y and NSC95-2221-E-029-020-MY3.
7. REFERENCES [1] A. Kejariwal, S. Gupta, A. Nicolau, N. Dutt, R. Gupta, “Energy Efficient Watermarking on Mobile Devices Using Proxy-based Partitioning,” IEEE Trans. on Very Large Scale Integration (VLSI) Systems, June 2006, pp.625-636.
Figure 7. Growth rate of energy consumption when bit rate is doubled.
407
[2] Chu-Hsing Lin, Jung-Chun Liu, Chun-Wei Liao, “Energy Consumption Analysis of Audio Applications on Mobile Handheld Devices,” TENCON 2007 – IEEE Region 10 Conference, Taipei, October 31, 2007, pp.124-125.
[8] National Instruments Corp. website [Online], http://www.ni.com [9] National Instruments, Optimizing LabVIEW Embedded Applications, website [Online], http://www.ni.com
[3] Chu-Hsing Lin, Jung-Chun Liu, Chun-Wei Liao, “Energy Analysis of Multimedia Video Decoding on Mobile Handheld Devices,” International Conference on Multimedia and Ubiquitous Engineering, Korea, April 26, 2007, pp.120 – 125.
[10] S. Vernon, “Design and Implementation of AC-3 Decoders,” IEEE Transactions on Consumer Electronics, Vol. 41, No. 3. Aug. 1995, pp.754-759. [11] Shih-Way Huang, Tsung-Han Tsai, Liang-Gee Chen, “A Low Complexity Design of Psycho-acoustic Model for MPEG-2/4 Advanced Audio Coding,” IEEE Transactions on Consumer Electronics, Vol 50, Nov. 2004, pp. 1209 – 1217.
[4] K. Brandenburg and G. Stoll, “ISO-MPEG-1 Audio: A Generic Standard for coding of High-Quality Digital Audio,” J. Audio Eng. Soc., Vol. 42, Oct. 1994, pp.780-792.
[12] SUPER©: website [Online], http://www.erightsoft.com/SUPER.html
[5] K. Brandenburg, G. Stoll, “ISO-MPEG-1 Audio: A Generic Standard for Coding of High Quality Digital Audio,” Collected Papers on Digital Audio Bit-Rate Reduction (Gilchrist and Grewin), AES, 1996.
[13] TCPMP website [Online], http://tcpmp.corecodec.org/ [14] Windows Media Audio Codecs web site [Online], http://www.microsoft.com/windows/windowsmedia/forpros/ codecs/audio.aspx
[6] K. Lahiri, A. Raghunathan, S. Dey, and D. Panigrahi, “Battery Driven System Design: a New Frontier in Low Power Design,” Proc. ASPDAC/VLSI Design 2002, Bangalore, India, January 2002, pp. 261-267.
[15] XIPH. Ogg Vorbis website [Online], http://www.xiph.org/vorbis/
[7] MPC website [Online], http://www.musepack.net/
408