Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qssgexrcodecs_p.h
Go to the documentation of this file.
1
// Copyright (C) 2026 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:critical reason:data-parser
4
5
#
ifndef
QSSGEXRCODECS_P_H
6
#
define
QSSGEXRCODECS_P_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtCore
/
qbytearrayview
.
h
>
20
#
include
<
QtCore
/
qlist
.
h
>
21
#
include
<
QtCore
/
qspan
.
h
>
22
#
include
<
QtCore
/
qstring
.
h
>
23
24
#
include
<
array
>
25
#
include
<
limits
>
26
#
include
<
vector
>
27
28
QT_BEGIN_NAMESPACE
29
30
namespace
QSSGExr
{
31
32
constexpr
int
UShortRange
=
std
::
numeric_limits
<
quint16
>::
max
() + 1;
33
constexpr
int
BitmapSize
=
UShortRange
>> 3;
34
35
bool
undoPredictorAndDeinterleave
(QSpan<
char
> out, QSpan<
char
> scratch, QString *error);
36
37
bool
inflateExact
(QByteArrayView in, QSpan<
char
> out, QString *error);
38
39
bool
rleDecode
(QByteArrayView in, QSpan<
char
> out, QString *error);
40
41
struct
PizChannel
42
{
43
qint64
wordsPerSample
= 1;
44
qint64
byteOffsetInPixel
= 0;
45
};
46
47
// A zero len marks a bucket of longer codes in longSymbols.
48
struct
HufDecEntry
49
{
50
quint32
lit
= 0;
51
quint32
longOfs
= 0;
52
quint32
longCount
= 0;
53
quint8
len
= 0;
54
};
55
56
class
PizScratch
57
{
58
public
:
59
PizScratch
();
60
61
std
::
array
<
quint16
,
UShortRange
>
lut
{};
62
std
::
array
<
quint8
,
BitmapSize
>
bitmap
{};
63
std
::
vector
<
qint64
>
hcode
;
// (code << 6) | length
64
std
::
vector
<
HufDecEntry
>
dec
;
65
std
::
vector
<
quint32
>
longSymbols
;
66
std
::
vector
<
quint32
>
longSymbolsFilled
;
67
std
::
vector
<
quint16
>
planar
;
68
};
69
70
bool
pizDecode(QByteArrayView in,
71
QSpan<
char
> out,
72
const
QList<PizChannel> &channels,
73
qint64 nx,
74
qint64 ny,
75
qint64 bytesPerPixel,
76
PizScratch
*scratch,
77
QString *error);
78
79
// Exposed for the tests.
80
bool
hufUncompress(QByteArrayView in, QSpan<quint16> out,
PizScratch
*scratch, QString *error);
81
void
wav2Decode
(QSpan<quint16> base, qint64 offset, qint64 nx, qint64 ox, qint64 ny, qint64 oy, quint16 maxValue);
82
83
}
// namespace QSSGExr
84
85
QT_END_NAMESPACE
86
87
#
endif
// QSSGEXRCODECS_P_H
QSSGExr::PizScratch
Definition
qssgexrcodecs_p.h:57
QSSGExr::PizScratch::dec
std::vector< HufDecEntry > dec
Definition
qssgexrcodecs_p.h:64
QSSGExr::PizScratch::PizScratch
PizScratch()
Definition
qssgexrpiz.cpp:369
QSSGExr::PizScratch::planar
std::vector< quint16 > planar
Definition
qssgexrcodecs_p.h:67
QSSGExr::PizScratch::hcode
std::vector< qint64 > hcode
Definition
qssgexrcodecs_p.h:63
QSSGExr::PizScratch::lut
std::array< quint16, UShortRange > lut
Definition
qssgexrcodecs_p.h:61
QSSGExr::PizScratch::longSymbolsFilled
std::vector< quint32 > longSymbolsFilled
Definition
qssgexrcodecs_p.h:66
QSSGExr::PizScratch::bitmap
std::array< quint8, BitmapSize > bitmap
Definition
qssgexrcodecs_p.h:62
QSSGExr::PizScratch::longSymbols
std::vector< quint32 > longSymbols
Definition
qssgexrcodecs_p.h:65
QSSGExr
Definition
qssgexrcodecs.cpp:15
QSSGExr::BitmapSize
constexpr int BitmapSize
Definition
qssgexrcodecs_p.h:33
QSSGExr::undoPredictorAndDeinterleave
bool undoPredictorAndDeinterleave(QSpan< char > out, QSpan< char > scratch, QString *error)
Definition
qssgexrcodecs.cpp:17
QSSGExr::inflateExact
bool inflateExact(QByteArrayView in, QSpan< char > out, QString *error)
Definition
qssgexrcodecs.cpp:44
QSSGExr::rleDecode
bool rleDecode(QByteArrayView in, QSpan< char > out, QString *error)
Definition
qssgexrcodecs.cpp:78
QSSGExr::UShortRange
constexpr int UShortRange
Definition
qssgexrcodecs_p.h:32
QSSGExr::wav2Decode
void wav2Decode(QSpan< quint16 > base, qint64 offset, qint64 nx, qint64 ox, qint64 ny, qint64 oy, quint16 maxValue)
Definition
qssgexrpiz.cpp:376
QSSGExr::HufDecEntry
Definition
qssgexrcodecs_p.h:49
QSSGExr::HufDecEntry::lit
quint32 lit
Definition
qssgexrcodecs_p.h:50
QSSGExr::HufDecEntry::longOfs
quint32 longOfs
Definition
qssgexrcodecs_p.h:51
QSSGExr::HufDecEntry::len
quint8 len
Definition
qssgexrcodecs_p.h:53
QSSGExr::HufDecEntry::longCount
quint32 longCount
Definition
qssgexrcodecs_p.h:52
QSSGExr::PizChannel
Definition
qssgexrcodecs_p.h:42
QSSGExr::PizChannel::wordsPerSample
qint64 wordsPerSample
Definition
qssgexrcodecs_p.h:43
QSSGExr::PizChannel::byteOffsetInPixel
qint64 byteOffsetInPixel
Definition
qssgexrcodecs_p.h:44
qtquick3d
src
texturehelpers
qssgexrcodecs_p.h
Generated on
for Qt by
1.18.0