Hi there,
I took a look at the AOSP libjpeg code which is included in
git://android.git.kernel.org/platform/external/jpeg
during my flight back home (which incidentally had been diverted and landed me in Rio de Janeiro; not sure if I celebrate or cry) and noted the following things:
- There is a v6 implementation of the fast IDCT algorithm which lives in armv6_idct.S.
- The commit which adds this implementation was added October 2010, and there haven't been any changes since.
- The code that selects the decoder IDCT implementation in jddctmgr.c always uses that implementation if ANDROID_ARMV6_IDCT is defined.
- Google have an "ashmem" backing store implementation, and have code to enable tile-based mode. It's a fairly non-intrusive change to use ashmem since it just replaces jpeg_open_backing_store.
- The code is pretty much standard libjpeg without any structural changes to it.
- There isn't any NEON code in this branch.
- Mans has an optimized version here:
http://git.mansr.com/?p=libjpeg%3Ba=summary
I don't know if he's submitted this to AOSP or not.
This suggests to me that a simple drop-in of libjpeg-turbo might be actually easy to do, and that there is probably a significant performance benefit to be achieved. One thing to keep in mind is that this code still supports armv6, so we'd probably want to preserve that.
Thanks!