Grok 10.0.5
PacketManager.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
18#pragma once
19
20namespace grk
21{
22class PacketManager
23{
24 public:
25 PacketManager(bool compression, GrkImage* img, CodingParams* cparams, uint16_t tilenumber,
26 J2K_T2_MODE t2_mode, TileProcessor* tileProc);
27 virtual ~PacketManager();
28 PacketIter* getPacketIter(uint32_t poc) const;
35 void enableTilePartGeneration(uint32_t pino, bool first_poc_tile_part, uint32_t tppos);
43 static void updateCompressParams(const GrkImage* p_image, CodingParams* p_cp, uint16_t tile_no);
44
45 IncludeTracker* getIncludeTracker(void);
46 uint32_t getNumProgressions(void);
47 TileProcessor* getTileProcessor(void);
48 GrkImage* getImage();
49 grk_rect32 getTileBounds(void);
50 CodingParams* getCodingParams(void);
51 J2K_T2_MODE getT2Mode(void);
52
53 private:
68 static void updateCompressTcpProgressions(CodingParams* p_cp, uint16_t num_comps,
69 uint16_t tileno, grk_rect32 tileBounds,
70 uint64_t max_precincts, uint8_t max_res,
71 uint32_t dx_min, uint32_t dy_min, bool poc);
90 static void getParams(const GrkImage* image, const CodingParams* p_cp, uint16_t tileno,
91 grk_rect32* tileBounds, uint32_t* dx_min, uint32_t* dy_min,
92 uint64_t* precincts, uint64_t* max_precincts, uint8_t* max_res,
93 uint32_t** precinctByComponent);
94 GrkImage* image;
95 CodingParams* cp;
96 uint16_t tileno;
97 IncludeTracker* includeTracker;
98 PacketIter* pi_;
99 J2K_T2_MODE t2Mode;
100 TileProcessor* tileProcessor;
101 grk_rect32 tileBounds_;
102};
103
104} // namespace grk
uint16_t tileno
Definition PacketManager.h:96
PacketIter * pi_
Definition PacketManager.h:98
IncludeTracker * includeTracker
Definition PacketManager.h:97
TileProcessor * tileProcessor
Definition PacketManager.h:100
grk_rect32 tileBounds_
Definition PacketManager.h:101
CodingParams * cp
Definition PacketManager.h:95
J2K_T2_MODE t2Mode
Definition PacketManager.h:99
std::vector< Precinct * > precincts
Definition Subband.h:40
uint32_t pino
Compression Only Current packet iterator number.
Definition TileProcessor.h:121
J2K_T2_MODE
Definition TileCache.h:37
grk_rect< uint32_t > grk_rect32
Definition TileCache.h:61
Copyright (C) 2016-2023 Grok Image Compression Inc.
Definition ICacheable.h:20
grk_image * image
Definition plugin_interface.h:63