Energy Consumption Analysis

of Image Encoding and Decoding
Algorithms
Mohammad Rashid, Luca Ardito, and Marco Torchiano
GREENS 2015
Motivation
Energy consumption represents an
important issue with limited and
embedded devices
On all connected devices
IIIIIIIIII
I::::::::I
I::::::::I
II::::::II
I::::I mmmmmmm mmmmmmm aaaaaaaaaaaaa ggggggggg ggggg eeeeeeeeeeee ssssssssss aaaaaaaaaaaaa rrrrr rrrrrrrrr eeeeeeeeeeee
I::::I mm:::::::m m:::::::mm a::::::::::::a g:::::::::ggg::::g ee::::::::::::ee ss::::::::::s a::::::::::::a r::::rrr:::::::::r ee::::::::::::ee
I::::I m::::::::::mm::::::::::m aaaaaaaaa:::::a g:::::::::::::::::g e::::::eeeee:::::eess:::::::::::::s aaaaaaaaa:::::ar:::::::::::::::::r e::::::eeeee:::::ee
I::::I m::::::::::::::::::::::m a::::ag::::::ggggg::::::gge::::::e e:::::es::::::ssss:::::s a::::arr::::::rrrrr::::::re::::::e e:::::e
I::::I m:::::mmm::::::mmm:::::m aaaaaaa:::::ag:::::g g:::::g e:::::::eeeee::::::e s:::::s ssssss aaaaaaa:::::a r:::::r r:::::re:::::::eeeee::::::e
I::::I m::::m m::::m m::::m aa::::::::::::ag:::::g g:::::g e:::::::::::::::::e s::::::s aa::::::::::::a r:::::r rrrrrrre:::::::::::::::::e
I::::I m::::m m::::m m::::m a::::aaaa::::::ag:::::g g:::::g e::::::eeeeeeeeeee s::::::s a::::aaaa::::::a r:::::r e::::::eeeeeeeeeee
I::::I m::::m m::::m m::::ma::::a a:::::ag::::::g g:::::g e:::::::e ssssss s:::::s a::::a a:::::a r:::::r e:::::::e
II::::::IIm::::m m::::m m::::ma::::a a:::::ag:::::::ggggg:::::g e::::::::e s:::::ssss::::::s a::::a a:::::a r:::::r e::::::::e
I::::::::Im::::m m::::m m::::ma:::::aaaa::::::a g::::::::::::::::g e::::::::eeeeeeee s::::::::::::::s a:::::aaaa::::::a r:::::r e::::::::eeeeeeee
I::::::::Im::::m m::::m m::::m a::::::::::aa:::a gg::::::::::::::g ee:::::::::::::e s:::::::::::ss a::::::::::aa:::ar:::::r ee:::::::::::::e
IIIIIIIIIImmmmmm mmmmmm mmmmmm aaaaaaaaaa aaaa gggggggg::::::g eeeeeeeeeeeeee sssssssssss aaaaaaaaaa aaaarrrrrrr eeeeeeeeeeeeee
g:::::g
gggggg g:::::g
g:::::gg gg:::::g
g::::::ggg:::::::g
gg:::::::::::::g
ggg::::::ggg
gggggg
bbbbbbbb
b::::::b iiii iiii tttt
b::::::b i::::i i::::i ttt:::t
b::::::b iiii iiii t:::::t
b:::::b t:::::t
uuuuuu uuuuuu b:::::bbbbbbbbb iiiiiii qqqqqqqqq qqqqquuuuuu uuuuuu iiiiiiittttttt:::::ttttttt ooooooooooo uuuuuu uuuuuu ssssssssss
u::::u u::::u b::::::::::::::bb i:::::i q:::::::::qqq::::qu::::u u::::u i:::::it:::::::::::::::::t oo:::::::::::oo u::::u u::::u ss::::::::::s
u::::u u::::u b::::::::::::::::b i::::i q:::::::::::::::::qu::::u u::::u i::::it:::::::::::::::::t o:::::::::::::::ou::::u u::::u ss:::::::::::::s
u::::u u::::u b:::::bbbbb:::::::b i::::i q::::::qqqqq::::::qqu::::u u::::u i::::itttttt:::::::tttttt o:::::ooooo:::::ou::::u u::::u s::::::ssss:::::s
u::::u u::::u b:::::b b::::::b i::::i q:::::q q:::::q u::::u u::::u i::::i t:::::t o::::o o::::ou::::u u::::u s:::::s ssssss
u::::u u::::u b:::::b b:::::b i::::i q:::::q q:::::q u::::u u::::u i::::i t:::::t o::::o o::::ou::::u u::::u s::::::s
u::::u u::::u b:::::b b:::::b i::::i q:::::q q:::::q u::::u u::::u i::::i t:::::t o::::o o::::ou::::u u::::u s::::::s
u:::::uuuu:::::u b:::::b b:::::b i::::i q::::::q q:::::q u:::::uuuu:::::u i::::i t:::::t tttttto::::o o::::ou:::::uuuu:::::u ssssss s:::::s
u:::::::::::::::uub:::::bbbbbb::::::bi::::::iq:::::::qqqqq:::::q u:::::::::::::::uui::::::i t::::::tttt:::::to:::::ooooo:::::ou:::::::::::::::uus:::::ssss::::::s
u:::::::::::::::ub::::::::::::::::b i::::::i q::::::::::::::::q u:::::::::::::::ui::::::i tt::::::::::::::to:::::::::::::::o u:::::::::::::::us::::::::::::::s
uu::::::::uu:::ub:::::::::::::::b i::::::i qq::::::::::::::q uu::::::::uu:::ui::::::i tt:::::::::::tt oo:::::::::::oo uu::::::::uu:::u s:::::::::::ss
uuuuuuuu uuuubbbbbbbbbbbbbbbb iiiiiiii qqqqqqqq::::::q uuuuuuuu uuuuiiiiiiii ttttttttttt ooooooooooo uuuuuuuu uuuu sssssssssss
q:::::q
q:::::q
q:::::::q
q:::::::q
q:::::::q
qqqqqqqqq
Plan
Object: image codec algorithms
Purpose: assessing differences
Focus: energy consumption
Context: Raspberry PI
Research Questions
• RQ1: Do different codecs consume different amounts
of energy for encoding/decoding images?
• Metric: total energy
• RQ2: How closely are energy consumption and
computational performance correlated?
• Metrics: Enegy vs. time, and Power

