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

Side by Side Diff: third_party/libjpeg_turbo/jdhuff.h

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/jddctmgr.c ('k') | third_party/libjpeg_turbo/jdhuff.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 * jdhuff.h 2 * jdhuff.h
3 * 3 *
4 * Copyright (C) 1991-1997, Thomas G. Lane. 4 * Copyright (C) 1991-1997, Thomas G. Lane.
5 * Copyright (C) 2010, D. R. Commander. 5 * Copyright (C) 2010-2011, D. R. Commander.
6 * This file is part of the Independent JPEG Group's software. 6 * This file is part of the Independent JPEG Group's software.
7 * For conditions of distribution and use, see the accompanying README file. 7 * For conditions of distribution and use, see the accompanying README file.
8 * 8 *
9 * This file contains declarations for Huffman entropy decoding routines 9 * This file contains declarations for Huffman entropy decoding routines
10 * that are shared between the sequential decoder (jdhuff.c) and the 10 * that are shared between the sequential decoder (jdhuff.c) and the
11 * progressive decoder (jdphuff.c). No other modules need to see these. 11 * progressive decoder (jdphuff.c). No other modules need to see these.
12 */ 12 */
13 13
14 /* Short forms of external names for systems with brain-damaged linkers. */ 14 /* Short forms of external names for systems with brain-damaged linkers. */
15 15
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 DROP_BITS(nb); \ 201 DROP_BITS(nb); \
202 result = htbl->lookup[look] & ((1 << HUFF_LOOKAHEAD) - 1); \ 202 result = htbl->lookup[look] & ((1 << HUFF_LOOKAHEAD) - 1); \
203 } else { \ 203 } else { \
204 slowlabel: \ 204 slowlabel: \
205 if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \ 205 if ((result=jpeg_huff_decode(&state,get_buffer,bits_left,htbl,nb)) < 0) \
206 { failaction; } \ 206 { failaction; } \
207 get_buffer = state.get_buffer; bits_left = state.bits_left; \ 207 get_buffer = state.get_buffer; bits_left = state.bits_left; \
208 } \ 208 } \
209 } 209 }
210 210
211 #define HUFF_DECODE_FAST(s,nb,htbl) \
212 FILL_BIT_BUFFER_FAST; \
213 s = PEEK_BITS(HUFF_LOOKAHEAD); \
214 s = htbl->lookup[s]; \
215 nb = s >> HUFF_LOOKAHEAD; \
216 /* Pre-execute the common case of nb <= HUFF_LOOKAHEAD */ \
217 DROP_BITS(nb); \
218 s = s & ((1 << HUFF_LOOKAHEAD) - 1); \
219 if (nb > HUFF_LOOKAHEAD) { \
220 /* Equivalent of jpeg_huff_decode() */ \
221 /* Don't use GET_BITS() here because we don't want to modify bits_left */ \
222 s = (get_buffer >> bits_left) & ((1 << (nb)) - 1); \
223 while (s > htbl->maxcode[nb]) { \
224 s <<= 1; \
225 s |= GET_BITS(1); \
226 nb++; \
227 } \
228 s = htbl->pub->huffval[ (int) (s + htbl->valoffset[nb]) & 0xFF ]; \
229 }
230
211 /* Out-of-line case for Huffman code fetching */ 231 /* Out-of-line case for Huffman code fetching */
212 EXTERN(int) jpeg_huff_decode 232 EXTERN(int) jpeg_huff_decode
213 JPP((bitread_working_state * state, register bit_buf_type get_buffer, 233 JPP((bitread_working_state * state, register bit_buf_type get_buffer,
214 register int bits_left, d_derived_tbl * htbl, int min_bits)); 234 register int bits_left, d_derived_tbl * htbl, int min_bits));
OLDNEW
« no previous file with comments | « third_party/libjpeg_turbo/jddctmgr.c ('k') | third_party/libjpeg_turbo/jdhuff.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698