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_SRC_FXCODEC_LGIF_FX_GIF_H_ |
| 8 #define CORE_SRC_FXCODEC_LGIF_FX_GIF_H_ |
| 9 |
7 #include <setjmp.h> | 10 #include <setjmp.h> |
8 | 11 |
9 #include "core/include/fxcrt/fx_basic.h" | 12 #include "core/include/fxcrt/fx_basic.h" |
10 | 13 |
11 extern FX_WORD _GetWord_LSBFirst(uint8_t* p); | 14 extern FX_WORD _GetWord_LSBFirst(uint8_t* p); |
12 extern void _SetWord_LSBFirst(uint8_t* p, FX_WORD v); | 15 extern void _SetWord_LSBFirst(uint8_t* p, FX_WORD v); |
13 extern void _BpcConvert(const uint8_t* src_buf, | 16 extern void _BpcConvert(const uint8_t* src_buf, |
14 FX_DWORD src_len, | 17 FX_DWORD src_len, |
15 int32_t src_bpc, | 18 int32_t src_bpc, |
16 int32_t dst_bpc, | 19 int32_t dst_bpc, |
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 #ifdef GIF_SUPPORT_GRAPHIC_CONTROL_EXTENSION | 294 #ifdef GIF_SUPPORT_GRAPHIC_CONTROL_EXTENSION |
292 GifGCE* gce_ptr; | 295 GifGCE* gce_ptr; |
293 #endif | 296 #endif |
294 | 297 |
295 #ifdef GIF_SUPPORT_PLAIN_TEXT_EXTENSION | 298 #ifdef GIF_SUPPORT_PLAIN_TEXT_EXTENSION |
296 GifPTE* pte_ptr; | 299 GifPTE* pte_ptr; |
297 const uint8_t* pte_data_ptr; | 300 const uint8_t* pte_data_ptr; |
298 FX_DWORD pte_data_len; | 301 FX_DWORD pte_data_len; |
299 #endif | 302 #endif |
300 }; | 303 }; |
| 304 |
301 void _gif_error(gif_decompress_struct_p gif_ptr, const FX_CHAR* err_msg); | 305 void _gif_error(gif_decompress_struct_p gif_ptr, const FX_CHAR* err_msg); |
302 void _gif_warn(gif_decompress_struct_p gif_ptr, const FX_CHAR* err_msg); | 306 void _gif_warn(gif_decompress_struct_p gif_ptr, const FX_CHAR* err_msg); |
303 gif_decompress_struct_p _gif_create_decompress(); | 307 gif_decompress_struct_p _gif_create_decompress(); |
304 void _gif_destroy_decompress(gif_decompress_struct_pp gif_ptr_ptr); | 308 void _gif_destroy_decompress(gif_decompress_struct_pp gif_ptr_ptr); |
305 gif_compress_struct_p _gif_create_compress(); | 309 gif_compress_struct_p _gif_create_compress(); |
306 void _gif_destroy_compress(gif_compress_struct_pp gif_ptr_ptr); | 310 void _gif_destroy_compress(gif_compress_struct_pp gif_ptr_ptr); |
307 int32_t _gif_read_header(gif_decompress_struct_p gif_ptr); | 311 int32_t _gif_read_header(gif_decompress_struct_p gif_ptr); |
308 int32_t _gif_get_frame(gif_decompress_struct_p gif_ptr); | 312 int32_t _gif_get_frame(gif_decompress_struct_p gif_ptr); |
309 int32_t _gif_get_frame_num(gif_decompress_struct_p gif_ptr); | 313 int32_t _gif_get_frame_num(gif_decompress_struct_p gif_ptr); |
310 int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr); | 314 int32_t _gif_decode_extension(gif_decompress_struct_p gif_ptr); |
(...skipping 12 matching lines...) Expand all Loading... |
323 uint8_t** avial_buf_ptr); | 327 uint8_t** avial_buf_ptr); |
324 void interlace_buf(const uint8_t* buf, FX_DWORD width, FX_DWORD height); | 328 void interlace_buf(const uint8_t* buf, FX_DWORD width, FX_DWORD height); |
325 FX_BOOL _gif_encode(gif_compress_struct_p gif_ptr, | 329 FX_BOOL _gif_encode(gif_compress_struct_p gif_ptr, |
326 uint8_t*& dst_buf, | 330 uint8_t*& dst_buf, |
327 FX_DWORD& dst_len); | 331 FX_DWORD& dst_len); |
328 #define GIF_PTR_NOT_NULL(ptr, gif_ptr) \ | 332 #define GIF_PTR_NOT_NULL(ptr, gif_ptr) \ |
329 if (ptr == NULL) { \ | 333 if (ptr == NULL) { \ |
330 _gif_error(gif_ptr, "Out Of Memory"); \ | 334 _gif_error(gif_ptr, "Out Of Memory"); \ |
331 return 0; \ | 335 return 0; \ |
332 } | 336 } |
| 337 |
| 338 #endif // CORE_SRC_FXCODEC_LGIF_FX_GIF_H_ |
OLD | NEW |