Test Images
A
B
C
768K
2.4M
3.2M
CodecsPNG JPG, q:10
JPG, q:80JPG, q:40
Experimental design
.BMP
PNG
Encoder
JPG
Encoder
JPG
Encoder
JPG
Encoder
Q10
Q40
Q80
PNG
Decoder
JPG
Decoder
JPG
Decoder
JPG
Decoder
Instrumentation
Raspberry Pi + USB Tester OLED Backpack 2.0
RQ1: codec consumption
Task ☞ DECODING ENCODING
CODEC☟
Energy Time Energy Time
PNG 1.78 9.6 6.16 39.0
JPEG, Q:10 0.94 4.5 1.05 7.6
JPEG, Q:40 0.76 3.4 0.84 2.7
JPEG, Q:80 0.68 2.9 0.78 2.7
Average values over the three images, values for five repetitions of the task
Consumption
==
70k PNG decode
130k JPG:10 decode
160k JPG:40 decode
180k JPG:80 decode
{
or
or
or
(c) iFixIt - Walter Galan
RQ2: Energy and complexity
0.0
2.5
5.0
7.5
10.0
0 20 40
Time [s]
Energy[s]
Process
Decode
Encode
E = P · t
Mean Power vs. Total Energy
A
B
C
A
B
C
DecodeEncode
jpg:Q80 jpg:Q40 jpg:Q10 png:LL
Codec:Quality
Image
0.15
0.17
0.20
0.23
Power A
B
C
A
B
C
DecodeEncode
jpg:Q80 jpg:Q40 jpg:Q10 png:LL
Codec:Quality
Image
2.5
5.0
7.5
Energy
Key Findings
• Decoding a PNG image consumes ~2 times as much
energy as for a JPG image
• ~6 times for encoding
• Energy consumption is strongly correlated to time
• Other factors affect the energy marginally
• The average power consumption variation among
algorithms is ~10%
Open Questions
• Can we identify algorithms that with a similar
computational complexity consume less power?
• What are the features in software that can affect
power consumption?

Energy Consumption Analysis
 of Image Encoding and Decoding Algorithms

  • 1.
    Energy Consumption Analysis
 ofImage Encoding and Decoding Algorithms Mohammad Rashid, Luca Ardito, and Marco Torchiano GREENS 2015
  • 2.
    Motivation Energy consumption representsan important issue with limited and embedded devices
  • 3.
    On all connecteddevices IIIIIIIIII I::::::::I I::::::::I II::::::II I::::I mmmmmmm mmmmmmm aaaaaaaaaaaaa ggggggggg ggggg eeeeeeeeeeee ssssssssss aaaaaaaaaaaaa rrrrr rrrrrrrrr eeeeeeeeeeee I::::I mm:::::::m m:::::::mm a::::::::::::a g:::::::::ggg::::g ee::::::::::::ee ss::::::::::s a::::::::::::a r::::rrr:::::::::r ee::::::::::::ee I::::I m::::::::::mm::::::::::m aaaaaaaaa:::::a g:::::::::::::::::g e::::::eeeee:::::eess:::::::::::::s aaaaaaaaa:::::ar:::::::::::::::::r e::::::eeeee:::::ee I::::I m::::::::::::::::::::::m a::::ag::::::ggggg::::::gge::::::e e:::::es::::::ssss:::::s a::::arr::::::rrrrr::::::re::::::e e:::::e I::::I m:::::mmm::::::mmm:::::m aaaaaaa:::::ag:::::g g:::::g e:::::::eeeee::::::e s:::::s ssssss aaaaaaa:::::a r:::::r r:::::re:::::::eeeee::::::e I::::I m::::m m::::m m::::m aa::::::::::::ag:::::g g:::::g e:::::::::::::::::e s::::::s aa::::::::::::a r:::::r rrrrrrre:::::::::::::::::e I::::I m::::m m::::m m::::m a::::aaaa::::::ag:::::g g:::::g e::::::eeeeeeeeeee s::::::s a::::aaaa::::::a r:::::r e::::::eeeeeeeeeee I::::I m::::m m::::m m::::ma::::a a:::::ag::::::g g:::::g e:::::::e ssssss s:::::s a::::a a:::::a r:::::r e:::::::e II::::::IIm::::m m::::m m::::ma::::a a:::::ag:::::::ggggg:::::g e::::::::e s:::::ssss::::::s a::::a a:::::a r:::::r e::::::::e I::::::::Im::::m m::::m m::::ma:::::aaaa::::::a g::::::::::::::::g e::::::::eeeeeeee s::::::::::::::s a:::::aaaa::::::a r:::::r e::::::::eeeeeeee I::::::::Im::::m m::::m m::::m a::::::::::aa:::a gg::::::::::::::g ee:::::::::::::e s:::::::::::ss a::::::::::aa:::ar:::::r ee:::::::::::::e IIIIIIIIIImmmmmm mmmmmm mmmmmm aaaaaaaaaa aaaa gggggggg::::::g eeeeeeeeeeeeee sssssssssss aaaaaaaaaa aaaarrrrrrr eeeeeeeeeeeeee g:::::g gggggg g:::::g g:::::gg gg:::::g g::::::ggg:::::::g gg:::::::::::::g ggg::::::ggg gggggg bbbbbbbb b::::::b iiii iiii tttt b::::::b i::::i i::::i ttt:::t b::::::b iiii iiii t:::::t b:::::b t:::::t uuuuuu uuuuuu b:::::bbbbbbbbb iiiiiii qqqqqqqqq qqqqquuuuuu uuuuuu iiiiiiittttttt:::::ttttttt ooooooooooo uuuuuu uuuuuu ssssssssss u::::u u::::u b::::::::::::::bb i:::::i q:::::::::qqq::::qu::::u u::::u i:::::it:::::::::::::::::t oo:::::::::::oo u::::u u::::u ss::::::::::s u::::u u::::u b::::::::::::::::b i::::i q:::::::::::::::::qu::::u u::::u i::::it:::::::::::::::::t o:::::::::::::::ou::::u u::::u ss:::::::::::::s u::::u u::::u b:::::bbbbb:::::::b i::::i q::::::qqqqq::::::qqu::::u u::::u i::::itttttt:::::::tttttt o:::::ooooo:::::ou::::u u::::u s::::::ssss:::::s u::::u u::::u b:::::b b::::::b i::::i q:::::q q:::::q u::::u u::::u i::::i t:::::t o::::o o::::ou::::u u::::u s:::::s ssssss u::::u u::::u b:::::b b:::::b i::::i q:::::q q:::::q u::::u u::::u i::::i t:::::t o::::o o::::ou::::u u::::u s::::::s u::::u u::::u b:::::b b:::::b i::::i q:::::q q:::::q u::::u u::::u i::::i t:::::t o::::o o::::ou::::u u::::u s::::::s u:::::uuuu:::::u b:::::b b:::::b i::::i q::::::q q:::::q u:::::uuuu:::::u i::::i t:::::t tttttto::::o o::::ou:::::uuuu:::::u ssssss s:::::s u:::::::::::::::uub:::::bbbbbb::::::bi::::::iq:::::::qqqqq:::::q u:::::::::::::::uui::::::i t::::::tttt:::::to:::::ooooo:::::ou:::::::::::::::uus:::::ssss::::::s u:::::::::::::::ub::::::::::::::::b i::::::i q::::::::::::::::q u:::::::::::::::ui::::::i tt::::::::::::::to:::::::::::::::o u:::::::::::::::us::::::::::::::s uu::::::::uu:::ub:::::::::::::::b i::::::i qq::::::::::::::q uu::::::::uu:::ui::::::i tt:::::::::::tt oo:::::::::::oo uu::::::::uu:::u s:::::::::::ss uuuuuuuu uuuubbbbbbbbbbbbbbbb iiiiiiii qqqqqqqq::::::q uuuuuuuu uuuuiiiiiiii ttttttttttt ooooooooooo uuuuuuuu uuuu sssssssssss q:::::q q:::::q q:::::::q q:::::::q q:::::::q qqqqqqqqq
  • 4.
    Plan Object: image codecalgorithms Purpose: assessing differences Focus: energy consumption Context: Raspberry PI
  • 5.
    Research Questions • RQ1:Do different codecs consume different amounts of energy for encoding/decoding images? • Metric: total energy • RQ2: How closely are energy consumption and computational performance correlated? • Metrics: Enegy vs. time, and Power

  • 6.
  • 7.
  • 8.
  • 9.
    Instrumentation Raspberry Pi +USB Tester OLED Backpack 2.0
  • 10.
    RQ1: codec consumption Task☞ DECODING ENCODING CODEC☟ Energy Time Energy Time PNG 1.78 9.6 6.16 39.0 JPEG, Q:10 0.94 4.5 1.05 7.6 JPEG, Q:40 0.76 3.4 0.84 2.7 JPEG, Q:80 0.68 2.9 0.78 2.7 Average values over the three images, values for five repetitions of the task
  • 11.
    Consumption == 70k PNG decode 130kJPG:10 decode 160k JPG:40 decode 180k JPG:80 decode { or or or (c) iFixIt - Walter Galan
  • 12.
    RQ2: Energy andcomplexity 0.0 2.5 5.0 7.5 10.0 0 20 40 Time [s] Energy[s] Process Decode Encode E = P · t
  • 13.
    Mean Power vs.Total Energy A B C A B C DecodeEncode jpg:Q80 jpg:Q40 jpg:Q10 png:LL Codec:Quality Image 0.15 0.17 0.20 0.23 Power A B C A B C DecodeEncode jpg:Q80 jpg:Q40 jpg:Q10 png:LL Codec:Quality Image 2.5 5.0 7.5 Energy
  • 14.
    Key Findings • Decodinga PNG image consumes ~2 times as much energy as for a JPG image • ~6 times for encoding • Energy consumption is strongly correlated to time • Other factors affect the energy marginally • The average power consumption variation among algorithms is ~10%
  • 16.
    Open Questions • Canwe identify algorithms that with a similar computational complexity consume less power? • What are the features in software that can affect power consumption?