summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_GrdProc.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_GrdProc.h')
-rw-r--r--core/fxcodec/jbig2/JBig2_GrdProc.h52
1 files changed, 31 insertions, 21 deletions
diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h
index 3e4d3d403e..ef02a7d45a 100644
--- a/core/fxcodec/jbig2/JBig2_GrdProc.h
+++ b/core/fxcodec/jbig2/JBig2_GrdProc.h
@@ -7,6 +7,8 @@
#ifndef CORE_FXCODEC_JBIG2_JBIG2_GRDPROC_H_
#define CORE_FXCODEC_JBIG2_JBIG2_GRDPROC_H_
+#include <memory>
+
#include "core/fxcodec/fx_codec_def.h"
#include "core/fxcrt/cfx_unowned_ptr.h"
#include "core/fxcrt/fx_coordinates.h"
@@ -23,14 +25,14 @@ class CJBig2_GRDProc {
CJBig2_GRDProc();
~CJBig2_GRDProc();
- CJBig2_Image* decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* gbContext);
+ std::unique_ptr<CJBig2_Image> decode_Arith(CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* gbContext);
- FXCODEC_STATUS Start_decode_Arith(CJBig2_Image** pImage,
+ FXCODEC_STATUS Start_decode_Arith(std::unique_ptr<CJBig2_Image>* pImage,
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext,
IFX_Pause* pPause);
- FXCODEC_STATUS Start_decode_MMR(CJBig2_Image** pImage,
+ FXCODEC_STATUS Start_decode_MMR(std::unique_ptr<CJBig2_Image>* pImage,
CJBig2_BitStream* pStream);
FXCODEC_STATUS Continue_decode(IFX_Pause* pPause,
CJBig2_ArithDecoder* pArithDecoder);
@@ -88,34 +90,42 @@ class CJBig2_GRDProc {
CJBig2_ArithDecoder* pArithDecoder,
JBig2ArithCtx* gbContext,
IFX_Pause* pPause);
- CJBig2_Image* decode_Arith_Template0_opt3(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* gbContext);
+ std::unique_ptr<CJBig2_Image> decode_Arith_Template0_opt3(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* gbContext);
- CJBig2_Image* decode_Arith_Template0_unopt(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* gbContext);
+ std::unique_ptr<CJBig2_Image> decode_Arith_Template0_unopt(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* gbContext);
- CJBig2_Image* decode_Arith_Template1_opt3(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* gbContext);
+ std::unique_ptr<CJBig2_Image> decode_Arith_Template1_opt3(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* gbContext);
- CJBig2_Image* decode_Arith_Template1_unopt(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* gbContext);
+ std::unique_ptr<CJBig2_Image> decode_Arith_Template1_unopt(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* gbContext);
- CJBig2_Image* decode_Arith_Template2_opt3(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* gbContext);
+ std::unique_ptr<CJBig2_Image> decode_Arith_Template2_opt3(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* gbContext);
- CJBig2_Image* decode_Arith_Template2_unopt(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* gbContext);
+ std::unique_ptr<CJBig2_Image> decode_Arith_Template2_unopt(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* gbContext);
- CJBig2_Image* decode_Arith_Template3_opt3(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* gbContext);
+ std::unique_ptr<CJBig2_Image> decode_Arith_Template3_opt3(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* gbContext);
- CJBig2_Image* decode_Arith_Template3_unopt(CJBig2_ArithDecoder* pArithDecoder,
- JBig2ArithCtx* gbContext);
+ std::unique_ptr<CJBig2_Image> decode_Arith_Template3_unopt(
+ CJBig2_ArithDecoder* pArithDecoder,
+ JBig2ArithCtx* gbContext);
uint32_t m_loopIndex;
uint8_t* m_pLine;
FXCODEC_STATUS m_ProssiveStatus;
- CJBig2_Image** m_pImage;
+ CJBig2_Image* m_pImage;
JBig2ArithCtx* m_gbContext;
uint16_t m_DecodeType;
int m_LTP;