Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
JBig2_ArithDecoder.h
Go to the documentation of this file.
1
// Copyright 2014 The PDFium Authors
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7
#
ifndef
CORE_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_
8
#
define
CORE_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_
9
10
#
include
<
stdint
.
h
>
11
12
#
include
"core/fxcrt/fx_memory_wrappers.h"
13
#
include
"core/fxcrt/unowned_ptr.h"
14
15
class
CJBig2_BitStream
;
16
struct
JBig2ArithQe;
17
18
class
JBig2ArithCtx
{
19
public
:
20
struct
JBig2ArithQe
{
21
uint16_t
Qe
;
22
uint8_t
NMPS
;
23
uint8_t
NLPS
;
24
bool
bSwitch
;
25
};
26
27
JBig2ArithCtx
();
28
29
int
DecodeNLPS
(
const
JBig2ArithQe
& qe);
30
int
DecodeNMPS
(
const
JBig2ArithQe
& qe);
31
32
unsigned
int
MPS
()
const
{
return
m_MPS ? 1 : 0; }
33
unsigned
int
I
()
const
{
return
m_I; }
34
35
private
:
36
bool
m_MPS =
false
;
37
unsigned
int
m_I = 0;
38
};
39
FX_DATA_PARTITION_EXCEPTION
(
JBig2ArithCtx
);
40
41
class
CJBig2_ArithDecoder
{
42
public
:
43
explicit
CJBig2_ArithDecoder
(
CJBig2_BitStream
* pStream);
44
~
CJBig2_ArithDecoder
();
45
46
int
Decode
(
JBig2ArithCtx
* pCX);
47
48
bool
IsComplete
()
const
{
return
m_Complete; }
49
50
private
:
51
enum
class
StreamState : uint8_t {
52
kDataAvailable,
53
kDecodingFinished,
54
kLooping,
55
};
56
57
void
BYTEIN();
58
void
ReadValueA();
59
60
bool
m_Complete =
false
;
61
StreamState m_State = StreamState::kDataAvailable;
62
uint8_t m_B;
63
unsigned
int
m_C;
64
unsigned
int
m_A;
65
unsigned
int
m_CT;
66
UnownedPtr
<
CJBig2_BitStream
>
const
m_pStream;
67
};
68
69
#
endif
// CORE_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_
CHECK_LT
#define CHECK_LT(x, y)
Definition
check_op.h:12
DCHECK_LT
#define DCHECK_LT(x, y)
Definition
check_op.h:19
CJBig2_ArithDecoder
Definition
JBig2_ArithDecoder.h:41
CJBig2_ArithDecoder::IsComplete
bool IsComplete() const
Definition
JBig2_ArithDecoder.h:48
CJBig2_ArithDecoder::CJBig2_ArithDecoder
CJBig2_ArithDecoder(CJBig2_BitStream *pStream)
Definition
JBig2_ArithDecoder.cpp:58
CJBig2_ArithDecoder::Decode
int Decode(JBig2ArithCtx *pCX)
Definition
JBig2_ArithDecoder.cpp:70
CJBig2_ArithDecoder::~CJBig2_ArithDecoder
~CJBig2_ArithDecoder()
CJBig2_BitStream
Definition
JBig2_BitStream.h:14
JBig2ArithCtx
Definition
JBig2_ArithDecoder.h:18
JBig2ArithCtx::DecodeNLPS
int DecodeNLPS(const JBig2ArithQe &qe)
Definition
JBig2_ArithDecoder.cpp:43
JBig2ArithCtx::JBig2ArithCtx
JBig2ArithCtx()
JBig2ArithCtx::I
unsigned int I() const
Definition
JBig2_ArithDecoder.h:33
JBig2ArithCtx::DecodeNMPS
int DecodeNMPS(const JBig2ArithQe &qe)
Definition
JBig2_ArithDecoder.cpp:52
JBig2ArithCtx::MPS
unsigned int MPS() const
Definition
JBig2_ArithDecoder.h:32
fxcrt::UnownedPtr
Definition
unowned_ptr.h:76
FX_DATA_PARTITION_EXCEPTION
#define FX_DATA_PARTITION_EXCEPTION(T)
Definition
fx_memory_wrappers.h:26
fxcrt
Definition
stl_util.h:17
std
[33]
Definition
src_corelib_tools_qhash.cpp:421
JBig2ArithCtx::JBig2ArithQe
Definition
JBig2_ArithDecoder.h:20
JBig2ArithCtx::JBig2ArithQe::NMPS
uint8_t NMPS
Definition
JBig2_ArithDecoder.h:22
JBig2ArithCtx::JBig2ArithQe::bSwitch
bool bSwitch
Definition
JBig2_ArithDecoder.h:24
JBig2ArithCtx::JBig2ArithQe::Qe
uint16_t Qe
Definition
JBig2_ArithDecoder.h:21
JBig2ArithCtx::JBig2ArithQe::NLPS
uint8_t NLPS
Definition
JBig2_ArithDecoder.h:23
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxcodec
jbig2
JBig2_ArithDecoder.h
Generated on
for Qt by
1.14.0