OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef CORE_FXCODEC_LGIF_FX_GIF_H_ | 7 #ifndef CORE_FXCODEC_LGIF_FX_GIF_H_ |
8 #define CORE_FXCODEC_LGIF_FX_GIF_H_ | 8 #define CORE_FXCODEC_LGIF_FX_GIF_H_ |
9 | 9 |
10 #include <setjmp.h> | 10 #include <setjmp.h> |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 GifGCE* gce_ptr; | 111 GifGCE* gce_ptr; |
112 GifPTE* pte_ptr; | 112 GifPTE* pte_ptr; |
113 CFX_ByteString* string_ptr; | 113 CFX_ByteString* string_ptr; |
114 } GifPlainText; | 114 } GifPlainText; |
115 class CGifLZWDecoder { | 115 class CGifLZWDecoder { |
116 public: | 116 public: |
117 struct tag_Table { | 117 struct tag_Table { |
118 uint16_t prefix; | 118 uint16_t prefix; |
119 uint8_t suffix; | 119 uint8_t suffix; |
120 }; | 120 }; |
121 CGifLZWDecoder(FX_CHAR* error_ptr = NULL) { err_msg_ptr = error_ptr; } | 121 CGifLZWDecoder(FX_CHAR* error_ptr = nullptr) { err_msg_ptr = error_ptr; } |
122 void InitTable(uint8_t code_len); | 122 void InitTable(uint8_t code_len); |
123 | 123 |
124 int32_t Decode(uint8_t* des_buf, uint32_t& des_size); | 124 int32_t Decode(uint8_t* des_buf, uint32_t& des_size); |
125 | 125 |
126 void Input(uint8_t* src_buf, uint32_t src_size); | 126 void Input(uint8_t* src_buf, uint32_t src_size); |
127 uint32_t GetAvailInput(); | 127 uint32_t GetAvailInput(); |
128 | 128 |
129 private: | 129 private: |
130 void ClearTable(); | 130 void ClearTable(); |
131 void AddCode(uint16_t prefix_code, uint8_t append_char); | 131 void AddCode(uint16_t prefix_code, uint8_t append_char); |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 uint8_t* src_buf, | 287 uint8_t* src_buf, |
288 uint32_t src_size); | 288 uint32_t src_size); |
289 uint32_t gif_get_avail_input(gif_decompress_struct_p gif_ptr, | 289 uint32_t gif_get_avail_input(gif_decompress_struct_p gif_ptr, |
290 uint8_t** avial_buf_ptr); | 290 uint8_t** avial_buf_ptr); |
291 void interlace_buf(const uint8_t* buf, uint32_t width, uint32_t height); | 291 void interlace_buf(const uint8_t* buf, uint32_t width, uint32_t height); |
292 FX_BOOL gif_encode(gif_compress_struct_p gif_ptr, | 292 FX_BOOL gif_encode(gif_compress_struct_p gif_ptr, |
293 uint8_t*& dst_buf, | 293 uint8_t*& dst_buf, |
294 uint32_t& dst_len); | 294 uint32_t& dst_len); |
295 | 295 |
296 #endif // CORE_FXCODEC_LGIF_FX_GIF_H_ | 296 #endif // CORE_FXCODEC_LGIF_FX_GIF_H_ |
OLD | NEW |