Grok  7.6.6
TileComponent.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 #include <vector>
24 
25 #include "TileProcessor.h"
26 
27 namespace grk {
28 
29 // tile component
30 struct TileComponent : public grk_rect_u32 {
31  TileComponent();
33 
34  bool create_buffer(grk_rect_u32 *unreducedTileComp,grk_rect_u32 unreducedTileOrImageCompWindow);
35  bool init(bool isCompressor,
36  bool whole_tile,
37  grk_rect_u32 unreducedTileComp,
38  grk_rect_u32 unreducedTileOrImageCompWindow,
39  uint8_t prec,
40  CodingParams *cp,
41  TileCodingParams *tcp,
43  grk_plugin_tile *current_plugin_tile);
44 
45  void allocSparseBuffer(uint32_t numres);
46  void release_mem(bool releaseBuffer);
47  bool subbandIntersectsAOI(uint8_t resno,
48  eBandOrientation orient,
49  const grk_rect_u32 *aoi) const;
50 
52  bool isWholeTileDecoding();
54  bool postDecompress(int32_t *srcData, DecompressBlockExec *block, bool isHT);
55 
56  Resolution *resolutions; /* resolutions information */
57  uint8_t numresolutions; /* number of resolution levels */
58  uint8_t resolutions_to_decompress; /* number of resolutions level to decompress (at max)*/
60 #ifdef DEBUG_LOSSLESS_T2
61  Resolution* round_trip_resolutions; /* round trip resolution information */
62 #endif
63 private:
64  template<typename F> bool postDecompressImpl(int32_t *srcData, DecompressBlockExec *block);
70 
71 };
72 
73 }
74 
75 
76 
77 
Definition: SparseBuffer.h:72
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: BitIO.cpp:23
eBandOrientation
Definition: T1Structs.h:36
Plugin tile.
Definition: grok.h:1254
Coding parameters.
Definition: CodingParams.h:238
Definition: T1Structs.h:268
Definition: T1Structs.h:228
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: CodingParams.h:121
Tile-component coding parameters.
Definition: CodingParams.h:49
Definition: TileComponent.h:30
uint8_t resolutions_decompressed
Definition: TileComponent.h:59
uint8_t numresolutions
Definition: TileComponent.h:57
void allocSparseBuffer(uint32_t numres)
Definition: TileComponent.cpp:187
TileComponentWindowBuffer< int32_t > * getBuffer() const
Definition: TileComponent.cpp:312
bool postDecompressImpl(int32_t *srcData, DecompressBlockExec *block)
Definition: TileComponent.cpp:355
ISparseBuffer * getSparseBuffer()
Definition: TileComponent.cpp:319
bool isWholeTileDecoding()
Definition: TileComponent.cpp:316
bool create_buffer(grk_rect_u32 *unreducedTileComp, grk_rect_u32 unreducedTileOrImageCompWindow)
Definition: TileComponent.cpp:269
bool subbandIntersectsAOI(uint8_t resno, eBandOrientation orient, const grk_rect_u32 *aoi) const
Definition: TileComponent.cpp:177
~TileComponent()
Definition: TileComponent.cpp:43
uint8_t resolutions_to_decompress
Definition: TileComponent.h:58
TileComponentCodingParams * m_tccp
Definition: TileComponent.h:69
TileComponent()
Definition: TileComponent.cpp:29
TileComponentWindowBuffer< int32_t > * buf
Definition: TileComponent.h:68
Resolution * resolutions
Definition: TileComponent.h:56
void release_mem(bool releaseBuffer)
Definition: TileComponent.cpp:46
ISparseBuffer * m_sa
Definition: TileComponent.h:65
bool wholeTileDecompress
Definition: TileComponent.h:66
bool m_is_encoder
Definition: TileComponent.h:67
bool init(bool isCompressor, bool whole_tile, grk_rect_u32 unreducedTileComp, grk_rect_u32 unreducedTileOrImageCompWindow, uint8_t prec, CodingParams *cp, TileCodingParams *tcp, TileComponentCodingParams *tccp, grk_plugin_tile *current_plugin_tile)
Initialize tile component in unreduced tile component coordinates (tile component coordinates take su...
Definition: TileComponent.cpp:73
bool postDecompress(int32_t *srcData, DecompressBlockExec *block, bool isHT)
Definition: TileComponent.cpp:323