Grok  7.6.3
T1HT.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 #pragma once
19 #include "T1Interface.h"
20 #include "stdint.h"
21 #include "testing.h"
22 #include "TileProcessor.h"
23 #include "T1Interface.h"
24 
25 
26 namespace grk {
27 
28 struct TileCodingParams;
29 
30 namespace t1_ht {
31 
32 
33 class T1HT: public T1Interface {
34 public:
35  T1HT(bool isCompressor, TileCodingParams *tcp, uint32_t maxCblkW, uint32_t maxCblkH);
36  virtual ~T1HT();
37 
38  bool compress(CompressBlockExec *block);
39  bool decompress(DecompressBlockExec *block);
40 
41 private:
42  void preCompress(CompressBlockExec *block, grk_tile *tile);
44 
45  uint32_t coded_data_size;
46  uint8_t *coded_data;
48  int32_t *unencoded_data;
49 
50  mem_fixed_allocator *allocator;
51  mem_elastic_allocator *elastic_alloc;
52 };
53 }
54 }
grk::t1_ht::T1HT::T1HT
T1HT(bool isCompressor, TileCodingParams *tcp, uint32_t maxCblkW, uint32_t maxCblkH)
Definition: T1HT.cpp:38
ojph::mem_fixed_allocator
Definition: ojph_mem.h:53
grk::t1_ht::T1HT
Definition: T1HT.h:33
grk::CompressBlockExec
Definition: T1Structs.h:281
grk::TileCodingParams
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: CodingParams.h:121
grk::t1_ht::T1HT::preCompress
void preCompress(CompressBlockExec *block, grk_tile *tile)
Definition: T1HT.cpp:59
grk::CompressBlockExec::compno
uint16_t compno
Definition: T1Structs.h:291
grk::shift
const double shift
Definition: RateControl.cpp:154
grk::CompressBlockExec::tiledp
int32_t * tiledp
Definition: T1Structs.h:290
ojph_block_decoder.h
ojph::local::ojph_decode_codeblock
bool ojph_decode_codeblock(ui8 *coded_data, ui32 *decoded_data, ui32 missing_msbs, ui32 num_passes, ui32 lengths1, ui32 lengths2, ui32 width, ui32 height, ui32 stride)
Decodes one codeblock, processing the cleanup, siginificance propagation, and magnitude refinement pa...
Definition: ojph_block_decoder.cpp:989
grk::t1_ht::T1HT::coded_data
uint8_t * coded_data
Definition: T1HT.h:46
testing.h
grk::t1_ht::T1HT::unencoded_data
int32_t * unencoded_data
Definition: T1HT.h:48
ojph_mem.h
grk::t1_ht::T1HT::~T1HT
virtual ~T1HT()
Definition: T1HT.cpp:53
grk_cblk_dec_compressed_data_pad_ht
const uint8_t grk_cblk_dec_compressed_data_pad_ht
Definition: T1HT.cpp:32
grk::DecompressBlockExec::cblk
DecompressCodeblock * cblk
Definition: T1Structs.h:275
grk::Codeblock::numbps
uint32_t numbps
Definition: T1Structs.h:108
grk::grk_tile::comps
TileComponent * comps
Definition: TileProcessor.h:35
grk::t1_ht::T1HT::coded_data_size
uint32_t coded_data_size
Definition: T1HT.h:45
grk::t1_ht::T1HT::decompress
bool decompress(DecompressBlockExec *block)
Definition: T1HT.cpp:130
grk::t1_ht::T1HT::unencoded_data_size
uint32_t unencoded_data_size
Definition: T1HT.h:47
grk::CompressBlockExec::tile
grk_tile * tile
Definition: T1Structs.h:287
ojph::coded_lists::buf
ui8 * buf
Definition: ojph_mem.h:173
grk::BlockExec::qmfbid
uint8_t qmfbid
Definition: T1Structs.h:258
ojph::local::ojph_encode_codeblock
void ojph_encode_codeblock(ui32 *buf, ui32 missing_msbs, ui32 num_passes, ui32 width, ui32 height, ui32 stride, ui32 *lengths, ojph::mem_elastic_allocator *elastic, ojph::coded_lists *&coded)
Definition: ojph_block_encoder.cpp:463
grk::grk_rectangle::width
T width() const
Definition: util.h:169
T1HT.h
grk::CompressBlockExec::cblk
CompressCodeblock * cblk
Definition: T1Structs.h:286
ojph::local
Definition: ojph_block_decoder.cpp:50
ojph::coded_lists
Definition: ojph_mem.h:162
grk
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: BitIO.cpp:23
grk_includes.h
grk::grk_tile
Definition: TileProcessor.h:31
grk::BlockExec::tilec
TileComponent * tilec
Definition: T1Structs.h:253
ojph::mem_elastic_allocator
Definition: ojph_mem.h:178
grk::t1_ht::T1HT::allocator
mem_fixed_allocator * allocator
Definition: T1HT.h:50
grk::BlockExec::k_msbs
uint8_t k_msbs
Definition: T1Structs.h:263
ojph
Definition: ojph_block_decoder.cpp:49
T1Interface.h
ojph_block_encoder.h
TileProcessor.h
grk::T1Interface
Definition: T1Interface.h:23
grk::DecompressBlockExec
Definition: T1Structs.h:270
grk::CompressBlockExec::inv_step_ht
float inv_step_ht
Definition: T1Structs.h:297
grk::t1_ht::T1HT::compress
bool compress(CompressBlockExec *block)
Definition: T1HT.cpp:103
grk::TileComponent::postDecompress
bool postDecompress(int32_t *srcData, DecompressBlockExec *block, bool isHT)
Definition: TileComponent.cpp:332
grk::t1_ht::T1HT::elastic_alloc
mem_elastic_allocator * elastic_alloc
Definition: T1HT.h:51
grk::GRK_ERROR
void GRK_ERROR(const char *fmt,...)
Definition: logger.cpp:57
grk::t1_ht::T1HT::postDecompress
bool postDecompress(DecompressBlockExec *block)