Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(383)

Side by Side Diff: third_party/libjpeg_turbo/jdapistd.c

Issue 7554002: Updates libjpeg-turbo to 1.1.90 (r677) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/libjpeg_turbo/jctrans.c ('k') | third_party/libjpeg_turbo/jdarith.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * jdapistd.c 2 * jdapistd.c
3 * 3 *
4 * Copyright (C) 1994-1996, Thomas G. Lane. 4 * Copyright (C) 1994-1996, Thomas G. Lane.
5 * Copyright (C) 2010, D. R. Commander.
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 application interface code for the decompression half 9 * This file contains application interface code for the decompression half
9 * of the JPEG library. These are the "standard" API routines that are 10 * of the JPEG library. These are the "standard" API routines that are
10 * used in the normal full-decompression case. They are not used by a 11 * used in the normal full-decompression case. They are not used by a
11 * transcoding-only application. Note that if an application links in 12 * transcoding-only application. Note that if an application links in
12 * jpeg_start_decompress, it will end up linking in the entire decompressor. 13 * jpeg_start_decompress, it will end up linking in the entire decompressor.
13 * We thus must separate this file from jdapimin.c to avoid linking the 14 * We thus must separate this file from jdapimin.c to avoid linking the
14 * whole decompression library into a transcoder. 15 * whole decompression library into a transcoder.
15 */ 16 */
16 17
17 #define JPEG_INTERNALS 18 #define JPEG_INTERNALS
18 #include "jinclude.h" 19 #include "jinclude.h"
19 #include "jpeglib.h" 20 #include "jpeglib.h"
21 #include "jpegcomp.h"
20 22
21 23
22 /* Forward declarations */ 24 /* Forward declarations */
23 LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo)); 25 LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
24 26
25 27
26 /* 28 /*
27 * Decompression initialization. 29 * Decompression initialization.
28 * jpeg_read_header must be completed before calling this. 30 * jpeg_read_header must be completed before calling this.
29 * 31 *
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 } 197 }
196 198
197 /* Call progress monitor hook if present */ 199 /* Call progress monitor hook if present */
198 if (cinfo->progress != NULL) { 200 if (cinfo->progress != NULL) {
199 cinfo->progress->pass_counter = (long) cinfo->output_scanline; 201 cinfo->progress->pass_counter = (long) cinfo->output_scanline;
200 cinfo->progress->pass_limit = (long) cinfo->output_height; 202 cinfo->progress->pass_limit = (long) cinfo->output_height;
201 (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo); 203 (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
202 } 204 }
203 205
204 /* Verify that at least one iMCU row can be returned. */ 206 /* Verify that at least one iMCU row can be returned. */
205 lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->min_DCT_scaled_size; 207 lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->_min_DCT_scaled_size;
206 if (max_lines < lines_per_iMCU_row) 208 if (max_lines < lines_per_iMCU_row)
207 ERREXIT(cinfo, JERR_BUFFER_SIZE); 209 ERREXIT(cinfo, JERR_BUFFER_SIZE);
208 210
209 /* Decompress directly into user's buffer. */ 211 /* Decompress directly into user's buffer. */
210 if (! (*cinfo->coef->decompress_data) (cinfo, data)) 212 if (! (*cinfo->coef->decompress_data) (cinfo, data))
211 return 0; /* suspension forced, can do nothing more */ 213 return 0; /* suspension forced, can do nothing more */
212 214
213 /* OK, we processed one iMCU row. */ 215 /* OK, we processed one iMCU row. */
214 cinfo->output_scanline += lines_per_iMCU_row; 216 cinfo->output_scanline += lines_per_iMCU_row;
215 return lines_per_iMCU_row; 217 return lines_per_iMCU_row;
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 while (cinfo->input_scan_number <= cinfo->output_scan_number && 268 while (cinfo->input_scan_number <= cinfo->output_scan_number &&
267 ! cinfo->inputctl->eoi_reached) { 269 ! cinfo->inputctl->eoi_reached) {
268 if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED) 270 if ((*cinfo->inputctl->consume_input) (cinfo) == JPEG_SUSPENDED)
269 return FALSE; /* Suspend, come back later */ 271 return FALSE; /* Suspend, come back later */
270 } 272 }
271 cinfo->global_state = DSTATE_BUFIMAGE; 273 cinfo->global_state = DSTATE_BUFIMAGE;
272 return TRUE; 274 return TRUE;
273 } 275 }
274 276
275 #endif /* D_MULTISCAN_FILES_SUPPORTED */ 277 #endif /* D_MULTISCAN_FILES_SUPPORTED */
OLDNEW
« no previous file with comments | « third_party/libjpeg_turbo/jctrans.c ('k') | third_party/libjpeg_turbo/jdarith.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698