1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// libwebp v1.6.0, src/dec/alphai_dec.h:
//
// Copyright 2013 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.
// -----------------------------------------------------------------------------
//
// Alpha decoder: internal header.
//
// Author: Urvang (urvang@google.com)
//! Translation of `src/dec/alphai_dec.h` from libwebp v1.6.0.
//!
//! Work package: WP7 (VP8L decoder).
// The header also declares `WebPDeallocateAlphaMemory`, which
// `src/dec/alpha_dec.c` defines; it belongs to that module (WP6).
use crateVP8Io;
use crateVP8LDecoder;
use crateWEBP_FILTER_TYPE;
// upstream: src/dec/alphai_dec.h ALPHDecoder
/// The alpha decoder. `Default` is the zeroed structure of `ALPHNew`.
///
/// The C field `output` is not stored: the alpha plane belongs to the VP8
/// decoder, which passes it to each call, and `prev_line` is a position in it
/// (ADR 0003, "Decoding context per call"). `io` keeps no `opaque` that points
/// back here; the VP8L alpha functions take this decoder instead.