jpeg image is corrupt with libjpeg-turbo on Android

Bug #826642 reported by Chao Yang
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libjpeg-turbo
Fix Released
Medium
Tom Gall

Bug Description

The library libjpeg-turbo has already been integrated into linaro-android-2.3.4, whose code can be downloaded from branch linaro_android_2.3.4

The jpeg files can be displayed with libjpeg-turbo on Linaro Android, but the displaying quality is not satisfactory. One of the typical example is the wallpaper. The snapshots of the wallpaper are attached in the zip file enclosed. Please refer to libjpeg-turbo.jpg for the wallpaper decoded with libjpeg-turbo and libjpeg.jpg is the one decoded with original libjpeg. The wallpaper source file is also enclosed.

Revision history for this message
Chao Yang (chaoyang) wrote :
Revision history for this message
Prashanth S (prashanth-srinivasan) wrote :

   I also ported libjpeg-turbo1.1.1 on to Android GingerBed.
   I also applied the patches,001-ugly-hack-use-correct-dequant-tables-with-fast-neon-.patch,0001-fix-color-conversion-
   for-Android.patch.

   Then when I booted the smdk board with this newly built image following are my observations
   The Home screen itself is corrupted.
   The Images in the thumbnails of gallary are not appearing properly.
   The Decoded images are blurred.
   Test image used is simple lena 256x256.jpeg.

Revision history for this message
Alexander Sack (asac) wrote :

please attach pics directly without zipping them. makes it easier to look at the bug.

Revision history for this message
Chao Yang (chaoyang) wrote :

Attach a snapshort of wallpaper decoded with libjpeg-turbo

Revision history for this message
Chao Yang (chaoyang) wrote :

Attach a snapshort of wallpaper decoded with original libjpeg

Revision history for this message
Chao Yang (chaoyang) wrote :

Attach the wallpaper source file

Fathi Boudra (fboudra)
Changed in libjpeg-turbo:
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Tom Gall (tom-gall) wrote :

Just curious could you also use djpeg from the command line on android with that same data file ?

I've decoded this same image with 1.1.90 on linux and I don't see any resolution issues. I'm thinking the right and proper fix is porting the android modifications forward to this version and using that as our basis. It would be difficult to make 11.08 but worth it.

Changed in libjpeg-turbo:
assignee: nobody → Tom Gall (tom-gall)
Fathi Boudra (fboudra)
summary: - jpeg displaying quality is not satisfactory with libjpeg-turbo on
- Android
+ jpeg image is corrupt with libjpeg-turbo on Android
Revision history for this message
Prashanth S (prashanth-srinivasan) wrote :

>Tom,
   In Android, I ran the djpeg in command line.The generated output images are fine.

I am attaching screen shots of 2 test images and the Home screen of android.

Input Test Images can be found at

Test 1.http://www.docjava.com/book/dsp/data/images/lena.JPEG
Test 2.http://www.greatarchaeology.com/Archaeological_Places/Rapa-Nui-National-Park.jpg

Regards
Prashanth

Fathi Boudra (fboudra)
Changed in libjpeg-turbo:
milestone: none → 1.1.90
status: Triaged → Fix Released
Revision history for this message
Fathi Boudra (fboudra) wrote :

the Android WG bugs #823960 and #826642 are not present in libjpeg-turbo 1.1.90.
see http://lists.linaro.org/pipermail/linaro-dev/2011-August/006747.html

Revision history for this message
Tom Gall (tom-gall) wrote :

This has not been fixed nor released for android yet. It IS working in our linux release however.

Changed in libjpeg-turbo:
status: Fix Released → Triaged
Revision history for this message
Prashanth S (prashanth-srinivasan) wrote :

>>Fathi Boudra "the Android WG bugs #823960 and #826642 are not present in libjpeg-turbo 1.1.90.
see http://lists.linaro.org/pipermail/linaro-dev/2011-August/006747.html"

    I tried with this code base on Android.I am able to build the libjpeg.so,but while trying to build the libskia of android ,I get compile time errors.http://paste.ubuntu.com/673733/. The header file"libjpeg.h" is very different for 1.1.1 and 1.1.90.

   Is there any way to port 1.1.90 on to Android?

Revision history for this message
Tom Gall (tom-gall) wrote :

@Prashanth - Correct the support for Android in 1.1.90 is a work in progress and covered by this blueprint https://blueprints.launchpad.net/libjpeg-turbo/+spec/engr-multimedia-codec-jpeg-android-1.2

Tom Gall (tom-gall)
Changed in libjpeg-turbo:
milestone: 1.1.90 → 1.1.90-android
Revision history for this message
Tom Gall (tom-gall) wrote :

I believe this is now fixed, however how does one load images into the Gallery App?

With the 1.1.90 based forward port I'm not seeing corruption of jpeg images now, web pages with know jpegs on them display correctly however I'd like to best recreate what was documented in this bug. Thanks!

Changed in libjpeg-turbo:
status: Triaged → Fix Committed
Tom Gall (tom-gall)
Changed in libjpeg-turbo:
status: Fix Committed → Fix Released
Revision history for this message
Zach Pfeffer (pfefferz) wrote :

Trying to fix the gallery app, we've had an sdcard mounting issue that I'm going to look at.

Revision history for this message
Prashanth S (prashanth-srinivasan) wrote :

Ref: 1.2-beta-linaro-andoid

   I integrated the 1.2-beta-linaro-andoid on to android ginger bread.

   1.The gallery app is decoding fine.(No Issues).
   2.The Images are properly decoded and displayed on the screen.
   3.Home screen is also properly displayed.

   Performance Part:
       Using djpeg tool, I am not seeing any performance improvement even for high res images(1096x1024).May be we should find some other way to measure the performance.

Revision history for this message
Tom Gall (tom-gall) wrote :

Prashanth,

   I plan to use tjbench especially now that there is a variant that builds and runs against the older libjpeg. This will help quite a bit for direct comparisons.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.