quant_levels_dec_utils.h 1.2 KB

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