Grok  7.6.6
T2Compress.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2021 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 
24 namespace grk {
25 
26 struct TileProcessor;
27 
31 struct T2Compress {
32  T2Compress(TileProcessor *tileProc);
33 
34  /*
35  Encode the packets of a tile to a destination buffer
36  @param tileno number of the tile encoded
37  @param maxlayers maximum number of layers
38  @param dest the destination buffer
39  @param p_data_written amount of data written
40  @param first_poc_tile_part true if first POC tile part, otherwise false
41  @param tppos The position of the tile part flag in the progression order
42  @param pino packet iterator number
43  */
44  bool compress_packets(uint16_t tileno, uint16_t maxlayers,
45  BufferedStream *stream, uint32_t *p_data_written,
46  bool first_poc_tile_part, uint32_t tppos,
47  uint32_t pino);
48 
58  bool compress_packets_simulate(uint16_t tileno, uint16_t maxlayers,
59  uint32_t *p_data_written, uint32_t max_len, uint32_t tppos,
60  PacketLengthMarkers *markers);
61 
62 private:
64 
74  BufferedStream *stream, uint32_t *p_data_written);
75 
86  uint32_t *p_data_written, uint32_t len,
87  PacketLengthMarkers *markers);
88 
89 };
90 
91 }
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: BitIO.cpp:23
Byte input-output stream.
Definition: BufferedStream.h:38
Packet iterator.
Definition: PacketIter.h:217
Definition: LengthMarkers.h:88
Tier-2 coding.
Definition: T2Compress.h:31
bool compress_packets_simulate(uint16_t tileno, uint16_t maxlayers, uint32_t *p_data_written, uint32_t max_len, uint32_t tppos, PacketLengthMarkers *markers)
Simulate compressing packets of a tile to a destination buffer.
Definition: T2Compress.cpp:72
bool compress_packet(TileCodingParams *tcp, PacketIter *pi, BufferedStream *stream, uint32_t *p_data_written)
Encode a packet of a tile to a destination buffer.
Definition: T2Compress.cpp:138
bool compress_packets(uint16_t tileno, uint16_t maxlayers, BufferedStream *stream, uint32_t *p_data_written, bool first_poc_tile_part, uint32_t tppos, uint32_t pino)
Definition: T2Compress.cpp:34
bool compress_packet_simulate(TileCodingParams *tcp, PacketIter *pi, uint32_t *p_data_written, uint32_t len, PacketLengthMarkers *markers)
Encode a packet of a tile to a destination buffer.
Definition: T2Compress.cpp:561
T2Compress(TileProcessor *tileProc)
Definition: T2Compress.cpp:29
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:121
Tile compressor/decompressor.
Definition: TileProcessor.h:70