Grok  7.6.0
T1HT.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2016-2020 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 "Tier1.h"
23 #include "TileProcessor.h"
24 #include "T1Interface.h"
25 
26 
27 namespace grk {
28 
29 struct TileCodingParams;
30 
31 namespace t1_ht {
32 
33 
34 class T1HT: public T1Interface {
35 public:
36  T1HT(bool isEncoder, TileCodingParams *tcp, uint32_t maxCblkW, uint32_t maxCblkH);
37  virtual ~T1HT();
38 
39  void preEncode(encodeBlockInfo *block, grk_tile *tile, uint32_t &max);
40  double compress(encodeBlockInfo *block, grk_tile *tile, uint32_t max,
41  bool doRateControl);
42 
45 
46 private:
47  uint32_t coded_data_size;
48  uint8_t *coded_data;
50  int32_t *unencoded_data;
51 
52  mem_fixed_allocator *allocator;
53  mem_elastic_allocator *elastic_alloc;
54 };
55 }
56 }
grk::t1_ht::T1HT
Definition: T1HT.h:34
grk::t1_ht::T1HT::decompress
bool decompress(decodeBlockInfo *block)
grk::TileCodingParams
Tile coding parameters : this structure is used to store coding/decoding parameters common to all til...
Definition: CodingParams.h:117
grk::t1_ht::T1HT::coded_data
uint8_t * coded_data
Definition: T1HT.h:48
testing.h
grk::t1_ht::T1HT::unencoded_data
int32_t * unencoded_data
Definition: T1HT.h:50
grk::t1_ht::T1HT::~T1HT
virtual ~T1HT()
grk::t1_ht::T1HT::coded_data_size
uint32_t coded_data_size
Definition: T1HT.h:47
grk::t1_ht::T1HT::unencoded_data_size
uint32_t unencoded_data_size
Definition: T1HT.h:49
grk::decodeBlockInfo
Definition: T1Interface.h:25
grk::t1_ht::T1HT::T1HT
T1HT(bool isEncoder, TileCodingParams *tcp, uint32_t maxCblkW, uint32_t maxCblkH)
grk
Copyright (C) 2016-2020 Grok Image Compression Inc.
Definition: BitIO.h:27
Tier1.h
grk::grk_tile
Definition: TileProcessor.h:180
grk::t1_ht::T1HT::compress
double compress(encodeBlockInfo *block, grk_tile *tile, uint32_t max, bool doRateControl)
grk::t1_ht::T1HT::allocator
mem_fixed_allocator * allocator
Definition: T1HT.h:52
grk::t1_ht::T1HT::preEncode
void preEncode(encodeBlockInfo *block, grk_tile *tile, uint32_t &max)
T1Interface.h
TileProcessor.h
grk::T1Interface
Definition: T1Interface.h:103
grk::encodeBlockInfo
Definition: T1Interface.h:58
grk::t1_ht::T1HT::elastic_alloc
mem_elastic_allocator * elastic_alloc
Definition: T1HT.h:53
grk::t1_ht::T1HT::postDecode
void postDecode(decodeBlockInfo *block)