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

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

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/huffman_encode.c ('k') | third_party/libwebp/utils/quant_levels.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 // 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 // Alpha plane quantization utility 8 // Alpha plane quantization utility
9 // 9 //
10 // Author: Vikas Arora (vikasa@google.com) 10 // Author: Vikas Arora (vikasa@google.com)
11 11
12 #ifndef WEBP_UTILS_QUANT_LEVELS_H_ 12 #ifndef WEBP_UTILS_QUANT_LEVELS_H_
13 #define WEBP_UTILS_QUANT_LEVELS_H_ 13 #define WEBP_UTILS_QUANT_LEVELS_H_
14 14
15 #include <stdlib.h> 15 #include <stdlib.h>
16 16
17 #include "../webp/types.h" 17 #include "../webp/types.h"
18 18
19 #if defined(__cplusplus) || defined(c_plusplus) 19 #if defined(__cplusplus) || defined(c_plusplus)
20 extern "C" { 20 extern "C" {
21 #endif 21 #endif
22 22
23 // Replace the input 'data' of size 'width'x'height' with 'num-levels' 23 // Replace the input 'data' of size 'width'x'height' with 'num-levels'
24 // quantized values. If not NULL, 'sse' will contain the sum of squared error. 24 // quantized values. If not NULL, 'sse' will contain the sum of squared error.
25 // Valid range for 'num_levels' is [2, 256]. 25 // Valid range for 'num_levels' is [2, 256].
26 // Returns false in case of error (data is NULL, or parameters are invalid). 26 // Returns false in case of error (data is NULL, or parameters are invalid).
27 int QuantizeLevels(uint8_t* const data, int width, int height, int num_levels, 27 int QuantizeLevels(uint8_t* const data, int width, int height, int num_levels,
28 uint64_t* const sse); 28 uint64_t* const sse);
29 29
30 // Apply post-processing to input 'data' of size 'width'x'height' assuming
31 // that the source was quantized to a reduced number of levels.
32 // Returns false in case of error (data is NULL, invalid parameters, ...).
33 int DequantizeLevels(uint8_t* const data, int width, int height);
34
35 #if defined(__cplusplus) || defined(c_plusplus) 30 #if defined(__cplusplus) || defined(c_plusplus)
36 } // extern "C" 31 } // extern "C"
37 #endif 32 #endif
38 33
39 #endif /* WEBP_UTILS_QUANT_LEVELS_H_ */ 34 #endif /* WEBP_UTILS_QUANT_LEVELS_H_ */
OLDNEW
« no previous file with comments | « third_party/libwebp/utils/huffman_encode.c ('k') | third_party/libwebp/utils/quant_levels.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698