]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 21 Feb 2012 12:12:11 +0000 (12:12 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 21 Feb 2012 12:12:11 +0000 (12:12 +0000)
coders/jpeg.c

index c1a558ad1cd86a04ca84b7125f8c524b7203515e..e280713644b5af3d14c49355571f5d385e86ac5a 100644 (file)
@@ -1796,36 +1796,36 @@ static MagickBooleanType WriteJPEGImage(const ImageInfo *image_info,
   static const unsigned int
     CbQTable[DCTSIZE2] =
     {
-         17,    19,    24,    37,    68,   148,   384,  1186,
-         19,    20,    26,    40,    74,   162,   419,  1293,
-         24,    26,    34,    52,    96,   210,   544,  1676,
-         37,    40,    52,    81,   148,   323,   838,  2585,
-         68,    74,    96,   148,   272,   593,  1537,  4741,
-        148,   162,   210,   323,   593,  1293,  3353, 10338,
-        384,   419,   544,   838,  1537,  3353,  8694, 12725,
-       1186,  1293,  1676,  2585,  4741, 10338, 12725, 12725
+      17,   19,   24,   37,   68,   148,   384,   1186,
+      19,   20,   26,   40,   74,   162,   419,   1293,
+      24,   26,   34,   52,   96,   210,   544,   1676,
+      37,   40,   52,   81,   148,  323,   838,   2585,
+      68,   74,   96,   148,  272,  593,   1537,  4741,
+      148,  162,  210,  323,  593,  1293,  3353,  10338,
+      384,  419,  544,  838,  1537, 3353,  8694,  12725,
+      1186, 1293, 1676, 2585, 4741, 10338, 12725, 12725
     },
     CrQTable[DCTSIZE2] =
     {
-         17,    18,    22,    31,    50,    92,   193,   465,
-         18,    19,    24,    33,    54,    98,   207,   498,
-         22,    24,    29,    41,    66,   120,   253,   609,
-         31,    33,    41,    57,    92,   169,   355,   854,
-         50,    54,    66,    92,   148,   271,   570,  1370,
-         92,    98,   120,   169,   271,   498,  1046,  2516,
-        193,   207,   253,   355,   570,  1046,  2198,  5289,
-        465,   498,   609,   854,  1370,  2516,  5289, 12725
+      17,   18,   22,   31,   50,   92,    193,   465,
+      18,   19,   24,   33,   54,   98,    207,   498,
+      22,   24,   29,   41,   66,   120,   253,   609,
+      31,   33,   41,   57,   92,   169,   355,   854,
+      50,   54,   66,   92,   148,  271,   570,   1370,
+      92,   98,   120,  169,  271,  498,   1046,  2516,
+      193,  207,  253,  355,  570,  1046,  2198,  5289,
+      465,  498,  609,  854,  1370, 2516,  5289,  12725
     },
     LuminanceQTable[DCTSIZE2] =
     {
-         16,    11,    11,    15,    21,    34,    50,    65,
-         11,    12,    13,    18,    24,    48,    62,    69,
-         13,    13,    16,    23,    38,    56,    72,    71,
-         15,    18,    23,    29,    53,    77,    83,    80,
-         21,    24,    38,    53,    68,    98,   104,   100,
-         30,    44,    56,    73,    92,   105,   117,   117,
-         50,    62,    74,    83,   104,   119,   121,   122,
-         67,    77,    79,    88,   108,   119,   122,   122
+      17, 12, 14, 17, 22, 30, 45, 72,
+      12, 13, 14, 17, 22, 31, 46, 74,
+      14, 14, 16, 19, 25, 35, 52, 83,
+      17, 17, 19, 23, 30, 41, 62, 100,
+      22, 22, 25, 30, 39, 54, 80, 129,
+      30, 31, 35, 41, 54, 74, 111, 178,
+      45, 46, 52, 62, 80, 111, 166, 267,
+      72, 74, 83, 100, 129, 178, 267, 428
     };
 
   /*
@@ -2153,8 +2153,8 @@ static MagickBooleanType WriteJPEGImage(const ImageInfo *image_info,
       jpeg_info.comp_info[i].h_samp_factor=1;
       jpeg_info.comp_info[i].v_samp_factor=1;
     }
-  if ((jpeg_info.comp_info[0].h_samp_factor > 1) &&
-      (jpeg_info.comp_info[0].v_samp_factor > 1))
+  if ((jpeg_info.comp_info[0].h_samp_factor >= 2) &&
+      (jpeg_info.comp_info[0].v_samp_factor >= 2))
     {
       /*
         Nicolas Robidoux's remix of ISO-IEC 10918-1 : 1993(E) Annex K.