diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-02-10 22:37:07 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-02-10 22:37:07 -0300 |
commit | abb985e755ccf858149294868eff8a9a9feca67e (patch) | |
tree | 2a82fd9f87ddecfb14b08d8599bb2417b3cea7ff /drivers/webp/utils/quant_levels.c | |
parent | 1c7726820ec53b486e946bb42cac98a600c5bdb5 (diff) |
Reverted to older version of WebP, newer one crashed on Android.
Diffstat (limited to 'drivers/webp/utils/quant_levels.c')
-rw-r--r-- | drivers/webp/utils/quant_levels.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/webp/utils/quant_levels.c b/drivers/webp/utils/quant_levels.c index d7c8aab922..f6884392aa 100644 --- a/drivers/webp/utils/quant_levels.c +++ b/drivers/webp/utils/quant_levels.c @@ -1,10 +1,8 @@ // Copyright 2011 Google Inc. All Rights Reserved. // -// Use of this source code is governed by a BSD-style license -// that can be found in the COPYING file in the root of the source -// tree. An additional intellectual property rights grant can be found -// in the file PATENTS. All contributing project authors may -// be found in the AUTHORS file in the root of the source tree. +// This code is licensed under the same terms as WebM: +// Software License Agreement: http://www.webmproject.org/license/software/ +// Additional IP Rights Grant: http://www.webmproject.org/license/additional/ // ----------------------------------------------------------------------------- // // Quantize levels for specified number of quantization-levels ([2, 256]). @@ -16,6 +14,10 @@ #include "./quant_levels.h" +#if defined(__cplusplus) || defined(c_plusplus) +extern "C" { +#endif + #define NUM_SYMBOLS 256 #define MAX_ITER 6 // Maximum number of convergence steps. @@ -138,3 +140,15 @@ int QuantizeLevels(uint8_t* const data, int width, int height, return 1; } +int DequantizeLevels(uint8_t* const data, int width, int height) { + if (data == NULL || width <= 0 || height <= 0) return 0; + // TODO(skal): implement gradient smoothing. + (void)data; + (void)width; + (void)height; + return 1; +} + +#if defined(__cplusplus) || defined(c_plusplus) +} // extern "C" +#endif |