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> |
11 #include <list> | 11 #include <list> |
12 #include <map> | 12 #include <map> |
13 | 13 |
14 #include "core/include/fxcodec/fx_codec.h" | 14 #include "core/include/fxcodec/fx_codec.h" |
15 #include "core/src/fxcodec/jbig2/JBig2_Context.h" | 15 #include "core/src/fxcodec/jbig2/JBig2_Context.h" |
16 #include "third_party/base/nonstd_unique_ptr.h" | 16 #include "third_party/base/nonstd_unique_ptr.h" |
17 #include "third_party/libopenjpeg20/openjpeg.h" // For OPJ_SIZE_T. | 17 #include "third_party/libopenjpeg20/openjpeg.h" // For OPJ_SIZE_T. |
18 | 18 |
19 class CFX_IccProfileCache; | 19 class CFX_IccProfileCache; |
20 class CFX_IccTransformCache; | 20 class CFX_IccTransformCache; |
| 21 class CPDF_ColorSpace; |
21 | 22 |
22 class CCodec_BasicModule : public ICodec_BasicModule { | 23 class CCodec_BasicModule : public ICodec_BasicModule { |
23 public: | 24 public: |
24 // ICodec_BasicModule: | 25 // ICodec_BasicModule: |
25 FX_BOOL RunLengthEncode(const uint8_t* src_buf, | 26 FX_BOOL RunLengthEncode(const uint8_t* src_buf, |
26 FX_DWORD src_size, | 27 FX_DWORD src_size, |
27 uint8_t*& dest_buf, | 28 uint8_t*& dest_buf, |
28 FX_DWORD& dest_size) override; | 29 FX_DWORD& dest_size) override; |
29 FX_BOOL A85Encode(const uint8_t* src_buf, | 30 FX_BOOL A85Encode(const uint8_t* src_buf, |
30 FX_DWORD src_size, | 31 FX_DWORD src_size, |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 }; | 252 }; |
252 | 253 |
253 class CCodec_JpxModule : public ICodec_JpxModule { | 254 class CCodec_JpxModule : public ICodec_JpxModule { |
254 public: | 255 public: |
255 CCodec_JpxModule(); | 256 CCodec_JpxModule(); |
256 ~CCodec_JpxModule() override; | 257 ~CCodec_JpxModule() override; |
257 | 258 |
258 // ICodec_JpxModule: | 259 // ICodec_JpxModule: |
259 CJPX_Decoder* CreateDecoder(const uint8_t* src_buf, | 260 CJPX_Decoder* CreateDecoder(const uint8_t* src_buf, |
260 FX_DWORD src_size, | 261 FX_DWORD src_size, |
261 bool use_colorspace) override; | 262 CPDF_ColorSpace* cs) override; |
262 void GetImageInfo(CJPX_Decoder* pDecoder, | 263 void GetImageInfo(CJPX_Decoder* pDecoder, |
263 FX_DWORD* width, | 264 FX_DWORD* width, |
264 FX_DWORD* height, | 265 FX_DWORD* height, |
265 FX_DWORD* components) override; | 266 FX_DWORD* components) override; |
266 bool Decode(CJPX_Decoder* pDecoder, | 267 bool Decode(CJPX_Decoder* pDecoder, |
267 uint8_t* dest_data, | 268 uint8_t* dest_data, |
268 int pitch, | 269 int pitch, |
269 const std::vector<uint8_t>& offsets) override; | 270 const std::vector<uint8_t>& offsets) override; |
270 void DestroyDecoder(CJPX_Decoder* pDecoder) override; | 271 void DestroyDecoder(CJPX_Decoder* pDecoder) override; |
271 }; | 272 }; |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 OPJ_SIZE_T opj_read_from_memory(void* p_buffer, | 322 OPJ_SIZE_T opj_read_from_memory(void* p_buffer, |
322 OPJ_SIZE_T nb_bytes, | 323 OPJ_SIZE_T nb_bytes, |
323 void* p_user_data); | 324 void* p_user_data); |
324 OPJ_SIZE_T opj_write_from_memory(void* p_buffer, | 325 OPJ_SIZE_T opj_write_from_memory(void* p_buffer, |
325 OPJ_SIZE_T nb_bytes, | 326 OPJ_SIZE_T nb_bytes, |
326 void* p_user_data); | 327 void* p_user_data); |
327 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); | 328 OPJ_OFF_T opj_skip_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); |
328 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); | 329 OPJ_BOOL opj_seek_from_memory(OPJ_OFF_T nb_bytes, void* p_user_data); |
329 | 330 |
330 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ | 331 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ |
OLD | NEW |