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/unowned_ptr.h"
13
14
class
CJBig2_BitStream
;
15
struct
JBig2ArithQe;
16
17
class
JBig2ArithCtx
{
18
public
:
19
struct
JBig2ArithQe
{
20
uint16_t
Qe
;
21
uint8_t
NMPS
;
22
uint8_t
NLPS
;
23
bool
bSwitch
;
24
};
25
26
JBig2ArithCtx
();
27
28
int
DecodeNLPS
(
const
JBig2ArithQe
& qe);
29
int
DecodeNMPS
(
const
JBig2ArithQe
& qe);
30
31
unsigned
int
MPS
()
const
{
return
m_MPS ? 1 : 0; }
32
unsigned
int
I
()
const
{
return
m_I; }
33
34
private
:
35
bool
m_MPS =
false
;
36
unsigned
int
m_I = 0;
37
};
38
39
class
CJBig2_ArithDecoder
{
40
public
:
41
explicit
CJBig2_ArithDecoder
(
CJBig2_BitStream
* pStream);
42
~
CJBig2_ArithDecoder
();
43
44
int
Decode
(
JBig2ArithCtx
* pCX);
45
46
bool
IsComplete
()
const
{
return
m_Complete; }
47
48
private
:
49
enum
class
StreamState : uint8_t {
50
kDataAvailable,
51
kDecodingFinished,
52
kLooping,
53
};
54
55
void
BYTEIN();
56
void
ReadValueA();
57
58
bool
m_Complete =
false
;
59
StreamState m_State = StreamState::kDataAvailable;
60
uint8_t m_B;
61
unsigned
int
m_C;
62
unsigned
int
m_A;
63
unsigned
int
m_CT;
64
UnownedPtr
<
CJBig2_BitStream
>
const
m_pStream;
65
};
66
67
#
endif
// CORE_FXCODEC_JBIG2_JBIG2_ARITHDECODER_H_
CJBig2_ArithDecoder
Definition
JBig2_ArithDecoder.h:39
CJBig2_ArithDecoder::IsComplete
bool IsComplete() const
Definition
JBig2_ArithDecoder.h:46
CJBig2_ArithDecoder::CJBig2_ArithDecoder
CJBig2_ArithDecoder(CJBig2_BitStream *pStream)
Definition
JBig2_ArithDecoder.cpp:56
CJBig2_ArithDecoder::Decode
int Decode(JBig2ArithCtx *pCX)
Definition
JBig2_ArithDecoder.cpp:68
CJBig2_ArithDecoder::~CJBig2_ArithDecoder
~CJBig2_ArithDecoder()
CJBig2_BitStream
Definition
JBig2_BitStream.h:13
JBig2ArithCtx
Definition
JBig2_ArithDecoder.h:17
JBig2ArithCtx::DecodeNLPS
int DecodeNLPS(const JBig2ArithQe &qe)
Definition
JBig2_ArithDecoder.cpp:41
JBig2ArithCtx::JBig2ArithCtx
JBig2ArithCtx()
JBig2ArithCtx::I
unsigned int I() const
Definition
JBig2_ArithDecoder.h:32
JBig2ArithCtx::DecodeNMPS
int DecodeNMPS(const JBig2ArithQe &qe)
Definition
JBig2_ArithDecoder.cpp:50
JBig2ArithCtx::MPS
unsigned int MPS() const
Definition
JBig2_ArithDecoder.h:31
fxcrt::UnownedPtr
Definition
unowned_ptr.h:75
std
Definition
qfloat16.h:493
JBig2ArithCtx::JBig2ArithQe
Definition
JBig2_ArithDecoder.h:19
JBig2ArithCtx::JBig2ArithQe::NMPS
uint8_t NMPS
Definition
JBig2_ArithDecoder.h:21
JBig2ArithCtx::JBig2ArithQe::bSwitch
bool bSwitch
Definition
JBig2_ArithDecoder.h:23
JBig2ArithCtx::JBig2ArithQe::Qe
uint16_t Qe
Definition
JBig2_ArithDecoder.h:20
JBig2ArithCtx::JBig2ArithQe::NLPS
uint8_t NLPS
Definition
JBig2_ArithDecoder.h:22
qtwebengine
src
3rdparty
chromium
third_party
pdfium
core
fxcodec
jbig2
JBig2_ArithDecoder.h
Generated on Thu Nov 14 2024 00:57:49 for Qt by
1.12.0