src/3rdparty/libjpeg/jdtrans.c
branchGCC_SURGE
changeset 31 5daf16870df6
parent 30 5dc02b23752f
equal deleted inserted replaced
27:93b982ccede2 31:5daf16870df6
     1 /*
     1 /*
     2  * jdtrans.c
     2  * jdtrans.c
     3  *
     3  *
     4  * Copyright (C) 1995-1997, Thomas G. Lane.
     4  * Copyright (C) 1995-1997, Thomas G. Lane.
       
     5  * Modified 2000-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 library routines for transcoding decompression,
     9  * This file contains library routines for transcoding decompression,
     9  * that is, reading raw DCT coefficient arrays from an input JPEG file.
    10  * that is, reading raw DCT coefficient arrays from an input JPEG file.
    97 transdecode_master_selection (j_decompress_ptr cinfo)
    98 transdecode_master_selection (j_decompress_ptr cinfo)
    98 {
    99 {
    99   /* This is effectively a buffered-image operation. */
   100   /* This is effectively a buffered-image operation. */
   100   cinfo->buffered_image = TRUE;
   101   cinfo->buffered_image = TRUE;
   101 
   102 
       
   103   /* Compute output image dimensions and related values. */
       
   104   jpeg_core_output_dimensions(cinfo);
       
   105 
   102   /* Entropy decoding: either Huffman or arithmetic coding. */
   106   /* Entropy decoding: either Huffman or arithmetic coding. */
   103   if (cinfo->arith_code) {
   107   if (cinfo->arith_code)
   104     ERREXIT(cinfo, JERR_ARITH_NOTIMPL);
   108     jinit_arith_decoder(cinfo);
   105   } else {
   109   else {
   106     if (cinfo->progressive_mode) {
   110     jinit_huff_decoder(cinfo);
   107 #ifdef D_PROGRESSIVE_SUPPORTED
       
   108       jinit_phuff_decoder(cinfo);
       
   109 #else
       
   110       ERREXIT(cinfo, JERR_NOT_COMPILED);
       
   111 #endif
       
   112     } else
       
   113       jinit_huff_decoder(cinfo);
       
   114   }
   111   }
   115 
   112 
   116   /* Always get a full-image coefficient buffer. */
   113   /* Always get a full-image coefficient buffer. */
   117   jinit_d_coef_controller(cinfo, TRUE);
   114   jinit_d_coef_controller(cinfo, TRUE);
   118 
   115