summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/codec_int.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/codec/codec_int.h')
-rw-r--r--core/fxcodec/codec/codec_int.h118
1 files changed, 59 insertions, 59 deletions
diff --git a/core/fxcodec/codec/codec_int.h b/core/fxcodec/codec/codec_int.h
index d19a694222..c7bd9fc6fe 100644
--- a/core/fxcodec/codec/codec_int.h
+++ b/core/fxcodec/codec/codec_int.h
@@ -26,15 +26,15 @@ class CCodec_BasicModule : public ICodec_BasicModule {
public:
// ICodec_BasicModule:
FX_BOOL RunLengthEncode(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
uint8_t*& dest_buf,
- FX_DWORD& dest_size) override;
+ uint32_t& dest_size) override;
FX_BOOL A85Encode(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
uint8_t*& dest_buf,
- FX_DWORD& dest_size) override;
+ uint32_t& dest_size) override;
ICodec_ScanlineDecoder* CreateRunLengthDecoder(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
int width,
int height,
int nComps,
@@ -60,7 +60,7 @@ class CCodec_ScanlineDecoder : public ICodec_ScanlineDecoder {
protected:
class ImageDataCache {
public:
- ImageDataCache(int width, int height, FX_DWORD pitch);
+ ImageDataCache(int width, int height, uint32_t pitch);
~ImageDataCache();
bool AllocateCache();
@@ -77,7 +77,7 @@ class CCodec_ScanlineDecoder : public ICodec_ScanlineDecoder {
const int m_Width;
const int m_Height;
- const FX_DWORD m_Pitch;
+ const uint32_t m_Pitch;
int m_nCachedLines;
std::unique_ptr<uint8_t, FxFreeDeleter> m_Data;
};
@@ -95,7 +95,7 @@ class CCodec_ScanlineDecoder : public ICodec_ScanlineDecoder {
int m_OutputHeight;
int m_nComps;
int m_bpc;
- FX_DWORD m_Pitch;
+ uint32_t m_Pitch;
FX_BOOL m_bColorTransformed;
int m_NextLine;
uint8_t* m_pLastScanline;
@@ -106,7 +106,7 @@ class CCodec_FaxModule : public ICodec_FaxModule {
public:
// ICodec_FaxModule:
ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
int width,
int height,
int K,
@@ -120,13 +120,13 @@ class CCodec_FaxModule : public ICodec_FaxModule {
int height,
int pitch,
uint8_t*& dest_buf,
- FX_DWORD& dest_size) override;
+ uint32_t& dest_size) override;
};
class CCodec_FlateModule : public ICodec_FlateModule {
public:
virtual ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
int width,
int height,
int nComps,
@@ -135,60 +135,60 @@ class CCodec_FlateModule : public ICodec_FlateModule {
int Colors,
int BitsPerComponent,
int Columns);
- virtual FX_DWORD FlateOrLZWDecode(FX_BOOL bLZW,
+ virtual uint32_t FlateOrLZWDecode(FX_BOOL bLZW,
const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
FX_BOOL bEarlyChange,
int predictor,
int Colors,
int BitsPerComponent,
int Columns,
- FX_DWORD estimated_size,
+ uint32_t estimated_size,
uint8_t*& dest_buf,
- FX_DWORD& dest_size);
+ uint32_t& dest_size);
virtual FX_BOOL Encode(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
int predictor,
int Colors,
int BitsPerComponent,
int Columns,
uint8_t*& dest_buf,
- FX_DWORD& dest_size);
+ uint32_t& dest_size);
virtual FX_BOOL Encode(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
uint8_t*& dest_buf,
- FX_DWORD& dest_size);
+ uint32_t& dest_size);
};
class CCodec_JpegModule : public ICodec_JpegModule {
public:
CCodec_JpegModule() {}
ICodec_ScanlineDecoder* CreateDecoder(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
int width,
int height,
int nComps,
FX_BOOL ColorTransform) override;
FX_BOOL LoadInfo(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
int& width,
int& height,
int& num_components,
int& bits_per_components,
FX_BOOL& color_transform,
uint8_t** icc_buf_ptr,
- FX_DWORD* icc_length) override;
+ uint32_t* icc_length) override;
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) override;
+ uint32_t icc_length) override;
void* Start() override;
void Finish(void* pContext) override;
void Input(void* pContext,
const uint8_t* src_buf,
- FX_DWORD src_size) override;
+ uint32_t src_size) override;
#ifndef PDF_ENABLE_XFA
int ReadHeader(void* pContext, int* width, int* height, int* nComps) override;
#else // PDF_ENABLE_XFA
@@ -200,7 +200,7 @@ class CCodec_JpegModule : public ICodec_JpegModule {
#endif // PDF_ENABLE_XFA
int StartScanline(void* pContext, int down_scale) override;
FX_BOOL ReadScanline(void* pContext, uint8_t* dest_buf) override;
- FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr) override;
+ uint32_t GetAvailInput(void* pContext, uint8_t** avail_buf_ptr) override;
};
#ifdef PDF_ENABLE_XFA
@@ -213,7 +213,7 @@ class CCodec_PngModule : public ICodec_PngModule {
virtual void Finish(void* pContext);
virtual FX_BOOL Input(void* pContext,
const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
CFX_DIBAttribute* pAttribute);
protected:
@@ -224,8 +224,8 @@ class CCodec_GifModule : public ICodec_GifModule {
CCodec_GifModule() { FXSYS_memset(m_szLastError, '\0', 256); }
virtual void* Start(void* pModule);
virtual void Finish(void* pContext);
- virtual FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr);
- virtual void Input(void* pContext, const uint8_t* src_buf, FX_DWORD src_size);
+ virtual uint32_t GetAvailInput(void* pContext, uint8_t** avail_buf_ptr);
+ virtual void Input(void* pContext, const uint8_t* src_buf, uint32_t src_size);
virtual int32_t ReadHeader(void* pContext,
int* width,
@@ -249,17 +249,17 @@ class CCodec_BmpModule : public ICodec_BmpModule {
CCodec_BmpModule() { FXSYS_memset(m_szLastError, 0, sizeof(m_szLastError)); }
void* Start(void* pModule) override;
void Finish(void* pContext) override;
- FX_DWORD GetAvailInput(void* pContext, uint8_t** avail_buf_ptr) override;
+ uint32_t GetAvailInput(void* pContext, uint8_t** avail_buf_ptr) override;
void Input(void* pContext,
const uint8_t* src_buf,
- FX_DWORD src_size) override;
+ uint32_t src_size) override;
int32_t ReadHeader(void* pContext,
int32_t* width,
int32_t* height,
FX_BOOL* tb_flag,
int32_t* components,
int32_t* pal_num,
- FX_DWORD** pal_pp,
+ uint32_t** pal_pp,
CFX_DIBAttribute* pAttribute) override;
int32_t LoadImage(void* pContext) override;
@@ -279,25 +279,25 @@ class CCodec_IccModule : public ICodec_IccModule {
void* CreateTransform(ICodec_IccModule::IccParam* pInputParam,
ICodec_IccModule::IccParam* pOutputParam,
ICodec_IccModule::IccParam* pProofParam = NULL,
- FX_DWORD dwIntent = Icc_INTENT_PERCEPTUAL,
- FX_DWORD dwFlag = Icc_FLAGS_DEFAULT,
- FX_DWORD dwPrfIntent = Icc_INTENT_ABSOLUTE_COLORIMETRIC,
- FX_DWORD dwPrfFlag = Icc_FLAGS_SOFTPROOFING) override;
+ uint32_t dwIntent = Icc_INTENT_PERCEPTUAL,
+ uint32_t dwFlag = Icc_FLAGS_DEFAULT,
+ uint32_t dwPrfIntent = Icc_INTENT_ABSOLUTE_COLORIMETRIC,
+ uint32_t dwPrfFlag = Icc_FLAGS_SOFTPROOFING) override;
void* CreateTransform_sRGB(
const uint8_t* pProfileData,
- FX_DWORD dwProfileSize,
- FX_DWORD& nComponents,
+ uint32_t dwProfileSize,
+ uint32_t& nComponents,
int32_t intent = 0,
- FX_DWORD dwSrcFormat = Icc_FORMAT_DEFAULT) override;
+ uint32_t dwSrcFormat = Icc_FORMAT_DEFAULT) override;
void* CreateTransform_CMYK(
const uint8_t* pSrcProfileData,
- FX_DWORD dwSrcProfileSize,
- FX_DWORD& nSrcComponents,
+ uint32_t dwSrcProfileSize,
+ uint32_t& nSrcComponents,
const uint8_t* pDstProfileData,
- FX_DWORD dwDstProfileSize,
+ uint32_t dwDstProfileSize,
int32_t intent = 0,
- FX_DWORD dwSrcFormat = Icc_FORMAT_DEFAULT,
- FX_DWORD dwDstFormat = Icc_FORMAT_DEFAULT) override;
+ uint32_t dwSrcFormat = Icc_FORMAT_DEFAULT,
+ uint32_t dwDstFormat = Icc_FORMAT_DEFAULT) override;
void DestroyTransform(void* pTransform) override;
void Translate(void* pTransform,
FX_FLOAT* pSrcValues,
@@ -306,7 +306,7 @@ class CCodec_IccModule : public ICodec_IccModule {
uint8_t* pDest,
const uint8_t* pSrc,
int pixels) override;
- void SetComponents(FX_DWORD nComponents) override {
+ void SetComponents(uint32_t nComponents) override {
m_nComponents = nComponents;
}
@@ -321,7 +321,7 @@ class CCodec_IccModule : public ICodec_IccModule {
Icc_CLASS ic,
CFX_BinaryBuf* pTransformKey);
- FX_DWORD m_nComponents;
+ uint32_t m_nComponents;
std::map<CFX_ByteString, CFX_IccTransformCache*> m_MapTranform;
std::map<CFX_ByteString, CFX_IccProfileCache*> m_MapProfile;
};
@@ -333,12 +333,12 @@ class CCodec_JpxModule : public ICodec_JpxModule {
// ICodec_JpxModule:
CJPX_Decoder* CreateDecoder(const uint8_t* src_buf,
- FX_DWORD src_size,
+ uint32_t src_size,
CPDF_ColorSpace* cs) override;
void GetImageInfo(CJPX_Decoder* pDecoder,
- FX_DWORD* width,
- FX_DWORD* height,
- FX_DWORD* components) override;
+ uint32_t* width,
+ uint32_t* height,
+ uint32_t* components) override;
bool Decode(CJPX_Decoder* pDecoder,
uint8_t* dest_data,
int pitch,
@@ -354,10 +354,10 @@ class CCodec_TiffModule : public ICodec_TiffModule {
void GetFrames(void* ctx, int32_t& frames) override;
FX_BOOL LoadFrameInfo(void* ctx,
int32_t frame,
- FX_DWORD& width,
- FX_DWORD& height,
- FX_DWORD& comps,
- FX_DWORD& bpc,
+ uint32_t& width,
+ uint32_t& height,
+ uint32_t& comps,
+ uint32_t& bpc,
CFX_DIBAttribute* pAttribute) override;
FX_BOOL Decode(void* ctx, class CFX_DIBitmap* pDIBitmap) override;
void DestroyDecoder(void* ctx) override;
@@ -372,12 +372,12 @@ class CCodec_Jbig2Context {
CCodec_Jbig2Context();
~CCodec_Jbig2Context() {}
- FX_DWORD m_width;
- FX_DWORD m_height;
+ uint32_t m_width;
+ uint32_t m_height;
CPDF_StreamAcc* m_pGlobalStream;
CPDF_StreamAcc* m_pSrcStream;
uint8_t* m_dest_buf;
- FX_DWORD m_dest_pitch;
+ uint32_t m_dest_pitch;
IFX_Pause* m_pPause;
CJBig2_Context* m_pContext;
CJBig2_Image* m_dest_image;
@@ -391,12 +391,12 @@ class CCodec_Jbig2Module : public ICodec_Jbig2Module {
void* CreateJbig2Context() override;
FXCODEC_STATUS StartDecode(void* pJbig2Context,
CFX_PrivateData* pPrivateData,
- FX_DWORD width,
- FX_DWORD height,
+ uint32_t width,
+ uint32_t height,
CPDF_StreamAcc* src_stream,
CPDF_StreamAcc* global_stream,
uint8_t* dest_buf,
- FX_DWORD dest_pitch,
+ uint32_t dest_pitch,
IFX_Pause* pPause) override;
FXCODEC_STATUS ContinueDecode(void* pJbig2Context,
IFX_Pause* pPause) override;