src/3rdparty/libjpeg/jutils.c
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
     1 /*
     1 /*
     2  * jutils.c
     2  * jutils.c
     3  *
     3  *
     4  * Copyright (C) 1991-1996, Thomas G. Lane.
     4  * Copyright (C) 1991-1996, Thomas G. Lane.
       
     5  * Modified 2009 by Guido Vollbeding.
     5  * This file is part of the Independent JPEG Group's software.
     6  * This file is part of the Independent JPEG Group's software.
     6  * For conditions of distribution and use, see the accompanying README file.
     7  * For conditions of distribution and use, see the accompanying README file.
     7  *
     8  *
     8  * This file contains tables and miscellaneous utility routines needed
     9  * This file contains tables and miscellaneous utility routines needed
     9  * for both compression and decompression.
    10  * for both compression and decompression.
    61  53, 60, 61, 54, 47, 55, 62, 63,
    62  53, 60, 61, 54, 47, 55, 62, 63,
    62  63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
    63  63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
    63  63, 63, 63, 63, 63, 63, 63, 63
    64  63, 63, 63, 63, 63, 63, 63, 63
    64 };
    65 };
    65 
    66 
       
    67 const int jpeg_natural_order7[7*7+16] = {
       
    68   0,  1,  8, 16,  9,  2,  3, 10,
       
    69  17, 24, 32, 25, 18, 11,  4,  5,
       
    70  12, 19, 26, 33, 40, 48, 41, 34,
       
    71  27, 20, 13,  6, 14, 21, 28, 35,
       
    72  42, 49, 50, 43, 36, 29, 22, 30,
       
    73  37, 44, 51, 52, 45, 38, 46, 53,
       
    74  54,
       
    75  63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
       
    76  63, 63, 63, 63, 63, 63, 63, 63
       
    77 };
       
    78 
       
    79 const int jpeg_natural_order6[6*6+16] = {
       
    80   0,  1,  8, 16,  9,  2,  3, 10,
       
    81  17, 24, 32, 25, 18, 11,  4,  5,
       
    82  12, 19, 26, 33, 40, 41, 34, 27,
       
    83  20, 13, 21, 28, 35, 42, 43, 36,
       
    84  29, 37, 44, 45,
       
    85  63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
       
    86  63, 63, 63, 63, 63, 63, 63, 63
       
    87 };
       
    88 
       
    89 const int jpeg_natural_order5[5*5+16] = {
       
    90   0,  1,  8, 16,  9,  2,  3, 10,
       
    91  17, 24, 32, 25, 18, 11,  4, 12,
       
    92  19, 26, 33, 34, 27, 20, 28, 35,
       
    93  36,
       
    94  63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
       
    95  63, 63, 63, 63, 63, 63, 63, 63
       
    96 };
       
    97 
       
    98 const int jpeg_natural_order4[4*4+16] = {
       
    99   0,  1,  8, 16,  9,  2,  3, 10,
       
   100  17, 24, 25, 18, 11, 19, 26, 27,
       
   101  63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
       
   102  63, 63, 63, 63, 63, 63, 63, 63
       
   103 };
       
   104 
       
   105 const int jpeg_natural_order3[3*3+16] = {
       
   106   0,  1,  8, 16,  9,  2, 10, 17,
       
   107  18,
       
   108  63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
       
   109  63, 63, 63, 63, 63, 63, 63, 63
       
   110 };
       
   111 
       
   112 const int jpeg_natural_order2[2*2+16] = {
       
   113   0,  1,  8,  9,
       
   114  63, 63, 63, 63, 63, 63, 63, 63, /* extra entries for safety in decoder */
       
   115  63, 63, 63, 63, 63, 63, 63, 63
       
   116 };
       
   117 
    66 
   118 
    67 /*
   119 /*
    68  * Arithmetic utilities
   120  * Arithmetic utilities
    69  */
   121  */
    70 
   122