Grok  7.6.6
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 
28 struct T2Decompress {
29  T2Decompress(TileProcessor *tileProc);
30 
38  bool decompress_packets(uint16_t tileno, ChunkBuffer *src_buf,
39  uint64_t *data_read);
40 
41 private:
51  bool decompress_packet(TileCodingParams *tcp, const PacketIter *pi, ChunkBuffer *src_buf,
52  uint64_t *data_read);
53 
54  bool skip_packet(TileCodingParams *p_tcp, PacketIter *p_pi, ChunkBuffer *src_buf,
55  uint64_t *p_data_read);
56 
57  bool read_packet_header(TileCodingParams *p_tcp, const PacketIter *p_pi,
58  bool *p_is_data_present, ChunkBuffer *src_buf,
59  uint64_t *p_data_read);
60 
61  bool read_packet_data(Resolution *l_res, const PacketIter *p_pi,
62  ChunkBuffer *src_buf, uint64_t *p_data_read);
63 
64  bool skip_packet_data(Resolution *l_res, PacketIter *p_pi,
65  uint64_t *p_data_read, uint64_t max_length);
66 
67  void init_seg(DecompressCodeblock *cblk, uint32_t index, uint8_t cblk_sty,
68  bool first);
69 
70 };
71 
72 }
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: BitIO.cpp:23
Definition: ChunkBuffer.h:29
Definition: T1Structs.h:137
Packet iterator.
Definition: PacketIter.h:217
Definition: T1Structs.h:228
Tier-2 decoding.
Definition: T2Decompress.h:28
TileProcessor * tileProcessor
Definition: T2Decompress.h:42
bool read_packet_data(Resolution *l_res, const PacketIter *p_pi, ChunkBuffer *src_buf, uint64_t *p_data_read)
Definition: T2Decompress.cpp:505
bool skip_packet(TileCodingParams *p_tcp, PacketIter *p_pi, ChunkBuffer *src_buf, uint64_t *p_data_read)
Definition: T2Decompress.cpp:583
void init_seg(DecompressCodeblock *cblk, uint32_t index, uint8_t cblk_sty, bool first)
Definition: T2Decompress.cpp:175
bool read_packet_header(TileCodingParams *p_tcp, const PacketIter *p_pi, bool *p_is_data_present, ChunkBuffer *src_buf, uint64_t *p_data_read)
Definition: T2Decompress.cpp:210
T2Decompress(TileProcessor *tileProc)
Definition: T2Decompress.cpp:28
bool decompress_packets(uint16_t tileno, ChunkBuffer *src_buf, uint64_t *data_read)
Decompress the packets of a tile from a source buffer.
Definition: T2Decompress.cpp:32
bool skip_packet_data(Resolution *l_res, PacketIter *p_pi, uint64_t *p_data_read, uint64_t max_length)
Definition: T2Decompress.cpp:611
bool decompress_packet(TileCodingParams *tcp, const PacketIter *pi, ChunkBuffer *src_buf, uint64_t *data_read)
Decompress a packet of a tile from a source buffer.
Definition: T2Decompress.cpp:151
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