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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 CFX_BinaryBuf* pTransformKey); | 304 CFX_BinaryBuf* pTransformKey); |
305 | 305 |
306 FX_DWORD m_nComponents; | 306 FX_DWORD m_nComponents; |
307 std::map<CFX_ByteString, CFX_IccTransformCache*> m_MapTranform; | 307 std::map<CFX_ByteString, CFX_IccTransformCache*> m_MapTranform; |
308 std::map<CFX_ByteString, CFX_IccProfileCache*> m_MapProfile; | 308 std::map<CFX_ByteString, CFX_IccProfileCache*> m_MapProfile; |
309 }; | 309 }; |
310 | 310 |
311 class CCodec_JpxModule : public ICodec_JpxModule { | 311 class CCodec_JpxModule : public ICodec_JpxModule { |
312 public: | 312 public: |
313 CCodec_JpxModule(); | 313 CCodec_JpxModule(); |
314 void* CreateDecoder(const uint8_t* src_buf, | 314 ~CCodec_JpxModule() override; |
315 FX_DWORD src_size, | 315 |
316 FX_BOOL useColorSpace = FALSE); | 316 // ICodec_JpxModule: |
317 void GetImageInfo(void* ctx, | 317 CJPX_Decoder* CreateDecoder(const uint8_t* src_buf, |
318 FX_DWORD& width, | 318 FX_DWORD src_size, |
319 FX_DWORD& height, | 319 bool use_colorspace) override; |
320 FX_DWORD& codestream_nComps, | 320 void GetImageInfo(CJPX_Decoder* pDecoder, |
321 FX_DWORD& output_nComps); | 321 FX_DWORD* width, |
322 FX_BOOL Decode(void* ctx, | 322 FX_DWORD* height, |
| 323 FX_DWORD* components) override; |
| 324 FX_BOOL Decode(CJPX_Decoder* pDecoder, |
323 uint8_t* dest_data, | 325 uint8_t* dest_data, |
324 int pitch, | 326 int pitch, |
325 FX_BOOL bTranslateColor, | 327 uint8_t* offsets) override; |
326 uint8_t* offsets); | 328 void DestroyDecoder(CJPX_Decoder* pDecoder) override; |
327 void DestroyDecoder(void* ctx); | |
328 }; | 329 }; |
329 | 330 |
330 class CCodec_TiffModule : public ICodec_TiffModule { | 331 class CCodec_TiffModule : public ICodec_TiffModule { |
331 public: | 332 public: |
332 // ICodec_TiffModule | 333 // ICodec_TiffModule |
333 void* CreateDecoder(IFX_FileRead* file_ptr) override; | 334 void* CreateDecoder(IFX_FileRead* file_ptr) override; |
334 void GetFrames(void* ctx, int32_t& frames) override; | 335 void GetFrames(void* ctx, int32_t& frames) override; |
335 FX_BOOL LoadFrameInfo(void* ctx, | 336 FX_BOOL LoadFrameInfo(void* ctx, |
336 int32_t frame, | 337 int32_t frame, |
337 FX_DWORD& width, | 338 FX_DWORD& width, |
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 OPJ_SIZE_T opj_read_from_memory(void* p_buffer, | 482 OPJ_SIZE_T opj_read_from_memory(void* p_buffer, |
482 OPJ_SIZE_T nb_bytes, | 483 OPJ_SIZE_T nb_bytes, |
483 void* p_user_data); | 484 void* p_user_data); |
484 OPJ_SIZE_T opj_write_from_memory(void* p_buffer, | 485 OPJ_SIZE_T opj_write_from_memory(void* p_buffer, |
485 OPJ_SIZE_T nb_bytes, | 486 OPJ_SIZE_T nb_bytes, |
486 void* p_user_data); | 487 void* p_user_data); |
487 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); | 488 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); |
488 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); | 489 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); |
489 | 490 |
490 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ | 491 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ |
OLD | NEW |