Grok  9.5.0
T2Decompress.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  */
18 
19 #pragma once
20 
21 namespace grk
22 {
23 struct TileProcessor;
24 
29 {
30  T2Decompress(TileProcessor* tileProc);
31 
38  bool decompressPackets(uint16_t tileno, SparseBuffer* srcBuf, bool* truncated);
39 
40  private:
49  bool decompressPacket(TileCodingParams* tcp, const PacketIter* pi, SparseBuffer* srcBuf,
50  PacketInfo* packetInfo, bool skipData);
51  bool processPacket(TileCodingParams* tcp, PacketIter* pi, SparseBuffer* srcBuf);
52  bool readPacketHeader(TileCodingParams* p_tcp, const PacketIter* p_pi, bool* dataPresent,
53  SparseBuffer* srcBuf, uint32_t* dataRead, uint32_t* packetDataBytes);
54  bool readPacketData(Resolution* l_res, const PacketIter* p_pi, SparseBuffer* srcBuf);
55  void initSegment(DecompressCodeblock* cblk, uint32_t index, uint8_t cblk_sty, bool first);
56 };
57 
58 } // namespace grk
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: ICacheable.h:20
Definition: Codeblock.h:182
Definition: LengthCache.h:152
Packet iterator.
Definition: PacketIter.h:163
Definition: Resolution.h:24
Definition: SparseBuffer.h:28
Tier-2 decoding.
Definition: T2Decompress.h:29
TileProcessor * tileProcessor
Definition: T2Decompress.h:41
bool decompressPacket(TileCodingParams *tcp, const PacketIter *pi, SparseBuffer *srcBuf, PacketInfo *packetInfo, bool skipData)
Decompress a packet of a tile from a source buffer.
Definition: T2Decompress.cpp:178
bool processPacket(TileCodingParams *tcp, PacketIter *pi, SparseBuffer *srcBuf)
Definition: T2Decompress.cpp:55
bool decompressPackets(uint16_t tileno, SparseBuffer *srcBuf, bool *truncated)
Decompress the packets of a tile from a source buffer.
Definition: T2Decompress.cpp:118
T2Decompress(TileProcessor *tileProc)
Definition: T2Decompress.cpp:27
bool readPacketData(Resolution *l_res, const PacketIter *p_pi, SparseBuffer *srcBuf)
Definition: T2Decompress.cpp:503
void initSegment(DecompressCodeblock *cblk, uint32_t index, uint8_t cblk_sty, bool first)
Definition: T2Decompress.cpp:28
bool readPacketHeader(TileCodingParams *p_tcp, const PacketIter *p_pi, bool *dataPresent, SparseBuffer *srcBuf, uint32_t *dataRead, uint32_t *packetDataBytes)
Definition: T2Decompress.cpp:217
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: CodingParams.h:122
Tile processor for decompression and compression.
Definition: TileProcessor.h:77