summaryrefslogtreecommitdiffstats
path: root/firefox4-libjpeg-turbo.patch
blob: c2fee7ffd21d0b4fd0bc4c4a6b882e79e711b5c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
diff -up mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp
--- mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp.jpeg-turbo	2011-01-22 01:28:24.000000000 +0100
+++ mozilla-central/modules/libpr0n/decoders/nsJPEGDecoder.cpp	2011-01-22 16:47:15.003018762 +0100
@@ -416,14 +416,6 @@ nsJPEGDecoder::WriteInternal(const char 
       return; /* I/O suspension */
     }
 
-    /* Force to use our YCbCr to Packed RGB converter when possible */
-    if (!mTransform && (mCMSMode != eCMSMode_All) &&
-        mInfo.jpeg_color_space == JCS_YCbCr && mInfo.out_color_space == JCS_RGB) {
-      /* Special case for the most common case: transform from YCbCr direct into packed ARGB */
-      mInfo.out_color_components = 4; /* Packed ARGB pixels are always 4 bytes...*/
-      mInfo.cconvert->color_convert = ycc_rgb_convert_argb;
-    }
-
     /* If this is a progressive JPEG ... */
     mState = mInfo.buffered_image ? JPEG_DECOMPRESS_PROGRESSIVE : JPEG_DECOMPRESS_SEQUENTIAL;
   }
@@ -568,15 +560,6 @@ nsJPEGDecoder::OutputScanlines(PRBool* s
       PRUint32 *imageRow = ((PRUint32*)mImageData) +
                            (mInfo.output_scanline * mInfo.output_width);
 
-      if (mInfo.cconvert->color_convert == ycc_rgb_convert_argb) {
-        /* Special case: scanline will be directly converted into packed ARGB */
-        if (jpeg_read_scanlines(&mInfo, (JSAMPARRAY)&imageRow, 1) != 1) {
-          *suspend = PR_TRUE; /* suspend */
-          break;
-        }
-        continue; /* all done for this row! */
-      }
-
       JSAMPROW sampleRow = (JSAMPROW)imageRow;
       if (mInfo.output_components == 3) {
         /* Put the pixels at end of row to enable in-place expansion */