OLD | NEW |
1 // Copyright 2013 Google Inc. All Rights Reserved. | 1 // Copyright 2013 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Use of this source code is governed by a BSD-style license | 3 // Use of this source code is governed by a BSD-style license |
4 // that can be found in the COPYING file in the root of the source | 4 // that can be found in the COPYING file in the root of the source |
5 // tree. An additional intellectual property rights grant can be found | 5 // tree. An additional intellectual property rights grant can be found |
6 // in the file PATENTS. All contributing project authors may | 6 // in the file PATENTS. All contributing project authors may |
7 // be found in the AUTHORS file in the root of the source tree. | 7 // be found in the AUTHORS file in the root of the source tree. |
8 // ----------------------------------------------------------------------------- | 8 // ----------------------------------------------------------------------------- |
9 // | 9 // |
10 // Alpha plane de-quantization utility | 10 // Alpha plane de-quantization utility |
11 // | 11 // |
12 // Author: Vikas Arora (vikasa@google.com) | 12 // Author: Vikas Arora (vikasa@google.com) |
13 | 13 |
14 #ifndef WEBP_UTILS_QUANT_LEVELS_DEC_H_ | 14 #ifndef WEBP_UTILS_QUANT_LEVELS_DEC_H_ |
15 #define WEBP_UTILS_QUANT_LEVELS_DEC_H_ | 15 #define WEBP_UTILS_QUANT_LEVELS_DEC_H_ |
16 | 16 |
17 #include "../webp/types.h" | 17 #include "../webp/types.h" |
18 | 18 |
19 #ifdef __cplusplus | 19 #ifdef __cplusplus |
20 extern "C" { | 20 extern "C" { |
21 #endif | 21 #endif |
22 | 22 |
23 // Apply post-processing to input 'data' of size 'width'x'height' assuming that | 23 // Apply post-processing to input 'data' of size 'width'x'height' assuming that |
24 // the source was quantized to a reduced number of levels. | 24 // the source was quantized to a reduced number of levels. 'stride' is in bytes. |
25 // Strength is in [0..100] and controls the amount of dithering applied. | 25 // Strength is in [0..100] and controls the amount of dithering applied. |
26 // Returns false in case of error (data is NULL, invalid parameters, | 26 // Returns false in case of error (data is NULL, invalid parameters, |
27 // malloc failure, ...). | 27 // malloc failure, ...). |
28 int WebPDequantizeLevels(uint8_t* const data, int width, int height, | 28 int WebPDequantizeLevels(uint8_t* const data, int width, int height, int stride, |
29 int strength); | 29 int strength); |
30 | 30 |
31 #ifdef __cplusplus | 31 #ifdef __cplusplus |
32 } // extern "C" | 32 } // extern "C" |
33 #endif | 33 #endif |
34 | 34 |
35 #endif /* WEBP_UTILS_QUANT_LEVELS_DEC_H_ */ | 35 #endif /* WEBP_UTILS_QUANT_LEVELS_DEC_H_ */ |
OLD | NEW |