Grok 10.0.1
T2Compress.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2016-2022 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
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, IBufferedStream* 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:
64
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
Definition: BitIO.h:33
Copyright (C) 2016-2022 Grok Image Compression Inc.
Definition: ICacheable.h:20
Definition: IBufferedStream.h:20
Definition: PLMarkerMgr.h:30
Packet iterator.
Definition: PacketIter.h:213
Definition: Resolution.h:25
Tier-2 coding.
Definition: T2Compress.h:32
bool compressPacket(TileCodingParams *tcp, PacketIter *pi, IBufferedStream *stream, uint32_t *p_data_written)
Encode a packet of a tile to a destination buffer.
Definition: T2Compress.cpp:340
bool compressPackets(uint16_t tileno, uint16_t maxlayers, IBufferedStream *stream, uint32_t *p_data_written, bool first_poc_tile_part, uint32_t tppos, uint32_t pino)
Definition: T2Compress.cpp:172
T2Compress(TileProcessor *tileProc)
Definition: T2Compress.cpp:25
bool compressHeader(BitIO *bio, Resolution *res, uint16_t layno, uint64_t precinctIndex)
Definition: T2Compress.cpp:202
bool compressPacketSimulate(TileCodingParams *tcp, PacketIter *pi, uint32_t *p_data_written, uint32_t len, PLMarkerMgr *markers)
Encode a packet of a tile to a destination buffer.
Definition: T2Compress.cpp:84
bool compressPacketsSimulate(uint16_t tileno, uint16_t maxlayers, uint32_t *p_data_written, uint32_t max_len, uint32_t tppos, PLMarkerMgr *markers, bool isFinal)
Simulate compressing packets of a tile to a destination buffer.
Definition: T2Compress.cpp:27
TileProcessor * tileProcessor
Definition: T2Compress.h:63
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: CodingParams.h:122
Definition: TileProcessor.h:78