Energy Consumption Analysis of Image Encoding and Decoding Algorithms

Researchers of the Department of Control and Computer Engineering of the Politecnico di Torino in Italy analyzed the energy consumption of image encoding and decoding algorithms on an embedded system1. They presented their work at this year’s Workshop on Green and Sustainable Software GREENS (http://greens.cs.vu.nl/) in Florence, Italy, which was a part of the 37th International Conference on Software Engineering ICSE (http://2015.icse-conferences.org/).

The researchers compared the energy consumption of PNG and JPEG decoding and encoding algorithms on a Raspberry PI embedded system running Raspbian Linux. The energy consumption data was acquired with a power meter with a sampling frequency of 10Hz. The test code was implemented in C++ (compiled with g++), whereas the test drivers were implemented with Linux shell scripts. Each task of the test code was repeated 30 times to get a statistically relevant data set (cf. Central Limit Theorem2). In the tests they decoded and encoded three benchmark images with JPEG at three quality levels and PNG, resulting in total of 24 tasks1:16–7.

They found that PNG decoding and encoding is more energy intensive than JPEG.
More specifically, PNG decoding consumed approx. twice as much energy as JPEG in the highest applied quality level. For PNG encoding it is even worse: it consumed six times as much energy than JPEG in its highest applied quality level1:18.
Furthermore, they found that although their PNG decoder implementation caused a lower average power demand than their JPEG decoder impl., it took much more processing time to decode the image, which resulted in a higher energy consumption1:20–1.
Additionally, they observed that the processing time, regardless of decoding or encoding, can be used to predict most of the energy consumption1:19.

Now, what can practitioners do with these findings? It cannot be a good recommendation to replace PNG with JPEG for images and icons, because especially in the case of icons, PNG offers the possibility to have a transparent background, which is often necessary if you use the same set of icons in several applications with different background colors or in applications where users can choose several color themes.

From my point of view, and this is also the position of the researchers1:21, the usage of PNG as the de facto standard for images and icons in mobile and web applications opens some possibilities for further investigation and improvement of the energy consumption of PNG decoding and encoding algorithms.

  1. Rashid, M., Ardito, L., Torchiano, M.: Energy Consumption Analysis of Image Encoding and Decoding Algorithms. In:: 2015 IEEE/ACM 4th International Workshop on Green and Sustainable Software (GREENS 2015), pp. 15–21. IEEE Computer Society Conference Publishing Services (2015). doi:10.1109/GREENS.2015.10
  2. Siegrist, K.: The Central Limit Theorem. http://www.math.uah.edu/stat/sample/CLT.html#nor, 2015-08-16