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

Side by Side Diff: third_party/libjpeg_turbo/jutils.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/jsimddct.h ('k') | third_party/libjpeg_turbo/jversion.h » ('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 * jutils.c 2 * jutils.c
3 * 3 *
4 * Copyright (C) 1991-1996, Thomas G. Lane. 4 * Copyright (C) 1991-1996, 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 tables and miscellaneous utility routines needed 8 * This file contains tables and miscellaneous utility routines needed
9 * for both compression and decompression. 9 * for both compression and decompression.
10 * Note we prefix all global names with "j" to minimize conflicts with 10 * Note we prefix all global names with "j" to minimize conflicts with
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 GLOBAL(long) 71 GLOBAL(long)
72 jdiv_round_up (long a, long b) 72 jdiv_round_up (long a, long b)
73 /* Compute a/b rounded up to next integer, ie, ceil(a/b) */ 73 /* Compute a/b rounded up to next integer, ie, ceil(a/b) */
74 /* Assumes a >= 0, b > 0 */ 74 /* Assumes a >= 0, b > 0 */
75 { 75 {
76 return (a + b - 1L) / b; 76 return (a + b - 1L) / b;
77 } 77 }
78 78
79 79
80 GLOBAL(size_t) 80 GLOBAL(long)
81 jround_up (size_t a, size_t b) 81 jround_up (long a, long b)
82 /* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */ 82 /* Compute a rounded up to next multiple of b, ie, ceil(a/b)*b */
83 /* Assumes a >= 0, b > 0 */ 83 /* Assumes a >= 0, b > 0 */
84 { 84 {
85 a += b - 1L; 85 a += b - 1L;
86 return a - (a % b); 86 return a - (a % b);
87 } 87 }
88 88
89 89
90 /* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays 90 /* On normal machines we can apply MEMCOPY() and MEMZERO() to sample arrays
91 * and coefficient-block arrays. This won't work on 80x86 because the arrays 91 * and coefficient-block arrays. This won't work on 80x86 because the arrays
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
170 FMEMZERO(target, bytestozero); 170 FMEMZERO(target, bytestozero);
171 #else 171 #else
172 register char FAR * ptr = (char FAR *) target; 172 register char FAR * ptr = (char FAR *) target;
173 register size_t count; 173 register size_t count;
174 174
175 for (count = bytestozero; count > 0; count--) { 175 for (count = bytestozero; count > 0; count--) {
176 *ptr++ = 0; 176 *ptr++ = 0;
177 } 177 }
178 #endif 178 #endif
179 } 179 }
OLDNEW
« no previous file with comments | « third_party/libjpeg_turbo/jsimddct.h ('k') | third_party/libjpeg_turbo/jversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698