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

Side by Side Diff: third_party/libjpeg/jdmarker.c

Issue 28763005: Merge 228354 "Better handle SOS CSi values and order" (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1650/src/
Patch Set: Created 7 years, 2 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/google.jdmarker.patch ('k') | no next file » | 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 * jdmarker.c 2 * jdmarker.c
3 * 3 *
4 * Copyright (C) 1991-1998, Thomas G. Lane. 4 * Copyright (C) 1991-1998, Thomas G. Lane.
5 * This file is part of the Independent JPEG Group's software. 5 * This file is part of the Independent JPEG Group's software.
6 * For conditions of distribution and use, see the accompanying README file. 6 * For conditions of distribution and use, see the accompanying README file.
7 * 7 *
8 * This file contains routines to decode JPEG datastream markers. 8 * This file contains routines to decode JPEG datastream markers.
9 * Most of the complexity arises from our desire to support input 9 * Most of the complexity arises from our desire to support input
10 * suspension: if not all of the data for a marker is available, 10 * suspension: if not all of the data for a marker is available,
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
335 ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc); 335 ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
336 336
337 id_found: 337 id_found:
338 338
339 cinfo->cur_comp_info[i] = compptr; 339 cinfo->cur_comp_info[i] = compptr;
340 compptr->dc_tbl_no = (c >> 4) & 15; 340 compptr->dc_tbl_no = (c >> 4) & 15;
341 compptr->ac_tbl_no = (c ) & 15; 341 compptr->ac_tbl_no = (c ) & 15;
342 342
343 TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc, 343 TRACEMS3(cinfo, 1, JTRC_SOS_COMPONENT, cc,
344 compptr->dc_tbl_no, compptr->ac_tbl_no); 344 compptr->dc_tbl_no, compptr->ac_tbl_no);
345
346 /* This CSi (cc) should differ from the previous CSi */
347 for (ci = 0; ci < i; ci++) {
348 if (cinfo->cur_comp_info[ci] == compptr)
349 ERREXIT1(cinfo, JERR_BAD_COMPONENT_ID, cc);
350 }
345 } 351 }
346 352
347 /* Collect the additional scan parameters Ss, Se, Ah/Al. */ 353 /* Collect the additional scan parameters Ss, Se, Ah/Al. */
348 INPUT_BYTE(cinfo, c, return FALSE); 354 INPUT_BYTE(cinfo, c, return FALSE);
349 cinfo->Ss = c; 355 cinfo->Ss = c;
350 INPUT_BYTE(cinfo, c, return FALSE); 356 INPUT_BYTE(cinfo, c, return FALSE);
351 cinfo->Se = c; 357 cinfo->Se = c;
352 INPUT_BYTE(cinfo, c, return FALSE); 358 INPUT_BYTE(cinfo, c, return FALSE);
353 cinfo->Ah = (c >> 4) & 15; 359 cinfo->Ah = (c >> 4) & 15;
354 cinfo->Al = (c ) & 15; 360 cinfo->Al = (c ) & 15;
(...skipping 996 matching lines...) Expand 10 before | Expand all | Expand 10 after
1351 { 1357 {
1352 my_marker_ptr marker = (my_marker_ptr) cinfo->marker; 1358 my_marker_ptr marker = (my_marker_ptr) cinfo->marker;
1353 1359
1354 if (marker_code == (int) M_COM) 1360 if (marker_code == (int) M_COM)
1355 marker->process_COM = routine; 1361 marker->process_COM = routine;
1356 else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15) 1362 else if (marker_code >= (int) M_APP0 && marker_code <= (int) M_APP15)
1357 marker->process_APPn[marker_code - (int) M_APP0] = routine; 1363 marker->process_APPn[marker_code - (int) M_APP0] = routine;
1358 else 1364 else
1359 ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code); 1365 ERREXIT1(cinfo, JERR_UNKNOWN_MARKER, marker_code);
1360 } 1366 }
OLDNEW
« no previous file with comments | « third_party/libjpeg/google.jdmarker.patch ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698