~cosme/ubuntu/precise/freeimage/freeimage-3.15.1

« back to all changes in this revision

Viewing changes to Source/LibJPEG/jdinput.c

  • Committer: Bazaar Package Importer
  • Author(s): Cosme Domínguez Díaz
  • Date: 2010-07-20 13:42:15 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100720134215-xt1454zaedv3b604
Tags: 3.13.1-0ubuntu1
* New upstream release. Closes: (LP: #607800)
 - Updated debian/freeimage-get-orig-source script.
 - Removing no longer necessary debian/patches/* and
   the patch system in debian/rules.
 - Updated debian/rules to work with the new Makefiles.
 - Drop from -O3 to -O2 and use lzma compression saves
   ~10 MB of free space. 
* lintian stuff
 - fixed debhelper-but-no-misc-depends
 - fixed ldconfig-symlink-missing-for-shlib

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * jdinput.c
3
3
 *
4
4
 * Copyright (C) 1991-1997, Thomas G. Lane.
 
5
 * Modified 2002-2009 by Guido Vollbeding.
5
6
 * This file is part of the Independent JPEG Group's software.
6
7
 * For conditions of distribution and use, see the accompanying README file.
7
8
 *
8
9
 * This file contains input control logic for the JPEG decompressor.
9
10
 * These routines are concerned with controlling the decompressor's input
10
11
 * processing (marker reading and coefficient decoding).  The actual input
11
 
 * reading is done in jdmarker.c, jdhuff.c, and jdphuff.c.
 
12
 * reading is done in jdmarker.c, jdhuff.c, and jdarith.c.
12
13
 */
13
14
 
14
15
#define JPEG_INTERNALS
74
75
   * In the full decompressor, this will be overridden by jdmaster.c;
75
76
   * but in the transcoder, jdmaster.c is not used, so we must do it here.
76
77
   */
77
 
  cinfo->min_DCT_scaled_size = DCTSIZE;
 
78
  cinfo->min_DCT_h_scaled_size = DCTSIZE;
 
79
  cinfo->min_DCT_v_scaled_size = DCTSIZE;
78
80
 
79
81
  /* Compute dimensions of components */
80
82
  for (ci = 0, compptr = cinfo->comp_info; ci < cinfo->num_components;
81
83
       ci++, compptr++) {
82
 
    compptr->DCT_scaled_size = DCTSIZE;
 
84
    compptr->DCT_h_scaled_size = DCTSIZE;
 
85
    compptr->DCT_v_scaled_size = DCTSIZE;
83
86
    /* Size in DCT blocks */
84
87
    compptr->width_in_blocks = (JDIMENSION)
85
88
      jdiv_round_up((long) cinfo->image_width * (long) compptr->h_samp_factor,
138
141
    compptr->MCU_width = 1;
139
142
    compptr->MCU_height = 1;
140
143
    compptr->MCU_blocks = 1;
141
 
    compptr->MCU_sample_width = compptr->DCT_scaled_size;
 
144
    compptr->MCU_sample_width = compptr->DCT_h_scaled_size;
142
145
    compptr->last_col_width = 1;
143
146
    /* For noninterleaved scans, it is convenient to define last_row_height
144
147
     * as the number of block rows present in the last iMCU row.
174
177
      compptr->MCU_width = compptr->h_samp_factor;
175
178
      compptr->MCU_height = compptr->v_samp_factor;
176
179
      compptr->MCU_blocks = compptr->MCU_width * compptr->MCU_height;
177
 
      compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_scaled_size;
 
180
      compptr->MCU_sample_width = compptr->MCU_width * compptr->DCT_h_scaled_size;
178
181
      /* Figure number of non-dummy blocks in last MCU column & row */
179
182
      tmp = (int) (compptr->width_in_blocks % compptr->MCU_width);
180
183
      if (tmp == 0) tmp = compptr->MCU_width;