Grok 10.0.5
T2Compress.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2023 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
22#pragma once
23
24namespace grk
25{
26struct TileProcessor;
27
31struct T2Compress
32{
33 T2Compress(TileProcessor* tileProc);
34
35 /*
36 Encode the packets of a tile to a destination buffer
37 @param tileno number of the tile encoded
38 @param maxlayers maximum number of layers
39 @param dest the destination buffer
40 @param p_data_written amount of data written
41 @param first_poc_tile_part true if first POC tile part, otherwise false
42 @param tppos The position of the tile part flag in the progression order
43 @param pino packet iterator number
44 */
45 bool compressPackets(uint16_t tileno, uint16_t maxlayers, BufferedStream* stream,
46 uint32_t* p_data_written, bool first_poc_tile_part, uint32_t tppos,
47 uint32_t pino);
48
58 bool compressPacketsSimulate(uint16_t tileno, uint16_t maxlayers, uint32_t* p_data_written,
59 uint32_t max_len, uint32_t tppos, PLMarkerMgr* markers,
60 bool isFinal);
61
62 private:
63 TileProcessor* tileProcessor;
64
73 bool compressPacket(TileCodingParams* tcp, PacketIter* pi, BufferedStream* stream,
74 uint32_t* p_data_written);
75
85 bool compressPacketSimulate(TileCodingParams* tcp, PacketIter* pi, uint32_t* p_data_written,
86 uint32_t len, PLMarkerMgr* markers);
87
88 bool compressHeader(BitIO* bio, Resolution* res, uint16_t layno, uint64_t precinctIndex);
89};
90
91} // namespace grk
BufferedStream * stream
Definition BitIO.h:88
uint64_t precinctIndex
Definition BlockExec.h:78
uint32_t len
Definition Codeblock.h:38
grk_ppx * markers
ppm markers data (table indexed by Zppm)
Definition PPMMarker.h:61
uint16_t layno
Definition PacketIter.h:259
uint16_t tileno
Definition PacketManager.h:96
TileProcessor * tileProcessor
Definition PacketManager.h:100
uint32_t pino
Compression Only Current packet iterator number.
Definition TileProcessor.h:121
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20