| 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf, FX_DWORD s
rc_size, | 145 ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf, FX_DWORD s
rc_size, |
| 146 int width, int height, int nComps, FX_
BOOL ColorTransform); | 146 int width, int height, int nComps, FX_
BOOL ColorTransform); |
| 147 FX_BOOL LoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int&
width, int& height, | 147 FX_BOOL LoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int&
width, int& height, |
| 148 int& num_components, int& bits_per_components, FX_BOOL&
color_transform, | 148 int& num_components, int& bits_per_components, FX_BOOL&
color_transform, |
| 149 uint8_t** icc_buf_ptr, FX_DWORD* icc_length); | 149 uint8_t** icc_buf_ptr, FX_DWORD* icc_length); |
| 150 FX_BOOL Encode(const CFX_DIBSource* pSource, uint8_t*& dest_buf,
FX_STRSIZE& dest_size, int quality, const uint8_t* icc_buf, FX_DWORD icc_length
); | 150 FX_BOOL Encode(const CFX_DIBSource* pSource, uint8_t*& dest_buf,
FX_STRSIZE& dest_size, int quality, const uint8_t* icc_buf, FX_DWORD icc_length
); |
| 151 virtual void* Start(); | 151 virtual void* Start(); |
| 152 virtual void Finish(void* pContext); | 152 virtual void Finish(void* pContext); |
| 153 virtual void Input(void* pContext, const uint8_t* src_buf, FX
_DWORD src_size); | 153 virtual void Input(void* pContext, const uint8_t* src_buf, FX
_DWORD src_size); |
| 154 virtual int ReadHeader(void* pContext, int* width, int* heig
ht, int* nComps); | 154 virtual int ReadHeader(void* pContext, int* width, int* heig
ht, int* nComps); |
| 155 virtual FX_BOOL» » StartScanline(void* pContext, int down_scale); | 155 virtual int»» » StartScanline(void* pContext, int down_scale); |
| 156 virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf); | 156 virtual FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf); |
| 157 virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr); | 157 virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr); |
| 158 protected: | 158 protected: |
| 159 IFX_JpegProvider* m_pExtProvider; | 159 IFX_JpegProvider* m_pExtProvider; |
| 160 }; | 160 }; |
| 161 class CCodec_IccModule : public ICodec_IccModule | 161 class CCodec_IccModule : public ICodec_IccModule |
| 162 { | 162 { |
| 163 public: | 163 public: |
| 164 virtual IccCS GetProfileCS(const uint8_t* pProfileData
, unsigned int dwProfileSize); | 164 virtual IccCS GetProfileCS(const uint8_t* pProfileData
, unsigned int dwProfileSize); |
| 165 virtual IccCS GetProfileCS(IFX_FileRead* pFile); | 165 virtual IccCS GetProfileCS(IFX_FileRead* pFile); |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 290 OPJ_SIZE_T offset; | 290 OPJ_SIZE_T offset; |
| 291 }; | 291 }; |
| 292 | 292 |
| 293 /* Wrappers for C-style callbacks. */ | 293 /* Wrappers for C-style callbacks. */ |
| 294 OPJ_SIZE_T opj_read_from_memory (void* p_buffer, OPJ_SIZE_T nb_bytes, void* p_u
ser_data); | 294 OPJ_SIZE_T opj_read_from_memory (void* p_buffer, OPJ_SIZE_T nb_bytes, void* p_u
ser_data); |
| 295 OPJ_SIZE_T opj_write_from_memory (void* p_buffer, OPJ_SIZE_T nb_bytes, void* p_u
ser_data); | 295 OPJ_SIZE_T opj_write_from_memory (void* p_buffer, OPJ_SIZE_T nb_bytes, void* p_u
ser_data); |
| 296 OPJ_OFF_T opj_skip_from_memory (OPJ_OFF_T nb_bytes, void* p_user_data); | 296 OPJ_OFF_T opj_skip_from_memory (OPJ_OFF_T nb_bytes, void* p_user_data); |
| 297 OPJ_BOOL opj_seek_from_memory (OPJ_OFF_T nb_bytes, void* p_user_data); | 297 OPJ_BOOL opj_seek_from_memory (OPJ_OFF_T nb_bytes, void* p_user_data); |
| 298 | 298 |
| 299 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ | 299 #endif // CORE_SRC_FXCODEC_CODEC_CODEC_INT_H_ |
| OLD | NEW |