Grok
12.0.1
src
lib
core
grk_includes.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016-2024 Grok Image Compression Inc.
3
*
4
* This source code is free software: you can redistribute it and/or modify
5
* it under the terms of the GNU Affero General Public License, version 3,
6
* as published by the Free Software Foundation.
7
*
8
* This source code is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Affero General Public License for more details.
12
*
13
* You should have received a copy of the GNU Affero General Public License
14
* along with this program. If not, see <http://www.gnu.org/licenses/>.
15
*
16
*
17
* This source code incorporates work covered by the BSD 2-clause license.
18
* Please see the LICENSE file in the root directory for details.
19
*
20
*/
21
#pragma once
22
23
// #define GRK_FORCE_SIGNED_COMPRESS
24
25
/*
26
* This must be included before any system headers,
27
* since they are affected by macros defined therein
28
*/
29
#include "grk_config_private.h"
30
#include <memory.h>
31
#include <cstdlib>
32
#include <string>
33
#ifdef _MSC_VER
34
#define _USE_MATH_DEFINES
// for C++
35
#endif
36
#include <cmath>
37
#include <cfloat>
38
#include <time.h>
39
#include <cstdio>
40
#include <cstdarg>
41
#include <ctype.h>
42
#include <cassert>
43
#include <cinttypes>
44
#include <climits>
45
#include <algorithm>
46
#include <sstream>
47
#include <iostream>
48
#include <vector>
49
#include <algorithm>
50
#include <numeric>
51
/*
52
Use fseeko() and ftello() if they are available since they use
53
'int64_t' rather than 'long'. It is wrong to use fseeko() and
54
ftello() only on systems with special LFS support since some systems
55
(e.g. FreeBSD) support a 64-bit int64_t by default.
56
*/
57
#if defined(GROK_HAVE_FSEEKO) && !defined(fseek)
58
#define fseek fseeko
59
#define ftell ftello
60
#endif
61
#if defined(_WIN32)
62
#define GRK_FSEEK(stream, offset, whence) _fseeki64(stream,
/* __int64 */
offset, whence)
63
#define GRK_FTELL(stream)
/* __int64 */
_ftelli64(stream)
64
#else
65
#define GRK_FSEEK(stream, offset, whence) fseek(stream, offset, whence)
66
#define GRK_FTELL(stream) ftell(stream)
67
#endif
68
#if defined(__GNUC__)
69
#define GRK_RESTRICT __restrict__
70
#else
71
#define GRK_RESTRICT
/* GRK_RESTRICT */
72
#endif
73
#ifdef __has_attribute
74
#if __has_attribute(no_sanitize)
75
#define GROK_NOSANITIZE(kind) __attribute__((no_sanitize(kind)))
76
#endif
77
#endif
78
#ifndef GROK_NOSANITIZE
79
#define GROK_NOSANITIZE(kind)
80
#endif
81
82
#define CMS_NO_REGISTER_KEYWORD 1
83
#include "lcms2.h"
84
85
#include "
grok_private.h
"
86
#include "
ILogger.h
"
87
#include <
Logger.h
>
88
#include "
simd.h
"
89
#include "
ThreadPool.hpp
"
90
#include "packer.h"
91
#include "
MinHeap.h
"
92
#include "
SequentialCache.h
"
93
#include "
SparseCache.h
"
94
#include "
CodeStreamLimits.h
"
95
#include "
geometry.h
"
96
#include "
MemManager.h
"
97
#include "
buffer.h
"
98
#include "
minpf_plugin_manager.h
"
99
#include "
plugin_interface.h
"
100
#include "
ICacheable.h
"
101
#include "
TileSet.h
"
102
#include "
GrkObjectWrapper.h
"
103
#include "
ChronoTimer.h
"
104
#include "
testing.h
"
105
#include "
MemStream.h
"
106
#include "
GrkMatrix.h
"
107
#include "
GrkImage.h
"
108
#include "
StripCache.h
"
109
#include "
grk_exceptions.h
"
110
#include "
SparseBuffer.h
"
111
#include "
BitIO.h
"
112
#include "
BufferedStream.h
"
113
#include "
Profile.h
"
114
#include "
LengthCache.h
"
115
#include "
PLMarkerMgr.h
"
116
#include "
PLCache.h
"
117
#include "
SIZMarker.h
"
118
#include "
PPMMarker.h
"
119
#include "
SOTMarker.h
"
120
#include "
CodeStream.h
"
121
#include "
CodingParams.h
"
122
#include "
CodeStreamCompress.h
"
123
#include "
CodeStreamDecompress.h
"
124
#include "
FileFormat.h
"
125
#include "
FileFormatCompress.h
"
126
#include "
FileFormatDecompress.h
"
127
#include "
BitIO.h
"
128
#include "
TagTree.h
"
129
#include "
t1_common.h
"
130
#include "
T1Interface.h
"
131
#include "
Codeblock.h
"
132
#include "
PacketParser.h
"
133
#include "
ResSimple.h
"
134
#include "
Precinct.h
"
135
#include "
Subband.h
"
136
#include "
Resolution.h
"
137
#include "
BlockExec.h
"
138
#include "
ImageComponentFlow.h
"
139
#include "
Scheduler.h
"
140
#include "
SparseCanvas.h
"
141
#include "
TileComponentWindow.h
"
142
#include "
WaveletCommon.h
"
143
#include "
WaveletReverse.h
"
144
#include "
WaveletFwd.h
"
145
#include "
PacketIter.h
"
146
#include "
PacketManager.h
"
147
#include "
ImageComponentFlow.h
"
148
#include "
TileComponent.h
"
149
#include "
mct.h
"
150
#include "
TileProcessor.h
"
151
#include "
TileCache.h
"
152
#include "
T2Compress.h
"
153
#include "
T2Decompress.h
"
154
#include "
grk_intmath.h
"
155
#include "
plugin_bridge.h
"
156
#include "
RateInfo.h
"
157
#include "
T1Factory.h
"
158
#include "
DecompressScheduler.h
"
159
#include "
CompressScheduler.h
"
160
161
#if(defined(__aarch64__) || defined(_M_ARM64)) && !defined(__ARM_FEATURE_SVE2) && \
162
!defined(__ARM_FEATURE_SVE2)
163
#define HWY_DISABLED_TARGETS (HWY_SVE | HWY_SVE2 | HWY_SVE_256 | HWY_SVE2_128)
164
#endif
BitIO.h
BlockExec.h
BufferedStream.h
ChronoTimer.h
CodeStream.h
CodeStreamCompress.h
CodeStreamDecompress.h
CodeStreamLimits.h
Codeblock.h
CodingParams.h
CompressScheduler.h
DecompressScheduler.h
FileFormat.h
The JPEG 2000 file format Reader/Writer (JP2)
FileFormatCompress.h
FileFormatDecompress.h
GrkImage.h
GrkMatrix.h
GrkObjectWrapper.h
ICacheable.h
ILogger.h
ImageComponentFlow.h
LengthCache.h
Logger.h
MemManager.h
MemStream.h
MinHeap.h
PLCache.h
PLMarkerMgr.h
PPMMarker.h
PacketIter.h
Implementation of a packet iterator (PI)
PacketManager.h
PacketParser.h
Precinct.h
Profile.h
RateInfo.h
ResSimple.h
Resolution.h
SIZMarker.h
SOTMarker.h
Scheduler.h
SequentialCache.h
SparseBuffer.h
SparseCache.h
SparseCanvas.h
StripCache.h
Subband.h
T1Factory.h
T1Interface.h
T2Compress.h
T2Decompress.h
TagTree.h
ThreadPool.hpp
TileCache.h
TileComponent.h
TileComponentWindow.h
TileProcessor.h
TileSet.h
WaveletCommon.h
WaveletFwd.h
WaveletReverse.h
buffer.h
geometry.h
grk_exceptions.h
grk_intmath.h
grok_private.h
mct.h
minpf_plugin_manager.h
plugin_bridge.h
plugin_interface.h
simd.h
t1_common.h
testing.h
Generated by
1.10.0