Path: blob/master/thirdparty/libwebp/src/utils/quant_levels_dec_utils.h
9912 views
// Copyright 2013 Google Inc. All Rights Reserved.1//2// Use of this source code is governed by a BSD-style license3// that can be found in the COPYING file in the root of the source4// tree. An additional intellectual property rights grant can be found5// in the file PATENTS. All contributing project authors may6// be found in the AUTHORS file in the root of the source tree.7// -----------------------------------------------------------------------------8//9// Alpha plane de-quantization utility10//11// Author: Vikas Arora ([email protected])1213#ifndef WEBP_UTILS_QUANT_LEVELS_DEC_UTILS_H_14#define WEBP_UTILS_QUANT_LEVELS_DEC_UTILS_H_1516#include "src/webp/types.h"1718#ifdef __cplusplus19extern "C" {20#endif2122// Apply post-processing to input 'data' of size 'width'x'height' assuming that23// the source was quantized to a reduced number of levels. 'stride' is in bytes.24// Strength is in [0..100] and controls the amount of dithering applied.25// Returns false in case of error (data is NULL, invalid parameters,26// malloc failure, ...).27int WebPDequantizeLevels(uint8_t* const data, int width, int height, int stride,28int strength);2930#ifdef __cplusplus31} // extern "C"32#endif3334#endif // WEBP_UTILS_QUANT_LEVELS_DEC_UTILS_H_353637