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_CODEC_CODEC_INT_H_ | 7 #ifndef CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ |
8 #define CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ | 8 #define CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ |
9 | 9 |
10 #include <limits.h> | 10 #include <limits.h> |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 FX_DWORD height, | 378 FX_DWORD height, |
379 CPDF_StreamAcc* src_stream, | 379 CPDF_StreamAcc* src_stream, |
380 CPDF_StreamAcc* global_stream, | 380 CPDF_StreamAcc* global_stream, |
381 uint8_t* dest_buf, | 381 uint8_t* dest_buf, |
382 FX_DWORD dest_pitch, | 382 FX_DWORD dest_pitch, |
383 IFX_Pause* pPause) override; | 383 IFX_Pause* pPause) override; |
384 FXCODEC_STATUS ContinueDecode(void* pJbig2Context, | 384 FXCODEC_STATUS ContinueDecode(void* pJbig2Context, |
385 IFX_Pause* pPause) override; | 385 IFX_Pause* pPause) override; |
386 void DestroyJbig2Context(void* pJbig2Context) override; | 386 void DestroyJbig2Context(void* pJbig2Context) override; |
387 }; | 387 }; |
388 class CFX_DIBAttributeExif : public IFX_DIBAttributeExif { | |
389 public: | |
390 CFX_DIBAttributeExif(); | |
391 ~CFX_DIBAttributeExif(); | |
392 virtual FX_BOOL GetInfo(FX_WORD tag, void* val); | |
393 | |
394 FX_BOOL ParseExif(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>* pHead, | |
395 uint8_t* data, | |
396 FX_DWORD len, | |
397 CFX_MapPtrTemplate<FX_DWORD, uint8_t*>* pVal); | |
398 | |
399 typedef FX_WORD (*_Read2Bytes)(uint8_t* data); | |
400 typedef FX_DWORD (*_Read4Bytes)(uint8_t* data); | |
401 uint8_t* ParseExifIFH(uint8_t* data, | |
402 FX_DWORD len, | |
403 _Read2Bytes* pReadWord, | |
404 _Read4Bytes* pReadDword); | |
405 FX_BOOL ParseExifIFD(CFX_MapPtrTemplate<FX_DWORD, uint8_t*>* pMap, | |
406 uint8_t* data, | |
407 FX_DWORD len); | |
408 | |
409 uint8_t* m_pExifData; | |
410 | |
411 FX_DWORD m_dwExifDataLen; | |
412 | |
413 void clear(); | |
414 _Read2Bytes m_readWord; | |
415 _Read4Bytes m_readDword; | |
416 CFX_MapPtrTemplate<FX_DWORD, uint8_t*> m_TagHead; | |
417 CFX_MapPtrTemplate<FX_DWORD, uint8_t*> m_TagVal; | |
418 }; | |
419 | |
420 struct DecodeData { | 388 struct DecodeData { |
421 public: | 389 public: |
422 DecodeData(unsigned char* src_data, OPJ_SIZE_T src_size) | 390 DecodeData(unsigned char* src_data, OPJ_SIZE_T src_size) |
423 : src_data(src_data), src_size(src_size), offset(0) {} | 391 : src_data(src_data), src_size(src_size), offset(0) {} |
424 unsigned char* src_data; | 392 unsigned char* src_data; |
425 OPJ_SIZE_T src_size; | 393 OPJ_SIZE_T src_size; |
426 OPJ_SIZE_T offset; | 394 OPJ_SIZE_T offset; |
427 }; | 395 }; |
428 | 396 |
429 void sycc420_to_rgb(opj_image_t* img); | 397 void sycc420_to_rgb(opj_image_t* img); |
430 | 398 |
431 /* Wrappers for C-style callbacks. */ | 399 /* Wrappers for C-style callbacks. */ |
432 OPJ_SIZE_T opj_read_from_memory(void* p_buffer, | 400 OPJ_SIZE_T opj_read_from_memory(void* p_buffer, |
433 OPJ_SIZE_T nb_bytes, | 401 OPJ_SIZE_T nb_bytes, |
434 void* p_user_data); | 402 void* p_user_data); |
435 OPJ_SIZE_T opj_write_from_memory(void* p_buffer, | 403 OPJ_SIZE_T opj_write_from_memory(void* p_buffer, |
436 OPJ_SIZE_T nb_bytes, | 404 OPJ_SIZE_T nb_bytes, |
437 void* p_user_data); | 405 void* p_user_data); |
438 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); | 406 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); |
439 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); | 407 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); |
440 | 408 |
441 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ | 409 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ |
OLD | NEW |