Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
godotengine
GitHub Repository: godotengine/godot
Path: blob/master/thirdparty/libwebp/src/dec/alphai_dec.h
21362 views
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 decoder: internal header.
11
//
12
// Author: Urvang ([email protected])
13
14
#ifndef WEBP_DEC_ALPHAI_DEC_H_
15
#define WEBP_DEC_ALPHAI_DEC_H_
16
17
#include "src/dec/vp8_dec.h"
18
#include "src/webp/types.h"
19
#include "src/dec/webpi_dec.h"
20
#include "src/dsp/dsp.h"
21
#include "src/utils/filters_utils.h"
22
23
#ifdef __cplusplus
24
extern "C" {
25
#endif
26
27
struct VP8LDecoder; // Defined in dec/vp8li.h.
28
29
typedef struct ALPHDecoder ALPHDecoder;
30
struct ALPHDecoder {
31
int width;
32
int height;
33
int method;
34
WEBP_FILTER_TYPE filter;
35
int pre_processing;
36
struct VP8LDecoder* vp8l_dec;
37
VP8Io io;
38
int use_8b_decode; // Although alpha channel requires only 1 byte per
39
// pixel, sometimes VP8LDecoder may need to allocate
40
// 4 bytes per pixel internally during decode.
41
uint8_t* output;
42
const uint8_t* prev_line; // last output row (or NULL)
43
};
44
45
//------------------------------------------------------------------------------
46
// internal functions. Not public.
47
48
// Deallocate memory associated to dec->alpha_plane decoding
49
void WebPDeallocateAlphaMemory(VP8Decoder* const dec);
50
51
//------------------------------------------------------------------------------
52
53
#ifdef __cplusplus
54
} // extern "C"
55
#endif
56
57
#endif // WEBP_DEC_ALPHAI_DEC_H_
58
59