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

Side by Side Diff: jdhuff.c

Issue 1291463002: Patch fix for "Add jpeg_skip_scanlines() API to libjpeg-turbo" (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git@master
Patch Set: Created 5 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
« no previous file with comments | « no previous file | 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 * jdhuff.c 2 * jdhuff.c
3 * 3 *
4 * This file was part of the Independent JPEG Group's software: 4 * This file was part of the Independent JPEG Group's software:
5 * Copyright (C) 1991-1997, Thomas G. Lane. 5 * Copyright (C) 1991-1997, Thomas G. Lane.
6 * libjpeg-turbo Modifications: 6 * libjpeg-turbo Modifications:
7 * Copyright (C) 2009-2011, 2015, D. R. Commander. 7 * Copyright (C) 2009-2011, 2015, D. R. Commander.
8 * For conditions of distribution and use, see the accompanying README file. 8 * For conditions of distribution and use, see the accompanying README file.
9 * 9 *
10 * This file contains Huffman entropy decoding routines. 10 * This file contains Huffman entropy decoding routines.
(...skipping 642 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 int blkn; 653 int blkn;
654 savable_state state; 654 savable_state state;
655 /* Outer loop handles each block in the MCU */ 655 /* Outer loop handles each block in the MCU */
656 656
657 /* Load up working state */ 657 /* Load up working state */
658 BITREAD_LOAD_STATE(cinfo,entropy->bitstate); 658 BITREAD_LOAD_STATE(cinfo,entropy->bitstate);
659 buffer = (JOCTET *) br_state.next_input_byte; 659 buffer = (JOCTET *) br_state.next_input_byte;
660 ASSIGN_STATE(state, entropy->saved); 660 ASSIGN_STATE(state, entropy->saved);
661 661
662 for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) { 662 for (blkn = 0; blkn < cinfo->blocks_in_MCU; blkn++) {
663 JBLOCKROW block = MCU_data[blkn]; 663 JBLOCKROW block = MCU_data ? MCU_data[blkn] : NULL;
Noel Gordon 2015/08/12 00:39:22 Confusing: this change was in the original submit,
664 d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn]; 664 d_derived_tbl * dctbl = entropy->dc_cur_tbls[blkn];
665 d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn]; 665 d_derived_tbl * actbl = entropy->ac_cur_tbls[blkn];
666 register int s, k, r, l; 666 register int s, k, r, l;
667 667
668 HUFF_DECODE_FAST(s, l, dctbl, slow_decode_mcu); 668 HUFF_DECODE_FAST(s, l, dctbl, slow_decode_mcu);
669 if (s) { 669 if (s) {
670 FILL_BIT_BUFFER_FAST 670 FILL_BIT_BUFFER_FAST
671 r = GET_BITS(s); 671 r = GET_BITS(s);
672 s = HUFF_EXTEND(r, s); 672 s = HUFF_EXTEND(r, s);
673 } 673 }
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
804 SIZEOF(huff_entropy_decoder)); 804 SIZEOF(huff_entropy_decoder));
805 cinfo->entropy = (struct jpeg_entropy_decoder *) entropy; 805 cinfo->entropy = (struct jpeg_entropy_decoder *) entropy;
806 entropy->pub.start_pass = start_pass_huff_decoder; 806 entropy->pub.start_pass = start_pass_huff_decoder;
807 entropy->pub.decode_mcu = decode_mcu; 807 entropy->pub.decode_mcu = decode_mcu;
808 808
809 /* Mark tables unallocated */ 809 /* Mark tables unallocated */
810 for (i = 0; i < NUM_HUFF_TBLS; i++) { 810 for (i = 0; i < NUM_HUFF_TBLS; i++) {
811 entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL; 811 entropy->dc_derived_tbls[i] = entropy->ac_derived_tbls[i] = NULL;
812 } 812 }
813 } 813 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698