Grok  7.6.3
T1Part1.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 
21 namespace grk {
22 
23 namespace t1_part1 {
24 
25 class T1Part1: public T1Interface {
26 public:
27  T1Part1(bool isCompressor, uint32_t maxCblkW, uint32_t maxCblkH);
28  virtual ~T1Part1();
29 
30  bool compress(CompressBlockExec *block);
31  bool decompress(DecompressBlockExec *block);
32 
33 private:
34  void preCompress(CompressBlockExec *block, grk_tile *tile, uint32_t &max);
35  T1 *t1;
36 };
37 }
38 }
grk::CompressBlockExec::resno
uint8_t resno
Definition: T1Structs.h:292
grk::cblk_enc::passes
pass_enc * passes
Definition: t1_common.h:81
t1_common.h
grk::CompressBlockExec
Definition: T1Structs.h:281
grk::cblk_enc
Definition: t1_common.h:79
grk::cblk_dec::y1
uint32_t y1
Definition: t1_common.h:100
grk::CompressBlockExec::compno
uint16_t compno
Definition: T1Structs.h:291
grk::BlockExec::cblk_sty
uint32_t cblk_sty
Definition: T1Structs.h:257
grk::cblk_dec::seg_buffers
seg_data_chunk * seg_buffers
Definition: t1_common.h:99
grk::T1::allocate_buffers
bool allocate_buffers(uint32_t w, uint32_t h)
Definition: T1.cpp:280
grk::BlockExec::y
uint32_t y
Definition: T1Structs.h:261
grk::CompressBlockExec::tiledp
int32_t * tiledp
Definition: T1Structs.h:290
grk::BlockExec::band_orientation
eBandOrientation band_orientation
Definition: T1Structs.h:255
grk::cblk_dec::numbps
uint32_t numbps
Definition: t1_common.h:101
grk::cblk_dec::numSegments
uint32_t numSegments
Definition: t1_common.h:102
grk::CompressBlockExec::mct_norms
const double * mct_norms
Definition: T1Structs.h:298
grk::T1::cblkdatabuffersize
uint32_t cblkdatabuffersize
Definition: T1.h:65
grk::seg
Definition: t1_common.h:92
T1.h
grk::t1_part1::T1Part1::preCompress
void preCompress(CompressBlockExec *block, grk_tile *tile, uint32_t &max)
Definition: T1Part1.cpp:57
testing.h
grk::BlockExec::x
uint32_t x
Definition: T1Structs.h:260
grk::t1_part1::T1Part1::t1
T1 * t1
Definition: T1Part1.h:35
grk::seg_data_chunk
Definition: t1_common.h:87
grk::CompressBlockExec::mct_numcomps
uint16_t mct_numcomps
Definition: T1Structs.h:302
grk::cblk_enc::y0
uint32_t y0
Definition: t1_common.h:82
T1_NMSEDEC_FRACBITS
#define T1_NMSEDEC_FRACBITS
Definition: t1_common.h:51
grk::DecompressBlockExec::cblk
DecompressCodeblock * cblk
Definition: T1Structs.h:275
grk::cblk_enc::x0
uint32_t x0
Definition: t1_common.h:82
grk::T1::data_stride
uint32_t data_stride
Definition: T1.h:61
grk::t1_part1::T1Part1::compress
bool compress(CompressBlockExec *block)
Definition: T1Part1.cpp:96
grk::grk_tile::comps
TileComponent * comps
Definition: TileProcessor.h:35
grk::BlockExec::stepsize
float stepsize
Definition: T1Structs.h:256
smr_abs
#define smr_abs(x)
Definition: t1_common.h:107
grk::CompressBlockExec::tile
grk_tile * tile
Definition: T1Structs.h:287
grk::cblk_enc::x1
uint32_t x1
Definition: t1_common.h:82
grk::cblk_dec::x1
uint32_t x1
Definition: t1_common.h:100
grk::BlockExec::qmfbid
uint8_t qmfbid
Definition: T1Structs.h:258
grk::grk_rectangle::width
T width() const
Definition: util.h:169
grk::DecompressCodeblock::getSegBuffersLen
size_t getSegBuffersLen()
Definition: T1Structs.cpp:444
grk::t1_part1::T1Part1::~T1Part1
virtual ~T1Part1()
Definition: T1Part1.cpp:33
grk::CompressBlockExec::cblk
CompressCodeblock * cblk
Definition: T1Structs.h:286
grk::cblk_enc::y1
uint32_t y1
Definition: t1_common.h:82
grk_cblk_dec_compressed_data_pad_right
const uint8_t grk_cblk_dec_compressed_data_pad_right
< Space for a fake FFFF marker
Definition: t1_common.h:37
grk
Copyright (C) 2016-2021 Grok Image Compression Inc.
Definition: BitIO.cpp:23
to_smr
#define to_smr(x)
Definition: t1_common.h:109
grk::pass_enc::distortiondec
double distortiondec
Definition: t1_common.h:74
grk::CompressBlockExec::distortion
double distortion
Definition: T1Structs.h:289
grk::cblk_enc::numbps
uint32_t numbps
Definition: t1_common.h:83
grk::cblk_dec::segs
seg * segs
Definition: t1_common.h:98
grk_includes.h
grk::cblk_dec::y0
uint32_t y0
Definition: t1_common.h:100
grk::grk_tile
Definition: TileProcessor.h:31
grk::cblk_dec
Definition: t1_common.h:97
grk::T1::data
int32_t * data
Definition: T1.h:58
grk::cblk_enc::data
uint8_t * data
Definition: t1_common.h:80
grk::T1::compress_cblk
double compress_cblk(cblk_enc *cblk, uint32_t max, uint8_t orientation, uint16_t compno, uint8_t level, uint8_t qmfbid, double stepsize, uint32_t cblksty, const double *mct_norms, uint16_t mct_numcomps, bool doRateControl)
Definition: T1.cpp:740
grk::seg_data_chunk::buf
uint8_t * buf
Definition: t1_common.h:88
grk::T1::decompress_cblk
bool decompress_cblk(cblk_dec *cblk, uint8_t orientation, uint32_t cblksty)
Definition: T1.cpp:1318
grk::BlockExec::tilec
TileComponent * tilec
Definition: T1Structs.h:253
grk::T1
Definition: T1.h:33
grk::grk_realloc
void * grk_realloc(void *ptr, size_t new_size)
Reallocate memory blocks.
Definition: MemManager.cpp:135
grk::t1_part1::T1Part1
Definition: T1Part1.h:25
grk::T1::cblkdatabuffer
uint8_t * cblkdatabuffer
Definition: T1.h:63
grk::CompressBlockExec::inv_step
int32_t inv_step
Definition: T1Structs.h:296
grk::t1_part1::T1Part1::decompress
bool decompress(DecompressBlockExec *block)
Definition: T1Part1.cpp:142
grk::t1_part1::int_fix_mul_t1
static int32_t int_fix_mul_t1(int32_t a, int32_t b)
Multiply two fixed-point numbers.
Definition: T1Part1.cpp:43
T1Interface.h
grk::seg_data_chunk::len
uint32_t len
Definition: t1_common.h:89
grk::T1::code_block_enc_deallocate
void code_block_enc_deallocate(cblk_enc *p_code_block)
ENCODE ////////////////////////////////////////////////////.
Definition: T1.cpp:394
TileProcessor.h
T1Part1.h
grk::T1Interface
Definition: T1Interface.h:23
grk::t1_part1::T1Part1::T1Part1
T1Part1(bool isCompressor, uint32_t maxCblkW, uint32_t maxCblkH)
Definition: T1Part1.cpp:29
grk::DecompressBlockExec
Definition: T1Structs.h:270
grk::cblk_enc::numPassesTotal
uint32_t numPassesTotal
Definition: t1_common.h:84
grk::TileComponent::postDecompress
bool postDecompress(int32_t *srcData, DecompressBlockExec *block, bool isHT)
Definition: TileComponent.cpp:332
grk::cblk_dec::x0
uint32_t x0
Definition: t1_common.h:100
grk::CompressBlockExec::doRateControl
bool doRateControl
Definition: T1Structs.h:288