OLD | NEW |
1 // Copyright 2013 Google Inc. All Rights Reserved. | 1 // Copyright 2013 Google Inc. All Rights Reserved. |
2 // | 2 // |
3 // Use of this source code is governed by a BSD-style license | 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 | 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 | 5 // tree. An additional intellectual property rights grant can be found |
6 // in the file PATENTS. All contributing project authors may | 6 // in the file PATENTS. All contributing project authors may |
7 // be found in the AUTHORS file in the root of the source tree. | 7 // be found in the AUTHORS file in the root of the source tree. |
8 // ----------------------------------------------------------------------------- | 8 // ----------------------------------------------------------------------------- |
9 // | 9 // |
10 // Alpha decoder: internal header. | 10 // Alpha decoder: internal header. |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 typedef struct ALPHDecoder ALPHDecoder; | 26 typedef struct ALPHDecoder ALPHDecoder; |
27 struct ALPHDecoder { | 27 struct ALPHDecoder { |
28 int width_; | 28 int width_; |
29 int height_; | 29 int height_; |
30 int method_; | 30 int method_; |
31 WEBP_FILTER_TYPE filter_; | 31 WEBP_FILTER_TYPE filter_; |
32 int pre_processing_; | 32 int pre_processing_; |
33 struct VP8LDecoder* vp8l_dec_; | 33 struct VP8LDecoder* vp8l_dec_; |
34 VP8Io io_; | 34 VP8Io io_; |
35 int use_8b_decode; // Although alpha channel requires only 1 byte per | 35 int use_8b_decode_; // Although alpha channel requires only 1 byte per |
36 // pixel, sometimes VP8LDecoder may need to allocate | 36 // pixel, sometimes VP8LDecoder may need to allocate |
37 // 4 bytes per pixel internally during decode. | 37 // 4 bytes per pixel internally during decode. |
| 38 uint8_t* output_; |
| 39 const uint8_t* prev_line_; // last output row (or NULL) |
38 }; | 40 }; |
39 | 41 |
40 //------------------------------------------------------------------------------ | 42 //------------------------------------------------------------------------------ |
41 // internal functions. Not public. | 43 // internal functions. Not public. |
42 | 44 |
43 // Allocates a new alpha decoder instance. | 45 // Deallocate memory associated to dec->alpha_plane_ decoding |
44 ALPHDecoder* ALPHNew(void); | 46 void WebPDeallocateAlphaMemory(VP8Decoder* const dec); |
45 | |
46 // Clears and deallocates an alpha decoder instance. | |
47 void ALPHDelete(ALPHDecoder* const dec); | |
48 | 47 |
49 //------------------------------------------------------------------------------ | 48 //------------------------------------------------------------------------------ |
50 | 49 |
51 #ifdef __cplusplus | 50 #ifdef __cplusplus |
52 } // extern "C" | 51 } // extern "C" |
53 #endif | 52 #endif |
54 | 53 |
55 #endif /* WEBP_DEC_ALPHAI_H_ */ | 54 #endif /* WEBP_DEC_ALPHAI_H_ */ |
OLD | NEW |