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

Side by Side Diff: third_party/libwebp/utils/quant_levels.c

Issue 12942006: libwebp: update snapshot to v0.3.0-rc6 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 9 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/libwebp/utils/quant_levels.h ('k') | third_party/libwebp/utils/quant_levels_dec.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 // Copyright 2011 Google Inc. All Rights Reserved. 1 // Copyright 2011 Google Inc. All Rights Reserved.
2 // 2 //
3 // This code is licensed under the same terms as WebM: 3 // This code is licensed under the same terms as WebM:
4 // Software License Agreement: http://www.webmproject.org/license/software/ 4 // Software License Agreement: http://www.webmproject.org/license/software/
5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/ 5 // Additional IP Rights Grant: http://www.webmproject.org/license/additional/
6 // ----------------------------------------------------------------------------- 6 // -----------------------------------------------------------------------------
7 // 7 //
8 // Quantize levels for specified number of quantization-levels ([2, 256]). 8 // Quantize levels for specified number of quantization-levels ([2, 256]).
9 // Min and max values are preserved (usual 0 and 255 for alpha plane). 9 // Min and max values are preserved (usual 0 and 255 for alpha plane).
10 // 10 //
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 data[n] = map[data[n]]; 133 data[n] = map[data[n]];
134 } 134 }
135 } 135 }
136 End: 136 End:
137 // Store sum of squared error if needed. 137 // Store sum of squared error if needed.
138 if (sse != NULL) *sse = (uint64_t)err; 138 if (sse != NULL) *sse = (uint64_t)err;
139 139
140 return 1; 140 return 1;
141 } 141 }
142 142
143 int DequantizeLevels(uint8_t* const data, int width, int height) {
144 if (data == NULL || width <= 0 || height <= 0) return 0;
145 // TODO(skal): implement gradient smoothing.
146 (void)data;
147 (void)width;
148 (void)height;
149 return 1;
150 }
151
152 #if defined(__cplusplus) || defined(c_plusplus) 143 #if defined(__cplusplus) || defined(c_plusplus)
153 } // extern "C" 144 } // extern "C"
154 #endif 145 #endif
OLDNEW
« no previous file with comments | « third_party/libwebp/utils/quant_levels.h ('k') | third_party/libwebp/utils/quant_levels_dec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698