| OLD | NEW |
| 1 // Copyright 2012 Google Inc. All Rights Reserved. | 1 // Copyright 2012 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 // Lossless decoder: internal header. | 10 // Lossless decoder: internal header. |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 VP8LImageTransformType type_; // transform type. | 36 VP8LImageTransformType type_; // transform type. |
| 37 int bits_; // subsampling bits defining transform window. | 37 int bits_; // subsampling bits defining transform window. |
| 38 int xsize_; // transform window X index. | 38 int xsize_; // transform window X index. |
| 39 int ysize_; // transform window Y index. | 39 int ysize_; // transform window Y index. |
| 40 uint32_t *data_; // transform data. | 40 uint32_t *data_; // transform data. |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 typedef struct { | 43 typedef struct { |
| 44 int color_cache_size_; | 44 int color_cache_size_; |
| 45 VP8LColorCache color_cache_; | 45 VP8LColorCache color_cache_; |
| 46 VP8LColorCache saved_color_cache_; // for incremental |
| 46 | 47 |
| 47 int huffman_mask_; | 48 int huffman_mask_; |
| 48 int huffman_subsample_bits_; | 49 int huffman_subsample_bits_; |
| 49 int huffman_xsize_; | 50 int huffman_xsize_; |
| 50 uint32_t *huffman_image_; | 51 uint32_t *huffman_image_; |
| 51 int num_htree_groups_; | 52 int num_htree_groups_; |
| 52 HTreeGroup *htree_groups_; | 53 HTreeGroup *htree_groups_; |
| 54 HuffmanCode *huffman_tables_; |
| 53 } VP8LMetadata; | 55 } VP8LMetadata; |
| 54 | 56 |
| 55 typedef struct VP8LDecoder VP8LDecoder; | 57 typedef struct VP8LDecoder VP8LDecoder; |
| 56 struct VP8LDecoder { | 58 struct VP8LDecoder { |
| 57 VP8StatusCode status_; | 59 VP8StatusCode status_; |
| 58 VP8LDecodeState action_; | |
| 59 VP8LDecodeState state_; | 60 VP8LDecodeState state_; |
| 60 VP8Io *io_; | 61 VP8Io *io_; |
| 61 | 62 |
| 62 const WebPDecBuffer *output_; // shortcut to io->opaque->output | 63 const WebPDecBuffer *output_; // shortcut to io->opaque->output |
| 63 | 64 |
| 64 uint32_t *pixels_; // Internal data: either uint8_t* for alpha | 65 uint32_t *pixels_; // Internal data: either uint8_t* for alpha |
| 65 // or uint32_t* for BGRA. | 66 // or uint32_t* for BGRA. |
| 66 uint32_t *argb_cache_; // Scratch buffer for temporary BGRA storage. | 67 uint32_t *argb_cache_; // Scratch buffer for temporary BGRA storage. |
| 67 | 68 |
| 68 VP8LBitReader br_; | 69 VP8LBitReader br_; |
| 70 int incremental_; // if true, incremental decoding is expected |
| 71 VP8LBitReader saved_br_; // note: could be local variables too |
| 72 int saved_last_pixel_; |
| 69 | 73 |
| 70 int width_; | 74 int width_; |
| 71 int height_; | 75 int height_; |
| 72 int last_row_; // last input row decoded so far. | 76 int last_row_; // last input row decoded so far. |
| 73 int last_pixel_; // last pixel decoded so far. However, it may | 77 int last_pixel_; // last pixel decoded so far. However, it may |
| 74 // not be transformed, scaled and | 78 // not be transformed, scaled and |
| 75 // color-converted yet. | 79 // color-converted yet. |
| 76 int last_out_row_; // last row output so far. | 80 int last_out_row_; // last row output so far. |
| 77 | 81 |
| 78 VP8LMetadata hdr_; | 82 VP8LMetadata hdr_; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 // Clears and deallocate a lossless decoder instance. | 127 // Clears and deallocate a lossless decoder instance. |
| 124 void VP8LDelete(VP8LDecoder* const dec); | 128 void VP8LDelete(VP8LDecoder* const dec); |
| 125 | 129 |
| 126 //------------------------------------------------------------------------------ | 130 //------------------------------------------------------------------------------ |
| 127 | 131 |
| 128 #ifdef __cplusplus | 132 #ifdef __cplusplus |
| 129 } // extern "C" | 133 } // extern "C" |
| 130 #endif | 134 #endif |
| 131 | 135 |
| 132 #endif /* WEBP_DEC_VP8LI_H_ */ | 136 #endif /* WEBP_DEC_VP8LI_H_ */ |
| OLD | NEW |