What share of Android devices benefits from Libjpeg-turbo optimisations?

1.4k views Asked by At

The libjpeg-turbo project "uses SIMD instructions (MMX, SSE2, NEON) to accelerate baseline JPEG compression and decompression on x86, x86-64, and ARM systems".

What sort of share of the Android device space supports these instructions and hence would get a speed benefit from using this library?

(I will be decompressing jpegs in native code accessed via NDK.)

3

There are 3 answers

0
BitBank On BEST ANSWER

The vast majority of Android devices in the market use some flavor of ARM CPU. High end phones (e.g. HTC Sensation) tend to use ARM CPUs which support NEON (Qualcomm Snapdragon, OMAP4, Samsung Exynos, Tegra3). Older/less capable phones usually have some ARMv6 chipset such as the Qualcomm MSM72xx series. Some good examples are the Google G1 and the original Motorola Droid.

Android tablets are a slightly different story. A large percentage of existing tablet devices are based on the nVidia Tegra2 chipset which does not include NEON support. Newer tablets based on Tegra3 (Asus Transformer Prime) do include support for NEON. A few rare tablets are based on Qualcomm's SOC (e.g. HTC Flyer) and also support NEON. There are also a few low cost tablets based on MIPS and even some with x86 chips. Then there is the relatively new category of Google-TV devices. For the past year these have been mainly x86, but the latest generation coming soon will have many which use ARM CPUs.

1
Mārtiņš Možeiko On

Currently all Android devices uses ARM instruction set. And most of them (but not all) supports NEON instruction set. NEON instructions is like SSE2 to x86.

0
Tom Gall On

for the libjpeg-turbo port that I did (and am still working on) there the following things to consider:

instruction set (armv6, armv7), SIMD (with or without NEON)

Libjpeg-turbo really shines on armv7 with NEON. NEON is arm's SIMD support.

Tegra, Tegra2 doesn't have NEON but it is armv7 for instance. So libjpeg-turbo can be built right now turning NEON support off but still use some of the armv7 optimizations... it just won't be as fast. It will still be faster than the libjpeg that is currently found in android.

There are armv6 chips out there being put into new phones running Android. Especially for the cheaper markets. Rather then getting into an exhaustive list, what needs to happen in the lib (and this is WIP type stuff for me currently) is getting various armv6 optimizations into libjpeg-turbo so there is an all around good story for libjpeg-turbo on android. Stay tuned.