summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_SddProc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_SddProc.cpp')
-rw-r--r--core/fxcodec/jbig2/JBig2_SddProc.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/core/fxcodec/jbig2/JBig2_SddProc.cpp b/core/fxcodec/jbig2/JBig2_SddProc.cpp
index 29c604f1c7..7bdcf5c5f9 100644
--- a/core/fxcodec/jbig2/JBig2_SddProc.cpp
+++ b/core/fxcodec/jbig2/JBig2_SddProc.cpp
@@ -22,6 +22,10 @@
#include "core/fxcodec/jbig2/JBig2_TrdProc.h"
#include "third_party/base/ptr_util.h"
+CJBig2_SDDProc::CJBig2_SDDProc() = default;
+
+CJBig2_SDDProc::~CJBig2_SDDProc() = default;
+
std::unique_ptr<CJBig2_SymbolDict> CJBig2_SDDProc::DecodeArith(
CJBig2_ArithDecoder* pArithDecoder,
std::vector<JBig2ArithCtx>* gbContext,
@@ -289,7 +293,7 @@ std::unique_ptr<CJBig2_SymbolDict> CJBig2_SDDProc::DecodeHuffman(
NSYMSDECODED = 0;
std::unique_ptr<CJBig2_Image> BS;
while (NSYMSDECODED < SDNUMNEWSYMS) {
- if (pHuffmanDecoder->DecodeAValue(SDHUFFDH, &HCDH) != 0)
+ if (pHuffmanDecoder->DecodeAValue(SDHUFFDH.Get(), &HCDH) != 0)
return nullptr;
HCHEIGHT = HCHEIGHT + HCDH;
@@ -300,7 +304,7 @@ std::unique_ptr<CJBig2_SymbolDict> CJBig2_SDDProc::DecodeHuffman(
TOTWIDTH = 0;
HCFIRSTSYM = NSYMSDECODED;
for (;;) {
- nVal = pHuffmanDecoder->DecodeAValue(SDHUFFDW, &DW);
+ nVal = pHuffmanDecoder->DecodeAValue(SDHUFFDW.Get(), &DW);
if (nVal == JBIG2_OOB)
break;
if (nVal != 0)
@@ -319,8 +323,8 @@ std::unique_ptr<CJBig2_SymbolDict> CJBig2_SDDProc::DecodeHuffman(
}
TOTWIDTH = TOTWIDTH + SYMWIDTH;
if (SDREFAGG == 1) {
- if (pHuffmanDecoder->DecodeAValue(SDHUFFAGGINST, (int*)&REFAGGNINST) !=
- 0) {
+ if (pHuffmanDecoder->DecodeAValue(SDHUFFAGGINST.Get(),
+ (int*)&REFAGGNINST) != 0) {
return nullptr;
}
BS = nullptr;
@@ -440,9 +444,10 @@ std::unique_ptr<CJBig2_SymbolDict> CJBig2_SDDProc::DecodeHuffman(
NSYMSDECODED = NSYMSDECODED + 1;
}
if (SDREFAGG == 0) {
- if (pHuffmanDecoder->DecodeAValue(SDHUFFBMSIZE, (int32_t*)&BMSIZE) != 0)
+ if (pHuffmanDecoder->DecodeAValue(SDHUFFBMSIZE.Get(),
+ (int32_t*)&BMSIZE) != 0) {
return nullptr;
-
+ }
pStream->alignByte();
std::unique_ptr<CJBig2_Image> BHC;
if (BMSIZE == 0) {